Specifications
6 - 6
6.2.2 Sequence program
Create a sequence program to send data to the PLC CPU on the receiving side.
Perform the open processing for the connection 1 and send data.
After data sending, perform close processing for connection 1.
POINT
After creating a sequence program, perform the following operations with the GX
Developer.
1) Saving to FD
Drive/Path : A:
Q-E71
Project name : EX2-A
( indicates a demonstration machine No.)
Example: For demonstration machine No.1, EX2-A1
2) Designating connection destination (Refer to Section 5.2.3)
3) Writing to PLC CPU (Refer to Section 5.2.4)
(1) List of devices to be used
Device name Description Device name Description
SM400 Normally ON X0B Switch to command closing the connection.
M0
Turns ON for only 1 scan after the open
processing for connection No.1 is completed.
X20 to X2F Data sent to the receiving side.
M1
Turns ON for only 1 scan when the open
processing for connection No.1 is completed
abnormally.
X0B9
(X(n+1)9)
Turns ON when the initial processing of the
Ethernet module is completed normally.
M10
Turns ON for only 1 scan after the close
processing for connection No.1 is completed.
X0BC
(X(n+1)C)
Turns ON when COM.ERR LED turns on.
M11
Turns ON for only 1 scan when the close
processing for connection No.1 is completed
abnormally.
Y7A
Turns ON when the data sending is
completed normally.
M20
Turns ON for only 1 scan after the data
sending is completed.
Y7B
Turns ON when the data sending is
completed abnormally.
M21
Turns ON for only 1 scan when the data
sending is completed abnormally.
Y0B7 COM. ERR LED off request
M22
Turns ON at the data sending. Turns OFF at
the completion of data sending.
D0 to D9
Stores the control data of the OPEN
instruction.
M48
Turns ON when the connection No. 1 is in the
open status.
D10 to D11
Stores the control data of the CLOSE
instruction.
M64
Turns ON when the open request for the
connection No. 1 is being performed or while
the connection No. 1 is opened.
D20 to D21
Stores the control data of the BUFSND
instruction.
X0 to X7 Data sent to the receiving side. D22 Stores the send data length.
X8 Switch to command sending data D23 Stores the send data (X0 to X7).
X9
Switch to command clearing the error display
on the display LED
D24 Stores the send data (X20 to X2F).
X0A Switch to command opening the connection —— ————