Panelview "AND" Syntax

stretch_af

Member
Join Date
Mar 2011
Location
Drinking in Wisconsin
Posts
69
I am a bit of a novice when it comes to Syntax. I am trying to use 2 bits in the visibility tab. If both bits are high, then I want my graphic to be visible. I could create a separate bit in the processor to do this, but I still want to figure this out. Any help would be appreciated.

{::[5PACKAGE]B12:1/1}
AND
{::[5PACKAGE]B12:5/2}

Thanks
Justin
 
I want to say that the entire expression needs to be bracketed - otherwise it would just process the first tag.

I had some difficulty with something similar a long time ago and can't remember how I corrected it - since then I've always just made bits in the PLC.
 
Whatever is ahead of and after the AND must be in parenthesis when it is more than just a tag name. That forces it to resolve whats inside the parenthesis before the AND. For example:

(Tag1 > 500) AND (Tag2 < 1000)

If we assume the value of Tag1 and Tag2 are both = 750, then expression is evaluated as Tag1(750)> 500 = TRUE(1). Then it solves Tag2(750) < 1000 = TRUE(1). Only then does it perform the AND.

TRUE AND TRUE = TRUE Expression (or 1 AND 1 = 1)

If we had instead said Tag1 > 500 AND Tag2 < 1000

Then it would have evaulated as Tag1 > 500 = TRUE
But then it would have evaulated TRUE(1) AND Tag1 (750) and determined that to be FALSE. Then it would have seen a syntax error with the remaining part of the equation

FALSE Tag2 <1000

It would not understand why Tag2 is there instead of an operator.

However......if all you are doing is looking at a single tag, parenthesis are not needed, but they don't harm. Bit1 AND Bit2 is valid without needing parenthesis. Your expression as you wrote it in the first post would be valid.



OG
 
Last edited:
I figured it out. It was as easy I thought it should be. I was updating an older HMI, I didn't write it initially. I finally noticed there were two identical graphics on top of each other, depending on which recipe was running. That is why it appeared to not work. I modified one, but not the other. Lesson learned.

{::[5PACKAGE]B12:1/1} AND {::[5PACKAGE]B12:5/2}

^^ That was all I needed.^^
 

Similar Topics

Help. I am using a PV600+ with a ML-1100 and having trouble setting up the alarms. I have read the manual. All of chapter 9 - Setting up Alarms...
Replies
0
Views
2,411
I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
79
Hi Everyone, Currently we have three plants running with Controllogix PLCs (L72, L73, L74). In each of these plants we have 2 FTView SE...
Replies
0
Views
54
Hey all, i have a panelview screen (image attached), with 4 items on it. Program 1, Program 2, ...3, ...4. The PLC i am using is a compactlogix...
Replies
5
Views
169
Hello All! Ok, we got a Work cell from a Integrator that is sending saved scanning data from the PLC to HMI (Panel View Plus) when I look at this...
Replies
3
Views
80
Back
Top Bottom