Posted 24 Oct 2018 I have (176) workstations with local controls to each. Each has (2) photo eyes, a solenoid, and an MDR zone control. Therefore I have (176) of one photo eye, (176) of the other, and so on. My tags are all labeled with respect to the workstation. E.g. "solWorkstation1". My question is, is there a way I can use the same AOI in a loop and index the workstation number like I could if these numeric values "xx1" were elements in an array such as "xxx[1]" becoming "xxx[indexer]? Share this post Link to post Share on other sites
Posted 24 Oct 2018 Can you create new tags? If so, you can create arrays of tags called SOL of type BOOL[177], PhotoEye[177], etc. Arrays are 0-based, so unless you have a workstation 0, you need 177 elements to be able to index to SOL[176]. You can also create a UDT for each workstation of type WORKSTATION with sub-tags for whatever's in the workstation. Then you can create another tag called WorkStationTAG of type WORKSTATION[177] Share this post Link to post Share on other sites
Posted 24 Oct 2018 Short version, yes, I’ll see if I can round up the routine and attach it later today. This is for CLX correct? Share this post Link to post Share on other sites
Posted 25 Oct 2018 On 10/24/2018 at 8:40 AM, Joe E. said: Can you create new tags? If so, you can create arrays of tags called SOL of type BOOL[177], PhotoEye[177], etc. Arrays are 0-based, so unless you have a workstation 0, you need 177 elements to be able to index to SOL[176]. You can also create a UDT for each workstation of type WORKSTATION with sub-tags for whatever's in the workstation. Then you can create another tag called WorkStationTAG of type WORKSTATION[177] I still need to get the alias tags into the array, correct? Would I map that by moving Input DINTs and Output INTs into the arrays? (using 32pt input cards and 16pt output cards) Share this post Link to post Share on other sites
Posted 26 Oct 2018 (edited) Sorry, I've been travelling. I'll attach one of the programs that uses what your looking for to this. It moves a bunch of data to/from an analog alarm block. I've used it up to almost 300 analog points with multiple parameters in each analog tag (using UDT's) so I know it's fast and pretty robust (ie it works) There is an AOI involved- AALM (I don't like the AB alarm block so I rolled my own. Theirs has too much crap for my purposes) And the routine you're interested in is AA_C and maybe AA just to get an idea for what it's doing. AIOM is where I map an analog card point to a tag Asherton_12_22_15.ACD Edited 26 Oct 2018 by Michael Lloyd Share this post Link to post Share on other sites