Loading…

Method Name: methodReadClearFaults

Method ID: 0x4013

Method Label: Read/Clear Faults

Method Help: Read the device's current faults. Optionally, the fault status may also be cleared.


  • {
  • char status[3];
  • int fault[6];
  • int result;
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • send(136,status);
  • if (status[0])
  • {
  • display_response_status(136,status[0]);
  • }
  • if (status[2] & 0x10)
  • {
  • fault[0] = _ivar_value(16386);
  • fault[1] = _ivar_value(16387);
  • fault[2] = _ivar_value(16388);
  • fault[3] = _ivar_value(16389);
  • fault[4] = _ivar_value(16390);
  • fault[5] = _ivar_value(16391);
  • if (fault[0] != 0)
  • {
  • if (fault[0] & 1)
  • ACKNOWLEDGE(literal_string(41));
  • if (fault[0] & 2)
  • ACKNOWLEDGE(literal_string(43));
  • if (fault[0] & 4)
  • ACKNOWLEDGE(literal_string(44));
  • if (fault[0] & 8)
  • ACKNOWLEDGE(literal_string(45));
  • if (fault[0] & 16)
  • ACKNOWLEDGE(literal_string(46));


Please login for more