Loading…

方法名称: select_unit

方法ID: 0x4033

方法标签: Process unit

方法描述: 现场设备变量单位——使用数值表示、最小范围、范围上限、范围下限、传感器上限和传感器下限显示的工程单位。


  • {
  • int old_unit;
  • int counter;
  • int unit;
  • int mail;
  • float _fvalue;
  • float _upper;
  • float _lower;
  • char status[3];
  • mail = 0;
  • _set_device_status(0xFF,0);
  • _set_all_resp_code(0);
  • _set_xmtr_device_status(0xFF,0);
  • old_unit = _ivar_value(resolve_record_ref(resolve_array_ref(172,1),190));
  • if (_get_dev_var_value(literal_string(246),0,resolve_record_ref(resolve_array_ref(172,1),190)) == 0)
  • {
  • unit = _ivar_value(resolve_record_ref(resolve_array_ref(172,1),190));
  • if (old_unit != unit && (!(old_unit == 32 || old_unit == 33 || old_unit == 34 || old_unit == 35) || !(unit == 32 || unit == 33 || unit == 34 || unit == 35)))
  • {
  • ACKNOWLEDGE(literal_string(227));


请登录以获得完整内容