Omron CQM1H-SCB41 Operation Manual page 104

Sysmac cqm1h series serial communications board
Hide thumbs Also See for CQM1H-SCB41:
Table of Contents

Advertisement

Using Protocol Macros
Ladder Programming
Example
Protocol Macro
Executing Flag
Input condition
20708
000000
Protocol Macro
Executing Flag
20708
Protocol Macro
Input condition
Executing Flag
20708
000100
Step Error
Processing Flag
20709
The following diagram shows an example in which sequence number 000
(PRESENT VALUE READ) of a Temperature Controller (E5@K Read System)
is executed using the PMCR( ) instruction. If the sequence has been com-
pleted normally, the present value that has been read is transferred to another
word.
PMCR
DIFD (14) 00100
Step Error
Processing Flag
20709
MOV (21)
FAL (06) 01
Protocol Macro
Executing Flag
IR 20708
00100
When sequence ended
normally:
Step Error Processing
Flag IR 20709
When sequence ended
abnormally:
Step Error Processing
Flag IR 20709
Precaution on Reception Failures for PMCR( )
The reception buffer is cleared to all zeros just before the communications
sequence is executed. If programming is included in the ladder diagram to
periodically read, it should be designed to read the data only when receptions
are successful, and not when the contents of the buffer has been cleared to all
zeros. The above ladder programming shows one way to achieve this.
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
port 1 and the present value is stored in DM 0201 and
DM 0100
after.
DM 0200
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
DM 0201
IR 00100 turns ON, then the data received in DM 0201 is
moved to DM 0300.
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.
Sequence
Sequence
executed
completed
One cycle
Present value in DM 0201
moved to DM 0300
FAL instruction executed
Section 5-7
Sequence
re-executed
89

Advertisement

Table of Contents
loading

Table of Contents