Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 9 of 15

SYSMAC C200H-IDS01-V1/IDS21 ID Sensor Operation Manual: SECTION 3 Programming, pages 63 to 71

Pages 63 to 71 of 114, from SYSMAC C200H-IDS01-V1/IDS21 ID Sensor Operation Manual

The original document is the PDF (1.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Omron C200H-IDS01-V1

Page 63

Program Examples

Section 3-1

Program Example 8: Collating Check Code of Data Carrier’s Data Command execution input

10400 MOV(21) ID busy

#0005 101

10906

Sets the number of words in the command data to 5 words.

MOV(21)

Sets the beginning word where the command data is stored to DM 0800.

#0800 102

10906

Holds the status until the ID Sensor Unit begins executing the command.

10000

Command execution flag

10906

10400 DIFD(14)

Processing end

10908 10908 ANDW(34) 104 #FF00 DM0810 CMP(20)

Judges the result of processing

DM0810 #0000 25506

10407

10909

Data error output

10910

Command error end output

Equal flag DC warning 10407 Equal flag Data in the Data Carrier Command Data in the CPU

15

00

Address

0

000F

DM 0800

4D

44

0010

DM 0801

4B

31

0011

DM 0802

00

10

0012 Calculation object

DM 0803

00

20

DM 0804

2A

0D

Check area

002D 002E 002F 0030

48

7

Check code

Page 64

Program Examples Operation

Section 3-1 When the command execution input is ON, the number of words in the command (5) and the beginning word where the command is stored (DM 0800) are set using MOV, and the command execution flag (10000) is turned ON. IR 10906 holds this status until the ID Sensor Unit begins executing the command. While the ID Sensor Unit is executing the command, the ID Busy flag (word n+4 bit 00) is set to ON. When the write operation is completed, the ID Busy flag turns OFF. When the write operation has been completed, the result can be checked with an error flag. If the write operation has been completed normally and the DC Warning Flag (10407) has been turned ON, the Data Error Output (10909) will be turned ON. If there has been an error, the Command Error Output (10910) turns ON. Note Although the ID Busy flag normally turns OFF upon completion of the command, 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.

49

Page 65

Program Examples

Section 3-1

Program Example 9: Checking Number of Overwriting Operations on Data Carrier Command execution input

10400 MOV(21) ID busy

#0005 101

10906

Sets the number of words in the command data to 5 words.

MOV(21)

Sets the beginning word where the command data is stored to DM 0800.

#0800 102

10906

10906

Holds the status until the ID Sensor Unit begins executing the command.

10000

Command execution flag

10400 DIFD(14)

Processing end

10908 10908 ANDW(34) 104 #FF00 DM0810 CMP(20)

Judges the result of processing

DM0810 #0000 25506

10407

10909

Output for excessive overwriting operations

10910

Command error end output

Equal flag DC warning 10407 Equal flag Data in the Data Carrier Command Data of PC when using MD-L Command

Command Data of PC when using MD-S Command

15

15

00

00

Address 7

0

007F

DM 0800

4D

44

DM 0800

4D

44

MD

0080

DM 0801

4C

31

DM 0801

53

31

S1

0081

DM 0802

00

80

DM 0802

00

80

0082

DM 0803

00

10

DM 0803

00

01

0083

DM 0804

2A

0D

DM 0804

2A

0D

*

Number of writing operations area

0084

Note When using the MD-S command, write in advance the number of overwriting operations onto the number of writing operations area using the write command. It will be “0493E0” for a DC with the number of overwriting operations set for 300,000 operations.

50

Page 66

Monitoring

Section 3-2

Operation

When the command execution input is ON, the number of words in the command (5) and the beginning word where the command is stored (DM 0800) are set using MOV, and the command execution flag (10000) is turned ON. IR 10906 holds this status until the ID Sensor Unit begins executing the command. While the ID Sensor Unit is executing the command, the ID Busy flag (word n+4 bit 00) is set to ON. When the write operation is completed, the ID Busy flag turns OFF. When the write operation has been completed, the result can be checked with an error flag. If the write operation has been completed normally and the DC Warning Flag (10407) has been turned ON, the Data Error Output (10909) will be turned ON. If there has been an error, the Command Error Output (10910) turns ON. Note Although the ID Busy flag normally turns OFF upon completion of the command, 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.

3-2

Monitoring This section explains the use of the Handheld Programming Console to monitor data communication between the ID Sensor and the Data Carrier and to monitor errors. Except where otherwise noted, the operations covered in this section can only be performed while the Handheld Programming Console is in MONITOR mode.

3-2-1

Connecting the Handheld Programming Console Use the C200H-PRO27E Handheld Programming Console to monitor the operations of the ID Sensor Unit. Before connecting the Programming Console to the ID Sensor Unit, turn OFF the power to the PC. Use the optional C200H-CN222 (2 m) or C200H-CN422 (4 m) connecting cable to connect the Handheld Programming Console to the ID Sensor Unit. Connect the cable to the connector labeled “MONITOR” on the front panel of the ID Sensor Unit. Refer to the connection diagram on page 2.

Attaching the Keyboard Sheet

Attach the keyboard sheet (provided with the ID Sensor Unit as an accessory) as shown in the following figure.

Insert the keyboard sheet into the slots on both sides of the keyboard, and slide into place.

51

Page 67

Monitoring

3-2-2

Section 3-2

Mode Setting The Handheld Programming Console can be operated in three modes; the functions and applications of these modes are outlined in the following table. Use the Mode selector switch on the Handheld Programming Console to select the mode. Note that these modes apply only to the ID Sensor Unit; they do not apply to the CPU.

Programming Console Key Layout

C500-IDS01-V1

Mode selector switch

Programming Console Modes Mode RUN

Function Application In this mode, the CPU transfers data to and from the Data Set the ID Sensor to RUN mode for normal Carrier according to the program in the CPU. It is a normal operation. operating mode only; no key input is possible.

MONITOR

In this mode, use Read, Write, Continuous Write, and Step Write to monitor data communication between the ID Sensor and the Data Carrier. In this mode, the ID Sensor Unit operates only via commands input from the Handheld Programming Comsole; commands from the CPU are ignored.

PROGRAM

52

Not used.

The ID Sensor Unit reads/ An easy operation test such as Read, Step writes data directly from/to the Write or Continuous Write can be performed Data Carrier. when installing the ID Sensor. The ID Sensor Unit repeatedly executes Read, Write, Auto Read, or Auto Write. If an error occurs, the corresponding error code is displayed on the Programming Console. (Refer to 3-2-10 Error Codes.) Any communication error that has occurred in RUN mode is displayed on the Programming Console.

Use this mode to test (TEST) and adjust the speed of the Data Carrier and the distance from the Read/Write Head (or Antenna).

If an error occurs, use MONITOR mode to determine the cause. (Refer to 3-2-9 Error Log Display (ERR).) –––

Page 68

Monitoring

Section 3-2

RUN Mode

In this mode, the CPU transfers data to and from the Data Carrier according to the program in the CPU. It is a normal operating mode; data cannot be input. The following message appears on the Handheld Programming Console display.

<RUN>

PROGRAM Mode

This mode is not used, as the ID Sensor Unit cannot be programmed. When the mode selector on the Programming Console is set to the PROGRAM position, the following message is displayed.

<PROGRAM> <MODE ERROR> MONITOR Mode

When the selector is set to the MONITOR position, the following message is displayed, indicating that the operation of the ID Sensor Unit can be monitored.

<MONITOR>

Note

BZ

1. The CPU program is not executed in this mode. MONITOR mode is used specifically for monitoring operation of the ID Sensor Unit. 2. After monitoring the ID Sensor Unit, be sure to set the Handheld Programming Console to RUN to resume normal operation.

MONITOR Mode Functions and Operation

The following table gives a brief explanation of the commands used for monitoring and their functions. Each command is explained in more detail later in this section. Note that these commands can only be used when the Programming Console is in MONITOR mode.

Monitor command JOB

Function Sets a Read/Write Head (or Antenna) word number (fixed to 1) and address page number.

Key sequence

JOB

SET

INC

SET

DEC

DATA

0

0

7

F

(IDS01-V1)

0

(IDS21)

1

2

SET

7

53

Page 69

Monitoring

Section 3-2

Monitor command Start address/end address setting

Function

Key sequence

––– RESET INC

DEC

(Start/End Selection)

0

ADRS

0 INC

F

F

DEC

DATA setting

––– DATA

READ

0

0

F

F

Reads 1 byte of data from a specified address of the Data Carrier.

Start address setting

Step Write (WRITE 1)

Writes 1 byte of data to a specified address of the Data Carrier.

Start address setting

Data setting

Continuous Write (WRITE 2)

Writes several bytes of identical data to a specified address range of the Data Carrier.

Start address setting

End address setting

READ

WRITE

1

Data setting

WRITE

2

Monitor test (TEST)

54

Use this command to repeatedly execute Read, Write, Auto Read, or Auto Write in a specified address range of the Data Carrier and monitor error messages that occur as a result of command execution. The specified address range is accessed at one-second intervals.

Start address setting

End address setting

(Read or Auto Read)

TEST

1

Data Setting (Write or Auto Write)

4

Page 70

Monitoring

Section 3-2

Monitor command Function Error log display Use this command to display errors that occurred while the ID Sensor was in RUN mode. Error messages and corresponding codes are displayed, and errors are classified as either “newest error” or “statistical error”.

Initial Display

Key sequence

1

ERR

INC

DEC

2 3

SET

4

SET

(Date change)

SET

1

: displays newest error information

2

: displays statistical error information

3

: clears newest error information

4

: clears statistical error information

When the mode selector is in the MONITOR mode, the following message is displayed:

<MONITOR>

BZ

Indicates that the buzzer is enabled. Press the "B" key to alternately enable or disable the buzzer.

Note When the Programming Console is in MONITOR mode and the buzzer is enabled, only the following keys are functional: RESET

RESET Display

DATA

ADRS

JOB

B

Press the RESET key to return the screen to RESET status. Press the RESET key either after a monitoring operation has been completed, or during a monitoring operation to abort that operation. The following message is displayed when the RESET key is pressed:

C200H-IDS01-V1 The number of the Read/Write Head connected to the ID Sensor Unit. Usually fixed to 1. (See notes below.)

C200H-IDS21 The number of the Read/Write Antenna connected to the ID Sensor Unit. Usually fixed to 1. Address page number (See notes below.) (Refer to Address Page Numbers below.)

Address page number (Refer to Address Page Numbers below.)

HEAD 1 PAGE 00

HEAD 1 PAGE 0A RESET

RESET

STadrs00 data 00

STadrs00 data 00

Address Data ST: Start address

Address Data ST: Start address

ED: End address

ED: End address

55

Page 71

Monitoring

Section 3-2 Note

1. The number “1” need not be changed or reset, unless otherwise instructed or necessary. 2. The C200H-IDS01-V1 indicates “HEAD 1” while the C200H-IDS21 indicates “ANT.1”. Throughout this section, “HEAD 1” is displayed on the screen, but “ANT.1” will be displayed when the C200H-IDS21 is used. 3. The address page number must be set in hexadecimal on the C200HIDS01-V1 and decimal on the C200H-IDS21.

3-2-3

The JOB Function Use the JOB operation when the current address page number must be changed. The JOB operation can also be used to set a Read/Write Head (or Antenna) wordnumber and address page number. However, since the Read/Write Head (or Antenna) word number is already fixed to 1, no word number has to be set.

Address Page Numbers

There are 2K bytes of addresses in the Data Carrier. Address Page Number 0 1 2 3 4 5 6 7 000 100 200 300 400 500 600 700 through through through through through through through through 0FF 1FF 2FF 3FF 4FF 5FF 6FF 7FF Address range

8 9 A B C D E F 800 900 A00 B00 C00 D00 E00 F00 through through through through through through through through 8FF 9FF AFF BFF CFF DFF EFF FFF 10 11 12 13 14 15 16 17 1000 1100 1200 1300 1400 1500 1600 1700 through through through through through through through through 10FF 11FF 12FF 13FF 14FF 15FF 16FF 17FF

56