beckhoff TS6271 — 6.1.12 FB_PN_ALARM_DIAG

TwinCAT library and programming 6.1.11 FB_PN_READ_PORT_DIAG This block calls the port diagnostic information of a PROFINET device. VAR_INPUT VAR_INPUT bStart : BOOL; NETID : T_AmsNetId;(* AMS Net ID from Controller *) PORT : T_AmsPort; (* Port used by Controller to communicate with Device *) END_VAR bStart : The block is activated by a rising edge on this input NETID : AMS Net ID of the controller PORT : Port via which the controller communicates with the device (port = Device ID + 1000hex ) VAR_OUTPUT VAR_OUTPUT bBusy : BOOL; str_RemotePort_1 : str_PortDiag; str_RemotePort_2 : str_PortDiag; END_VAR bBusy : When the function block is activated this output is set.

It remains set until a feedback is received. While Busy = TRUE, no new command will be accepted at the inputs. str_RemotePort_1 : This structure [ } 68] contains the diagnostic information for Port 1. str_RemotePort_2 : This structure contains the diagnostic information for Port 2. Requirements 6.1.12 FB_PN_ALARM_DIAG Diagnosis alarms can be read out using this function block. Each instance of this function block makes a PLC input available (“PnIoBoxDiag”). This input must be linked to the “PnIoBoxDiag” input of the device that is to be evaluated. After successful reading of the diagnosis alarms/warnings, the alarm status of the device is reset.

The function block must be called once for each PROFINET device. A running index (iNrAlarms) indicates how many diagnosis alarms have been read from the buffer. TS6271 64 Version: 1.2 Development environment Target platform PLC libraries to be linked TwinCAT v2.11.0 R3 PC or CX (x86, ARM) TcPROFINETDiag.Lib