I'm trying to do something that makes sense in my head, I just can't quite figure it out in DmD. I hope my explanation here makes sense.
I have a FOR/NEXT loop (V0, 0-4) controlling five Units, through a UDT called Unit. When "lead unit on" criteria is met, Unit[V0] is controlled, turned on, etc, say Unit2. Then when "lag unit on" criteria is met, it controls another unit, say Unit3. That all works fine for me.
I would then like to log the data into a UDT called History0-511. I thought I might do this by incrementing a pointer (0-511), and storing that value in V0+10, or V10..V14, corresponding to the five Units. Then, when Unit2 changes a state, I need to copy a start time, stop time, count, error bit, etc to the corresponding field in History[V12]. How do I link my control loop, with V0, to the corresponding V10..V14 range? Like copy to History[V[V0+10]], which isn't allowed. What's a clean work around?