5. CONFIGURATION
END_IF
END_IF
// In PROFIBUS communication failure with the PROFIBUS slave ...
ELSE
QUALITY_PB_NX1005_O.VALIDITY:= VALIDITY_INVALID;
QUALITY_PB_NX1005_O.FLAGS.FLAG_COMM_FAIL:= TRUE;
QUALITY_PB_NX1005_O.FLAGS.FLAG_FAILURE:= FALSE;
// If the point have ever been updated once ...
IF NOT QUALITY_PB_NX1005_O.FLAGS.FLAG_RESTART THEN
QUALITY_PB_NX1005_O.FLAGS.FLAG_OLD_DATA:= TRUE;
END_IF
END_IF
5.1.5.1.8. PROFIBUS Analog Inputs Quality
// PROFIBUS analog input quality update, module NX6000
// In communication success case with PROFIBUS slave (address = 99) ...
IF DG_NX5001.tMstStatus.abySlv_State.bSlave_99 = TRUE THEN
// Waits the PROFIBUS slave become apt to exchange data and diagnostics
// (It is necessary to wait, avoiding invalid quality generation)
IF DG_NX5110.tPbusHeadA.tStatus1.bStation_Non_Existent = FALSE AND
DG_NX5110.tPbusHeadA.tStatus1.bStation_Not_Ready = FALSE AND
DG_NX5110.tPbusHeadA.wIdentNumber > 0 THEN
QUALITY_PB_NX6000.FLAGS.FLAG_COMM_FAIL:= FALSE;
// If there is a module present on the bus (slot = 3) and
// if there is no modules config problem (general) and
// if there is no config problem in that module (specific) and
// if there is no fatal error identification by the module and
// if there is no calibration error indication and
// if there is no over/under range error indication and
// if there is no error indication of input in open loop ...
IF (DG_NX5110.tPbusHeadA.dwModuleNotPresent AND SHL(1, 3)) = 0 AND
DG_NX5110.tPbusHeadA.tSummarized.bConfigMismatch = FALSE AND
DG_NX6000_8_AI_Voltage_Current.tGeneral.bConfigMismatch = FALSE AND
DG_NX6000_8_AI_Voltage_Current.tGeneral.bFatalError = FALSE AND
DG_NX6000_8_AI_Voltage_Current.tGeneral.bCalibrationError = FALSE AND
DG_NX6000_8_AI_Voltage_Current.tDetailed.tAnalogInput_00.bOverRange = FALSE
AND
DG_NX6000_8_AI_Voltage_Current.tDetailed.tAnalogInput_00.bUnderRange = FALSE
AND
DG_NX6000_8_AI_Voltage_Current.tDetailed.tAnalogInput_00.bOpenLoop = FALSE
THEN
QUALITY_PB_NX6000.VALIDITY:= VALIDITY_GOOD;
QUALITY_PB_NX6000.FLAGS.FLAG_RESTART:= FALSE;
QUALITY_PB_NX6000.FLAGS.FLAG_FAILURE:= FALSE;
QUALITY_PB_NX6000.FLAGS.FLAG_OLD_DATA:= FALSE;
QUALITY_PB_NX6000.FLAGS.FLAG_INACCURATE:= FALSE;
QUALITY_PB_NX6000.FLAGS.FLAG_OUT_OF_RANGE:= FALSE;
ELSE
// Condition to turns on imprecision indication
// (check first, because invalid validity must prevail)
83