beautypg.com

Example, Vf m.n – Yaskawa LEGEND-MC User Manual

Page 324

background image

314

LEGEND-MC User’s Manual

The following interrogation commands are affected by the PF command:

If the number of decimal places specified by PF is less than the actual value, a nine appears in all the
decimal places.

Example:

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 through 10) and n is the number of digits
to the right of the decimal point (0 through 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.

The variable format also affects returned values from internal variables such as _GNX.

DP

ER

PA

PR

TE

TP

:PF2

Format 2 places

:TPX

Tell position

99

Returns 99 if actual position is more than allowed format

:V1=10

Assign V1

:V1=

Return V1

0000000010.0000

Default format

:VF2.2

Change format

:V1=

Return V1

10.00

New format

:VF-2.2

Specify hex format

:V1=

Return V1

$0A.00

Hex value

:VF1

Change format

:V1=

Return V1

9

Overflow