Formatting data, Examples – Yaskawa SMC–4000 User Manual

Page 344

Advertising
background image

334

SMC–4000 User Manual

Formatting Data

Returned numeric values may be formatted in decimal or hexadecimal* with a specified number of digits
to the right and left of the decimal point using the PF command.

The Position Format (PF) command formats motion values such as those returned by the Tell Position
(TP), Speed? (SP?) and Tell Error (TE) commands.

Position Format is specified by:

PF 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.

Hex values are returned preceded by a $ and in 2's complement. Hex values should be input as signed 2's
complement, where negative numbers have a negative sign. The default format is PF 10.0.

Examples:

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.

:DP21

Define position

:TPX

Tell position

0000000021

Default format

:PF4

Change format to 4 places

:TPX

Tell position

0021

New format

:PF-4

Change to hexadecimal format

:TPX

Tell Position

$0015

Hexadecimal value

DP

ER

PA

PR

TE

TP

Advertising