Data transfer via communication ports
EXAMPLE
Transmit the characters "ABCDEFGH" to an external device connected to COM port 1. For start code and end
code the default settings "No-STX" and "CR" are selected.
Offset
Transmission data
"Transmission done" flag
Execution condition
F159_MTRN execution
POU Header and LD Body
ST Body
When the variable bSend is set to TRUE, the function F10_BKMV copies the characters of the string
sSendData to the buffer awSendBuffer beginning at awSendBuffer[1].
Then, F159_MTRN sends the data from the first element of the send buffer (awSendBuffer[0]) as specified by
s_Start. The length of the string to be sent (8 bytes) is set at n_Number (using the function LEN to calculate
the number of bytes). The data is output from COM port 1 as specified by d_Port.
736
0
2
3
4
( C R )
A
B
C
D
E
F
G H
Transmission
ON
OFF
ON
OFF