43
Program Examples
Section 3-1
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.
Note
Clearall clears all memory areas, including those that are write-protected.
3-1-2
Reading from the Data Carrier
This section shows program examples for the Read and Auto Read com-
mands.
Program Example 4:
The Read Command
Operation
When the execution command input is ON, the number of words in the com-
mand (fixed to 5 words), the beginning word where the command is stored
(DM 0200), and the beginning word number of the receiving area in the CPU
are set using MOV, and the command execution flag (10000) is turned ON. IR
10902
ID busy
MOV (21)
#0005
101
10902
10902
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 0200).
Word n+2
Command execution flag
(Bit in IR area) Holds the status
until the ID Sensor Unit begins
executing the command.
Command execution
input
MOV (21)
#0200
102
10000
MOV (21)
#0300
103
Sets the receiving area (in the
CPU) where the data to be read
will be transferred. (DM 0300 in
this example.)
Word n+3
Command data in the CPU
15
000A
52
44
48
31
00
0A
00
06
2A
0D
00
Number of bytes to be read
H1 (Hexadecimal, Head 1)
Read is exe-
cuted.
15
00
000B
000C
000D
000E
000F
14
16
18
15
17
19
Data in the Data Carrier
Address 7
0
DM 0200
DM 0202
DM 0203
DM 0204
DM 0201
RD (Read)
Beginning address of the data to
be read from the Data Carrier
14
15
16
17
18
19
DM 0300
DM 0302
DM 0301
Area in the CPU to which the data is
read
If the number of by-
tes to be read is odd,
the last 8 bits of data
are undefined.
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.
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...