FactoryTalk View SE - strings in expressions

Daveyh

Member
Join Date
Jun 2015
Location
San Francisco
Posts
15
I'm trying to get a multistate indicator to change color based on the value of a string variable that's read from an OPC server. The string value is either "Normal" or "Alarm".
I'd think that something like this below would work, created with the expression builder, but I keep getting errors, usually "Expression contains a tag that has an error value". The tag is good as I can read that into a String Display.

I've tried numerous combinations of quotes and spaces but have yet to find the magic combination. It's all on one line, any word wrap is from the forum's textbox. I also tried breaking into 3 lines.

Thanks!

If {Network.RATCOM.3.3408.Channel Status.Channel 1 AlarmState.Value} == Alarm Then 1 Else 0
 
Try putting Alarm in quotes "Alarm" that tells FT it's a string. I have done it in ME version I would think it works the same in SE
 
Last edited:
I tried quotes (and just tried again) and get the error "Failed to resolve item’s ID ‘Alarm’ because it does not exist on any server"

If I put the same tag {Network... AlarmState.Value} by itself in a string display object it returns "Normal" so I know the tag is working.
 
Fixed it!! I added parentheses around the comparison and it works :)

If ({Network.RATCOM.3.3408.Channel Status.Channel 1 AlarmState.Value} == "Alarm") Then 1 Else 0
 

Similar Topics

Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
129
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
165
Hello, We recently upgraded our control server to a newer model. After the transition we are experiencing issues with our trend graphs to where...
Replies
2
Views
120
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
200
This is admittedly a pretty obscure problem, but maybe someone else has run into it, or at least something similar. For reasons I won't get into...
Replies
3
Views
132
Back
Top Bottom