Chapter 10. PROFINET IO-Controller OperationGFK-2816F August 2015 21310.7.2 PNIO_DEV_COMM Function BlockThe PNIO_DEV_COMM function block monitors communications between a specified PNCand a specified IO-Device.PNIO_DEV_COMM can be used by the application logic to take a corrective action or turn onan indicator if a specific device fails. It might also be used by a custom HMI to show whichPROFINET IO-Device connections are currently established.It is recommended that the All Devices Connected status bit be checked first to determinewhether all devices belonging to the PNC are functioning. If this bit is 0, indicating that one ormore devices is not OK, the PNIO_DEV_COMM function block can then be used todetermine which specific devices are not communicating. For details on this status bit, referto Section 10.8.2, PROFINET IO-Controller Status Reporting.Parameters and Outputs of PNIO_DEV_COMMPNIO_DEV_COMM returns a Boolean indication of whether or not a given PNC is currentlycommunicating with a specified IO-Device. The PNC is identified by the IO Controller inputparameter, which is a PNIO_CONTROLLER_REF data type. The IO-Device is identified bythe IODevice input parameter, which is a PNIO_DEVICE_REF data type.PNIO_DEV_COMM has two Boolean outputs (in addition to ENO) labeled OK and Primary.OK is set ON/true if the PNC is successfully communicating with the IO-Device, otherwise itis OFF/false.The application logic must identify the PNC and the IO-Device in a symbolic manner, passingappropriate Reference ID Variables (refer to the following example) to the correspondinginput parameters.ExampleIn the following sample logic, the RIV iolan_controller01_L3 is assigned to the PNC and theRIV versamax_pns01_L3 is assigned to an IO-Device.If the iolan_controller01_L3 PNC is communicating with the versamax_pns01_L3 IO-Device,the Bool variable LC_PNC01_PNS01_Status is set on. In a simplex (non-redundant) system,Primary is set to On if OK is set to on. .