Use this block to iterate through the OBD Fault Definitions in the OBD Fault Manager, and get a obdfault_T reference to each one matching a given criteria.
This block can be used to iterate through all of the faults, the suspected faults, the pending faults, the confirmed faults, the ready faults, the completed faults, the MIL request faults, the previously active faults, the permanent faults, the test failing faults, the test failed since last clear faults, the failed last drive cycle faults, and the test failed since key cycle faults.
Input a obdfault_T reference, and the next fault will be output. If a null obdfault_T is provided at the input, the first fault will be output. If no faults are available matching the given criteria, then the block will output a null obdfault_T, and the Valid output will be false.
Because the output is null at the end of the iteration, it may be used as the next input, starting the iteration over. To skip the null obdfault_T, and simply loop back to the beginning, check 'Continue looping through faults'. When this is checked, the Valid will remain true, and there will be no way to determine when the loop starts over. Of course, if no faults are available, the output will be null and Valid will be false.
The faults are kept in a fixed list and this block iterates through them in a fixed order. If a fault state changes during the iteration of the fault list the fault's status may or may not be detected during the current scan of the list. If the fault is ordered before the current fault, the changed state will not be detected unless the list is rescanned. If the fault is ordered after the current fault the changed state will be found as the application iterates through the faults.
It is possible for another task to preempt the fault iterator and thus change the fault states. For example, a fault can enter the "Suspected" state while trying to count the number of "Suspected" faults in another task using this block. If the iteration of the faults needs to be coherent, then it is recommended that the user place the entire operation within a critical region.
OBD Fault Iterator
MotoHawk OBD Fault Manager
| Parameter Field | Values | Comments/Description |
|---|---|---|
| Loop through | Drop-down list | Choose one of the following states: All, Suspected, Pending, Confirmed, Ready, Failed This Drive Cycle, Test Complete This Drive Cycle, MIL Request, Previously Active, Permanent, Test Failing, Test Failed Since Last Clear, Failed Last Drive Cycle, or Test Failed Since Key Cycle. |
| Continue looping through faults | Checkbox | Checked = loop through all faults (no NULL occurs at end of list), Unchecked = loop through all faults (no NULL) |
| Copyright 2010 Woodward Corporation. All Rights Reserved. | Visit Us: mcs.woodward.com |