Loading…
Loading…
Method Name: configure_sensor
Method ID: 0x4033
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(195));
- _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(resolve_record_ref(resolve_array_ref(172,2),191),20.0);
- _get_dev_var_value(literal_string(221),0,16387);
- if (1 < _ivar_value(16387) && _ivar_value(16387) < 4)
- {
- if (_messart & 0xE3)
- _messart &= ~0xE3;
- if (_messart & 0x08)
- _messart &= ~0x04;
- _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)
- {
- _value &= ~0x0A;
- _value |= _value << 1;
- }
- else
- if ((_messart & 0x03) == 0x03)
- {
- _value |= 0x0A;
- }
- else
- {
- _value &= ~0x0A;
- }
- _iassign(16388,_value);
- send(131,status);
- if (status[0])
- {
- display_response_status(131,status[0]);
- process_abort();
- }
- else
Please login for more