Panasonic FP Series Programming Manual page 736

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

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].
The first two words of a string contain the string header information (maximum number of characters and the
current number of characters). The string header must not be copied into the buffer. Therefore, enter an offset
of 2 to the starting address of the string before copying the data.
Make sure that the send buffer is big enough for all the data to be sent. To determine its size you must take into
account that two characters of the string SendString can be copied into each element of the array SendBuffer.
SendBuffer[0] is reserved for the total number of bytes to be sent by F159_MTRN.
3. Sending the data using the instruction F159_MTRN
Execute F159_MTRN (see page 741) to
specify the amount of data to be sent
-
specify the communication port to be used
-
output the data from the communication port to the external device.
-
When the execution condition of F159_MTRN turns to TRUE and the "transmission done" flag is TRUE,
transmission starts. (For details on flag operation, see page 757.)
When sending data, operation is as follows:
The number of bytes to be sent is set in offset 0 of the send buffer.
-
The "transmission done" flag turns to FALSE.
-
The data in the send buffer is sent starting with the low order byte in offset 1.
-
The start and end codes specified in the system registers are automatically added to the data sent.
-
During transmission, F159_MTRN cannot be executed again.
-
The "reception done" flag turns to FALSE.
-
The number of bytes received is set to 0 in offset 0 of the receive buffer.
-
Data received is written into the receive buffer
-
When the specified number of bytes has been sent, the "transmission done" flag turns to TRUE. The end code
is automatically added to the data sent. At the end of transmission, the value in offset 0 is automatically reset to
0.
Data transfer via communication ports
735

Advertisement

Table of Contents
loading

Table of Contents