![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]()
|
New Here? Please read this important info!!!
![]() |
#16 | |
Member
|
Quote:
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. |
|
![]() |
![]() |
#17 |
Member
![]() ![]() Join Date: Jul 2014
Location: CA
Posts: 90
|
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. ![]() |
![]() |
![]() |
#18 |
Member
![]() ![]() Join Date: Jul 2014
Location: CA
Posts: 90
|
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. |
![]() |
![]() |
#19 | |
Member
|
Quote:
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 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 For example under visibility: Code:
#1 = 2 or if ({#1} = 2) then 1 else 0 Last edited by crawler009; August 20th, 2018 at 04:09 AM. |
|
![]() |
![]() |
#20 |
Member
![]() ![]() Join Date: Jul 2014
Location: CA
Posts: 90
|
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 by Tanquen; August 20th, 2018 at 09:59 AM. |
![]() |
![]() |
Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FTV SE VBA Display Names | JonAW | LIVE PLC Questions And Answers | 5 | February 8th, 2017 07:36 AM |
FatoryTalk View SE (network) Display Question | clownbrother2 | LIVE PLC Questions And Answers | 7 | March 16th, 2012 03:53 PM |
FT View SE Display protection | clownbrother2 | LIVE PLC Questions And Answers | 0 | March 15th, 2012 02:07 PM |
FT View SE 5.10 Display WallClockTime | The Plc Kid | LIVE PLC Questions And Answers | 4 | September 2nd, 2011 09:22 PM |
Factory Talk SE & Screen Saver | lostcontrol | LIVE PLC Questions And Answers | 4 | June 8th, 2010 07:37 AM |