Logix5000 Array element compare and reset

jholm90

Member
Join Date
Mar 2012
Location
Ontario
Posts
155
I've come across an application that might be hard to explain, however I think there might be a simple explanation. I am doing an array of robotic inspection checks on a part and have a UDT with these pertinent elements:
  • Check[x].Pass (BOOL)
  • Check[x].Fail (BOOL)
  • Check[x].Bypass (BOOL)

What I need to do is:
(1) When all checks are done I will need to compare the Fail bit in all array elements to make sure there are no failed check signals.
(2) When resetting the sequence, all the Pass and Fail bits need to be reset; however the Bypass bit and other elements in the UDT cannot be modified.

There are currently 40 checks to be programmed and I was hoping for some more elegant code than a large string of XIC functions to check for pass signals and another large string of OTU functions to reset my bits.

I tried to use a FAL Instruction for clearing my bits, however it does not like BOOL as the destination array element (If changed to INT then it functioned)

Just wondering if it might make more sense to create a two new BOOL arrays outside of my UDT with one being Pass and one Fail so it can be Filled with zeros and compared with a FBC Command.

Any insight on my array of troubles would be appreciated šŸ™ƒ
 
You could do a for loop. First time you see a fail end the loop and then do your cleanup logic which could be another for loop.

I would have tried FAL or FSC and I'm not sure why it wouldn't work. I could swear I've used it with bools inside of a UDT before.
 
Can you just change the bools to dints and move on with the rest of the tests and resets in a much simpler fashion?
 

Similar Topics

Hi All, I have some job settings in an array of real[6], I would like to save into another array in order to be able to load those settings back...
Replies
12
Views
4,414
I am attempting to use the FAL instruction in 5000 to sum an array. The logic is running in a ControlLogix PLC. I have searched this forum and...
Replies
6
Views
3,901
Hello All, I was wondering if there is a way to reset an array of timers by using a FLL or similar instruction. Timer[100] Thanks:beer:
Replies
17
Views
5,042
Hello, Hoping somebody has some ideas that can help me out. Looking for an easy way to average the nonzero values of a REAL array of fixed length...
Replies
3
Views
2,534
I have a tag called 'MBTCP.DATA.ReadData' INT[600] of which I would like to pull 16 sequential values into an add-on instruction. I will need...
Replies
6
Views
2,508
Back
Top Bottom