Chapter 3. Program Data
38
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
Bit in Word references can be used in the following situations:
■
In retentive 16-bit memory (AI, AQ, R, W, P, and L) and symbolics.
■
On all contacts and coils
except
legacy transition contacts (POSCON/NEGCON) and transition
coils (POSCOIL/NEGCOIL).
■
On all functions and call parameters that accept single or unaligned bit parameters.
Functions that accept
unaligned discrete references
Parameters
ARRAY MOVE (BIT)
SR and DS
ARRAY RANGE (BIT)
Q
MOVE (BIT)
IN and Q
SHFR (BIT)
IN, ST and Q
Restrictions
The use of Bit in Word references has the following restrictions:
■
Bit in Word references cannot be used on legacy transition contacts (POSCON/NEGCON) and
transition coils (POSCON/NEGCON).
■
The bit number (index) must be a constant; it cannot be a variable.
■
Bit addressing is not supported for a constant.
■
Indirect references cannot be used to address bits in 16-bit memory.
■
You cannot force a bit within 16-bit memory.
Examples:
%R2.X [0] addresses the first (least significant) bit of %R2
%R2.X [1] addresses the second bit of %R2. In the examples
In the examples [0] and [1] are the bit indexes. Valid bit indexes for the different variable types are:
BYTE variable
[0] through [7]
WORD, INT, or UINT variable
[0] through
[15]
DWORD or DINT variable
[0] through
[31]
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...