How to Write MinorFaults or MajorFaults to a String Tag? RSLogix5000 R19

Grendizer

Member
Join Date
Apr 2012
Location
Toronto
Posts
88
Hey All,

As the title states, how do I write a MinorFault generated by an instruction, for example a negative .PRE value was entered for a timer preset, to a string tag? I am brainstorming ideas on how to handle unexpected errors.

Thanks,
 
According to the help file for the GSV instruction, you can do this. It can capture the type of fault, and its fault code. You will need to create a UDT to store this information.

It doesn't look like you are able to grab the description of the fault though. When I tested it on a compactlogix, I received the Type of fault, and fault code.

I am not able to attach my example for you. The upload utility gets stuck at 31%. :confused:

It can be done, but I would very seriously look at some other way of capturing the faults and making sure that you don't fault in the first place.
 
Hey Seth,

"other way of capturing the faults" Good point! I think that's the right way to do it.
Anyhow, which Attribute did you use? Can you give my the class/attributes/etc.

Thank you alot,
 
Class Name: Program
Instance: MainProgram <---This should be changed to reflect your own program

Attribute Name: MinorFaultRecord
Dest: A tag of your choosing of type DINT[11]

You will then need to setup a UDT with these...

TimeLow - DINT
TimeHigh - DINT
Type - INT
Code - INT
Info - DINT[8]

Then setup a COP instruction to copy from the GSV destination, to your new UDT, leave length at 1.
 
Beautiful!! Works Really nice!! Thank you so much!

I can create a fancy fault Description array based on the Type and Code numbers but it might not be portable if used in later versions. I'll dig and see if there is a way to make the description change dynamically.

Thank you 100s of times. You gave me a nice starting point to continue brainstorming.
Btw, if you find a way to pull the description, please let me know.

Thank you again,,
 
Your post is a bit misleading, a negative timer preset, or accumulator value will generate a Major Fault, and the processor will shut down, unless you have a fault routine that clears the fault.

You need to be clear on the difference between Minor and Major faults, and the different classes of Major Faults, eg. recoverable, or non-recoverable. Non-recoverable major faults do not execute any "user" fault handling routines, they will cause a processor shutdown immediately, and you will not be able to write tag values with the fault type and code number.

You can't handle recoverable major faults in "normal" code areas, it has to be done in either a program fault routine, or a controller fault routine.

The "description" of faults (by type and code) appears in the programming software "help", and in the on-line manuals, you can, I believe, use these descriptions in your application without copyright issues, but it might be worth checking copyright with RA.

Now, down to basics, recoverable major faults are mostly caused by a bad user program... your code should prevent them happening, don't execute the instructions that cause them. Generate an alarm in your alarm handler to annunciate these occurances. Once the major fault has been triggered, it is usually too late to do anything about it.
 
Class Name: Program
Instance: MainProgram <---This should be changed to reflect your own program

Attribute Name: MinorFaultRecord
Dest: A tag of your choosing of type DINT[11]

You will then need to setup a UDT with these...

TimeLow - DINT
TimeHigh - DINT
Type - INT
Code - INT
Info - DINT[8]

Then setup a COP instruction to copy from the GSV destination, to your new UDT, leave length at 1.

You can happily GSV into a tag of the UDT, without having to COP it afterwards... So long as the UDT is the right "size" for the GSV data it will accept it directly... try it, I know it works...
 
Hey Daba,

You are absolutely right! I am sorry I wasn't clear about the type of faults I was referring to. Like you said, I must prevent Major faults, no doubt.
I will actually prevent all the possible faults but I just wanted to know how to read the faults that are populated in the controller's MinorFaults and MajorFaults Tabs.

Thank you for your post.
 
Thanks daba, from reading the help file for the GSV for retrieving fault codes it was kind of misleading. Create a DINT[11] and then it recommended using a UDT for easier reading.
I see now ;)
 
Neat! One less rung lol

A few rungs less, not just one....

The fault data contains 2 INTs, fault type and code. by using a UDT that data is populated automatically, with having to split a DINT into two INTs...

The other benefit is you now get named elements for the individual vales, so there's no need to add comments...
 

Similar Topics

Hi everyone, I hope you're all doing well. I'm currently working on updating an HMI project for the GP2500, and I've encountered a bit of a...
Replies
1
Views
87
I've gotten to the learning curve where I can program a call for pump to come on at set point but I'm not sure how to turn the same pump off when...
Replies
1
Views
129
Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
159
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
123
Hello, This is my first exposure to CCW Micro8xx family. Someone will write to my existing micro850. Modbus TCP is turned on and I created a...
Replies
2
Views
172
Back
Top Bottom