Thank you both for your help on this!
Phillip - that was exactly what I needed to know about. I wasn’t sure if I needed that last command or not. I’m sure that OptoMary or Ben may be able to tell us why I couldn’t just directly set PointerTable[0] to a number or do TurnOn(PointerTable[0]); directly. That would definitely simplify it. I didn’t know I wouldn’t be able to so when I first started this I was wondering why nothing was working. Then I looked around and found that you had to extract it into a pointer variable to be able to use it.
Barrett, Thanks for all that great info. It sounds about like what I’m doing. I didn’t use an init file to load my pointer tables. I just used a OptoScript Block. I only have 2 LeachFields with 8 lines each and the possibility or a third in the future so it’s not too much to do load. It all loads before I go into the loop. I set that up with pointer tables pointing to my I/0. I have 8 valves, 8 flow sensors, and 8 high level floats that are each in their own table and then they are passed into my subroutine which runs each line. In the subroutine is where I was breaking them out into pointer variables before using them, but then for an output I thought I would need to “put it back” into the pointer table.
I was interested in your exception code for an individual index. How do you usually go about adding that exception.
I also have another Forum question that OptoMary answered to if you want to see a little more of what I’m trying to accomplish. Break out of a subroutine?
Thanks!