Siemens TIA Portal provides DeviceStates and ModuleStates instructions for diagnosing remote I/O module status. This article uses a Siemens 1212C V4.5 PLC communicating with Solidot's PROFINET coupler XB6S-PN2002 as an example.
After creating a program and establishing communication with the XB6S-PN2002 coupler, preparations are complete.
I. Reading Coupler Status via DeviceStates XB6S-PN2002的状态
1.Create a global DB and define a Device
array to monitor module status.
2.Call the function block and add the array:
Set LADDR
to the target PROFINET system.
Set MODE=2
.
Link the Device
array to STATE
.
3.Test: Download the program and monitor the Device
array.
If device 1 loses communication, Device[1]
returns TRUE
.
II. Reading Coupler/Submodule Status via ModuleStates
1.Create a global DB and define a Module
array.
2.Call the function block:
Set LADDR
to the coupler (e.g., "pnio").
Set MODE=5
.
Link the Module
array to STATE
.
3.Test: Monitor the Module
array for status (e.g., maintenance alerts).
Example
For a system with 5 modules (slots 1-5):
Slot 1 & 3 trigger maintenance alerts → STATE
bits:Bit 0=1
(fault), Bit 2=1
(slot1 alert), Bit 4=1
(slot3 alert)
This demonstrates Solidot remote I/O module XB6S PROFINET coupler status monitoring via program variables.