Loading…
Loading…
Method Name: configure_sensor
Method ID: 0x4036
Method Label: Sensor config.
Method Help: Input parameter - the parameters for wiring to the input (sensor type, etc.) can be fixed via the function.
- {
- 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(368));
- _add_abort_method(4118);
- _messart = _ivar_value(16384);
- _unit = _ivar_value(resolve_record_ref(resolve_array_ref(172,1),203));
- if (_ivar_value(resolve_record_ref(resolve_array_ref(172,2),190)) == 250)
- _fassign(16391,20.0);
- if ((_messart & 0x03) == 0x01)
- {
- _vassign(16391,16426);
- }
- else
- {
- _fassign(16391,20.0);
- }
- if ((_messart & 0x40) == 0x40 && (_ivar_value(16387) == 2 || _ivar_value(16387) > 8) && _ivar_value(resolve_record_ref(resolve_array_ref(172,1),203)) != 253)
- {
- _iassign(16436,_messart & 0x03);
- }
- else
- {
- _iassign(16436,0x03);
- }
- _get_dev_var_value(literal_string(386),0,16387);
- if (2 < _ivar_value(16387) && _ivar_value(16387) < 8)
- {
- if (_messart & 0xE3)
- _messart &= ~0xE3;
- _fassign(16391,20.0);
- }
- else
- if (7 < _ivar_value(16387))
- {
- if ((_messart & 0xE0) != 0x40)
- {
- _messart &= ~0xA0;
- _messart |= 0x40;
- if (_ivar_value(16387) != 8)
- _messart |= 0x01;
- }
- }
Please login for more