Get I/O Unit Names

Is there any way to get a list / array of my I/O units’ names? I’m working on a strategy with a huge number of I/O Units and I’m wondering if there’s an easier way to assign my unit names to a pointer table as described here. The reasoning in that old post of mine still stands - I need a way to refer to units by their addresses and I’m hoping there’s a way to do this pointer assignment iteratively rather than by hard-coding. Any help is appreciated!

Use the export feature in PAC Control (right click the I/O Units folder). Save the file, then open it with excel (it is comma separated). You should then be able to sort and move things around in Excel to get the IO unit names together.

You can then copy those names into a new sheet and write a formula to generate the OptoScript you need to assign to a pointer table and then copy this back into your strategy if you are familiar with Excel formulas.


I was afraid it would be something like that! I was hoping there would be a programmatic way to do this within OptoScript, but this solution is still workable! We’re looking to expand our system so I need to rebuild my “I/O Unit[Address]” pointer table; fortunately this is kind of a ‘one and done’ thing, so generating a new hard-coded table is fine!

Thanks again Philip, you’ve been helpful as always! :grinning:

1 Like