Condition flags, Binary-mode addressing (@d), Bcd-mode addressing ( * d) – Omron HOME SECURITY SYSTEM - MOTION SENSOR FQM1-MMA21 User Manual

Page 330

Advertising
background image

307

I/O Memory

Appendix B

Data Memory (DM) Area

The DM Area contains 32,768 words with addresses ranging from D00000 to D32767. This data area is used
for general data storage and manipulation and is accessible only by word.

Data in D00000 to D29999 is cleared to all zeros when the power supply is cycled, but is held when the operat-
ing mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.

Data in the D30000 to D32767 is held when the FQM1’s power is cycled or the operating mode is changed
from PROGRAM mode to RUN/MONITOR mode or vice-versa. (These words are backed up by a super capac-
itor in a Motion Control Module and by flash memory in the Coordinator Module.)

Bits in the DM Area cannot be accessed directly and cannot be force-set or force-reset.

Words in the DM Area can be indirectly addressed in two ways: binary-mode and BCD-mode.

Binary-mode Addressing (@D)

When a “@” character is input before a DM address, the content of that DM word is treated as binary and the
instruction will operate on the DM word at that binary address. The entire DM Area (D00000 to D32767) can be
indirectly addressed with hexadecimal values 0000 to 7FFF.

BCD-mode Addressing (

*D)

When a “

*” character is input before a DM address, the content of that DM word is treated as BCD and the

instruction will operate on the DM word at that BCD address. Only part of the DM Area (D00000 to D09999)
can be indirectly addressed with BCD values 0000 to 9999.

Condition Flags

These flags include the Error Flag and Carry Flag, which indicate the results of instruction execution. In earlier
PLCs, these flags were in the SR Area.

The Condition Flags are specified with labels, such as CY and ER, or with symbols, such as P_Carry and
P_Instr_Error, rather than addresses. The status of these flags reflects the results of instruction execution, but
the flags are read-only; they cannot be written directly from instructions or CX-Programmer.

Note The CX-Programmer treats condition flags as global symbols beginning with P_.

All Condition Flags are cleared when the program switches tasks, so the status of the ER and AER flags are
maintained only in that cycle and in the task in which the error occurred.

D00000

D30000

D32767

Word addresses

Held words

0100

D00256

Example: @D00100

Address actually used.

0100

D00100

Example: *D00100

Address actually used.

Advertising