Using Check Sum - IMS Mforce micro drive Reference

Motion control
Table of Contents

Advertisement

Transmission
Parameter Setting
(DN) (command)
EM=0 & PY=1 CK=1
(DN) (command)
EM=1 & PY=1 CK=1
(DN) (command)
EM=2 & PY=1 CK=1
(DN) (command)
EM=3 & PY=1 CK=1
Table 2.3.4: MForce MicroDrive 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
77 82 32 49
4D 52 20 31
77+82+32+49 = 240
1111 0000 = 240
0000 1111
0001 0000
1000 0000
1001 0000 144
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.
Part 2: Connections and Interface
MForce
to MForce
MicroDrive Initial
MicroDrive
Response
(command)
Echoed back one
character at a time
(CS) (0A)
as the character is
entered.
(CS) (0A)
(CS) (0A)
(CS) (0A)
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 valu e will c ha nge.
(Po s s ib le entries: MR, m r, Mr, m R.) (M = 77, R =82, m =
109, r = 114) (See ASCII table appendix in MForce MicroDrive Software
Manual.)
Decimal value of M, R, <space> and 1
Hex
Add decimal values together
Change 240 decimal to binary
1's complement (invert binary)
Add 1 [2's complement]
OR result with 128 (Hex 80)
Result Check Sum value
MForce MicroDrive
Notes
Final Response
CET (ACK) or
The last character
(NAK)>
sent is the prompt >
CET (ACK) or
The last character
(NAK)>
sent is ACK or NAK
No response
except to PR and L
commands
Queued response.
CET command
The last character
(CS) (ACK) (NAK)
sent is ACK or NAK
2-17

Advertisement

Table of Contents
loading

Table of Contents