![background image](http://html1.mh-extra.com/html/omron/cj-12-2004/cj-12-2004_manual_740789139.webp)
120
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 instruction
and the command is executed. Data is read from the memory of Data Carrier A and written to the memory of
Data Carrier B. When communications with Data Carrier B have been completed, the Normal End Flag (word
(n + 7), bit 01) or Error End Flag (word (n + 7), bit 02) is turned ON.
Timing Chart (n = CIO 2000 + (10
×
77) = CIO 2770)
MOV
2771
#0910
MOV
2772
#0020
Execution
input
Command Execution Bit
ID Busy
MOV
2773
#0010
MOV
2776
#0010
Normal End Flag
Error End Flag
Normal end
Specification of command,
communications specifications
Specification of first read address.
Specification of number of
read (write) bytes.
Write data storage location
2770.00
0010.01
0010.01
2777.01
2777.02
2777.00
Waiting for command execution
(work bit)
0010.01
Waiting for command
execution (work bit)
Waiting for command
execution (work bit)
Error end
Used to time getting
resulting information.
Test Mode
2777.14
Unit Busy
2777.15
Command Execution Bit
Word n, bit 00
Command
Words (n+1) to (n+6)
Normal End/Error End
Word (n+7), bits 01/02
ID Busy
Resulting Information
Word (n+8)
Data storage area
1 scan
Copy
0000
Resulting Information stored.
Head 1
processing
Abort Bit
Word n, bit 02
Head 2
processing
Word (n+7), bit 00
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...