Loading…

Method Name: anin_cal_method

Method ID: 0x4160

Method Label: Calibrate Input

Method Help: Perform Analog Input Calibration


  • {
  • char cmd_status[3];
  • int menu_select;
  • int iItemSeln;
  • int iNumCalPoints;
  • DD_STRING InputName;
  • DD_STRING InputUnits;
  • DD_STRING EU_Units;
  • DD_STRING TB_Units;
  • int YesNo;
  • int iEnumD;
  • float fRawZeroVal;
  • float fRawMidVal;
  • float fRawSpanVal;
  • float fEUZeroVal;
  • float fEUMidVal;
  • float fEUSpanVal;
  • float fRaw_Zero;
  • float fRaw_Span;
  • float fOldRawZeroVal;
  • float fOldRawMidVal;
  • float fOldRawSpanVal;
  • float fOldEUZeroVal;
  • float fOldEUMidVal;
  • float fOldEUSpanVal;
  • float fRaw_Value0;
  • float fRaw_Value1;
  • float fRaw_Value2;
  • float fEU_Value0;
  • float fEU_Value1;
  • float fEU_Value2;
  • float Cal_Temp;
  • iItemSeln = 0;
  • CAL_Selection = iAninSeln;
  • ACKNOWLEDGE(literal_string(554));
  • if (iAninSeln >= 0 && iAninSeln <= 2)
  • {
  • iNumCalPoints = SELECT_FROM_LIST(literal_string(555),literal_string(556));
  • switch (iAninSeln)
  • {
  • case 0:
  • InputName = literal_string(557);
  • _get_enum_string(16386,DiffPressUnits,InputUnits);
  • break;
  • case 1:
  • InputName = literal_string(558);
  • _get_enum_string(16466,PressureUnits,InputUnits);
  • break;
  • case 2:
  • InputName = literal_string(559);
  • _get_enum_string(16520,RTDTempUnits,InputUnits);
  • break;
  • }
  • cal_var_index = iAninSeln;
  • live_var_index = iAninSeln;
  • dev_var_index = iAninSeln;
  • fOldRawZeroVal = AICalInfo[cal_var_index].CAL_RAW_ZERO;
  • fOldEUZeroVal = AICalInfo[cal_var_index].CAL_EU_ZERO;
  • fOldRawMidVal = AICalInfo[cal_var_index].CAL_RAW_MID;
  • fOldEUMidVal = AICalInfo[cal_var_index].CAL_EU_MID;
  • fOldRawSpanVal = AICalInfo[cal_var_index].CAL_RAW_FS;


Please login for more