If - immediate format, Command details, Parameter details – Applied Motion RS-232 User Manual

Page 100: Examples

Advertising
background image

100

920-0002 Rev. I
2/2013

Host Command Reference

IF - Immediate Format

Compatibility: All drives
Affects:

Immediate Commands IA, IC, ID, IE, IP, IT, IU, IV and IX

Sets the data format, hexadecimal or decimal, for data returned using all “I” commands (except IH, IL, IO and IS).

Data can be requested from the drive in two formats: hexadecimal or decimal. By default data is returned in
hexadecimal because of its speed and efficiency. Conversion to ascii in the decimal format is slower and causes
a slight delay that varies in length. Hexadecimal minimizes the overhead required to convert the internal binary
data to ascii form. This speeds up the process of sending out the requested data thus giving the most recent
value. Typically, applications written on more powerful host computers can easily convert a hexadecimal value into
a decimal value.

All “I” commands can be used at any time and at the fastest rate possible limited only by the given baud rate (see
BR and PB commands). Immediate commands are executed as they are received, regardless of what is in the
drive’s command buffer. Regardless of format (hex or dec) there will be a slight delay in processing the response
to an “I” command. “Real time” usage of the data must be carefully analyzed.

Command Details:

Structure

IF{Parameter #1}

Type

IMMEDIATE

Usage

READ/WRITE

Non-Volatile

YES

Register Access

None

Parameter Details:

Parameter #1

Return format

- units

letter

- range

H (hexadecimal) or D (decimal)

Examples:

Command

Drive sends

Notes

IFH

-

Sets format to Hexadecimal

ID

ID=00002710

Distance is 10000 counts

IF IF=H

IFD

-

Sets format to Decimal

ID

ID=10000

Distance is 10000 counts

IF IF=D

Advertising
This manual is related to the following products: