![background image](http://html1.mh-extra.com/html/omron/cj-12-2004/cj-12-2004_manual_740789132.webp)
113
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 ON.
If more than 15 seconds elapse while waiting for the Data Carrier, the operation will be ended.
MOV
2011
#0021
MOV
2012
#0010
Execution
input
Command Execution Bit
ID Busy
MOV
2013
#000A
MOVL
2014
#50001000
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
2010.00
0010.01
0010.01
2017.01
2017.02
2017.00
Waiting for command execution
(work bit)
Waiting for command
execution (work bit)
Waiting for command
execution (work bit)
Error end
Used to time getting read
data.
0010.01
Used to time getting
resulting information.
Test Mode
2017.14
Unit Busy
2017.15
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...