3.75 EDH0162En1040 – 06/99
MM4005 MS — Read motor status
Usage IMM PGM MIP
Syntax xxMS
Parameters
Description xx
[int] — Axis number.
Range xx — 0 to 4.
Units xx
— None.
Defaults xx Missing: 0.
Out of range: Error B.
Floating point: Error A.
Description This command reads the motor status byte of the specified axis. If the axis
number (xx) is missing or set to 0, the controller returns the motor status
bytes for all four axes, separated by a comma.
Each bit of the status byte represents a particular axis parameter, as
described in the following table:
Meaning for
Bit # Function
01
0 Axis in Motion NO YES
1 Motor power ON OFF
2 Motion direction Negative Positive
3 Right (+) travel limit Not tripped Tripped
4 Left (-) travel limit Not tripped Tripped
5 Mechanical zero signal Low High
6 Not used — Default
7 Not used Default —
The byte returned is in the form of an ASCII character. Converting the ASCII
code to binary will give us the status bits values.
NOTE
For a complete ASCII to binary conversion table, see Appendix F, ASCII
Table.
Returns xxMSaa
or xx
1
MSaa
1
, xx
2
MSaa
2
, xx
3
MSaa
3
, xx
4
MSaa
4
xx, xx
1
, xx
2
, xx
3
, xx
4
— Axis number.
aa, aa
1
, aa
2
, aa
3
, aa
4
— ASCII character representing the status byte.
Errors A — Unknown message code.
B — Incorrect axis number.
S — Communication time-out.
Rel. Commands TS — Read controller status.
TX — Read controller activity.
Example 2MS | Read motor status byte for axis #2.
2MSe
| Controller returns character e, or ASCII character 101; converting 101
to binary we get 01100101 which has the following meaning: axis in
motion, motor power ON, motion direction positive, no limits
tripped and mechanical zero high.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com