Torque

Forums

Forums

CLEAR_DTC fault cle...
 
Notifications
Clear all

CLEAR_DTC fault clear repeater

12 Posts
6 Users
0 Reactions
692 Views
(@joostm)
Posts: 5
Active Member
Topic starter
 

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!

 
Posted : 20/06/2023 9:59 am
(@joostm)
Posts: 5
Active Member
Topic starter
 

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) {};


 
Posted : 20/06/2023 10:04 am
(@joostm)
Posts: 5
Active Member
Topic starter
 

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

 
Posted : 20/06/2023 3:18 pm
(@cintakc)
Posts: 1665
Noble Member
 

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

 
Posted : 23/06/2023 9:34 am
(@capp777)
Posts: 2999
Famed Member
 

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

 
Posted : 23/06/2023 1:09 pm
(@joostm)
Posts: 5
Active Member
Topic starter
 

That speech/alarm option doesn't remove the MIL unfortunately...

 
Posted : 01/07/2023 12:16 pm
(@joostm)
Posts: 5
Active Member
Topic starter
 

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.

 
Posted : 01/07/2023 12:19 pm
(@cintakc)
Posts: 1665
Noble Member
 

this is command 04 or 14FFFFFF

 
Posted : 01/07/2023 3:05 pm
(@capp777)
Posts: 2999
Famed Member
 

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

 
Posted : 01/07/2023 8:43 pm
(@moreause)
Posts: 650
Honorable Member
 

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

 
Posted : 04/07/2023 3:33 pm
(@yetanfou)
Posts: 1
New Member
 

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?

 
Posted : 08/07/2023 7:00 pm
(@liq69ers)
Posts: 1
New Member
 

Thanks.

 
Posted : 09/07/2023 11:46 pm
Share:

  Follow me on twitter