FTV SE - Current Screen Indicator for Button command set to Display

I have done stuff like that before but then you end up going down a rabbit hole :) and keep adding code to check if the file is there and create it if it is not and if it is open and so on. Would the file be local to any Windows Terminal Server View SE client?

I wonder if you can create an HMI tag with VBA in a runtime client?

Exactly, thats why i said i prefer doing it without VBA. Yes, the good thing is that the file is local (normaly in the %temp% folder, or wherever you specify), and its created automatically if it didnt exist. But still you would need to periodically check manually if the value has changed. With tags you dont have those problems, because its automatic (for example visibility or color).

Thats a good point to create Tags through VBA, i also thought about it (with the computername as prefix), but i couldnt find a way.
 
OK...

Looked at an existing app by someone else and they have Header-Top, Process-Middle and Footer-Bottom screens. The header screen has the open process screens name updating. So I looked and it is using a parameter {#1} that is updating somehow. It took some time to find as it is not in the open screen button action and there is no VBA.

Wait for it…

The middle process screen is re-opening the header with a new value for the {#1} parameter. It’s on the display settings behavior tab using the startup command. I think I can use that to disable buttons in the header and pass it to other popups. :)
 
Good grief, Why oh why?

So I can place a Text Properties object on a screen that is getting a string in parameter #1.

Display Screen1 /T TEST

The Text Properties object on Screen1 is now displaying “TEST” using this: “/*LS:0 {#1}*/”

But I see no way to use parameter #1 in any kind of expression. :(

So, on the same flipping screen:

If “{#1}” == “TEST” Then
1
Else
0

No work.
 
Good grief, Why oh why?

So I can place a Text Properties object on a screen that is getting a string in parameter #1.

Display Screen1 /T TEST

The Text Properties object on Screen1 is now displaying “TEST” using this: “/*LS:0 {#1}*/”

But I see no way to use parameter #1 in any kind of expression. :(

So, on the same flipping screen:

If “{#1}” == “TEST” Then
1
Else
0

No work.

Hi Tanquen, the idea of passing Parameter to a display is very good.

I think, the reason why it dont work like you discribed it is that you pass a Tag (with the command "Display Screen1 /T TEST"), so with “/*LS:0 {#1}*/” you just show a Tagname, but not a value.

But going furher with this idea there are 2 ways how its working.
1. Do what you did, and show the “/*LS:0 {#1}*/” in a (hidden) Text. With VBA
Code:
Private Sub Display_AnimationStart()
If Text1.Caption = "Test" Then
Button1.Visible = True
Else
Button1.Visible = False
End If
End Sub
you can show/hide or whatever according the Parameter you passed to the Display.

The contra to this method is that you have to use VBA.
2. Create a list of Constant Tags (for example Constants\Value01, Constants\Value02, Constants\Value03... with the corresponding Values 1, 2, 3...). Then when you want to open the Navigation bar display call it with
Code:
Display NavBar /T Constants\Value02
and in the display you can use {#1} as Tag, which will have the Value 1, 2, 3 or whatever you passed to it.
For example under visibility:
Code:
#1 = 2
or 
if ({#1} = 2) then 1 else 0

I like this better because you dont have to use VBA and you can use all the normal animations and properties like with a normal tag.
 
Last edited:
FTV SE is just poorly written and they have not bothered to fix many issues over the last many years.

They make issue of the fact that when using parameters like {#1} you are not passing a tag but just a string. Only after the string is in an expression on the running screen is it then processed like a tag. At the same time no expression using it like a sting works. ??? You can't even say just {#1} you have to use a text object (not a string object) and must insert it as a Literal String as “/*LS:0 {#1}*/”. Why not just as {#1} and why not in any other text/string object?

Like the “(ra-bas) common-analogedit” screen can use three conditions but the VBA in this popup screen will only use the first condition as a tag and the next two used for the Min and Max must be numbers. The VBA in the screen will not process the Min and Max as tags. My display command is in a group object so in the group object I can pass it “1” for the min but not “Constants\Value01”. You can use “$Constants\Value01$” to pass it a “1” though. The $$ process the tag first and then send along the value. In a group object parameter you can even use “$Constants\Value01$,$ Constants\Value00$” to pass it “10”. For some reason you can’t use two constants using the display command directly so again it’s inconsistent and I have to use two separate parameters or create many more constants.

So this reopens the header when the Water Plant screen is open and then disables the Water Plant navigation button as it’s disable expression is “{#2}+{#3} == 10”:
Display Header /T Water Plant, CONSTANTS\09, CONSTANTS\01

But I wish I could just use:
Display Header /T Water Plant
With a disable expression of: {#1} == “Water Plant”

I thought about using VBA but avoid it if I can as it slows things down and less predictable.
 
Last edited:

Similar Topics

Hello everyone, I am currently working on a project that uses a Rockwell L33ER controller and the FTV Studio V13 as Supervisory computer...
Replies
0
Views
84
Hello everyone, I am working in a platform and we installed FTV CLIENT SE V 12 IN ALL THE CLIENTS COMPUTERS, we have 6 clients and only 1 is not...
Replies
0
Views
79
Hi all, I'm having difficulties trying to connect FactoryTalk View SE Local Station (V13.00) to MS SQL Server Express. I state that they are...
Replies
2
Views
109
Hi to all, Does TIA portal support creating reusable pop-up display as FTV has it implemented? Something like on link below. Thanks in advance.
Replies
5
Views
484
Hi all, I have a question about the communication from the FTV and the PLC for different machine I use. Most of these use a SLC5/04 PLC and...
Replies
0
Views
258
Back
Top Bottom