PV+ Changing text based on different bit conditions

antsrealm

Member
Join Date
Dec 2010
Location
Brisbane
Posts
207
Hi,

I am creating a HMI project that is using kepware OPC server to communicate with a square D PLC.

I need to create something like a multistate indicator to display different text based on the state of different bits. Is this possible?

The bits would be mapped to tags in kepware so just the state of these various tags would need to show different messages on a multistate indicator or something similar.

Any ideas??

Thanks.
 
Sure, You can use an expression inside the multistate indicator to make this work.

It can get.. ugly, but it is essentially just a nested if/else/then statement.

Edit: If you can, Put the state logic in the PLC and have it output an INT value based on state. Cleaner than doing it in the PV+.
 
Last edited:
Sure, You can use an expression inside the multistate indicator to make this work.

It can get.. ugly, but it is essentially just a nested if/else/then statement.

Edit: If you can, Put the state logic in the PLC and have it output an INT value based on state. Cleaner than doing it in the PV+.

Yeah that's what I'm after. This is replacing an obsolete existing screen and there is a few machines around with this configuration so it needs to be a straight swap.

Can you give a rough example of how to use this expression. I'm not overly familiar with how to define the state via an expression.

For eg. how do I say if tag1 = 1 then show state 1.

Thanks,
 
So it would work like this -
You'll need to build a 'state' table, Each condition should evaluate to a discrete int value.
Create your multistate object, You'll see you can assign states to values.

under connections, for indicator use the exprn button and build an expression like this
Code:
If {Tag1} == 1 Then 1
Else If {Tag2} == 1 then 2
Else If {Tag3} == 1 then 3
Else 0

Now, be careful with the order these evaluate in, The expression will EXIT on the first successful eval.
 
You can ALSO get more complicated and nest the If Then else inside the tree, If you look at the help file for FactoryTalk ME's IF statement it give a pretty decent example.
 

Similar Topics

Hello, i am trying to figure out a way to assign / change text when a bit goes from 0-1 (Auto -> Hand) while text box color changes from...
Replies
2
Views
2,411
Hi to all. We need to change a bad powerFlex 525 to a new one. How do you save the configuration to install in the new one? Thank you all for...
Replies
5
Views
239
Hi all, I am having an issue where some of my HMI push Buttons and Indicators go in to error when I navigate to a new screen. I am using a...
Replies
16
Views
477
We have a new machine that uses an armor block to transfer input signals for conveyor position that continuously alarms out on no position change...
Replies
0
Views
94
Hello everyone, I am trying to change the IP address of the Omron PLC (NJ30-1200) and HMI (NB7W-TW01B) to fetch the network on our network...
Replies
7
Views
292
Back
Top Bottom