Multi-State Variable Question (and a small aesthetic question)

wmeaneyjr

Member
Join Date
Dec 2012
Location
MA
Posts
11
Hi Guys,

I was wondering if you guys could help me out. I want a tag to display a certain word depending on a set of tags.

There are six flag tags that indicate the position of a piece of equiptment along a linear rail. When a flag is tripped, i'd like the corresponding word to show up, and dissapear when not true. I've done it so that i've made 6 text primitives (one for each flag) and set them in complex code to return true if the tag is true. This works fine in the display, but its rather cumbersom to make all the individual tags and codes. Any suggestions on streamlining the process.

Also, i'd like to have an initialization screen that shows for about 4 seconds and shows a progress bar. I've tried this with different variables and had a problem where the system would bounce back to the main screen all the time. Any suggestions?
 
Unfortunately there are few standard computer programs - they all work slightly different. I assume that you are working with some type of graphical operator software (sometimes called an HMI program). A method to pull out bits in one brand and model of software would simply give you an error in a different brand.
 
There are six flag tags that indicate the position of a piece of equiptment along a linear rail. When a flag is tripped, i'd like the corresponding word to show up, and dissapear when not true. I've done it so that i've made 6 text primitives (one for each flag) and set them in complex code to return true if the tag is true. This works fine in the display, but its rather cumbersom to make all the individual tags and codes. Any suggestions on streamlining the process.
Since the title of your post is "Multi-State Variable", are you trying to display the words based on a single tag? If all the words will display in the same location, then it's possible. Just MOVE a value into the tag (within the PLC) to display each word. Make zero a blank state, so they will disappear when you put a zero in the tag.

Also, i'd like to have an initialization screen that shows for about 4 seconds and shows a progress bar. I've tried this with different variables and had a problem where the system would bounce back to the main screen all the time. Any suggestions?
Make this initialization screen your startup screen (the default one displayed at powerup). Use an unconditional timer in the PLC. This will run once at powerup. Use the timer's accumulated value for your progress bar. When the timer expires, trigger your main screen.

PLC/HMI brands/models?... :confused:

🍻

-Eric
 
Happy New Year everyone!

:eek: I can't believe i forgot to say what i'm working with! Sorry guys!

For an HMI, its a Red Lion G308 with Crimson 3.0
The PLC is a Panasonic FP2-C2 (i'm not quite comfortable messing with the PLC code yet)

I was talking to one of the other software guys who suggested i look at the variables as an array. They're all sequetial Relay registers, R375-R37A. Each one corresponds to an active state, such as "Home" "Unknown" "Overtravel" etc. Is there any way to work that into the tags in crimson?
 
There are six flag tags that indicate the position of a piece of equiptment along a linear rail. When a flag is tripped, i'd like the corresponding word to show up, and dissapear when not true.
....
(i'm not quite comfortable messing with the PLC code yet)

Because your 6 tags already exist in the PLC code, you should be able to simply change the Red Lion Crimson graphic program to show a specific "word" when one tag is true (= 1), and make that word invisible when the tag is false (= 0).

Is the real problem that there are actually multiple versions of equipment that each need 6 tags and 6 position flags, but you want to show all with one graphic (at different times)?

That would be a different problem and would probably require changing the PLC program to organize and index the tags so that you could use the same graphic to show any set of them. As Eric said, if you want to show different similar equipment depending on operator selection, then you need to change the PLC program to look at which set of equipment has been selected, then create 6 tags using indirect or indexed addressing that moves the proper tag values into the 6 selected displayed tags.

In the Allen Bradley RSView graphics operator program, the above COULD possibly be done without changing the PLC program, by using Derived Tag Expressions that look at different PLC tags depending on an internal graphic operator-selected value.
 
Last edited:
For the multistate, you can use a Integer tag, setup for the multistate format. Set the source to complex, with code similar to the following.

int i = 0;
if (flag1) i = 1;
if (flag2) i = 2;

Return (i);


This will give you a default value, if none of the conditions are met.

For the init screen. Make an integer tag, with a trigger high limit of 4 or 5, and gotopage(main) for the action. On your initialization screen, set the properties - actions "On Tick" to increase this tag.

Hope this helps!
 
Brijm, that's an excellent suggestion for a "splash page" progress bar. My current project just had a "Please wait" indicator while waiting for the complicated parts of the system (an embedded Linux box) to boot, and now it has a progress bar like the one you described.

Thanks !

The problem I run into with the Multi-State Format that the OP is asking about is that the "R" register in the Panasonic controller are individual boolean "coil" style addresses.

You can create an Array tag out of a Flag type, but you can't use that to drive a multi-state Text Box.

I'm sure there are ways to do this; I don't know the Panasonic addressing format options other than what appears when you select an R type register in Crimson 3.
 
I've never used the Panasonic controllers, so I'm no help there. But using the complex expression you should be able to make the flag tags into an status integer. From there you can have one tag, display multiple status's (Assuming only 1 will display at a time). If you have access to an array, you can do this with less typing, but for 6 points, I likely wouldn't bother with an array.
 
Wow guys, thanks for all the responses!

Unfortunately, it looks like the best way right now is how i set it up, manually creating text primitives that are visible when the corresponding variable is true. Its just a huge PITA because there's a set of points for each encoder on our system, and we have 6 encoders. I have roughly 50 positions that need to trigger this response. Ah well, do it once and do it right and any future revisions will be childs play.

I'm unfortunately working with the new HMI (we used to use a Panasonic GV series that is now out of production.) to fit a pre-existing program from the Panasonic PLC, and i'm not extremely proficient in coding, so i'm not ready to start messing with it yet.

You guys are awesome, thanks so much for all the help!
 
Last edited:

Similar Topics

Hello all, I'm coding on a CP2E-N with CX-programmer and trying to get my head around some of the clunkier parts of it, since I'm more familiar...
Replies
4
Views
2,845
Hi Guys, I configured some FactoryTalk SE multistate indicators but they only reflect state changes only after screen closure and reopening...
Replies
6
Views
1,106
i am working on project where i getting data from gas compressors and moving that data to a fewer and a common register mapping. 1 crimson 3.1...
Replies
2
Views
2,692
Hi Guys, I have an INT Tag where I moved in values 0 = off, 1=manual and 2=Auto. Please, how can I display the Modes as text using Textlist with...
Replies
1
Views
971
I have a numeric tag that I use to display various messages (using Multi-State). In one of the messages, I would like to embed the value of a...
Replies
6
Views
2,032
Back
Top Bottom