Formatting Variables And Array Elements - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

-9, 5, 0, 7
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. For example:
Examples:
TP {F2.2}
-05.00, 05.00, 00.00, 07.00
TP {$4.2}
FFFB.00,$0005.00,$0000.00,$0007.00

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.
:V1=10
:V1=
0000000010.0000
:VF2.2
:V1=
10.00
:VF-2.2
:V1=
$0A.00
:VF1
:V1=
9
Local Formatting of Variables
PF and VF commands are global format commands that effect 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. For example:
Examples:
:V1=10
:V1=
0000000010.0000
:V1={F4.2}
122
Chapter 7 Application Programming
i
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Assign V1
Return V1
Default format
Change format
Return V1
New format
Specify hex format
Return V1
Hex value
Change format
Return V1
Overflow
Assign V1
Return V1
Default Format
Specify local format
Response from Interrogation Command
(Without Leading Zeros)
Tell Position in decimal format 2.2
Response from Interrogation Command
Tell Position in hexadecimal format 4.2
Response from Interrogation Command
DMC-14x5/6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents