What PLC are you using?
The CJ range can have a ST section, rather than trying to do it in a FB.
From what you said, you wanted to search through an Array of booleans, find a '1', then load the position of that find into another register?
I'm assuming the reason for the FB is for portability/security?
Hi, Its a NSJ (PLC/HMI)combination, Program/Section options are Ladder only unfortunately
So i thought i could utilize FB's to achieve this.
Looking at Ladder indirect addressing DR,IR now.
I was looking for portability ideally.
Functionality wise - it needs to loop through a range of Bools
If a match is found - store it,increment store register and then carry on looping till the next '1' is found until either the loop ends or max store registers is reached.
Regards