Loading…
Loading…
方法名称: inst_mode_method
方法ID: 0x4310
方法标签: Change Instrument Mode
方法描述: Select In Service or 'Out of Service' mode. The instrument adjusts its travel as the input changes, when it is In Service. Calibration and configuration require the instrument to be 'Out of Service'.
- {
- int q;
- int q0;
- int q1;
- int q2;
- int q3;
- float qa;
- char S[3];
- int a;
- int b;
- long ids[2];
- char st[3];
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_all_resp_code(0);
- send(151,S);
- if (_ivar_value(16804) > 2)
- {
- ACKNOWLEDGE(literal_string(2015));
- return;
- }
- ;
- send(48,S);
- if (_ivar_value(4139) > 0 || _ivar_value(4140) & 0x04 > 0 || _ivar_value(4141) & 0x80 > 0)
- {
- ACKNOWLEDGE(literal_string(2216));
- b = _ivar_value(4139);
- a = 0x01;
- do {
- if ((b & a) > 0)
- {
- _display_xmtr_status(4139,a);
- }
- a = a << 1;
- }
- while (a < 0x0100);
- if (_ivar_value(4140) & 0x04 > 0)
- {
- _display_xmtr_status(4140,0x04);
- }
- if (_ivar_value(4141) & 0x80 > 0)
- {
- _display_xmtr_status(4141,0x80);
- }
- }
- send_trans(129,0,S);
- _set_all_resp_code(1);
- _set_resp_code(8,0);
- ids[0] = 16427;
- if (1 == _ivar_value(167))
- {
- acknowledge(literal_string(2217),ids);
- }
- else
- {
- a = _ivar_value(16427);
- local_inst_mode = a;
- save_values();
- if (_ivar_value(16427))
- {
- if ((_ivar_value(16465) & 0x01C0) == 0x0100)
- {
- _get_dev_var_value(literal_string(2218),0,16452);
- }
- else
- {
- _get_dev_var_value(literal_string(2219),0,16452);
- }
- save_values();
- }
- else
- {
- if (1 == _ivar_value(16472) || 5 == _ivar_value(16472))
- {
- if (1 == _ivar_value(16472))
- {
- acknowledge(literal_string(2220),ids);
- }
- else
- {
- acknowledge(literal_string(2221),ids);
请登录以获得完整内容