Program Example - Mitsubishi MELSEC iQ-F FX5 User Manual

Hide thumbs Also See for MELSEC iQ-F FX5:
Table of Contents

Advertisement

Program example

The following shows an example of a program to execute consecutively the protocols in order of protocol numbers 4, 7, and 5
from the communication board (CH2) with the predefined protocol support function.
Program example
Drive
instruction
X20
= SD9102 K1
Completion
Completion
status indication
device
device
M0
M1
Completion
status indication
device
M1
Device
Description
X20
Trigger of drive S(P).CPRTCL instruction
M0
S(P).CPRTCL instruction completion device
M1
S(P).CPRTCL instruction completion status indication
device
M101
Execution normal end flag
M102
Abnormal end flag
When the send/receive data monitoring function is used, add a program as follows.
7 PREDEFINED PROTOCOL SUPPORT FUNCTION
222
7.8 Programming
MOV
MOV
MOV
SP. CPRTCL
'U0'
K2
MOV
Device
SD9102
D10
D12
D13
D14
K4
D12
K7
D13
K5
D14
K3
D10
M0
SET
M101
SET
M102
D10
D100
Description
Predefined protocol ready
Start device of control data
Control data (Protocol number executed first)
Control data (Protocol number executed second)
Control data (Protocol number executed third)
Drive S(P).CPRTCL instruction
Protocol number executed first (4)
Protocol number executed
second (7)
Protocol number executed
third (5)
Communication CH2
Consecutive execution of 3
protocols (4  7  5)
Result of executed instruction
Normal end flag is turned ON
Abnormal end flag is turned ON
Error code is stored

Advertisement

Table of Contents
loading

Table of Contents