Loading…

Method Name: config_protect_method

Method ID: 0x4312

Method Label: Change Write Protection

Method Help: Enable Protection to make calibration and setup parameters read only. Note: Removing protection requires pushing a button in the terminal box of the instrument.


  • {
  • int q;
  • int q0;
  • int q1;
  • int q2;
  • int q3;
  • float qa;
  • char S[3];
  • int i;
  • int new_pr;
  • int old_pr;
  • long ids[2];
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _set_all_resp_code(1);
  • _set_resp_code(8,0);
  • send(151,S);
  • if (_ivar_value(16804) > 2)
  • {
  • ACKNOWLEDGE(literal_string(2015));
  • return;
  • }
  • ;
  • send_trans(129,0,S);
  • i = 1;
  • send(15,S);
  • if (_ivar_value(16427) == 0)
  • {
  • if (1 == _ivar_value(16472) || 5 == _ivar_value(16472))
  • {
  • if (1 == _ivar_value(16472))
  • {
  • ACKNOWLEDGE(literal_string(2256));
  • }
  • else
  • {
  • ACKNOWLEDGE(literal_string(2257));
  • }
  • ids[0] = 167;
  • acknowledge(literal_string(2258),ids);
  • i = 0;
  • }
  • }
  • if (0 == _ivar_value(167) && 1 == i)
  • {
  • i = 1 - SELECT_FROM_LIST(literal_string(2259),literal_string(2226));
  • if (1 == i)
  • {
  • if (_ivar_value(16427) == 0)
  • {
  • ACKNOWLEDGE(literal_string(2260));
  • _vassign(16452,16427);
  • save_values();
  • _get_dev_var_value(literal_string(2261),0,16452);
  • save_values();
  • remove_all_abort();
  • if (_ivar_value(16452) > 0)
  • {
  • send_trans(136,2,S);
  • if (!_ivar_value(16784))
  • send_trans(136,0,S);
  • if (_ivar_value(16784) != 16)
  • {
  • if (_ivar_value(16784) != 0)
  • {
  • if (SELECT_FROM_LIST(literal_string(2225),literal_string(2226)))
  • {
  • DELAY(2,literal_string(2227));
  • process_abort();
  • }
  • }
  • send_trans(136,1,S);
  • send_trans(136,0,S);
  • }
  • q = 1;
  • send_trans(129,35,S);
  • if ((_ivar_value(16496) & 0x01) > 0 && _ivar_value(171) == 0)
  • {
  • q = 0;
  • ACKNOWLEDGE(literal_string(2228));
  • }


Please login for more