Loading…

方法名称: method_AutoSetup

方法ID: 0x42F9

方法标签: Auto Setup

方法描述:


  • {
  • char cmd_status[3];
  • int iResult;
  • int LoopIndex;
  • int OperationInProgress;
  • int iResultToProdKnown;
  • DD_STRING OperationResultMessage;
  • float fFloatValue;
  • unsigned int uiIntegerValue;
  • int TimeToWait;
  • DD_STRING strPercentValue;
  • DD_STRING strFromDico;
  • DD_STRING strToDisplay;
  • int ProgressBarValue;
  • _set_all_resp_code(0);
  • _set_device_status(0xFF,0);
  • _set_xmtr_all_resp_code(0);
  • _set_xmtr_device_status(0xFF,0);
  • iResult = SELECT_FROM_LIST(literal_string(1259),literal_string(1140));
  • if (iResult > 0)
  • {
  • _get_dev_var_value(literal_string(1260),0,16707);
  • _fassign(16998,probe_length);
  • send_trans(222,3,cmd_status);
  • if (cmd_status[0] != 0)
  • {
  • display_response_status(222,cmd_status[0]);
  • }
  • else
  • {
  • _fassign(16880,Cmd222_3_NewEmptyArea);
  • _fassign(16879,Cmd222_3_NewFullArea);
  • _fassign(16823,Cmd222_3_NewMinimumWindow);
  • _fassign(16756,Cmd222_3_NewSnapshotSize);
  • strFromDico = literal_string(1261);
  • strPercentValue = literal_string(1187);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(135,1,cmd_status);
  • if (cmd_status[0])
  • display_response_status(135,cmd_status[0]);
  • send_trans(195,2,cmd_status);
  • if (cmd_status[0])
  • display_response_status(195,cmd_status[0]);
  • strPercentValue = literal_string(1189);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send(197,cmd_status);
  • if (cmd_status[0])
  • display_response_status(197,cmd_status[0]);
  • send(139,cmd_status);
  • if (cmd_status[0])
  • display_response_status(139,cmd_status[0]);
  • strPercentValue = literal_string(1191);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • }
  • _get_dev_var_value(literal_string(535),0,16787);
  • if (InstallationType == 0)
  • {
  • _get_dev_var_value(literal_string(1182),0,16706);
  • fFloatValue = tank_height;
  • _fassign(16952,StillingWellDiameter);
  • }
  • else
  • {
  • _get_dev_var_value(literal_string(1183),0,16769);
  • _get_dev_var_value(literal_string(1184),0,16770);
  • fFloatValue = StillingWellHeight;
  • _fassign(16952,StillingWellDiameter);
  • }
  • _fassign(16951,fFloatValue);
  • _iassign(16950,InstallationType);
  • send_trans(222,0,cmd_status);
  • if (cmd_status[0] != 0)
  • {
  • display_response_status(222,cmd_status[0]);
  • }
  • else
  • {
  • _fassign(16706,Cmd222_0_NewTankHeight);
  • _fassign(16769,Cmd222_0_NewStillingwellHeight);
  • _fassign(16770,Cmd222_0_NewStillingwellDiameter);
  • _fassign(16814,Cmd222_0_NewInstallationCalspeed);
  • strFromDico = literal_string(1186);
  • strPercentValue = literal_string(1187);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send(145,cmd_status);
  • if (cmd_status[0])
  • display_response_status(145,cmd_status[0]);
  • strPercentValue = literal_string(1188);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(135,0,cmd_status);
  • if (cmd_status[0])
  • display_response_status(135,cmd_status[0]);
  • strPercentValue = literal_string(1189);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send(149,cmd_status);
  • if (cmd_status[0])
  • display_response_status(149,cmd_status[0]);
  • strPercentValue = literal_string(1190);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(153,0,cmd_status);
  • if (cmd_status[0])
  • display_response_status(153,cmd_status[0]);
  • strPercentValue = literal_string(1191);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • }
  • _get_dev_var_value(literal_string(528),0,16703);
  • uiIntegerValue = ApplicationType;
  • _iassign(16957,uiIntegerValue);
  • iResultToProdKnown = SELECT_FROM_LIST(literal_string(1198),literal_string(1199));
  • if (iResultToProdKnown == 0)
  • {
  • _iassign(16958,1);
  • _get_dev_var_value(literal_string(1200),0,16712);
  • fFloatValue = epsilon_r_product;
  • }
  • else
  • {
  • _iassign(16958,0);
  • _get_dev_var_value(literal_string(514),0,16786);
  • fFloatValue = epsilon_r_product;
  • }
  • uiIntegerValue = ProductFamily;
  • _iassign(16960,uiIntegerValue);
  • _fassign(16959,fFloatValue);
  • send_trans(222,1,cmd_status);
  • if (cmd_status[0] != 0)
  • {
  • display_response_status(222,cmd_status[0]);
  • }
  • else
  • {
  • _iassign(16786,Cmd222_1_NewProductFamily);
  • _fassign(16709,Cmd222_1_NewMeasure_threshold);
  • _fassign(16813,Cmd222_1_NewInterfaceThreshold);
  • _fassign(16712,Cmd222_1_NewEpsilon_r_product);
  • _fassign(16715,Cmd222_1_NewDielctProductMini);
  • _fassign(16716,Cmd222_1_NewDielctProductMaxi);
  • _fassign(16878,Cmd222_1_NewAttenuationFactor);
  • _fassign(16810,Cmd222_1_NewProbeHeadAttenuation);
  • _iassign(16515,Cmd222_1_NewAutoProductEpsR);
  • _iassign(16775,Cmd222_1_NewAsicPulseWidth);
  • _fassign(16711,Cmd222_1_NewEpsilon_r_gas);
  • _fassign(16710,Cmd222_1_NewProbeEndThreshold);
  • _fassign(16771,Cmd222_1_NewFlangeThreshold);
  • _iassign(16700,Cmd222_1_NewMeasuring_mode);
  • strFromDico = literal_string(1201);
  • strPercentValue = literal_string(1187);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send(133,cmd_status);
  • if (cmd_status[0])
  • display_response_status(133,cmd_status[0]);
  • strPercentValue = literal_string(1202);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(135,2,cmd_status);
  • if (cmd_status[0])
  • display_response_status(135,cmd_status[0]);
  • strPercentValue = literal_string(1203);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(135,3,cmd_status);
  • if (cmd_status[0])
  • display_response_status(135,cmd_status[0]);
  • strPercentValue = literal_string(1204);
  • strToDisplay = strFromDico + strPercentValue;
  • PUT_MESSAGE(strToDisplay);
  • send_trans(195,1,cmd_status);
  • if (cmd_status[0])
  • display_response_status(195,cmd_status[0]);


请登录以获得完整内容