bdossantos
Member
Need some assistance. I am testing out a heart beat code and I want to fault the processor so I can check from the SCADA system that the PLC is Faulted and Alarms me. Thank you.
Oh good one. Could even add a module that doesn't exist and then check the box to fault.If you have hardware you can set a module to fault the processor on connection loss.
Divide by zero and a negative timer preset are Minor faults in ControlLogix.
But an out-of-bounds pointer in an Array tag index, like MyArray[100] in an array whose elements are [0] through [99], will definitely Major Fault the CPU.
If you put a negative number in a timer preset and make it true, it will major fault the controller.
Try a math function that divides an integer by zero.
Thanks for that clarification about the Timer with a negative preset.
Just moving the negative integer into the Timer's .PRE does not fault the controller, but executing the Timer with a negative .PRE value does.
The out-of-range array pointer is the one that usually catches me in the wild.
I do work in a plant that has over 1000 PLCs all on the same Ethernet. So we use code that on first scan gets the IP address from the Ethernet module and if it doesn't match what the program has as a setpoint, it jumps backwards to fault the PLC.