4 SERIAL COMMUNICATION FB
4.2 M+FX5UCPU-SerialComm_Input
23
4
■Public label
*1 Even if a serial communication error occurs in the used communication channel, error completion and error code are not output and the
FB does not stop. Use a user program to detect the error. For serial communication error and serial communication error code, refer to
the following manual.
MELSEC iQ-F FX5 User's Manual (Serial Communication)
FB details
No. Variable name Name Data type Range Description
(11) pb_bSerialComErrUndetection Serial communication
error undetection
mode
Bit ON, OFF ON: FB does not detect serial communication error.
*1
OFF: FB detects serial communication error.
Item Description
Available device CPU module FX5U CPU, FX5UC CPU
Engineering tool GX Works3 Version 1.007H or later
Language Ladder diagram
Number of basic steps 496 steps
The number of FB steps integrated in the program varies depending on the CPU module used, the input/output definition, and
the setting options of GX Works3. For the setting options of GX Works3, refer to GX Works3 Operating Manual.
Processing • When i_bEN (Execution command) turns ON, serial data transfer goes into receiving standby state.
• In data receiving standby state, when the FB receives the data, the FB writes the number of received data to
o_uRecvDataLength (Number of receive data points) and writes the received data to o_uRecvData (Receive data storage
device). When receiving is completed, o_bRecvComp (Normal completion) turns ON.
• This FB checks the following input values when started up. If an error occurs, o_bErr (Error completion) turns ON, and
o_uErrId (Error code) stores the error code.
(1) Receive channel number
(2) Allowable number of receive data points
• If an error occurs during the data communication processing, o_bErr (Error completion) turns ON, and the serial
communication error code is stored to o_uErrId (Error code). For error codes, refer to Page 25 Error code. When
pb_bSerialComErrUndetection (Serial communication error undetection mode) is turned ON by a user program, this FB
does not detect serial communication error. Detect serial communication error by a user program.
• When data receiving is suspended and passes time-out time, time-out occurs, and then o_bRecvComp (Receiving
complete) turns ON.
FB compilation method Macro type
FB operation Pulsed execution (multiple scan execution type)
Timing chart of I/O signals [When the operation is completed successfully]
<ch1 example>
[When the operation is completed with an error]
FB error (When the receive channel number is outside the setting range)
i_bEN
Turns OFF after 1 scan time
o_bENO
Receiving
0H
Serial data transfer
SM8562 (ch1 receive completion)
o_bOK
o_bErr
o_uErrId
i_bEN
o_bENO
0H Error code
o_bOK
o_bErr
o_uErrId