2-9
Part 2: Connections and Interface
Parameter Setting
Transmission to
MDI
MDI Initial
Response
MDI Final
Response
Notes
EM=0 & PY=1 CK=1
(DN) (command)
(CS) (0A)
(command)
Echoed back one
character at a time
as the character is
entered.
CET (ACK) or
(NAK)>
The last character
sent is the prompt >
EM=1 & PY=1 CK=1
(DN) (command)
(CS) (0A)
−
CET (ACK) or
(NAK)>
The last character
sent is ACK or NAK
EM=2 & PY=1 CK=1
(DN) (command)
(CS) (0A)
−
−
No response
except to PR and L
commands
EM=3 & PY=1 CK=1
(DN) (command)
(CS) (0A)
−
CET command
(CS) (ACK) (NAK)
Queued response.
The last character
sent is ACK or NAK
Table 2.2.4: MDI Response to Echo Mode - Party and Check Sum are One (1)
Using Check Sum
For communication using Check Sum, the following 2 commands demonstrate sending and receiving.
Sending Command
1.
Check Sum set to ZERO before first character is sent.
2. All characters (ASCII values) are added to Check Sum, including the Device Name DN (if PY=1), to the end of
the command, but not including terminator.
3. Check Sum is 2’s complement, then “OR” ed with Hex 80 (prevents Check Sum from being seen as Command
Terminator).
4. Terminator Sent.
Example command:
MR (space) 1
Note:
Any combination of upper/lower case may be used. In this example,
if a lower case <mr> were to be used, the decimal values will change to
109 and 114. Subsequently the Result Check Sum value will change.
(Possible entries: MR, mr, Mr, mR.) (M = 77, R =82, m =
109, r = 114) (See ASCII table appendix in MDI Software Manual.)
77 82 32 49
Decimal value of M, R, <space> and 1
4D 52 20 31
Hex
77+82+32+49 = 240 Add decimal values together
1111 0000 = 240
Change 240 decimal to binary
0000 1111
1’s complement (invert binary)
0001 0000
Add 1 [2’s complement]
1000 0000
OR result with 128 (Hex 80)
1001 0000 144
Result Check Sum value
Once the result is reached, add the check Sum value (144 in this example) to your string by typing: MR 1(Alt Key +
0144) (Use the symbol of 0144 in your string by holding down the alt key and typing 0144). You must type the numbers
from the Numlock key pad to the right of the keyboard. The numbers at the top of the keyboard will not work.
Receiving Command
1. Check Sum set to ZERO.
2. All characters are added to Check Sum.
3. When receiving a Command Terminator, the lower 7 bits of the Check Sum should be equal to ZERO.
a) If not ZERO, the command is ignored and NAK echoed.
b) If ZERO, ACK is sent instead of CR/LF pair.
4. Responses to PR commands will be Check Summed as above, but the receiving device should NOT respond
with ACK or NAK.
Содержание MDrive 34 Plus Series
Страница 12: ...1 6 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...
Страница 24: ...1 18 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...
Страница 26: ...2 2 MDrive34Plus Motion Control Hardware Revision R080106 ...
Страница 50: ...2 26 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...
Страница 52: ...A 2 MDrive34Plus Motion Control Hardware Manual Revision R080106 Page Intentionally Left Blank ...
Страница 66: ...A 16 MDrive34Plus Motion Control Hardware Manual Revision R080106 Page Intentionally Left Blank ...
Страница 82: ...A 32 MDrive34Plus Motion Control Hardware Manual Revision R080106 Page Intentionally Left Blank ...