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
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:
WORD, INT, or UINT variable