RMA
Member
I've got an application where a robot is running 10 objects one after another past a camera so I need to buffer the result of the camera test. This bit is easy enough since I can just AND the falling edge of the camera's data strobe and the result and if the result is OK SET the corresponding bit in the array.
However, in order for this to work I need to initialise the array to 0 at the start of each new run and I can't find any way to this other than to individually reset each element in the array. Apart from the fact that it's too spaghetti-like for my taste even with only ten elements, what are you going to if you've got 100 elements!
Is there really no way reset all the bits in an array at one time?
By the way, the array is a STAT in the IDB and the company I'm doing this for want it to stay there otherwise I'd move it out to Marker memory and define a WORD to access all the bits in one go - can't see any way to do that with a STAT, though.
However, in order for this to work I need to initialise the array to 0 at the start of each new run and I can't find any way to this other than to individually reset each element in the array. Apart from the fact that it's too spaghetti-like for my taste even with only ten elements, what are you going to if you've got 100 elements!
Is there really no way reset all the bits in an array at one time?
By the way, the array is a STAT in the IDB and the company I'm doing this for want it to stay there otherwise I'd move it out to Marker memory and define a WORD to access all the bits in one go - can't see any way to do that with a STAT, though.