Mitsubishi Electric MELSEC iQ-F Reference
Mitsubishi Electric MELSEC iQ-F Reference

Mitsubishi Electric MELSEC iQ-F Reference

Fx5 ethernet/cc-link ie function block
Hide thumbs Also See for MELSEC iQ-F:

Advertisement

Quick Links

MELSEC iQ-F
FX5 Ethernet/CC-Link IE
Function Block Reference

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSEC iQ-F

  • Page 1 MELSEC iQ-F FX5 Ethernet/CC-Link IE Function Block Reference...
  • Page 3: Table Of Contents

    CONTENTS CHAPTER 1 FUNCTION BLOCK (FB) LIST CHAPTER 2 FX5 ETHERNET FB M+FX5UCPU-EN_ConnectionOpen ............4 M+FX5UCPU-EN_ConnectionClose .
  • Page 4: Chapter 1 Function Block (Fb) List

    FUNCTION BLOCK (FB) LIST This Function Block (FB) list shows the FBs used with the MELSEC iQ-F FX5 Ethernet/CC-Link IE Field Network module. FX5 Ethernet FB Name Description M+FX5UCPU-EN_ConnectionOpen Opens (establishes) a connection. M+FX5UCPU-EN_ConnectionClose Closes (disconnects) the connection. M+FX5UCPU-EN_Recv_Socket Reads the data received from the target device through socket communication.
  • Page 5 MEMO 1 FUNCTION BLOCK (FB) LIST...
  • Page 6 FX5 ETHERNET FB M+FX5UCPU-EN_ConnectionOpen Name M+FX5UCPU-EN_ConnectionOpen Overview Item Description Overview Opens (establishes) a connection for data communication with target device. Symbol M+FX5UCPU-EN_ConnectionOpen i_bEN o_bENO i_stModule o_bOK i_uConnectionNo o_bErr o_uErrId (8) pbi_bUseParameters (9) pbi_uProtocol (10) pbi_uOpen_System (11) pbi_uLocal_Port_No (12) pbi_uTarget_Port_No (13) pbi_u2IP_Address Labels ■Input label Variable name...
  • Page 7 ■Public label Variable name Name Data type Range Description pbi_bUseParameters Parameter used ON, OFF Specify whether to use the parameter values set by the engineering tool or the following operation parameter values when processing for opening a connection. • OFF: Performs open processing according to the target device configuration setting made by the engineering tool.
  • Page 8 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). Error code...
  • Page 9: M+Fx5Ucpu-En_Connectionclose

    M+FX5UCPU-EN_ConnectionClose Name M+FX5UCPU-EN_ConnectionClose Overview Item Description Overview Closes (disconnects) a connection for data communication with target device. Symbol M+FX5UCPU-EN_ConnectionClose i_bEN o_bENO i_stModule o_bOK i_uConnectionNo o_bErr o_uErrId (8) pbo_uErrConn_No Labels ■Input label Variable name Name Data type Range Description i_bEN Execution command ON, OFF ON: The FB is activated.
  • Page 10 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). Error code...
  • Page 11 M+FX5UCPU-EN_Recv_Socket Name M+FX5UCPU-EN_Recv_Socket Overview Item Description Overview Reads the data received by socket communication. Symbol M+FX5UCPU-EN_Recv_Socket i_bEN o_bENO i_stModule o_bOK i_uConnectionNo o_bErr o_uErrId o_uRecvData (9) pbi_bReadTiming Labels ■Input label Variable name Name Data type Range Description i_bEN Execution command ON, OFF ON: The FB is activated.
  • Page 12: M+Fx5Ucpu-En_Recv_Socket

    • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). 2 FX5 ETHERNET FB...
  • Page 13 Error code Error code Description Action (hexadecimal) Refer to the MELSEC iQ-F FX5 User's Manual (Ethernet All error code Same as the error code caused by the data receiving (SP.SOCRCV) instruction. Communication) 2 FX5 ETHERNET FB 2.3 M+FX5UCPU-EN_Recv_Socket...
  • Page 14 M+FX5UCPU-EN_Send_Socket Name M+FX5UCPU-EN_Send_Socket Overview Item Description Overview Sends the data to the target device of the specified connection. Symbol M+FX5UCPU-EN_Send_Socket i_bEN o_bENO i_stModule o_bOK i_uConnectionNo o_bErr o_uErrId UW i_uSendData Labels ■Input label Variable name Name Data type Range Description i_bEN Execution command ON, OFF ON: The FB is activated.
  • Page 15: M+Fx5Ucpu-En_Send_Socket

    • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). Error code...
  • Page 16: M+Fx5Ucpu-En_Slmp_Deviceread_Ip

    M+FX5UCPU-EN_SLMP_DeviceRead_IP Name M+FX5UCPU-EN_SLMP_DeviceRead_IP Overview Item Description Overview Reads data from the target device with IP address specification. Symbol M+FX5UCPU-EN_SLMP_DeviceRead_IP i_bEN o_bENO (10) i_stModule o_bOK (11) i_u2IP_Address o_bErr (12) o_uErrId (13) UW i_uSubCommand o_uReadData (14) UW i_uDeviceCode UW i_u2DeviceNo UW i_uDevicePoints UW i_uChannel UW i_uTarget_Port_No (15) pbi_uRequestModuleIO...
  • Page 17 *1 It can be specified when the target device for reading is MELSEC iQ-R Series. It cannot be specified when the target device for reading is MELSEC Q/L Series or MELSEC iQ-F Series. *2 The allowable range is 1 to 3584 when the target device for reading is MELSEC iQ-F Series. ■Output label...
  • Page 18 Variable name Name Data type Default value Description (14) o_uReadData Read data storage Word [Unsigned]/Bit • When the 0th bit of the subcommand is 1, read the destination String [16-bit] device data in units of bits. Example: When reading the bit device M100 to M107 in units of bits 1st word b8 b7...
  • Page 19 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). 2 FX5 ETHERNET FB...
  • Page 20 960 (when the 0th bit of the sub command is 0) or out of the range from 1 to 3972 (when the 0th bit of the sub command is Refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Error code other than 100 Same as the error code caused by the SLMP frame sending (SP.SLMPSND) instruction.
  • Page 21 M+FX5UCPU-EN_SLMP_DeviceWrite_IP Name M+FX5UCPU-EN_SLMP_DeviceWrite_IP Overview Item Description Overview Writes data to the target device by specifying IP address. Symbol M+FX5UCPU-EN_SLMP_DeviceWrite_IP i_bEN o_bENO (11) i_stModule o_bOK (12) i_u2IP_Address o_bErr (13) o_uErrId (14) UW i_uSubCommand UW i_uDeviceCode UW i_u2DeviceNo UW i_uDevicePoints UW i_uWriteData UW i_uChannel (10) UW i_uTarget_Port_No...
  • Page 22 *1 It can be specified when the target device for writing is MELSEC iQ-R Series. It cannot be specified when the target device for writing is MELSEC Q/L Series or MELSEC iQ-F Series. *2 The allowable range is 1 to 3584 when the target device for writing is MELSEC iQ-F Series. 2 FX5 ETHERNET FB...
  • Page 23: M+Fx5Ucpu-En_Slmp_Devicewrite_Ip

    ■Output label Variable name Name Data type Default value Description (11) o_bENO Execution status ON: The execution command is ON. OFF: The execution command is OFF. (12) o_bOK Normal completion Device writing has been completed normally when this output is on. (13) o_bErr Error completion...
  • Page 24: M+Fx5Ucpu-En_Slmp_Devicewrite_Ip

    • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (Ethernet Communication). 2 FX5 ETHERNET FB...
  • Page 25 1 to 3972 (when the 0th bit of the sub command is Error code other than 100 Same as the error code caused by the SLMP frame sending Refer to the MELSEC iQ-F FX5 User's Manual (Ethernet (SP.SLMPSND) instruction. Communication) 2 FX5 ETHERNET FB 2.6 M+FX5UCPU-EN_SLMP_DeviceWrite_IP...
  • Page 26: Name *1

    CC-LINK IE FIELD NETWORK MODULE FB M+FX5CCLIEF_DeviceRead Name M+FX5CCLIEF_DeviceRead Overview Item Description Overview Reads data from a specified device in the programmable controller of another station. Symbol M+FX5CCLIEF_DeviceRead i_bEN o_bENO i_stModule o_bOK i_u2TargetAddress o_bErr o_uErrId (10) UW i_uDataLength o_uReadData (11) i_s32TargetDevice UW i_uChannel (12) pbi_uCPU_Type...
  • Page 27: M+Fx5Cclief_Deviceread

    Specify the head device of the target station from which device (32) data is to be read. Refer to the MELSEC iQ-F FX5 User's Manual (CC- Link IE) for details on specifying the device. i_uChannel Own station channel Word [unsigned] 1, 2 Specify the channel to be used by own station.
  • Page 28 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). 3 CC-LINK IE FIELD NETWORK MODULE FB...
  • Page 29 Action D000H to DFFFH This error code is the same as the error code that occurs with the Refer to the MELSEC iQ-F FX5 User's Manual (GP.READ) instruction for reading data in the programmable (CC-Link IE) controller of another station.
  • Page 30: M+Fx5Cclief_Devicewrite

    M+FX5CCLIEF_DeviceWrite Name M+FX5CCLIEF_DeviceWrite Overview Item Description Overview Writes data to a specified device in the programmable controller of another station. Symbol M+FX5CCLIEF_DeviceWrite i_bEN o_bENO i_stModule o_bOK i_u2TargetAddress o_bErr (10) UW : i_uDataLength o_uErrId (11) UW i_uWriteData i_s32TargetDevice UW i_uChannel (12) pbi_uCPU_Type (13) pbi_uTargetStation (14) pbi_bArrivalConfirm (15) pbi_uResendCountMax...
  • Page 31: M+Fx5Cclief_Devicewrite

    Character string Specify the head device of the target station to which device data is to be written. Refer to the MELSEC iQ-F FX5 User's Manual (CC- Link IE) for details on specifying the device. i_uChannel Own station channel Word [unsigned] 1, 2 Specify the channel to be used by own station.
  • Page 32 Variable name Name Data type Default value Description (13) pbi_uTargetStation Target station Word [unsigned] 0 to 2 Specify the target station specification method. • 0: Station number specification → Station with the specification method station number specified in "target station address" •...
  • Page 33 Variable name Name Data type Default value Description  (20) pbo_u4ErrTime Error occurrence time Word [unsigned] Clock data at the time of error occurrence is stored. (0..3) 1st word • Upper 8 bits: Month (01H to 12H) • Lower 8 bits: Lower 2 digits of year (00H to 99H) 2nd word •...
  • Page 34 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). Error code...
  • Page 35: M+Fx5Cclief_Send

    M+FX5CCLIEF_Send Name M+FX5CCLIEF_Send Overview Item Description Overview Sends data to the programmable controller of another station. Symbol M+FX5CCLIEF_Send i_bEN o_bENO i_stModule o_bOK (10) i_uTargetNetworkNo o_bErr (11) UW : i_uTargetStationNo o_uErrId (12) UW i_uChannel UW i_uTargetChannel UW i_uDataLength UW i_uSendData (13) pbi_uTargetStation (14) pbi_bArrivalConfirm (15) pbi_uResendCountMax (16) pbi_uMonitorTime...
  • Page 36 Variable name Name Data type Range Description i_uDataLength Send data length Word [unsigned] 1 to 960 Specify the number of words to be sent. • When reading data from RCPU, QCPU, LCPU, or FX5CPU: 1 to 960 • When reading data from QnACPU: 1 to 480 ...
  • Page 37 Variable name Name Data type Range Description (16) pbi_uMonitorTime Arrival monitoring Word [unsigned] 0, 1 to 32767 Specify the monitoring time until completion of time processing. If the processing is not completed within the monitoring time, data is resent until the value specified in "maximum number of resends"...
  • Page 38 • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). Error code...
  • Page 39: M+Fx5Cclief_Recv

    M+FX5CCLIEF_Recv Name M+FX5CCLIEF_Recv Overview Item Description Overview Reads the data received from the programmable controller of another station. Symbol M+FX5CCLIEF_Recv i_bEN o_bENO i_stModule o_bOK i_uRecvChannel o_bErr o_uErrId o_uRecvDataLength o_uRecvData (10) pbi_bReadTiming (11) pbi_uMonitorTime (12) pbo_uResendCount (13) pbo_u4ErrTime (14) pbo_uErrNetworkNo (15) pbo_uErrStationNo (16) pbo_uSendNetworkNo (17) pbo_uSendStationNo (18) pbo_uSendChannel...
  • Page 40 ■Public label Variable name Name Data type Default value Description  (10) pbi_bReadTiming Read timing This label is not used in the FB program and does not need to be set. Data is read at the first END processing after the unit FB is started.
  • Page 41: M+Fx5Cclief_Recv

    • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). Error code...
  • Page 42: M+Fx5Cclief_Setparameter

    M+FX5CCLIEF_SetParameter Name M+FX5CCLIEF_SetParameter Overview Item Description Overview Sets parameters for a module. Symbol M+FX5CCLIEF_SetParameter i_bEN o_bENO i_stModule o_bOK i_uTotalStations o_bErr UW : i_u605NetworkConfigurationSet o_uErrId (10) UW i_u8ReservedStationSet UW i_u8ErrInvalidStationSet (11) pbi_uConstantLinkScanTime (12) pbi_uIpAddress (13) pbi_bNetworkConfigurationSetFlg (14) pbi_bReservedStationSetFlg (15) pbi_bErrInvalidStationSetFlg (16) pbi_bSubMaseterSet (17) pbi_bIP_PacketTransferFlg (18) pbi_bDatalinkFaultyStationSet (19) pbi_bCPU_StopOutputSet...
  • Page 43 ■Public label Variable name Name Data type Range Description  (11) pbi_uConstantLinkS Constant link scan Word [unsigned] This label is not used in the FB program and does not canTime time need to be set. (12) pbi_uIpAddress Upper 2 digits of IP Word [unsigned] ...
  • Page 44: M+Fx5Cclief_Setparameter

    (Execution command). • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). Error code...
  • Page 45: M+Fx5Cclief_Stationnoset

    M+FX5CCLIEF_StationNoSet Name M+FX5CCLIEF_StationNoSet Overview Item Description Overview Sets the station number for the own station. Symbol M+FX5CCLIEF_StationNoSet i_bEN o_bENO i_stModule o_bOK i_uSetStationNo o_bErr o_uErrId Labels ■Input label Variable name Name Data type Range Description i_bEN Execution command ON, OFF ON: The FB is activated. OFF: The FB is not activated.
  • Page 46: M+Fx5Cclief_Stationnoset

    • Every input must be provided with a value for proper FB operation. • Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module parameters, refer to the MELSEC iQ-F FX5 User's Manual (CC-Link IE). Error code...
  • Page 47 MEMO 3 CC-LINK IE FIELD NETWORK MODULE FB 3.6 M+FX5CCLIEF_StationNoSet...
  • Page 48: Instruction Index

    INSTRUCTION INDEX ....24 M+FX5CCLIEF_DeviceRead ....28 M+FX5CCLIEF_DeviceWrite ....37 M+FX5CCLIEF_Recv .
  • Page 49 MEMO...
  • Page 50: Revisions

    Chapter 2, 3 This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 52 Manual number: JY997D64901C When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN Specifications are subject to change without notice.

Table of Contents