80
3 DATA COMMUNICATION USING NONPROCEDURAL PROTOCOL
3.2 Transmitting Data to Target Device
Program for data transmission
Program example for data transmission
The following shows the program for data transmission using nonprocedural protocol and its example.
For details on OUTPUT instructions, refer to the dedicated instruction. (Page 520 Dedicated Instructions)
Start the programmable controller on the host station.
The value set with Engineering tool is stored in the C24.
Input the user data transmission command signal.
Executes the OUTPUT instruction after storing the send data and the control data for the OUTPUT instruction in the
device.
Data is sent when the OUTPUT instruction is executed.
C24 transmission processing completes and the OUTPUT instruction completion device turns ON.
When the completion device +1 (abnormal completion signal) turns ON, the error code is stored in the control data completion
status (S1+1).
M0 M1
G.OUTPUT
M0Un D0 D11
M1
OUTPUT
0
n
Ò
Ó
Ô
Õ
(CH1)
Transmission instruction
Create transmission data from D11
Create control data from D0
Processing for normal completion
Processing for abnormal completion(retransmission, etc.)
Module READY (X1E)
Transmission instruction
OUTPUT instruction
OUTPUT instruction completion device
ON when transmission abnormal completion
OUTPUT instruction completion device + 1
(normal completion/abnormal completion)
1 scan
Transmission data count (Un\G1024)
Transmission data
Transmission data (from Un\G1025)
Data transmission