SLC-500 Fault Routine


Introduction to the SLC-500 Fault Routine

We usually use the SLC-500 Fault Routine to set certain values in the processor during a major fault condition. For example, if the processor faults, we don’t want the MMI (Man-Machine Interface) to display “Stale” Values. Without a fault routine, the processor might constantly display static values even though the program is not executing. The operator would think the equipment is running. In reality, we have a processor fault, and operation of the equipment has ceased.

Conversely, a fault routine might zero the values the MMI is monitoring. When the operator sees that all values are zero, he will know a problem has occurred.

There are several conditions that will cause a processor fault. For example, a negative preset or accumulator in a timer. Certain math overflow conditions could fault the processor. If a module becomes unseated, the processor could also fault, and shut down the system.

Create the Fault Routine

Obviously, we must be offline to create the fault routine. Right click “Program Files”, and create new. In this case, File #8 will be the fault routine.

Meanwhile, I’m just going to have a simple ADD instruction in the fault routine. This allows us to verify the routine is executing when it should. In reality, you might use a COPy or FLL (File Fill) to zero certain registers the MMI is monitoring.

Moreover, I’ll add a self-running timer to the Main Routine (Ladder 2). The purpose of this timer is for me to enter a negative value to cause a processor fault. This will verify the operation of the fault routine.

Configure the Fault Routine

Finally, I’ll go into the S2 Data file, and click on the “Errors” Tab. I’ll set file 8 as the fault routine.

Download and test your work

At this point, I’ll download the file, and monitor ladder 8. As you can see, the fault routine has not executed.

Next, I’ll open the T4 data file, and place a negative preset into a timer. This will cause a processor fault. Remember, when the processor faults, the processor will stop running your logic. Never do this on running equipment.

We can clearly see the processor has faulted. Look at the ADD Instruction in ladder 8. You will notice the value of N7:2 has incremented. This proves the fault routine did execute when the processor faulted.

Now, I’ll just clear the fault, correct the preset, and go back to run mode.

For more information on the SLC-500, visit the category page!

— Ricky Bryce

Leave a comment

Your email address will not be published. Required fields are marked *

seven + = fifteen