EnBOX User’s Manual
Software Commands
21
2.3.3
TONIC Command
The TONIC command allows reading the position values and some other
auxiliary information (end-switches, alarm) from relative encoders. This command
does not depend on the of ENC_SEL value.
2.3.3.1
TONIC:GET? Command
This command gets a single measurement from both relative encoders. The
returned string is composed of “TONIC:GET:” literal and two decimal values,
separated with comma (“,”):
Example:
TONIC:GET
\r\n
TONIC:GET
:
10088,20711
\r\n
2.3.3.2
TONIC:AUX? Command
This command returns the values of alarm, and P and Q end-switches. Both direct
value and latched value are returned. Latches get set when the input signal is high and
can be cleared from the software command (see TONIC:AUX_CLEAR command).
The returned string is composed of “TONIC:AUX:” literal and two numbers in
hexadecimal format which represent the values of aux input for each of the two
encoders. The following table shows position of individual bits in returned value:
Bit position
Register name
Description
31:19
Reserved
-
18
P_LATCH
P latched
17
Q_LATCH
Q latched
16
E_LATCH
E latched
15:3
Reserved
-
2
P
P direct
1
Q
Q direct
0
E
E direct
Example:
TONIC:AUX?
\r\n
TONIC:AUX
:
00010000,00020002
\r\n