beautypg.com

2 fmt parameter – ocs register read format, 3 rfs parameter – ocs register read auto-refresh, Fmt parameter – ocs register read format – Horner APG XL4 OCS HE-ETN300 User Manual

Page 74: Ffs parameter – ocs register read auto-refresh

background image

CH.11

SUP0740-07

11/30/2009

Page 74 of 98

# 958


¾ For BOOL formatting (see next section), a bit number can be appended to 16-bit register

references (%R, %AI and %AQ). For example, reg–R11.3 references bit 3 of register %R11.
Valid bit numbers are 1 through 16.


11.5.2.2

FMT PARAMETER – OCS REGISTER READ FORMAT


Examples:

fmt–BOOL

fmt–BOOL–ON–OFF
fmt–BOOL–YES–NO
fmt–BIN
fmt–HEX
fmt–INT
fmt–UINT
fmt–DINT
fmt–UDINT
fmt–REAL
fmt–REAL–E
fmt–ASCII–10
fmt–IPADR

The required fmt parameter is followed by a dash and a display format type. Valid format types
are BOOL, BIN, HEX, INT, UINT, DINT, UDINT, REAL, ASCII and IPADR. Three of these format
types (BOOL, REAL and ASCII) have optional or required modifiers as follows:

The BOOL format reads and displays a single bit, and two optional modifiers indicate the text to
display for the bit’s logical On and Off states. The text "TRUE" and "FALSE" will be displayed if
the modifiers are omitted. In other words, fmt–BOOL is equivalent to fmt–BOOL–TRUE–FALSE.

The REAL format reads a 32-bit floating-point value, and the optional –E modifier can be used to
display data in exponential (scientific) notation. The fmt–REAL format displays a variable number
of digits to the left of the decimal point and 6 digits to the right of the decimal point (e.g. –
12345.000000). On the other hand, the fmt–REALE format only shows 1 digit to the left of the
decimal point and shows 6 digits to the right of the decimal point followed by a 4-character power
of 10 (e.g. –1.234500E+04).

The ASCII format accesses a string of ASCII characters, and a string size modifier from –1 to –31
is required, indicating how many ASCII characters to read and display. For example, the fmt–
ASCII–10
format reads and displays a string of 10 ASCII characters.

11.5.2.3

RFS PARAMETER – OCS REGISTER READ AUTO-REFRESH


Example: rfs–2

The optional rfs parameter specifies how often the