19
The User Program Section 2-3
3b. If the command is illegal, or the Read format is illegal, the ID Sensor
Unit turns ON both the Command Error flag (word n+4 bit 09) and the
Read Format Error flag (word n+4 bit 08), and returns the data to the
PC. At this time, the ID Busy flag (word n+4 bit 00) is turned OFF.
4. When the ID Sensor Unit has completed communication with the
Data Carrier (step 4), the ID Sensor Unit forwards the read data to the
CPU; the Unit turns OFF the ID Busy flag as the command is completed.
If communication with the Data Carrier fails, or if an error occurs during communication, the ID Sensor Unit stops data communication with the Data Carrier, turns ON the Data Carrier communication error flags, returns the data to
the CPU, and turns OFF the ID Busy flag.
Steps 1 to 4 compose one read operation.
2-3-1 Communication Commands
The ID Sensor Unit is provided with seven dedicated commands for communicating with the Data Carrier through the Read/Write Head. The following table
outlines these commands.
Note The Clearall command clears the Data Carrier’s internal memory, regardless
of write protection.
When transferring data between the Data Carrier and the ID Sensor Unit, up
to 1024 bytes (512 words) of data per scan can be written to or read from the
Data Carrier. However, when transferring data between the PC and the ID
Sensor Unit, only 20 words can be transferred per scan. Data is transferred
between the PC and the ID Sensor Unit at a rate of 0.2 ms per word.
If data is to be read and written simultaneously, the read data can be up to 20
words (40 bytes) in length and the write data can be up to 16 words (32 bytes)
in length. (Because the write data is transferred with the command data,
which requires 4 of the 20 words, only 16 words are available to carry the
write data.) If the data exceeds 20 words, more than one scan is required to
transfer the data between the CPU and the ID Sensor Unit, making simultaneous processing impossible.
For details refer to 3-3 Timing Considerations.
Command name Mnemonic ASCII
code
Function
Write WT 57 54 Writes data to the internal memory of the Data Carrier; up to1024 bytes
(512 words) of data can be written at a time.
Read RD 52 44 Reads data from the internal memory of the Data Carrier; up to 1024
bytes (512 words) of data can be read at a time.
Auto Write AW 41 57 Waits until the Data Carrier approaches the Read/Write Head and then
writes data to the internal memory of the Data Carrier as it comes within
detection range of the Read/Write Head. Up to 1024 bytes (512 words) of
data can be written at a time.
Auto Read AR 41 52 Waits until the Data Carrier approaches the Read/Write Head and then
reads data from the internal memory of the Data Carrier as it comes
within detection range of the Read/Write Head. Up to 1024 bytes (512
words) of data can be read at a time.
Clear-all
(see note)
CA 43 41 Clears the contents of the Data Carrier’s internal memory.
Auto Read/Write Abort AA 41 41 Aborts Auto Read and Auto Write. When this command is executed, the
ID Sensor Unit is initialized and waits for the next command.
Data management
(C200H-IDS01-V1
only)
MD 4D 44 Checks the Data Carrier’s internal memory. The reliability of data is
checked using the MD-K and MD-C commands and the number of
overwriting operations is checked using the MD-L and MD-S commands.