4

I've connected to OBDKey and obtained data. I want immediately close my program when the vehicle is powered down(ignition turned off) How can I check that ignition is turned off?

dsolimano
  • 8,870
  • 3
  • 48
  • 63
vic
  • 159
  • 1
  • 7

2 Answers2

5

What about using the RPM value from the engine controller to determine that the engine has stopped running? With OBDKey, use the 010C\r command. this will be 41 0C 00 00 if the engine is not running or NO DATA if the ECU has already shut down.

chengbo
  • 5,789
  • 4
  • 27
  • 41
obdkey
  • 400
  • 3
  • 9
0

If you're using an ELM327chipset, you can use the ATIGN command which will response ON or OFF.

In practice, I'm not sure whether this command is actually useful. For socket-powered OBD2 devices, it looks like they always report ON when they are powered. See also ELM327 ATIGN always returns 'ON'.

Community
  • 1
  • 1
DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67