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!
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) {};
Apparently DTC_CLEAR is not called via a sensor.
Can someone explain how i can do that?
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
isn't there an option under speech/alarm
settings to do this?
That speech/alarm option doesn't remove the MIL unfortunately...
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.
this is command 04 or 14FFFFFF
Curious why the option below
the automatic scan did not clear
DTC but the clear fault pushbutton
did.
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
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?
Thanks.