Loading…
Loading…
Method Name: MthAlignHartUnits
Method ID: 0x415C
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(16731,0);
- save_values();
- iOptionForCopy = SELECT_FROM_LIST(literal_string(1818),literal_string(1819));
- switch (iOptionForCopy)
- {
- case 0:
- return;
- break;
- case 1:
- eIsUnitChanged = 1;
- devVolumeFlow.DIGITAL_UNITS = _ivar_value(16733);
- devVelocityOfSound.DIGITAL_UNITS = _ivar_value(16734);
- devMassFlow.DIGITAL_UNITS = _ivar_value(16735);
- devFlowVelocity.DIGITAL_UNITS = _ivar_value(16734);
- devGain.DIGITAL_UNITS = _ivar_value(16736);
- devSNR.DIGITAL_UNITS = _ivar_value(16736);
- if (eDiagnostics1_1p == 421 && eNumberOfPaths == 1 || eDiagnostics1_2p == 421 && eNumberOfPaths == 2 || eDiagnostics1_2p == 422 && eNumberOfPaths == 2 || eDiagnostics1_3p == 421 && eNumberOfPaths == 3 || eDiagnostics1_3p == 422 && eNumberOfPaths == 3 || eDiagnostics1_3p == 423 && eNumberOfPaths == 3)
- {
- devDiagFlowVelocity.DIGITAL_UNITS = _ivar_value(16734);
- }
- else
- {
- devDiagFlowVelocity.DIGITAL_UNITS = 250;
- }
- if (eDiagnostics1_1p == 415 && eNumberOfPaths == 1 || eDiagnostics1_2p == 415 && eNumberOfPaths == 2 || eDiagnostics1_2p == 416 && eNumberOfPaths == 2 || eDiagnostics1_3p == 415 && eNumberOfPaths == 3 || eDiagnostics1_3p == 416 && eNumberOfPaths == 3 || eDiagnostics1_3p == 417 && eNumberOfPaths == 3)
- {
- devDiagVelocityOfSound.DIGITAL_UNITS = _ivar_value(16734);
- }
- else
- {
- devDiagVelocityOfSound.DIGITAL_UNITS = 250;
- }
- if (eDiagnostics2_1p == 402 && eNumberOfPaths == 1 || eDiagnostics2_2p == 402 && eNumberOfPaths == 2 || eDiagnostics2_2p == 403 && eNumberOfPaths == 2 || eDiagnostics2_3p == 402 && eNumberOfPaths == 3 || eDiagnostics2_3p == 403 && eNumberOfPaths == 3 || eDiagnostics2_3p == 404 && eNumberOfPaths == 3)
- {
- devDiagGain.DIGITAL_UNITS = _ivar_value(16736);
- }
- else
- {
- devDiagGain.DIGITAL_UNITS = 250;
- }
- if (eDiagnostics2_1p == 409 && eNumberOfPaths == 1 || eDiagnostics2_2p == 409 && eNumberOfPaths == 2 || eDiagnostics2_2p == 410 && eNumberOfPaths == 2 || eDiagnostics2_3p == 409 && eNumberOfPaths == 3 || eDiagnostics2_3p == 410 && eNumberOfPaths == 3 || eDiagnostics2_3p == 411 && eNumberOfPaths == 3)
- {
- devDiagSNR.DIGITAL_UNITS = _ivar_value(16736);
- }
- else
- {
- devDiagSNR.DIGITAL_UNITS = 250;
- }
- if (eFunctionTotalizer1_39002_32 != 0 && cdDevTotalizer1 == 0)
- {
- devVolumeTotalizer1.DIGITAL_UNITS = _ivar_value(16737);
- }
- else
- {
- devVolumeTotalizer1.DIGITAL_UNITS = 250;
- }
- if (eFunctionTotalizer1_39002_32 != 0 && cdDevTotalizer1 == 2)
- {
- devMassTotalizer1.DIGITAL_UNITS = _ivar_value(16738);
- }
- else
- {
- devMassTotalizer1.DIGITAL_UNITS = 250;
Please login for more