^1 USER MANUAL ^2 PMAC DUAL-PORTED RAM ^3 8K x 16 bit Dual-Ported RAM ^4 3Ax-00PMAC-xUxx ^5 June 8, 2004 Single Source Machine Control Power // Flexibility // Ease of Use 21314 Lassen Street Chatsworth, CA 91311 // Tel. (818) 998-2095 Fax. (818) 998-7807 // www.deltatau.
Copyright Information © 2003 Delta Tau Data Systems, Inc. All rights reserved. This document is furnished for the customers of Delta Tau Data Systems, Inc. Other uses are unauthorized without written permission of Delta Tau Data Systems, Inc. Information contained in this manual may be updated from time-to-time due to product improvements, etc., and may not conform in every respect to former issues. To report errors or inconsistencies, call or email: Delta Tau Data Systems, Inc.
PMAC Dual-Ported RAM User Manual Table of Contents DUAL-PORTED RAM COMMUNICATIONS........................................................................................................1 Uses of DPRAM........................................................................................................................................................1 Setting up the PC Bus Dual-Ported RAM (Option 2)................................................................................................
PMAC Dual-Ported RAM User Manual ii Table of Contents
PMAC Dual-Ported RAM User Manual DUAL-PORTED RAM COMMUNICATIONS PMAC’s Option 2 provides an 8K x 16 bit dual-ported RAM that allows PMAC and its host to share an area of fast memory. For the PMAC PC and the PMAC Lite, Option 2 is a separate board that sits on the PC bus and cables to PMAC. For the PMAC VME, Option 2(V) consists of ICs added to the main board itself. Option 2 is not available for the PMAC STD. For all versions of the PMAC2, Option 2 consists of ICs added to the main board itself.
PMAC Dual-Ported RAM User Manual PMAC-PC OPTION 2 DUAL-PORTED RAM INTERFACE BOARD 4.19 in (106.4 mm) P4 U10 3.88 in (98.5 MM) P3 7.50 in (190.5 mm) To install the board, connect the cables as previously stated with the boards removed from your computer. Next, install both boards, plugging in PMAC first and then the DPRAM board in the slot next to it. Turn on your computer and establish communication with PMAC using the PMAC Executive software.
PMAC Dual-Ported RAM User Manual System Memory Map (Most Compatible) Decimal Hex 0 16K 32K 48K 64K 0000 04000 08000 0C000 10000 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 624K 640K 9C000 A0000 ⋅ ⋅ 688K 704K AC000 B0000 ⋅ ⋅ ⋅ ⋅ 944K 960K EC000 F0000 ⋅ ⋅ 1008K FC000 Function Standard 640K RAM For DOS, Programs, etc.
PMAC Dual-Ported RAM User Manual Example: To configure the DPRAM to start at $EC000 in PC memory. There is 8K of DPRAM and 24-bit addressing is needed. To configure and enable the DPRAM, either use the PMAC Executive program’s dual-port RAM configuration feature or send the following commands directly to PMAC. WX:$786,$0000E,$000C5 ;configure DPRAM for $EC000 save ;save configuration to EAROM $$$ ;re-initialize the card The last hex digit 5 comes from the above binary number 0101 = $5 Unused 24-bit Addr.
PMAC Dual-Ported RAM User Manual Before choosing the DPRAM starting address, determine what memory space is available in the VME system (so that PMAC’s DPRAM does not interfere with existing RAM or other devices on the VME bus). Just like setting up the base address of PMAC VME, the starting address of DPRAM is done through software, but in a somewhat different manner. The best way to describe how to set up DPRAM is to give an example.
PMAC Dual-Ported RAM User Manual Note: This dynamic addressing scheme provides the capability for addressing up to 1M byte of DPRAM in 16K byte blocks, by changing the value of base + $121 on the fly. However, PMAC VME currently utilizes only a single 16 Kbyte block (8K x 16), so the base + $121 register only has to be written to once every time PMAC is powered up or reset. At this point, the starting address of DPRAM is fully specified.
PMAC Dual-Ported RAM User Manual Note: DPRAM only occupies the low 16 bits (0-15) of each 24-bit word in PMAC. PMAC memory locations $D000 to $D1FF are reserved for fixed uses. The range of $D200 to $DFFF is open for general-purpose use. From the PMAC side, locations in DPRAM are typically accessed using M-variables. An M-variable is defined to each word to be used (such as M120->X:$D200,0,16,S), then these M-variables are used in programs. They can either be written to (e.g. M120=P1+P5) or read from (e.g.
PMAC Dual-Ported RAM User Manual PMAC Address Host Address Y:$D000 X:$D000 Y:$D001 X:$D001 Y:$D200 X:$D200 ..... ..... Y:$DFFF X:$DFFF $1FC000 $1FC002 $1FC004 $1FC006 $1FC800 $1FC802 ..... ..... $1FFFFC $1FFFFE The following two equations can be helpful to help calculate both PMAC and host addresses for DPRAM: Host address = Host start address + 4 x (PMAC address - $D000) + offset where: offset = 0 for accessing Y memory, and offset = 2 for accessing X memory.
PMAC Dual-Ported RAM User Manual M130->D:$28 M131->DP:$D000 OPEN PLC 1 CLEAR M131=M130/(I108*32) CLOSE I5=2 ENABLE PLC 1 ;motor #1 actual position ;point to a location in DPRAM ;update motor position (in counts) in DPRAM ; allow PLC 1 to be enabled ; “turn on” PLC 1 Now, read the location corresponding to M131 ($D000 in PMAC's memory) in PC memory and extract this position information so that the C program can use it.
PMAC Dual-Ported RAM User Manual while (peek (0xD400, 0x0801) == 1); /* wait until position received */ *x = X; *y = Y; *z = Z; poke (0xD400, 0x0801,1); /*send position flag } 10 Dual-Ported RAM Communications
PMAC Dual-Ported RAM User Manual DUAL-PORTED RAM AUTOMATIC FUNCTIONS PMAC provides many facilities for using the dual-ported RAM (DPRAM) to pass information back and forth between the host computer and PMAC.
PMAC Dual-Ported RAM User Manual DUAL-PORTED RAM DATA GATHERING FORMATS 24 BITS PMAC WORD: DPRAM BYTE NO. (RELATIVE) 0 1 2 3 BIT # 23 S 16 15 Byte 2 87 Byte 1 0 Byte 0 Byte 0 Byte 1 S Byte 2 S = Sign bit S S S S S S S S (SIGN EXTENSION) 48 BITS PMAC Y: WORD PMAC X: WORD DPRAM BYTE NO.
PMAC Dual-Ported RAM User Manual Register Addresses Address 0x0000 (Y:$D000) 0x0002 (X:$D000) Description Control Panel Motor/Coordinate System Enable Mask (Set bit to enable; PMAC clears on taking action) Bit 0: Motor/Coordinate System # 1 Bit 1: Motor/Coordinate System # 2 Bit 2: Motor/Coordinate System # 3 Bit 3: Motor/Coordinate System # 4 Bit 4: Motor/Coordinate System # 5 Bit 5: Motor/Coordinate System # 6 Bit 6: Motor/Coordinate System # 7 Bit 7: Motor/Coordinate System # 8 Bits 8-15: Not Used Coo
PMAC Dual-Ported RAM User Manual Servo Fixed Data Buffer PMAC can provide key motor servo data to the DPRAM where it can be accessed easily and quickly by the host computer. PMAC copies data from key motor registers into fixed registers in the DPRAM. The copying is attempted every I19 servo cycles, and is done for motors 1 through n, where n is determined by variable I59. Setting I48 to 1 and issuing the GATHER command enables this feature.
PMAC Dual-Ported RAM User Manual Register Map Global Registers for Servo Fixed Data Reporting Buffer Address (0x0024) Y:$D009 (0x0026) X:$D009 (0x0028,A) $D00A (0x002C,E) $D00B (0x0030-46) $D00C-11 Description Host Status to PMAC: Bit 0 = 1 is Host-Busy, reading buffer; = 0 is not busy Bits 1-15 (reserved for future use) PMAC Status to Host: Bits 0-14 Servo Timer Bit 15 = 1 is PMAC-Busy updating buffer; = 0 is not busy Global Status Bits (from Y:$0003) Low 24 Bits (First word returned on? command) Global
PMAC Dual-Ported RAM User Manual Motor # Host Address PMAC Address Source Address 1 0x00680x006A $D01A X:$003A Motor Previous DAC (32 bits; 1/256 DAC bits) 2 3 4 5 6 0x00A40x00A6 $D029 X:$0076 0x00E00x00E2 $D038 X:$00B2 0x011C0x011E $D047 X:$00EE 0x01580x015A $D056 X:$012A 0x01940x0196 $D065 X:$0166 7 8 0x01D00x01D2 $D074 X:$01A2 0x020C0x020E $D083 X:$01DE Motor Servo Status (32 bits; low 24 bits used) 1st word returned on ? command Motor/C.S.
PMAC Dual-Ported RAM User Manual Background Fixed Data Buffer PMAC can provide information of interest of the host computer through the DPRAM as a background task. This feature is enabled if I49=1. If this feature is enabled, each time PMAC executes its housekeeping tasks in background, which it does between each scan of each PLC program, it will update the buffer in DPRAM if the host has read the previous contents of the buffer.
PMAC Dual-Ported RAM User Manual Motor/Coordinate System Specific Registers for Background Fixed Data Buffer Motor/C.S. # Host Address PMAC Address Source Address Motor/C.S.
PMAC Dual-Ported RAM User Manual Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S.
PMAC Dual-Ported RAM User Manual Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S. # Host Address PMAC Address Source A Source B Source C Motor/C.S.
PMAC Dual-Ported RAM User Manual Coordinate System Time Remaining in move when I13 > 0 (2*msec) 1 2 3 4 5 6 7 Motor/C.S. # Host Address PMAC Address Source Address Motor/C.S. # Host Address 0x02B80x02BA $D0AE X:$0020 0x03340x0336 $D0CD X:$005C 0x03B00x03B2 $D0EC X:$0098 0x042C0x042E $D10B X:$00D4 0x04A80x04AA $D12A X:$0110 0x05240x0526 $D149 X:$014C 0x05A00x05A2 $D168 X:$0188 Coordinate System Time Remaining in accel/decel when I13 > 0 (2*msec) 1 2 3 4 5 6 7 PMAC Address Motor/C.S.
PMAC Dual-Ported RAM User Manual General Description The buffer has three parts. The first part is the header: four 16-bit words (eight host addresses) containing handshake information and defining the location and size of the rest of the table. This is at a fixed location in DPRAM (see table at end of section). The second part contains the address specifications of the PMAC registers to be copied into DPRAM.
PMAC Dual-Ported RAM User Manual Each background cycle, between each scan of each PLC program, PMAC will try to copy data into each variable in the buffer. Bit 15 of each variable’s data type specifier controls whether or not PMAC is allowed to update that particular variable’s value. PMAC will skip updating any variable that has bit of its data type specifier set to 1. Any variable that has bit 15 set to 0 will be updated.
PMAC Dual-Ported RAM User Manual Background Variable Data Write Buffer The Background Variable Data Write Buffer is essentially the opposite of the Background Variable Data Read Buffer described above. It allows the user to write to up to 32 user-specified registers or particular bits in registers to PMAC without using a communications port (PC Bus, serial, or DPRAM ASCII I/O).
PMAC Dual-Ported RAM User Manual Data Format PMAC X, Y, and Special registers will use the long 32-bit data 1word. The 32-bit Data 2 word is not used in this case. For PLCC function blocks, only X (bits 0-2 = 6) or Y (bits 0-2 = 4) memory writes are allowed. For a 48-bit PMAC integer or float point value, The L (Long) format should be used. L will have the lower 32 bits of the total 48 bits in the long 32-bit data 1 word and the upper 16 bits in the lower 32-bit data 2 word. PCOMM.
PMAC Dual-Ported RAM User Manual Note: If the {size} requested in the DEFINE GATHER {size} command is smaller than required to hold an even multiple of the requested data, the actual data storage will go beyond the requested {size} to the next higher multiple of memory words required to hold the data. For example, if gathering one 24-bit value and one 48-bit value, three words of memory is needed.
PMAC Dual-Ported RAM User Manual DPRAM ASCII Communications PMAC can perform ASCII communications through the dual-ported RAM, as well as through the normal bus communications port and the serial port. The DPRAM ASCII communications is enabled by setting I58 to 1. This permits the host to send an ASCII command to PMAC by placing the command string characters in consecutive registers in the DPRAM and setting a flag to notify PMAC of the command.
PMAC Dual-Ported RAM User Manual The buffer in DPRAM is limited to 159 characters; however, a command line of up to 200 characters can be sent by using the DPRAM buffer twice. The first 159 characters are placed in DPRAM without a terminating NULL character and the host-output-complete flag is set; then the remaining up to 41 characters are sent with a NULL character to terminate, and the host-output-complete flag is set again To read a response: 1.
PMAC Dual-Ported RAM User Manual Register Map Address 0x062C (Y:$D18B) 0x062E (X:$D18B) 0x06300x06CE ($D18C$D1B3) Address 0x06D0 (Y:$D1B4) 0x06D2 (X:$D1B4) 0x06D40x07D2 ($D1B5D1F4) ASCII Host-to-PMAC Transfer Description ASCII Host-Output Control Word Bit 0: Host-Output-Control Flag = 0: Host Output Enable. Set to 0 by PMAC when it has processed a command string. = 1: Host Output Complete. Set to 1 by the Host when it has loaded a full command string.
PMAC Dual-Ported RAM User Manual When PMAC receives a binary-format program command in DPRAM from the host, it simply copies it into the rotary program buffer in internal memory. The end result is the same as if an ASCII program command had been sent to PMAC through any of the ports, but the transmission is quicker because PMAC gets the command all at once, and it does not have to parse the command from ASCII format.
PMAC Dual-Ported RAM User Manual Register Map HOST to PMAC Transfer Description Address 0x07F0 (Y:$D1FC) PMAC to HOST Binary Rotary Buffer Status Word Bit 15 = 1 :Error (Stops processing commands) Bit14 = 1 :Internal Rotary buffer full (Busy flag) PMAC Index stops updating. Bits 7-0 = Code Error ----------------------------------------1 Internal Rotary Buffer size = 0 or DPRAM Rotary Buffer Size = 0 These flags are set and reset by the PMAC.
PMAC Dual-Ported RAM User Manual Command Type = 1 PMAC Command Code 1 Code 2 30 30 30 30 30 30 0/1 0/1/2 3 4 5 6 ENABLE / DISABLE PLC ABS / INC / FRAX HOME Not Available Not Available HOMEZ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 CIRn LINEAR NORM PSET SPLINEn STOP BSTART BSTOP WAIT (Not Implemented) RAPID CCn TSELn ADISn AROTn IDISn IROTn TINIT Code 1 Code 2 14 14 14 14 15 15 15 15 0 1 2 3 0 1 2 3 Command Type = 2 PMAC Command In={constant} (
PMAC Dual-Ported RAM User Manual Command Type = 0 Sub-type A: A thru Z and CALL (24-Bit Word 1) -----------------------------------------------------------------------23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00 --|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--| FLOAT MANTISSA ( 36 BITS ) | 1| CODE1 = 1-27 | EXPONENT(6 BIT) | ^ 1,3 ... = A, B ...
PMAC Dual-Ported RAM User Manual Sub-type B: ABS/INC (24-Bit Word 1) -----------------------------------------------------------------------23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00 --|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--| Not Used | ^ | N. U.
PMAC Dual-Ported RAM User Manual (24-Bit Word 2) -----------------------------------------------------------------------23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00 --|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--| S | "n" = Integer number value = 1 - 1023 & value of 1024 = 0 ^-- SIGN (Two's complement) Sub-type F: LINEAR, NORM, PSET, STOP, BSTART, BSTOP, WAIT, RAPID, TINIT (24-Bit Word 1) -------------------------------------------------------------------