4. Configuration
57
// 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_NX1005_O.FLAGS.FLAG_COMM_FAIL:= FALSE;
// If there is a module presente on the bus (slot = 2) and
// if there isn’t no modules config problem (general) and
// if there is no config problem in that module (specific) and
// if there isn’t fatal error identification by the module and
// if there is no outputs short circuit indication and
// if there is no external power supply missing indication ...
IF (DG_NX5110.tPbusHeadA.dwModuleNotPresent AND SHL(1, 2)) = 0 AND
DG_NX5110.tPbusHeadA.tSummarized.bConfigMismatch = FALSE AND
DG_NX1005_24_Vdc_8_DO_Trans_8_DI.tGeneral.bConfigMismatch = FALSE AND
DG_NX1005_24_Vdc_8_DO_Trans_8_DI.tGeneral.bFatalError = FALSE AND
DG_NX1005_24_Vdc_8_DO_Trans_8_DI.tDetailed.bOutputShortCircuit = FALSE AND
DG_NX1005_24_Vdc_8_DO_Trans_8_DI.tDetailed.bNoExternalSupply = FALSE THEN
QUALITY_PB_NX1005_O.VALIDITY:= VALIDITY_GOOD;
QUALITY_PB_NX1005_O.FLAGS.FLAG_RESTART:= FALSE;
QUALITY_PB_NX1005_O.FLAGS.FLAG_FAILURE:= FALSE;
QUALITY_PB_NX1005_O.FLAGS.FLAG_OLD_DATA:= FALSE;
ELSE
QUALITY_PB_NX1005_O.VALIDITY:= VALIDITY_INVALID;
QUALITY_PB_NX1005_O.FLAGS.FLAG_FAILURE:= TRUE;
// 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
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
PROFIBUS Analog Inputs Quality
// PROFIBUS analog inpunt quality update, module NX6000
// In communication sucess 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 presente on the bus (slot = 2) and
// if there isn’t no modules config problem (general) and
// if there is no config problem in that module (specific) and
// if there isn’t 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