General-Purpose Communication
7.2 Sending Operation
7.2.1 Overview of Sending Operation
Sending in the general-purpose communication is performed by formulating a data table for
sending on the given operation memory, and subsequently executing GPSEND command.
External device
ABCDE
Send message/data
D CDT102
・・EDT103
B ADT101
U 5DT100
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
・・・・・・・・
00002
・・・・・・・・
00001
PLC
Send data based on GPSEND
command
Note: The above figure indicates the data part. In communication via LAN, a header including size information of the sent data is added.
Sample program
• Confirm that Connection 1 is established in the general-purpose communication mode (X80),
and that the general-purpose sending process is not in progress for the same port (Y80),
and start up the sending program.
• In the SSET command, convert a given message into an ASCII text string, and specify the
number of strings to be sent in the data register (DT100), and the message to be sent from
the data register (DT101).
• In the UNITSEL command, specify the slot No. (LAN port: U100) and the connection No. (U1).
• In the GPSEND command, specify and execute the header of the table where the message
to be sent is saved (DT101) and the No. of characters (DT100).
R0
(
)
DF
SSET DT100“ABCDE”
R100
R100
R100
UNITSEL U1U100
GPSEND . US DT101 DT0DT100
X80 Y80
GPSEND execution conditions
Clear to send flag: ON
Sending flag: OFF
SEND processing
S: Header of Sent Data (DT101)
n: No. of Sent Characters (DT100)
D: Execution Result Code (DT0)
Clear to send
general-purpose
communication flag
Sending general-
purpose
communication flag
R100
Data conversion
S1: Sent Data
S2: Save Sent Data
DT100: No. of Sent Characters
DT101 onward: Sent Data
R101
( )
DF
Y80 R101
( )
DF /
Confirm sending completion
Reset GPSEND execution
conditions
S1
S2
S n D
S1 S2
Settings for communication port
S1: CPU LAN port (U100)
S2: Connection 1 (U1)
7-4