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:
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
- 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