You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old August 17th, 2018, 09:19 AM   #16
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 196
Quote:
Originally Posted by Tanquen View Post
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.
  Reply With Quote
Old August 17th, 2018, 11:25 AM   #17
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 69
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.
  Reply With Quote
Old August 18th, 2018, 06:07 PM   #18
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 69
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.
  Reply With Quote
Old August 20th, 2018, 02:48 AM   #19
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 196
Quote:
Originally Posted by Tanquen View Post
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 by crawler009; August 20th, 2018 at 03:09 AM.
  Reply With Quote
Old August 20th, 2018, 08:53 AM   #20
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 69
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 08:59 AM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
FTV SE VBA Display Names JonAW LIVE PLC Questions And Answers 5 February 8th, 2017 06:36 AM
FatoryTalk View SE (network) Display Question clownbrother2 LIVE PLC Questions And Answers 7 March 16th, 2012 02:53 PM
FT View SE Display protection clownbrother2 LIVE PLC Questions And Answers 0 March 15th, 2012 01:07 PM
FT View SE 5.10 Display WallClockTime The Plc Kid LIVE PLC Questions And Answers 4 September 2nd, 2011 08:22 PM
Factory Talk SE & Screen Saver lostcontrol LIVE PLC Questions And Answers 4 June 8th, 2010 06:37 AM


All times are GMT -5. The time now is 11:46 AM.


.