Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » CLEAR_DTC fault clear repeater

Pages: [1]
Author Topic: CLEAR_DTC fault clear repeater
joostm
Member
Posts: 5
Post CLEAR_DTC fault clear repeater
on: June 20, 2023 (GMT)

Hi, I’m trying to automate the RESET FAULTs with a 6 seconds sleep timer, but how do I call the reset faults from a script?

Something like this?

in init():
sensor = Sensor.getSensorByName(“CLEAR_DTC”);

in main():
sensor.setValue(1);
sensor.start();
Time.sleep(6000);

Can someone please explain how to call the Reset Faults command?
Thank you very much!

joostm
Member
Posts: 5
Post Re: CLEAR_DTC fault clear repeater
on: June 20, 2023 (GMT)

scriptTitle="fault reset";

scriptDescription="Fault reset repeater";

scriptPackage="torque.fault.reset.repeater";

scriptVersion=1;

scriptAuthor="Joost.Mulder";

 

 

/**

* This is called when the script is first loaded, only once.

*

 * This function is required and must complete within 1000ms.

*/

onInit = function() {

  

   // Our quit global flag.  Use the var keyword to make it local

   quit = false;

 

   // Create a test sensor

   sensor = Sensor.getSensorByName("CLEAR_DTC");

   //("CLEAR_DTC","CLEAR_DTC","S");

 

};

 

/**

* This is called when Torque is connected to an OBD2 device

*

 * This function is optional and does not need to be defined.

*/

onOBDConnected = function() {};

 

/**

* This is called when Torque is disconnected from the OBD2 device

*

* This function is optional and does not need to be defined.

*/

onOBDDisconnected= function() {};

 

/**

* This is a 'main' entry point for your script, (if you choose to

* define this function), it can run indefinitely while (!quit) { ... } style

*

 * This function is optional and does not need to be defined.

*/

main = function() {

 

   // Show a non-blocking dialog

   dialog = Dialog.popup("start resetting faults?","script initialised, run automatically?","Ok",function(){ Log:log("yes, start resetting faults"); },function() { Log:log("The no, dont start resetting faults"); quit = true;} );

 

   // Enter our main loop

   while (!quit) {

 

      // Put the current time milliseconds in the sensor we made

      //sensor.setValue(Time.currentTimeMillis());

                  sensor.setValue(1);

                  sensor.start();

 

      // Sleep about six seconds so we don't chew up CPU

      Time.sleep(6000);

                 

                  

                  

   }

 

 

};

 

/**

* This is called when your main function should stop and exit (if you use the function)

 *

 * This function is required if you have defined the main function, it must

 * return within 1000ms. Usually you will just put a 'quit=true;' here so your

* main loop exits properly instead of having to be forcibly stopped by the app

*/

stop = function() {

 

   quit = true;

 

};

 

/**

* This is called when a sensor is read or updated over OBD2, GPS, etc.

*

 * This function is optional and does not need to be defined.

*/

//onSensorRead = function(sensor) {};


joostm
Member
Posts: 5
Post Re: CLEAR_DTC fault clear repeater
on: June 20, 2023 (GMT)

Apparently DTC_CLEAR is not called via a sensor.
Can someone explain how i can do that?

cintakc
Member
Posts: 1663
Post Re: CLEAR_DTC fault clear repeater
on: June 23, 2023 (GMT)

there are different commands to remove errors on different brands of cars
for example 1800FF00
in Torque you can implement a button with a command to remove errors

Capp777
Member
Posts: 2994
Post Re: CLEAR_DTC fault clear repeater
on: June 23, 2023 (GMT)

isn’t there an option under speech/alarm
settings to do this?

joostm
Member
Posts: 5
Post Re: CLEAR_DTC fault clear repeater
on: July 1, 2023 (GMT)

That speech/alarm option doesn’t remove the MIL unfortunately…

joostm
Member
Posts: 5
Post Re: CLEAR_DTC fault clear repeater
on: July 1, 2023 (GMT)

Oke, what works for me is the Remove Fault button, but I have to push it manually every 5 seconds, to prevent MIL. I know, it’s because of a broken sensor, which is difficult to replace, so currently looking for a temp solution…
What is the command I need to send via a script? Or what is the command send from this button?
I have a VW crafter 2010.

cintakc
Member
Posts: 1663
Post Re: CLEAR_DTC fault clear repeater
on: July 1, 2023 (GMT)

this is command 04 or 14FFFFFF

Capp777
Member
Posts: 2994
Post Re: CLEAR_DTC fault clear repeater
on: July 1, 2023 (GMT)

Curious why the option below
the automatic scan did not clear
DTC but the clear fault pushbutton
did.

moreause
Member
Posts: 643
Post Re: CLEAR_DTC fault clear repeater
on: July 4, 2023 (GMT)

Just wondering why you want to erase the check engine light absolutely

if you need to do it every 5 seconds i would say change the sensor or make sure the check engine light don’t come up by by- passing that sensor

Yetanfou
Member
Posts: 1
Post Re: CLEAR_DTC fault clear repeater
on: July 8, 2023 (GMT)

I made the following script as a temporary workaround to cope with the dreaded EGR valve from hell in a Skoda Octavia II (CAYC engine). The code is simple but thus far effective – after a bit of testing, YMMV as may mine – in stopping that #$%#*^ coil led from blinking and the thing going into ‘limp mode’ while the engine is not yet fully warmed up. The real fix consists of either cleaning and greasing alt. replacing the EGR valve but as that is placed on the cylinder block underneath the DPF and necessitates dismantling far too many bits and even then is hardly reachable while lying underneath the car I don’t have the time to do this yet.

As configured it sends a clear DTC command every 5 seconds, this works for the VAG CAYC engine I’m using it on. Other brands might need different codes, uncomment what works for you.

scriptTitle="DTC_Clear_Loop";
scriptDescription="Clear DTCs at a specific time interval";
scriptPackage="org.unternet.app.torque.script.dtcclearloop";
scriptVersion=1;
scriptAuthor="Yetanfou";

onInit = function() {
   quit = false;
};

main = function() {
   while (!quit) {
      if (OBD.isConnectedToAdapter() && OBD.isConnectedToECU()) {

         // The most common clear DTC command is mode 4 
         OBD.sendCommandGetResponse("clear_dtc", "04\r");

         // Torque itself uses the following sequence, use what works for you...
         // OBD.sendCommandGetResponse("clear_dtc", "14\r");
         // OBD.sendCommandGetResponse("clear_dtc", "14FF00\r");
         // OBD.sendCommandGetResponse("clear_dtc", "140000\r");
         // OBD.sendCommandGetResponse("clear_dtc", "0100\r");
         // OBD.sendCommandGetResponse("clear_dtc", "04\r");
         // OBD.sendCommandGetResponse("clear_dtc", "14FF00\r");
         // OBD.sendCommandGetResponse("clear_dtc", "14\r");
         // OBD.sendCommandGetResponse("clear_dtc", "140000\r");
      }

      // Sleep for as many seconds as you are willing to, the longer the better up to a certain level...
      Time.sleep(5000);
   }
};

stop = function() {
    quit = true;
};

The script works, the codes get reset and the coil lamp disappears… as long as the car is not moving. As soon as it starts moving this specific code can only be reset by cycling the ECU (contact off-contact on), alas. This could be brand-specific or code-specific or just my bad luck so maybe this script works for you?

liq69ers
Member
Posts: 1
Post Re: CLEAR_DTC fault clear repeater
on: July 9, 2023 (GMT)

Thanks.

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.037 seconds.

  Follow me on twitter