Using Protocol Macros

Section 5-7

Ladder Programming Example

The following diagram shows an example in which sequence number 000 (PRESENT VALUE READ) of a Temperature Controller (E5jK Read System) is executed using the PMCR(––) instruction. If the sequence has been completed normally, the present value that has been read is transferred to another word.

Protocol Macro

Executing Flag

Input condition

00000020708

Protocol Macro

Executing Flag

20708

PMCR

If input condition IR 00000 is ON and the Protocol

 

Macro Executing Flag IR 20708 is OFF, then sequence

#1000

No. 000 is executed for Serial Communications Board

DM 0100

port 1 and the present value is stored in DM 0201 and

DM 0200

after.

 

 

Input condition

Protocol Macro

Step Error

Executing Flag

Processing Flag

000100

20708

20709

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step Error

Processing Flag

20709

Protocol Macro

Executing Flag

IR 20708

DIFD (14) 00100

MOV (21)

DM 0201

DM 0300

FAL (06) 01

If Protocol Macro Executing Flag IR 20708 turns OFF, IR 00100 turns ON (and remains ON for one cycle).

If Protocol Macro Executing Flag IR 20708 is OFF and Step Error Processing Flag IR 20709 is OFF when

IR 00100 turns ON, then the data received in DM 0201 is moved to DM 0300.

If IR 00100 is ON (sequence end) and Step Error Pro- cessing Flag IR 20709 is ON, the sequence has ended abnormally and a FAL(06) instruction (FAILURE ALARM AND RESET instruction) is executed.

00100

When sequence ended normally:

Step Error Processing Flag IR 20709

When sequence ended abnormally:

Step Error Processing Flag IR 20709

Sequence Sequence Sequence

executed completed re-executed

One cycle

Present value in DM 0201 moved to DM 0300

FAL instruction executed

Precaution on Reception Failures for PMCR(––)

The reception buffer is cleared to all zeros just before the communications se- quence is executed. If programming is included in the ladder diagram to periodi- cally read, it should be designed to read the data only when receptions are suc- cessful, and not when the contents of the buffer has been cleared to all zeros. The above ladder programming shows one way to achieve this.

90

Page 101
Image 101
Omron CQM1H-SCB41 operation manual Ladder Programming Example, Precaution on Reception Failures for Pmcr