Hi all,
I need to activate a digital output every time I call a function, when I am doing the first point, I want to activate the doPoint1, when I am doing the second point the function should activate the doPoint2 and so on.
Late binding only work with procedures, it would be super easy with an array, but I don't know of any way to make an array to share the same memory space than a list of outputs.
AliasIO does not seem the way to go either... as I would have to define an alias for each signal...
A group output could be the way, setting it to the same address than all the DO bits, but I would have to calculate the right bit and make an bitwise OR with that,,,
Something like this pseudocode:
InitialValue = GOutput(groupOutuput);
bitActiveValue = calculateValueWithOnlyOneBitActive(5);
setGO groupOutuput, calculatedValue OR InitialValue; // BitOr seems only to work with BYTES not bigger groups.
But as said in the comment, BitOR seems only to work with 8 bits at once...
Apart of doing something like (PseudoCode again):
Not a big deal doing this... it would work and I have to do it only for 32 signals, but it's super ugly...
How would you solve this small issue?
Thank you all in advance.