Wonderware Intouch Question(s)

Join Date
Sep 2016
Location
VA
Posts
2
(Solved)
Howdy everyone,
Quite a newbie here. Come from a programming background and fell into working with PLC (Logix 5000) and Wonderware Intouch at work due to my ability with logic and history as a programmer.

I am trying to find a way to simplify some of the work were doing by creating a quick function that will call specific data from our PLC that is stored in various ways instead of creating a bunch of tags.

So I can understand how to call program tags and data fairly well. But I am not sure if what I am trying to do is possible. We have some items on the screen and when you click on them it opens up a window with multiple data fields that are called from an array. I was hoping to just create local variables for each of the item that represent their position in the array and then use the StringFromIntgr() function to convert them to a string, then combine the strings into the item address I want to call from the PLC, and then assign this to tag that would be displayed on the popup window.

So i.e, an On Show Condition Window Script:

DIM ProgramName AS Message;
DIM ArrayPosition1 AS Integer;
DIM ArrayPosition2 AS Integer;
DIM ArrayPosition1String AS Message;
DIM ArrayPosition2String AS Message;
DIM ItemAddress AS Message;

ProgramName = "SomeProgram"
ArrayPosition1 = 1;
ArrayPosition2 = 1;

ArrayPosition1String = StringFromIntgr(ArrayPosition1, 10);
ArrayPosition2String = StringFromIntgr(ArrayPosition2, 10);

ItemAddress = "Program:" + ProgramName + ".Array1Name[" + ArrayPosition1String + "].Array2Name[" + ArrayPosition2String + "].InformationIWant"

{This should produce "Program:SomeProgram.Array1Name[1].Array2Name[1].InformationIWant"}

{So the InformationIWant is an Integer}
{I've created a tag that is an I/O Integer name tempIntegerValue that points to a 0 value, and indirect analog named DisplayValue}

tempIntegerValue.Name = ItemAddress;

DisplayValue = tempIntegerValue.Name;

However DisplayValue will either display !!(error) or a 0.

Is there a way to go about this that would be successful?

Thanks!
G
 
Last edited:
Ok figured it out!

DIM ProgramName AS Message;
DIM ArrayPosition1 AS Integer;
DIM ArrayPosition2 AS Integer;
DIM ArrayPosition1String AS Message;
DIM ArrayPosition2String AS Message;
DIM ItemAddress AS Message;

ProgramName = "SomeProgram"
ArrayPosition1 = 1;
ArrayPosition2 = 1;

ArrayPosition1String = StringFromIntgr(ArrayPosition1, 10);
ArrayPosition2String = StringFromIntgr(ArrayPosition2, 10);

ItemAddress = "AccessName:program:" + ProgramName + ".Array1Name[" + ArrayPosition1String + "].Array2Name[" + ArrayPosition2String + "].InformationIWant"

{This should produce "AccessName:program:SomeProgram.Array1Name[1].Array2Name[1].InformationIWant"}

{So the InformationIWant is an Integer}
{I've created an indirect analog named DisplayValue}

DisplayValue.Name = ItemAddress;

This correctly displays the value I am after.

Hope this helps someone else.

More info: https://wonderwarewest.com/download...t Tags and Remote References in InTouch 7.pdf
 
Last edited:

Similar Topics

Hello all, I'm using WonderWare Intouch at my factory for the HMI. Here is what I'm trying to accomplish: Save data values (27 of them) into one...
Replies
21
Views
7,529
Hi Guy 1. Please how can I create a shutdown button on the intouch? 2. Also how can I configure graphical Trend for 9 different values/tags in it?
Replies
3
Views
2,719
Ok, so this questions has two parts. First of all, I am creating a SmartSymbol with some indirect tags that I want to display in a generic pop...
Replies
0
Views
2,301
Hi, Please I need help regarding synchronization of data on both Primary and Secondary server. I got a client pointing into a Primary server, and...
Replies
2
Views
2,659
I'll preface this by saying that I am an Intouch beginner… I have an Allen-Bradley Compactlogix that currently stores recipes in an array[0-20]...
Replies
1
Views
4,067
Back
Top Bottom