FTVS Programming Help (String Display)

kandymann

Lifetime Supporting Member
Join Date
Jan 2011
Location
Virginia
Posts
168
Hello all,

I am stumped about how to validate an expression in order to meeting the following conditions. Here's what I want to do: I have a solenoid gate valve that has two limit switches indicating that it is open or closed. If any limit switch fails to make open or close, I want the operator to see a "N/A" on the string display.

I created three (3) STRING tags in my Logix5000 program:
A) Closed_String (Closed)
B) Open_String (Open)
C) NA_String (N/A)

I created three outputs that I will use to give feedback indication of the limit switches:
A) Gate_Selection_1.0 (Open)
B) Gate_Selection_1.1 (Closed)
C) NA (N/A)

See attached pic for logic.

Can anyone give me some clues as to how I can create a string display in FTVS showing OPEN, CLOSED, N/A based on which output is true?

gate_selection.jpg
 
+1 on rdrast suggestion. Use bits to MOV 1,2 or 3 into an DINT and a Multistate Indicator

or use an expression in connection tab of Multistate.

IF {[MyShortcut]Gate_Selection_1.0} Then 1 Else
IF {[MyShortcut]Gate_Selection_1.1} Then 2 Else 0

Using the expression there is no need for NA coil. This expression is saying if I am not open or I am not closed then I am N/A.

1=Open 2 =Closed 0=N/A
 
The MultiState Indicator is the best way to go...

You can then have different coloured texts and backgrounds for each of the states, which you could achieve with "animation", but that's a duplication of effort when it can all be done in a MultiState Indicator.

Personally I would not use the expressions method in the connections tab as cwal61 suggested, valid as it is, as I like to keep the HMI or SCADA as clean as possible, doing any work needed in the PLC. The less "scripting" or expression evaluation FTVS applications do, the faster the screen update time, and a better experience for those viewing it.
 
Don't use individual outputs.
Use an integer, set it to 0 for NA, 1 for open, 2 for closed, then use a multistate indicator in View.

+1 on rdrast suggestion. Use bits to MOV 1,2 or 3 into an DINT and a Multistate Indicator

or use an expression in connection tab of Multistate.

IF {[MyShortcut]Gate_Selection_1.0} Then 1 Else
IF {[MyShortcut]Gate_Selection_1.1} Then 2 Else 0

Using the expression there is no need for NA coil. This expression is saying if I am not open or I am not closed then I am N/A.

1=Open 2 =Closed 0=N/A

The MultiState Indicator is the best way to go...

You can then have different coloured texts and backgrounds for each of the states, which you could achieve with "animation", but that's a duplication of effort when it can all be done in a MultiState Indicator.

Personally I would not use the expressions method in the connections tab as cwal61 suggested, valid as it is, as I like to keep the HMI or SCADA as clean as possible, doing any work needed in the PLC. The less "scripting" or expression evaluation FTVS applications do, the faster the screen update time, and a better experience for those viewing it.

Thank you all very much for the help. I just used MOV and a couple DINT tags and the multistate display works perfectly for what I am wanting to do.

Thanks again for your replies! :)
 

Similar Topics

I'm trying to use a Numeric input enable to let users change their HMI password. The only problem is it deletes leading zeros when you enter it. I...
Replies
2
Views
1,935
title says it all. at what point in time are ( ) required when writing expressions in FTVS? is it only when you want to 'look' at things it...
Replies
1
Views
1,508
If it had a modem it would be damned near ideal. I still have at least half-a-dozen sites I call into using a modem. Besides the Rockwell stuff...
Replies
0
Views
1,283
Can you have a connection between the .mer application and multiple PLC's (runtime targets?) So rather than messaging certain status bits from...
Replies
4
Views
2,059
something i found today working with global objects in FTVS v10. If you have an object within your global object screen that is OUTSIDE the...
Replies
1
Views
1,609
Back
Top Bottom