Loading…

Method Name: methodReadClearFaults

Method ID: 0x413B

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(16439);
  • fault[1] = _ivar_value(16440);
  • fault[2] = _ivar_value(16441);
  • fault[3] = _ivar_value(16442);
  • fault[4] = _ivar_value(16443);
  • fault[5] = _ivar_value(16444);
  • if( fault[0] != 0 ) { if( fault[0] & 1 ) ACKNOWLEDGE("|en|Reset"); if( fault[0] & 2 ) ACKNOWLEDGE("|en|Low Power"); if( fault[0] & 4 ) ACKNOWLEDGE("|en|Actuator Error"); if( fault[0] & 8 ) ACKNOWLEDGE("|en|Air Supply Low"); if( fault[0] & 16 ) ACKNOWLEDGE("|en|Position Error"); if( fault[0] & 32 ) ACKNOWLEDGE("|en|Reserved (0-5)"); if( fault[0] & 64 ) ACKNOWLEDGE("|en|Keypad Fault"); if( fault[0] & 128 ) ACKNOWLEDGE("|en|Marginal Power"); } if( fault[1] != 0 ) { if( fault[1] & 1 ) ACKNOWLEDGE("|en|Calibration Failed"); if( fault[1] & 2 ) ACKNOWLEDGE("|en|Find Stops Failed"); if( fault[1] & 4 ) ACKNOWLEDGE("|en|Autotune Failed"); if( fault[1] & 8 ) ACKNOWLEDGE("|en|Std Diagnostics Failed"); if( fault[1] & 16 ) ACKNOWLEDGE("|en|Ext Diagnostics Failed"); if( fault[1] & 32 ) ACKNOWLEDGE("|en|Operating System Fault"); if( fault[1] & 64 ) ACKNOWLEDGE("|en|Reserved (1-6)"); if( fault[1] & 128 ) ACKNOWLEDGE("|en|Reserved (1-7)"); } if( fault[2] != 0 ) { if( fault[2] & 1 ) ACKNOWLEDGE("|en|Bias Out Of Range"); if( fault[2] & 2 ) ACKNOWLEDGE("|en|I/P Out Of Range"); if( fault[2] & 4 ) ACKNOWLEDGE("|en|Temp Out Of Range"); if( fault[2] & 8 ) ACKNOWLEDGE("|en|Reserved (2-3)"); if( fault[2] & 16 ) ACKNOWLEDGE("|en|Reserved (2-4)"); if( fault[2] & 32 ) ACKNOWLEDGE("|en|Reserved (2-5)"); if( fault[2] & 64 ) ACKNOWLEDGE("|en|Reserved (2-6)"); if( fault[2] & 128 ) ACKNOWLEDGE("|en|Reserved (2-7)"); } if( fault[3] != 0 ) { if( fault[3] & 1 ) ACKNOWLEDGE("|en|NVM Checksum Error"); if( fault[3] & 2 ) ACKNOWLEDGE("|en|RAM Checksum Error"); if( fault[3] & 4 ) ACKNOWLEDGE("|en|Flash Checksum Error"); if( fault[3] & 8 ) ACKNOWLEDGE("|en|Stack Error"); if( fault[3] & 16 ) ACKNOWLEDGE("|en|Factory Mode Fault"); if( fault[3] & 32 ) ACKNOWLEDGE("|en|NVM Test Error"); if( fault[3] & 64 ) ACKNOWLEDGE("|en|Reserved (3-6)"); if( fault[3] & 128 ) ACKNOWLEDGE("|en|Reserved (3-7)"); } if( fault[4] != 0 ) { if( fault[4] & 1 ) ACKNOWLEDGE("|en|Ref Voltage Fault"); if( fault[4] & 2 ) ACKNOWLEDGE("|en|Position Sensor Fault"); if( fault[4] & 4 ) ACKNOWLEDGE("|en|Current Sensor Fault"); if( fault[4] & 8 ) ACKNOWLEDGE("|en|Temperature Sensor Fault"); if( fault[4] & 16 ) ACKNOWLEDGE("|en|Reserved"); if( fault[4] & 32 ) ACKNOWLEDGE("|en|Actuator Pressure 1 Fault"); if( fault[4] & 64 ) ACKNOWLEDGE("|en|Actuator Pressure 2 Fault"); if( fault[4] & 128 ) ACKNOWLEDGE("|en|Supply Pressure Sensor Fault"); } if( fault[5] != 0 ) { if( fault[5] & 1 ) ACKNOWLEDGE("|en|I/P Pressure Sensor Fault"); if( fault[5] & 2 ) ACKNOWLEDGE("|en|Atmospheric Pressure Sensor Fault"); if( fault[5] & 4 ) ACKNOWLEDGE("|en|Reserved"); if( fault[5] & 8 ) ACKNOWLEDGE("|en|NVW Write Fault"); if( fault[5] & 16 ) ACKNOWLEDGE("|en|IRQ Fault"); if( fault[5] & 32 ) ACKNOWLEDGE("|en|Reserved"); if( fault[5] & 64 ) ACKNOWLEDGE("|en|Self Check Error"); if( fault[5] & 128 ) ACKNOWLEDGE("|en|Software Error"); };
  • result=SELECT_FROM_LIST("|en|Do you want to clear current faults ?",


Please login for more