Using Protocol Macros

Section 5-3

e)Transferring the created project to the Board:

See 11.1 Transferring and Reading Protocol Data between Personal Computers and Serial Communications Boards.

3.Create the ladder program.

a)Setting Send Data

Specifying Operands

Set the send data in the I/O memory after the S+1 operand of the PMCR(––) instruction. Set the number of send data words (including S itself) in S.

Direct Designations

Set the send data in the I/O memory specified by the read variables in the send message.

Specifying Link Words

Set the send data in the O1 or O2 area of the Link Word Area.

b)Coding PMCR(––)

 

Protocol Macro

Input condition

Executing Flag

PMCR

#1100

DM0000

DM1000

1:Use port 1, 600: Sequence No. 100 First word of send data

First storage word for receive data

If the input condition turns ON when the Protocol Macro Executing Flag (IR 20708 for port 1) is OFF, communications sequence No. 100 registered in the Serial Communications Board is called, and data is sent and received via port 1 of the Serial Communications Board.

The amount of send data depends on the number of words specified in DM 0000 (the number of words after DM 0001 plus 1 for DM 0000 itself), and is sent from the next word after DM 0001.

S: DM 0000

Number of words

 

 

Send data

 

 

 

 

Number of send words plus 1 for DM 0000

Number of words

The receive data is stored in consecutive words beginning with DM 1000, and the number of words actually stored in DM 1000 (the number of words after DM 1001 plus 1 for DM 1000 itself) is stored.

D:DM 1000 DM 1001

Number of words

Receive data

Number of receive words plus 1 for DM 1000

Number of words

c)Execute PMCR(––)

4.For details on the confirming operation, see Section 12 Tracing and I/O Memory Monitoring.

Transmission Line Tracing

The data in the send/receive messages flowing over the transmission line (RS-232C or RS-422A/485) and the control codes are traced.

I/O Memory Monitoring

Monitors send/receive data and the status of the various flags.

69

Page 80
Image 80
Omron CQM1H-SCB41 operation manual Transferring the created project to the Board