```pascal // Block Type: FC // Block Name (Original): GNS PLCdia Profibus // Block Number: 2416 // Original Network Languages: LAD, STL // Block Comment: // (c) by SIDEL // Name : General Safety: PLC Diagnostic: Profibus Node Diagnostic // Description: // Function: General Safety // Modul : PLC Diagnostic // Option : Profibus Node Diagnostic // - PLC Profibus Node Diagnostic Control Logic with SFC51 "RDSYSST" // -------------------------------------------------------------------------------- FUNCTION "GNS_PLCdia_Profibus" : Void { S7_Optimized_Access := 'TRUE' } VERSION : 0.1 BEGIN // Network 1: Diagnostic Memory (Original Language: STL) // - Request Memory // --- BEGIN STL Network 1 --- A "GNS PLCdia ProfibusData".I_O_FLT1 O "GNS PLCdia ProfibusData".I_O_FLT2 O "GNS PLCdia ProfibusData".RACK_FLT O "GNS PLCdia ProfibusData".COMPLETE_RESTART O_BRACK A "GNS PLCdia ProfibusData".Device_status[1] A "gIN_ResetBtn" BRACKET S "GNS PLCdia ProfibusData".State_REQ R "GNS PLCdia ProfibusData".I_O_FLT1 R "GNS PLCdia ProfibusData".I_O_FLT2 R "GNS PLCdia ProfibusData".RACK_FLT R "GNS PLCdia ProfibusData".COMPLETE_RESTART // --- END STL Network 1 --- // Network 2: Diagnostic Call (Original Language: LAD) // Network 2 did not produce printable SCL code. // Network 3: ProfiBus Network Fault (Original Language: LAD) IF "gIN_ResetBtn" THEN "PBusF" := FALSE; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "PBusF" := TRUE; END_IF; // Network 4: ProfiBus Network Fault (Original Language: LAD) IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "HMI CPU_DP Diag"."Slave_Status" := 1; END_IF; IF "GNS PLCdia ProfibusData"."Device_status" THEN "PBusF" := TRUE; END_IF; // Network 5: (Original Language: LAD) IF "gIN_ResetBtn" THEN "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; "HMI CPU_DP Diag"."Slave_Status" := 0; END_IF; END_FUNCTION ```