Mitsubishi Electric MELSEC iQ-F FX5 Reference Manual page 21

Cpu module function block reference
Hide thumbs Also See for MELSEC iQ-F FX5:
Table of Contents

Advertisement

■Output label
No.
Variable name
Name
(8)
o_bENO
Execution status
(9)
o_bSendComp
Send completion
(10)
o_bRecvComp
Receive completion
(11)
o_bErr
Error completion
(12)
o_uErrId
Error code
(13)
o_uRecvDataLength
Number of receive
data points
(14)
o_uRecvData
Receive data storage
device
*1 The data storage position in the word device varies depending on the 8-bit/16-bit mode setting.
*2 The number of required word devices varies depending on the 8-bit/16-bit mode setting.
■Public label
No.
Variable name
(15)
pb_bSerialComErrUndetection
*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
Item
Description
Available device
CPU module
Engineering tool
Language
Ladder diagram
Number of basic steps
713 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 sending/receiving standby state.
• In data sending standby state, this FB sends the send data specified by i_uSendData (Send data storage device) and
i_uSendDataLength (Number of send data points) using non-protocol triggered by the serial data transfer (RS2) instruction
when i_bSendReq (Sending request) turns ON. When sending is completed, o_bSendComp (Sending complete) turns ON.
• In data receiving standby state, when the FB receives the data, the FB writes the number of the received data to
o_uRecvDataLength (Number of receive data points), writes the received data to o_uRecvData (Receive data storage
device) and then o_bRecvComp (Receiving complete) 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) Send/receive channel number
(2) Allowable number of receive data points
(3) Number of send data points (Only when sending request)
• If an error occurs during data communication processing, o_bErr (Error completion) turns ON, and o_uErrId (Error code)
stores the serial communication error code. For error codes, refer to Page 21 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 the time-out time elapses, time-out occurs, and then o_bRecvComp (Receiving
complete) turns ON.
FB compilation method
Macro type
FB operation
Always executed
Data type
Bit
Bit
Bit
Bit
Word [Unsigned]
Word [Unsigned]
Word [Unsigned]
Name
Data type
Serial communication
Bit
error undetection
mode
FX5U CPU, FX5UC CPU
GX Works3 Version 1.007H or later
Default value
Description
OFF
ON: The execution command is on.
OFF: The execution command is off.
OFF
When this bit is ON, it indicates that data sending is
completed.
OFF
When this bit is ON, it indicates that data receiving is
completed.
OFF
When this label is on, it indicates that an error has
occurred in the FB.
0
Stores the error code that occurred in the FB.
0
Stores the number of bytes of data received.
0
Specify the head address of the device which stores the
received data.
Range
Description
ON, OFF
ON: FB does not detect serial communication error.
OFF: FB detects serial communication error.
4 SERIAL COMMUNICATION FB
4.1 M+FX5UCPU-SerialComm_InputOutput
*1*2
4
*1
19

Advertisement

Table of Contents
loading

Table of Contents