44
Program Examples
Section 3-1
10902 holds this status until the ID Sensor Unit begins executing the com-
mand.
While the ID Sensor Unit is executing the command, the ID Busy flag (word
n+4 bit 00) is turned ON. When the Read operation is complete, the ID Busy
flag turns OFF.
Although the ID Busy flag normally turns OFF upon completion of the com-
mand, if the command execution flag is ON at this time, the ID Busy flag will
stay ON. Therefore, design the program so that the command execution flag
will be turned OFF when the ID Busy flag turns ON, as in the example.
Program Example 5:
The Auto Read Command
Operation
When the command execution is ON, the number of words in the command
(fixed to 5), the beginning word where the command is stored (DM 0400), and
the beginning word of the receiving area in the CPU (DM 0500) are set using
MOV, and the command execution flag (10000) is turned ON. IR 10900 holds
this status until the ID Sensor Unit begins executing the command.
10903
ID busy
MOV (21)
#0005
101
10903
10903
10400
Sets the number of words in the
command data (fixed to 5 words).
Word n+1
Sets the beginning word where the
command data is stored (example
shows DM 0400).
Word n+2
(Bit in IR area) Holds the status
until the ID Sensor Unit begins
executing the command.
Command execution flag
Command
execution input
MOV (21)
#0400
102
10000
MOV (21)
#0500
103
Sets the receiving area (in the
CPU) where the data to be read
will be transferred. (DM 0500 in
this example.)
Word n+3
Command data in the CPU
15
001A
41
52
48
31
00
1A
00
05
2A
0D
00
H1 (Hexadecimal, Head 1)
Number of bytes to be read
Auto Read is
executed.
15
00
001B
001C
001D
001E
38
3A
3C
39
3B
Data in the Data Carrier
Address 7
DM 0400
DM 0402
DM 0403
DM 0404
DM 0401
AR (Auto read command)
Beginning address of the data in
the Data Carrier
38
39
3A
3B
3C
XX
DM 0500
DM 0502
DM 0501
If the number of by
tes to be read is odd,
the last 8 bits of data
are undefined.
Receiving area in the CPU
If the number of bytes to be read is odd,
shift codes 2A and OD forward one byte
and write 00 into the last 8 bits.
0
Summary of Contents for SYSMAC C200H-IDS01-V1
Page 1: ...OPERATION MANUAL ID Sensor SYSMAC C200H IDS01 V1 IDS21 Cat No W153 E1 04...
Page 3: ...iv...
Page 5: ...vi...
Page 7: ...viii TABLE OF CONTENTS Glossary 89 Index 91 Revision History 95...
Page 9: ......
Page 15: ...xvi Application Precautions 5...
Page 25: ......
Page 95: ......
Page 97: ......
Page 99: ......
Page 103: ......
Page 109: ......
Page 111: ......
Page 114: ...SYSMAC C200H IDS01 V1 IDS21 ID Sensor Cat No W153 E1 04 OPERATION MANUAL...