
Adding Leading Zeros from Response to Interrogation Commands
The leading zeros on data returned as a response to interrogation commands can be added by the use of the
command, LZ. The LZ command is set to a default of 1.
LZ0
Disables the LZ function
TP
Tell Position Interrogation Command
-0000000009, 0000000005
Response (With Leading Zeros)
LZ1
Enables the LZ function
TP
Tell Position Interrogation Command
-9, 5
Response (Without Leading Zeros)
Local Formatting of Response of Interrogation Commands
The response of interrogation commands may be formatted locally. To format locally, use the command, {Fn.m} or
{$n.m} on the same line as the interrogation command. The symbol F specifies that the response should be
returned in decimal format and $ specifies hexadecimal. n is the number of digits to the left of the decimal, and m
is the number of digits to the right of the decimal.
TP {F2.2}
Tell Position in decimal format 2.2
-05.00, 05.00, 00.00, 07.00
Response from Interrogation Command
TP {$4.2}
Tell Position in hexadecimal format 4.2
FFFB.00,$0005.00,$0000.00,$0007.00
Response from Interrogation Command
Formatting Variables and Array Elements
The Variable Format (VF) command is used to format variables and array elements. The VF command is specified
by:
VF m.n
where m is the number of digits to the left of the decimal point (0 thru 10) and n is the number of digits to the right
of the decimal point (0 thru 4).
A negative sign for m specifies hexadecimal format. The default format for VF is VF 10.4
Hex values are returned preceded by a $ and in 2's complement.
Instruction
Interpretation
v1=10
Assign v1
v1=
Return v1
:0000000010.0000
Response - Default format
VF2.2
Change format
v1=
Return v1
:10.00
Response - New format
VF-2.2
Specify hex format
v1=
Return v1
$0A.00
Response - Hex value
VF1
Change format
v1=
Return v1
:9
Response - Overflow
Local Formatting of Variables
PF and VF commands are global format commands that affect the format of all relevant returned values and
variables. Variables may also be formatted locally. To format locally, use the command, {Fn.m} or {$n.m} following
the variable name and the ‘=’ symbol. F specifies decimal and $ specifies hexadecimal. n is the number of digits to
the left of the decimal, and m is the number of digits to the right of the decimal.
Chapter 7 Application Programming ▫ 149
DMC-40x0 User Manual