![background image](http://html1.mh-extra.com/html/omron/cj-12-2004/cj-12-2004_manual_740789128.webp)
109
Sample Programming
Appendix B
Programming Example
When the execution input turns ON, settings are made in the Special I/O Unit Area using the MOV and MOVL
instructions and the command is executed. When communications with the Data Carrier have been completed,
the Normal End Flag (word (n + 7), bit 01) or Error End Flag (word (n + 7), bit 02) is turned ON.
Read data can be used after the Normal End Flag (word (n + 7), bit 01) has been turned ON.
To end command execution while waiting for the Data Carrier, turn ON the Abort Input.
MOV
2001
#0010
MOV
2002
#0010
Execution
input
Command Execution Bit
ID Busy
MOV
2003
#000A
MOVL
2004
#00001000
Normal End Flag
Error End Flag
Normal end
Specification of command,
communications specifications
and read data storage order.
Specification of first read address.
Specification of number of read bytes.
Read data storage location
2000.00
0010.01
0010.01
2007.01
2007.02
2007.00
Waiting for command execution
(work bit)
0010.01
Waiting for command
execution (work bit)
Waiting for command
execution (work bit)
Error end
Test Mode
2007.14
Unit Busy
2007.15
Used to time getting read
data.
Abort Bit
2000.02
Abort input
0010.02
Waiting for abort
(work bit)
Waiting for Abort
(work bit)
0010.02
ID Busy
2007.00
Used to time getting
resulting information.
Summary of Contents for CJ - 12-2004
Page 2: ...SYSMAC CS CJ Series ID Sensor Units Operation Manual Revised December 2004...
Page 3: ...iv...
Page 11: ...xii...
Page 55: ...36 Connections and Wiring Section 3 4...
Page 69: ...50 I O Data Allocations Section 4 3...
Page 91: ...72 Data Check Section 5 7...
Page 141: ...122 Sample Programming Appendix B...
Page 147: ...128 Revision History...