low_level_command
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
low_level_command [2016/09/07 18:12] – ↷ Page moved from documentation:low_level_command to low_level_command asiadmin | low_level_command [2021/09/23 17:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Low Level Command Set ====== | ||
+ | |||
+ | ===== SETUP CONTROL COMMANDS ===== | ||
+ | |||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | Currently, the only way to access the low level format is through the Setup Control Commands | ||
+ | |||
+ | </ | ||
+ | |||
+ | The following are special commands used to setup different properties of the MS 2000 and MFC-2000. | ||
+ | |||
+ | ==== For HyperTerminal ==== | ||
+ | |||
+ | ^Command ^Description ^ | ||
+ | |255 65 \\ Alt[255] ' | ||
+ | |255 66 \\ Alt[255] ' | ||
+ | |255 82 \\ Alt[255] ' | ||
+ | |255 72 \\ Alt[255] ' | ||
+ | |255 84 \\ Alt[255] ' | ||
+ | |||
+ | **Note:** Remote Switch Scanning and Transmission Delay is not supported | ||
+ | |||
+ | ==== For Advanced Serial Port Monitor ==== | ||
+ | |||
+ | Make Sure Special> | ||
+ | {{ ll_command_mode.png? | ||
+ | |||
+ | |||
+ | ^Command ^Description ^ | ||
+ | |# | ||
+ | |# | ||
+ | |# | ||
+ | |||
+ | |||
+ | ===== LOW LEVEL FORMAT ===== | ||
+ | |||
+ | |||
+ | This serial RS-232 interface is used to hook up the MS 2000 and MFC 2000 to a PC with a protocol that imitates the Ludl Low Level command set. The purpose of the low level protocol is to provide a simple interface between a PC program and the MS 2000 and the MFC-2000, without ASCII conversion. | ||
+ | |||
+ | **NOTE: | ||
+ | |||
+ | The low level format is formed by the following 8 bit bytes: | ||
+ | |||
+ | **BYTE1: | ||
+ | **BYTE2: | ||
+ | **BYTE3: | ||
+ | **BYTES 4 thru 9:** Data Bytes, mostly in 2's compliment form in the order of: Least Significant Byte, Middle Byte, Most Significant Byte \\ | ||
+ | **LAST BYTE: | ||
+ | |||
+ | All values specified through this section of the manual use the following format: | ||
+ | |||
+ | |000000| Decimal| | ||
+ | |0x0000| Hexadecimal| | ||
+ | |Ctrl< | ||
+ | |Alt[0000]| Decimal number typed with Alt held down| | ||
+ | |' | ||
+ | |||
+ | **RS 232 Timeout: | ||
+ | |||
+ | **SERIAL DELAY: | ||
+ | |||
+ | **WARNING: | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | It is recommended that the RS-232 OUT port is not used with the low level command set. | ||
+ | </ | ||
+ | |||
+ | |||
+ | Commands are generally broken into five groups. | ||
+ | |||
+ | Data values are broken into 8-bit bytes for the data length times, and then each byte is sent out through serial channel to the interface, from LSB to MSB. | ||
+ | |||
+ | The ASCII colon (:) character is defined as the end of command code, and used to terminate the command loading sequence at which time the controller clears the serial buffer and attempts to process the command. | ||
+ | |||
+ | **Note:** The MS 2000 does not support parity check. | ||
+ | |||
+ | **Group 1 /Byte 1:** Axis Identifier | ||
+ | This one byte character identifies which axis or control function the command is for. | ||
+ | |||
+ | ^X Axis:|Dec: 24 (Hex: 0x18)|Keyboard: | ||
+ | ^Y Axis:|Dec: 25 (Hex: 0x19)|Keyboard: | ||
+ | ^Z Axis:|Dec: 26 (Hex: 0x1A)|Keyboard: | ||
+ | ^F Axis:|Dec: 27 (Hex: 0x1B)|Keyboard: | ||
+ | |||
+ | The following are reserved for future use: | ||
+ | |||
+ | ^Autofocus|Dec: | ||
+ | ^Controller|Dec: | ||
+ | ^Scan|Dec: | ||
+ | |||
+ | **Group 2 / Byte 2:** Command Identifier | ||
+ | This is a single byte instruction code. These codes are listed in this manual. | ||
+ | |||
+ | **Group 3 / Byte 3:** Data Size | ||
+ | This is a single byte that gives the number of data bytes for this instruction. | ||
+ | |||
+ | Exceptions: | ||
+ | |||
+ | **Group 4 / Bytes 4-?: | ||
+ | This group holds the data for the command whether the command is sending or receiving information. | ||
+ | Numerical information is broken down into the 8 bit bytes. | ||
+ | |||
+ | **Group 5:** Last Byte | ||
+ | This is a one-byte end-of-command character | ||
+ | |||
+ | |||
+ | ===== COMMAND LISTING ===== | ||
+ | |||
+ | |||
+ | The following are commands formatted by the MS 2000 shown in Decimal, and keyboard / ASCII form. The first command, Read Status, give examples that explain in depth the formatting which will be used for the rest of the examples. | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 63| | ||
+ | ^Hex| 0x3f| | ||
+ | ^Keyboard| ?| | ||
+ | ^Data Size| None| | ||
+ | |||
+ | The MS 2000 will respond to this command in the following manor. | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | Command: <wrap cmd>24 63 58 </ | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | In the above example the 24 represents the X axis, the 63 represents the Read Status command and the 58 is the colon which signifies the end of the command. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | The above example shows a way to enter this command using a terminal screen where the Ctrl< | ||
+ | |||
+ | The | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 97| | ||
+ | ^Hex| 0x61| | ||
+ | ^Keyboard| a| | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 97 represents the Read Motor Position command. | ||
+ | |||
+ | Conversion: '' | ||
+ | |||
+ | The example below shows the same example above as it would appear on a computer serial port terminal program such as Hyperterminal (see command 63 for this manuals formatting information). | ||
+ | |||
+ | <wrap cmd> < | ||
+ | |||
+ | Note: As can be seen in the Read Motor Position Command, many low level commands are incompatible with terminal screens, so no terminal screen example will be given throughout the rest of the manual for those commands. | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 100| | ||
+ | ^Hex| 0x64| | ||
+ | ^Keyboard| d| | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | Requests the MS 2000 to respond with current setting for the distance of increment moves. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 100 represents the Read Increment Value command. | ||
+ | |||
+ | Conversion: '' | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 105| | ||
+ | ^Hex| 0x69| | ||
+ | ^Keyboard| i| | ||
+ | ^Data Size| 6| | ||
+ | |||
+ | Requests the MS 2000 to respond with the identification code for the Axis Id. The response for X, Y, and Z axis' is EMOT :. The fifth and sixth bytes are spaces (ASCII code 32). | ||
+ | |||
+ | **Note:** The MS 2000 does not support consecutive 105 commands to read the version information. | ||
+ | |||
+ | == Example: == | ||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 69 77 79 84 32 58 </ | ||
+ | |||
+ | Reply Converted to ASCII: EMOT : | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | The example below shows the same example above as it would appear on a computer serial port terminal program such as Hyperterminal (see command 63 for this manuals formatting information). | ||
+ | |||
+ | <wrap cmd> | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 108| | ||
+ | ^Hex| 0x6C| | ||
+ | ^Keyboard|l| | ||
+ | ^Data Size|4| | ||
+ | |||
+ | Requests the MS 2000 to respond with the current stage position in two's compliment form using 3 bytes followed by the status byte. The response is in tenths of microns. | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 160 134 01 20 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 97 represents the Read Motor Position command. | ||
+ | |||
+ | '' | ||
+ | |||
+ | See command 126 (Read Status Byte) for more information on the status byte. | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 111| | ||
+ | ^Hex| 0x6F| | ||
+ | ^Keyboard| o| | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Requests the MS 2000 to respond with current instantaneous value of the servo speed trajectory. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 78 02 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 111 represents the Read Current Speed command. | ||
+ | |||
+ | 78+(2*256) =590 μm/s or 0.59 mm/second | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 113| | ||
+ | ^Hex| 0x71| | ||
+ | ^Keyboard| q | | ||
+ | ^Data Size| 1| | ||
+ | |||
+ | Requests the MS 2000 to respond with current setting for the time to ramp up and down. This is a one-byte number between 1 and 255. It represents the number of milliseconds the ramp from start speed to maximum speed at the beginning of a move and from maximum speed to start speed at the end of a move will take. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 78 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 113 represents the Read Ram Time command. | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec|114| | ||
+ | ^Hex| 0x72| | ||
+ | ^Keyboard| r| | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Dummy function. Do not use. | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 115| | ||
+ | ^Hex|: 0x73| | ||
+ | ^Keyboard| s | | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Requests the MS 2000 to respond with current setting for the maximum speed the stage is allowed to move. The number returned is a straight two-byte number representing a speed m/s. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 78 02 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | In the above example the 24 represents the X axis, the 115 represents the Read Maximum Speed command. | ||
+ | |||
+ | 78+(2*256) =590 μm/s or 0.59 mm/second | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 116 | | ||
+ | ^Hex| 0x74 | | ||
+ | ^Keyboard| t | | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | Requests the MS 2000 to respond with current target position. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> 160 134 01 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 116 represents the Read Target Position command. | ||
+ | |||
+ | Conversion: '' | ||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 126 | | ||
+ | ^Hex| 0x7E | | ||
+ | ^Keyboard| ~ | | ||
+ | ^Data Size| 1| | ||
+ | |||
+ | Requests the MS 2000 to respond with the Status Byte. The number is one byte, which can be broken down into 8 bits that represent the following internal flags: | ||
+ | |||
+ | ^Bit 0| 0 = No Motor Signal, \\ 1 = Motor Signal \\ (i.e., axis is moving) | ||
+ | ^Bit 1| Always 1, as servos cannot be turned off | | ||
+ | ^Bit 2| 0 = Pulses Off, \\ 1 = Pulses On | | ||
+ | ^Bit 3| 0 = Joystick/ | ||
+ | ^Bit 4| 0 = motor not ramping, \\ 1 = motor ramping | ||
+ | ^Bit 5| 0 = ramping up, \\ 1= ramping down | | ||
+ | ^Bit 6| Upper limit switch: \\ 0 = open, \\ 1 = closed | ||
+ | ^Bit 7| Lower limit switch: \\ 0 = open, \\ 1 = closed | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller and the controller’s reply. | ||
+ | |||
+ | In the above example the 24 represents the X axis, the 126 represents the Read Status Byte command. The 58 is the colon, which signifies the end of the command. | ||
+ | |||
+ | B7: 1 -Axis is at upper limit \\ | ||
+ | B6: 0 -Lower limit switch open \\ | ||
+ | B5: 0 -Ramping down if ramping \\ | ||
+ | B4: 0 -Not ramping \\ | ||
+ | B3: 1 -Joystick is enabled \\ | ||
+ | B2: 0 -Pulses are not being used \\ | ||
+ | B1: 1 -Servo Encoders are in use \\ | ||
+ | B0: 0 -Motors are not turned on \\ | ||
+ | |||
+ | |||
+ | ==== Command: Start / Enable Motor ==== | ||
+ | |||
+ | |||
+ | ^Dec| 71| | ||
+ | ^Hex| 47| | ||
+ | ^Keyboard| G| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Enables the function. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Response: | ||
+ | |||
+ | |||
+ | |||
+ | ==== Command: Stop / Disable Motor ==== | ||
+ | |||
+ | |||
+ | ^Dec| 66| | ||
+ | ^Hex| 42| | ||
+ | ^Keyboard| B| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Disables the function. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Response: | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 65| | ||
+ | ^Hex| 0x41| | ||
+ | ^Keyboard| A| | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | Requests the MS 2000 to write the given position to the current position count buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | The 24 represents the X axis, the 65 represents the Write Motor Position command. | ||
+ | |||
+ | **Conversion: | ||
+ | |||
+ | **Reverse Conversion: | ||
+ | |||
+ | 10 millimeters | ||
+ | *10,000 to get tenths of microns | ||
+ | =100,000 | ||
+ | |||
+ | lsb = remainder of 100,000 / 256 = 160 | ||
+ | mb = remainder of 100,000 / 256 / 256 = 134 | ||
+ | msb = remainder of 100,000 / 256 / 256 / 256 =1 | ||
+ | |||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | |||
+ | ^Dec| 84| | ||
+ | ^Hex| 0x54| | ||
+ | ^Keyboard| T| | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | Requests the MS 2000 to write the given position to the target position buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | **Conversion: | ||
+ | |||
+ | **Reverse Conversion: | ||
+ | |||
+ | 10 millimeters | ||
+ | *10,000 to get tenths of microns | ||
+ | =100,000 | ||
+ | |||
+ | lsb = remainder of 100,000 / 256 = 160 | ||
+ | mb = remainder of 100,000 / 256 / 256 = 134 | ||
+ | msb = remainder of 100,000 / 256 / 256 / 256 =1 | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 43| | ||
+ | ^Hex| 0x2B| | ||
+ | ^Keyboard| +| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Requests the MS 2000 to add the Increment Value to the Current Position Value and place the result in the Target Position Buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> No reply </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 45| | ||
+ | ^Hex| 0x2D| | ||
+ | ^Keyboard| -| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Requests the MS 2000 to subtract the Increment Value to the Current Position Value and place the result in the Target Position Buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply in Dec: <wrap reply> No reply </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 68| | ||
+ | ^Hex| 0x44| | ||
+ | ^Keyboard| D| | ||
+ | ^Data Size| 3| | ||
+ | |||
+ | Requests the MS 2000 to write the given position to the Increment Value buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | **Conversion: | ||
+ | |||
+ | **Reverse Conversion: | ||
+ | |||
+ | 10 millimeters | ||
+ | *10,000 to get tenths of microns | ||
+ | =100,000 | ||
+ | |||
+ | lsb = remainder of 100,000 / 256 = 160 | ||
+ | mb = remainder of 100,000 / 256 / 256 = 134 | ||
+ | msb = remainder of 100,000 / 256 / 256 / 256 =1 | ||
+ | |||
+ | |||
+ | |||
+ | ==== Command: | ||
+ | |||
+ | ^Dec| 81| | ||
+ | ^Hex| 0x51| | ||
+ | ^Keyboard| Q| | ||
+ | ^Data Size| 1| | ||
+ | |||
+ | Requests the MS 2000 to write the given byte to the Ramping Time buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | |||
+ | ==== Command: Write Start Speed ==== | ||
+ | |||
+ | ^Dec| 82| | ||
+ | ^Hex| 0x52| | ||
+ | ^Keyboard| R| | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Dummy function – do not use. | ||
+ | |||
+ | |||
+ | ==== Command: Write Top Speed ==== | ||
+ | |||
+ | ^Dec| 83| | ||
+ | ^Hex| 0x53| | ||
+ | ^Keyboard| S| | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Requests the MS 2000 to write the given speed to the Top Speed buffer. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | **Conversion: | ||
+ | |||
+ | **Reverse Conversion: | ||
+ | |||
+ | 6 millimeters/ | ||
+ | *1000 to get microns | ||
+ | =6000 microns/ | ||
+ | |||
+ | lsb = remainder of 6000 / 256 = 112 | ||
+ | msb = remainder of (6000 / 256)† / 256 = 23 | ||
+ | |||
+ | †drop remainder of first division and take remainder of second division | ||
+ | |||
+ | |||
+ | ==== Command: Write Vector Speed ==== | ||
+ | |||
+ | ^Dec| 94| | ||
+ | ^Hex| 0x5E| | ||
+ | ^Keyboard| ^| | ||
+ | ^Data Size| 2| | ||
+ | |||
+ | Instructs the MS 2000 to immediately ramp motors to given velocity value and continue at that speed until instructed otherwise. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: | ||
+ | Reply: | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | **Conversion: | ||
+ | |||
+ | |||
+ | ==== Command: Joystick / Control Device Enable ==== | ||
+ | |||
+ | |||
+ | ^Dec| 74| | ||
+ | ^Hex| 0x4A| | ||
+ | ^Keyboard| J| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Enables the control device function. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: <wrap cmd> 24 74 58 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | |||
+ | ==== Command: Joystick / Controller Disable ==== | ||
+ | |||
+ | |||
+ | ^Dec| 75| | ||
+ | ^Hex| 0x4B| | ||
+ | ^Keyboard| K| | ||
+ | ^Data Size| 0| | ||
+ | |||
+ | Disables the control device function. | ||
+ | |||
+ | == Example: == | ||
+ | |||
+ | Command: <wrap cmd> 24 75 58 </ | ||
+ | |||
+ | The above is an example of a stream of bytes that a PC would send serially to the controller. | ||
+ | |||
+ | {{tag> |
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181