● The GPTRNS, pGPSEND, and GPSEND instructions should be executed after confirming
that the general-purpose communication clear to send flag for the target COM port and
connection is ON and that the general-purpose communication sending flag is OFF.
● For the GPSEND instruction, be sure to keep the execution condition ON until the completion
of the transmission that sets the general-purpose communication sending flag to OFF.
● The general-purpose communication sent flag in the WX area is used for confirming the
completion of the transmission using the general-purpose communication.
● When data is sent to a communication port that is undergoing transmission, it results in no
operation. No error occurs.
● Sending zero-byte data results in an error.
● For a GPTRNS instruction and a pGPSEND instruction, up to 16 instructions can be
executed simultaneously for different COM ports and connections. (The total of simultaneous
usage of SEND, RECV, GPTRNS, pGPSEND, and pPMSET instructions)
● The GPTRNS, pGPSEND, and GPSEND instructions are not available in interrupt programs.
■
Precautions during programming (in the case of SCU)
● If a positive number is specified for [n], the start code and end code that are specified in the
configuration menu are automatically added to the data to be sent. Do not include a start
code or an end code in the sent data.
● If an end code will not be added, specify a negative number for the amount of sent data [n].
In addition, select "SS" as the operation units.
● The maximum volume of data that can be sent with GPTRNS, pGPSEND, and GPSEND
instructions is 4,096 bytes, including a start code and an end code.
■
Precautions during programming (in the case of CPU with built-in ET-LAN)
● General-purpose communication can use user connections 1 to 16. It cannot be used for the
system connection and the expansion user connections 17 to 216.
● User connections should be in the "connected" state. We recommend using the FPWIN GR7
tool software to set "Open automatically" in Built-in ET-LAN>User connection information
setting>Open type. The connections can also be connected with the OPEN instruction.
● No header or terminator is added to data to be sent. Store the start code and end code as
part of the send data if they need to be sent to match the external device protocol.
● The maximum volume of data that can be sent in a single instance with GPTRNS,
pGPSEND, and GPSEND instructions is 16,384 bytes.
■
Sample program (in the case of SCU)
● This program checks that the general-purpose communication mode is on (X8:ON) and that
general-purpose sending is not in progress in the same port (Y8:OFF), and then starts up the
sending program.
● Using the SSET instruction, convert any given message into an ASCII string. Set the number
of sent characters to the data register DT100, and the sent message to the data register
DT101.
● Using the UNITSEL instruction, specify the slot number (U0) and the COM. port number
(U1).
● In the GPTRNS / pGPSEND / GPSEND instruction, specify and execute the start of the table
that stores the message to be sent (DT101) and the number of characters in the data
(DT100).
9.3 Sending Operation
WUME-FP7COM-07 9-11