Fault Handling.....

Join Date
May 2011
Location
South Carolina
Posts
87
Good Afternoon Everyone.

I have a dilemma and I am sure someone out there knows the solution. Here is my situation:

We have tooling that gets connected to the machine. The machine reads the tool ID to know what tool is installed. Based on this, there is an option screen populated so the operator knows which production option to pick (Option 1-15).

The tooling data is contained in a 3 dimensional array such as tool[1,1,1] where the first and second numbers are either 1 or 2. The third number is where the problem comes in and this is the option number. The arrays vary in size based on the tool. So one tool may have an array of Tool_1[3,3,5] and another one has an array of Tool_2[3,3,10]. Well if the operator "accidentally" chooses an option outside the array size, it causes a major fault on the PLC.

I want to use a fault routine to get the fault data and if it due to choosing a number outside the array options, which I think gives a Fault Type of 4 and a Fault Code of 20, I want to zero out the option numbers and reset the fault.

I have attached a screenshot of the logic and was wondering if what I did will function as intended. Also, when it resets the fault, does the PLC go to run mode or program mode? If it goes to program mode, how do you automatically change it to run mode?

Fault Routine.jpg
 
I would focus on preventing the fault in the first place.

Clamp the available range the operator can input so that it cannot be out of range.
 
I agree, avoid the fault.

Put all the data in one array, e.g. Tools_All[Ntools,N2D_2nd_dim,N_3rd_dim]

  • The first dimension Ntools is the tool
  • The second dimension N2D_2nd_dim is a 1-D form of the first two dimensions of OP arrays Tool_1, Tool_2, ...
    • The dimension is chosen big enough for all tools
    • Say largest first two dim values in OP are 5 and 4; make this 30 (6x5)
    • The formula for this 2nd dimension is 5*OPval1 + OPdim2
      • Will yield 29 and no overflow for OPval1=5 and OPval2=4
  • The third dimension N_3rd_dim is 16 and is for the operator-entered value 1-15
All values in the array at locations outside the valid location for the tool (first dimension) have a value of -9999, or some other invalid value.

The code checks for a value of -99 and responds accordingly when it finds it.

Code for all tools is identical; you are not checking whether to use Tool_1, or Tool_2, etc.
 
You have not said what the operator screen is perhaps (if you have access to it) modify the HMI/PC that the operator enters data to limit the entry, most HMI's for example have parameters on input fields to limit the range that can be put in.
 
The logic you have posted won't clear the fault. You need an SSV to write back to the controller to do that. Perhaps you already have that and just didn't include it in the screen shot.

The controller doesn't enter fault mode until it reaches the end of the fault routine AND the major fault is still present. So, if you have an SSV that clears the fault then when it reaches the end of the routine it will remain in Run and return to the next instruction from where it was when the fault occurred. Without the SSV it will enter fault mode and shut down.

And I am with durallymax...prevent the mistake from causing a fault. Use Limit Test or GRT/GEQ/LES/LEQ to test the entered value before attempting to use the value. As Parky suggests, it IS a good idea to use the HMI limiting capabilities to alert the operator that they have entered an invalid value. But I never trust the HMI to do the error checking for the PLC.

OG
 
Last edited:
I would focus on preventing the fault in the first place.

Clamp the available range the operator can input so that it cannot be out of range.

+1

Use the variable maximum feature of a numeric input enable to limit the input range based on which array is loaded.

If you buffer the HMI input you can also prevent the controller fault by checking if the value is in range before using it (and then zero/throw a message up).
 

Similar Topics

I've made a fault routine to notify operators when an IO module causes a major fault, and provided a button to manually reset the fault, but I'd...
Replies
8
Views
2,436
Hi All, I am working with K350 Servo Drives, L30ERM Processor, and FactoryTalk View ME. We are trying to work on a fault handling routine where...
Replies
0
Views
1,271
So I am rewriting a messy program (which I wrote awhile back), adding some features and streamlining some security and decided to try my hand in...
Replies
4
Views
2,506
Hello all, New member to the forum here. I have a question about fault handlers that I'm not too clear about - may seem pretty basic but I can't...
Replies
3
Views
2,267
Hey guys. New to the forums. We have just finished a conversion from PLC5 to ControlLogix (using a 5571 controller) and are using ControlNet to...
Replies
9
Views
2,527
Back
Top Bottom