Sign in to follow this  
Followers 0
arkansascontrols

RSView SE and UDT's in ControlLogix

4 posts in this topic

I have a material handling application controlled by multiple ControlLogix Processors. Data regarding product details for each possible position in the system is stored in a LARGE array of tags based on a UDT that is quite complex. My RSView SE application has a screen that displays the location of each product container in the system that can be clicked for details about that particular containers product. This information is read from element(x) of the MyBigUDT Array. Now the customer wants to see color coding of the containers from the main display screen based on product codes. So my problem is this; 1. I can go to each screen element and write an expression in the Animation->Color dialog to change the color based on the product id (which is a subelement of the MyBigUDT Array), however this will require writing almost 1000 unique expressions for each of the container objects, which I obviously don't want to do. 2. I can write VBA Code to change the color of each container object, however since the container objects in RSView cannot be an Array of objects and VBA will not allow you to build Object, Variant or String Variable Names by combining text and string converted numbers, then my only option is to write almost 1000 unique lines of code to change the color of each container object. So my question to the guru's is this; Is there a work-around for the RSView Limitation of creating arrays of screen element(such as polygons, numeric data displays etc.) Such as some other method of indexing through multiple identical elements on the screen? And, is there a way I can directly read/write PLC Tags from VBA without a separate DDE/OPC link? If this were a single DINT, or REAL or BOOL I could create a reference tag in RSView, but you can't create an Array of Reference Tags in RSView, so again, I would have to create nearly 1000 tags in RSView with each one pointing to a different element of MyBigUDT. Obviously the object here is to create a For Next Loop in VBA that will do a lookup on the correct array element, and ideally to be able to use the VBA event for Numeric Data Display Change() to update the associated Polygon (I have a grouping of a Polygon and a Numeric Data Display Field) With Polygon1 and NDD1 through 999. Any suggestions or workarounds would be appreciated. Surely others have run into this wall, I'm at the point where I think I need to write a standalone VB application that I call from RSView to save on coding. Regards E

Share this post


Link to post
Share on other sites
How many different containers are displayed simultaneously on the main display screen? I'm thinking that if the answer is a relatively small (fixed) number, an indirect expression could solve your problem...please tell me the number isn't 1000. Edited by Nathan

Share this post


Link to post
Share on other sites
I'm afraid that every container is displayed simultaneously. An indirect expression would be perfect but how do you index through even a small number, I've not been able to figure out an effective way to index through at all, other than one by one, or with static lines of VBA code?

Share this post


Link to post
Share on other sites
Ouch - is there a way to export the screen to an XML(ish) format? Otherwise, I have no idea how you could programmatically step through the objects on the screen. I imagine it's possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0