Loading…
Loading…
Method Name: MthAlignHartUnits
Method ID: 0x41CB
Method Label: Align HART Units
Method Help: Align 'HART units' (for measured values) to 'display units' (for configuration parameters) or to default. (Fct. C5.5)
- {
- char achCmdStatus[3];
- int iResult;
- int iOptionForCopy;
- int eIsUnitChanged;
- eIsUnitChanged = 0;
- _iassign(16842,0);
- save_values();
- iOptionForCopy = SELECT_FROM_LIST(literal_string(1946),literal_string(1947));
- switch (iOptionForCopy)
- {
- case 0:
- return;
- break;
- case 1:
- eIsUnitChanged = 1;
- _iassign(16409,_ivar_value(16844));
- _iassign(16424,_ivar_value(16845));
- _iassign(16438,_ivar_value(16846));
- _iassign(16452,_ivar_value(16847));
- _iassign(16466,_ivar_value(16848));
- if (eModeConcentration1_04352_32 != 1 && eModeConcentration1_04352_32 != 8 && eModeConcentration1_04352_32 != 11)
- {
- _iassign(16611,_ivar_value(16846));
- }
- else
- {
- _iassign(16611,250);
- }
- if (eModeConcentration1_04352_32 == 8 || eModeConcentration1_04352_32 == 11)
- {
- _iassign(16625,_ivar_value(16845));
- }
- else
- {
- _iassign(16625,250);
- }
- if (eModeConcentration2_04353_32 != 1 && eModeConcentration2_04353_32 != 8 && eModeConcentration2_04353_32 != 11)
- {
- _iassign(16639,_ivar_value(16846));
- }
- else
- {
- _iassign(16639,250);
- }
- if (eModeConcentration2_04353_32 == 8 || eModeConcentration2_04353_32 == 11)
- {
- _iassign(16653,_ivar_value(16845));
- }
- else
- {
- _iassign(16653,250);
- }
- if (eFunctionTotalizer1_39002_32 != 0 && (eMeasurementTotalizer1_44040_32 == 2 || eMeasurementTotalizer1_44040_32 == 14 || eMeasurementTotalizer1_44040_32 == 16))
- {
- _iassign(16667,_ivar_value(16849));
- }
- else
- {
- _iassign(16667,250);
- }
- if (eFunctionTotalizer1_39002_32 != 0 && (eMeasurementTotalizer1_44040_32 == 1 || eMeasurementTotalizer1_44040_32 == 15 || eMeasurementTotalizer1_44040_32 == 17))
- {
- _iassign(16683,_ivar_value(16850));
- }
- else
- {
- _iassign(16683,250);
- }
- if (eFunctionTotalizer2_39027_32 != 0 && (eMeasurementTotalizer2_44130_32 == 2 || eMeasurementTotalizer2_44130_32 == 14 || eMeasurementTotalizer2_44130_32 == 16))
- {
- _iassign(16697,_ivar_value(16849));
- }
- else
- {
- _iassign(16697,250);
- }
- if (eFunctionTotalizer2_39027_32 != 0 && (eMeasurementTotalizer2_44130_32 == 1 || eMeasurementTotalizer2_44130_32 == 15 || eMeasurementTotalizer2_44130_32 == 17))
Please login for more