Program Examples; Writing To The Data Carrier - Omron SYSMAC C200H-IDS01-V1 Operation Manual

Id sensor
Hide thumbs Also See for SYSMAC C200H-IDS01-V1:
Table of Contents

Advertisement

Program Examples

Section Overview
3-1

Program Examples

3-1-1

Writing to the Data Carrier

Program Example 1:
The Write Command
Command
execution input
10900
10900
Command data in CPU
15
DM 0000
57
DM 0001
48
DM 0002
00
DM 0003
10
DM 0004
12
DM 0005
14
DM 0006
0D
40
This section contains example programs that illustrate data transfer between
the ID Sensor Unit and the CPU of the PC. Six communication commands
(Write, Auto Write, Read, Auto Read, Clear-all, and Auto Read/Write Abort)
can be used.
Also included in this section are a description of Monitoring functions and an
explanation of Command Processing Time and Turnaround Time.
The following conditions apply to the example programs in this section:
1,2,3...
1. The ID Sensor Unit unit number switch is set to 0.
2. The command data is stored in the DM area of the CPU.
Refer to 2-3 The User Program for an overview of program operation.
This section illustrates program examples of the Write, Auto Write, and Clear-
all commands.
10400
ID busy
00
54
WT (Write)
31
H1 (Hexadecimal, Head 1)
06
Beginning address in which data is
to be written in Data Carrier
11
Data to be written to Data Carrier,
13
numbers 10 through 14 (5 bytes)
2A
If the number of bytes to be written to the Data
00
Carrier is odd, shift codes 2A and 0D forward
one byte and write 00 into the last 8 bits.
Sets the number of words in the
MOV (21)
command data (7 in this example)
#0007
Word n+1
101
Sets the beginning word where the
MOV (21)
command data is stored (DM 0000
in this example).
#0000
102
Word n+2
(Bit in IR area) Holds the status
10900
until the ID Sensor Unit begins ex-
ecuting the command.
Command execution flag
10000
Write is executed.
Section 3-1
Data to be written
to Data Carrier
7
Address
0006
10
0007
11
0008
12
0009
13
000A
14
Data cannot be written to
write-protected areas.
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c200h-ids21

Table of Contents