Loading…

Method Name: alarm_upper_value

Method ID: 0x4062

Method Label: High alarm

Method Help: High limit of the flow rate, at which an alarm is generated, can be set as % value of the span flow rate of the set maximum range. High alarm values for flow rate can be set within the range of -10% to 110% (percentage to Range 1) in increments of 0.1%.


  • {
  • long ids[2];
  • int alarm_upper_value10;
  • float alarm_upper_value11;
  • int alarm_upper_value20;
  • float alarm_upper_value21;
  • char status[3];
  • send(135,status);
  • do {
  • alarm_upper_value10 = _ivar_value(resolve_record_ref(16598,16454));
  • alarm_upper_value10 = (alarm_upper_value10 & 0xff00) / 0x0100 | (alarm_upper_value10 & 0x00ff) * 0x0100;
  • alarm_upper_value21 = alarm_upper_value11 = (alarm_upper_value10 >> 8 & 0x00ff | alarm_upper_value10 << 8 & 0xff00) / 10.0;
  • if (alarm_upper_value11 > 3276)
  • {
  • alarm_upper_value10 = alarm_upper_value10 - 0x0100;
  • alarm_upper_value10 = alarm_upper_value10 ^ 0xffff;
  • alarm_upper_value21 = alarm_upper_value11 = -(alarm_upper_value10 >> 8 & 0x00ff | alarm_upper_value10 << 8 & 0xff00) / 10.0;
  • }
  • _get_local_var_value(literal_string(506),ids,literal_string(507));
  • alarm_upper_value20 = alarm_upper_value21 * 10;


Please login for more