Loading…
Loading…
Method Name: configure_sensor
Method ID: 0x4032
Method Label: Sensor config.
Method Help: Input parameter - the parameters for wiring to the input (sensor type, etc.) can be fixed via the function.
- {
- int counter;
- long ids[2];
- char status[3];
- int _messart;
- int _unit;
- int _value;
- float _fvalue;
- float _upper;
- float _lower;
- _set_device_status(0xFF,0);
- _set_all_resp_code(0);
- _set_xmtr_device_status(0xFF,0);
- ACKNOWLEDGE(literal_string(178));
- _add_abort_method(4118);
- _unit = _ivar_value(resolve_record_ref(resolve_array_ref(172,1),203));
- _messart = _ivar_value(16384);
- _messart &= ~0xBC;
- if (_ivar_value(resolve_record_ref(resolve_array_ref(172,2),190)) == 250)
- _fassign(resolve_record_ref(resolve_array_ref(172,2),191),20.0);
- _get_dev_var_value(literal_string(202),0,16387);
- if (1 < _ivar_value(16387) && _ivar_value(16387) < 4)
- {
- if (_messart & 0xE3)
- _messart &= ~0xE3;
- _fassign(16392,20.0);
- }
- else
- if (3 < _ivar_value(16387))
- {
- if ((_messart & 0xC4) != 0x40)
- {
- _messart &= ~0xC4;
- _messart |= 0x40;
- if (_ivar_value(16387) != 4)
- _messart |= 0x01;
- }
- }
- else
- if (0 == _ivar_value(16387))
- {
- _messart &= ~0x03;
- }
- _iassign(16384,_messart);
- if (_messart & 0xC0)
- {
- if (_ivar_value(16386) == 0x10)
- _iassign(16386,0x01);
- }
- if (_messart & 0xC8)
- _iassign(16385,0x02);
- _value = _ivar_value(16388);
- if (_messart & 0xC0)
- {
- _value &= ~0x04;
- }
- if (_messart & 0x08)
- {
Please login for more