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 May 14th, 2018, 03:33 PM   #1
khelza
Member
Canada

khelza is offline
 
Join Date: Sep 2015
Location: Ontario
Posts: 65
Talking FTV SE - Current Screen Indicator for Button command set to Display

I have multiple buttons that are configured to Run Command for Display (navigation). I don't see an indicator field, and am wondering how I can configure these parameters to treat the "Down Appearance" as FTV ME would treat a State (Value=1) as an indicator.

All I am trying to do is have the button change colour or appear as the Down Appearance if the button is pressed and that page is currently being displayed. (That means the buttons appear on every page, in the same position, and one is a different colour than the rest if its page is being displayed)

First time using SE, so I apologize if there is a simple solution for this.

I can probably do some work-around with visibilities and images, but it's a lot of buttons, so I'd prefer a more direct route if one exists.

Thanks!

Last edited by khelza; May 14th, 2018 at 03:36 PM.
  Reply With Quote
Old May 15th, 2018, 05:29 AM   #2
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 5,286
I don't believe you can do that on command buttons.

You can achieve it with regular buttons and a lot of VBA code, but is it really worth it? My normal method for handling this when I unfortunately have to work with FTView, is just make my row of quick navigation buttons, copy them to every screen I need them on, and then delete the one on each screen that pertains to that screen.

Once again, something Ignition makes incredibly easy.
__________________
------------------------------------
How to ask questions the SMART Way!

Look First, Ask Second!

  Reply With Quote
Old May 15th, 2018, 05:54 AM   #3
chopin
Member
United Kingdom

chopin is offline
 
Join Date: May 2012
Location: Milton Keynes
Posts: 128
FTView ME have a lot of limitations. You probably will not be able to achieve what you want.
It does not allow you to write vba scripts as well.
  Reply With Quote
Old May 15th, 2018, 07:23 AM   #4
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 201
hi khelza
we do it also for a navigation bar, but (like rdrast said) it not so easy as in other hmi softwares (almost nothing is easy in FTV)

What you could do is create a internal tag, lets say "currentDisplay". In every display under Display Settings -> Commands -> Startup assign a "&Set currentDisplay XX" where xx is a display number.
Now your variable currentDisplay always has the number of the current display.
On the buttons you can change the status of Animation->color with "Expression" = "currentDisplay", to change the color of the buttons according to the display which is currently open.

Last edited by crawler009; May 15th, 2018 at 07:31 AM.
  Reply With Quote
Old May 15th, 2018, 09:26 AM   #5
khelza
Member
Canada

khelza is offline
 
Join Date: Sep 2015
Location: Ontario
Posts: 65
Quote:
Originally Posted by crawler009 View Post
What you could do is create a internal tag, lets say "currentDisplay". In every display under Display Settings -> Commands -> Startup assign a "&Set currentDisplay XX" where xx is a display number.
Now your variable currentDisplay always has the number of the current display.
On the buttons you can change the status of Animation->color with "Expression" = "currentDisplay", to change the color of the buttons according to the display which is currently open.
This worked, and was pretty simple! Thanks so much
  Reply With Quote
Old August 13th, 2018, 06:05 PM   #6
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 85
I’ve done it this way on other HMIs but found that it don’t work as soon as you have more than one client running. You then see the same HMI tags being updated to a new screen name by the other user.
What is the easiest way to get a variable that only exists in the running client? Someone has mentioned using a VB variable.
  Reply With Quote
Old August 13th, 2018, 08:31 PM   #7
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,668
Yes, using VB is your only option here. Tags are server based, but the VBA is client based.


I don't think you'll need to use actual variables though - you should be able to just directly write the property on each button press. Use a navigation bar that is a separate display and always remains docked to the bottom/top/side of your screen. Each button has a "Display[some_screen]" command attached, but also runs a VBA sub to set the colours of all the other tabs to the "off" colour, and to set the colour of just that one tab to the "on" colour.
  Reply With Quote
Old August 13th, 2018, 08:58 PM   #8
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 85
Quote:
Originally Posted by ASF View Post
Yes, using VB is your only option here. Tags are server based, but the VBA is client based.


I don't think you'll need to use actual variables though - you should be able to just directly write the property on each button press. Use a navigation bar that is a separate display and always remains docked to the bottom/top/side of your screen. Each button has a "Display[some_screen]" command attached, but also runs a VBA sub to set the colours of all the other tabs to the "off" colour, and to set the colour of just that one tab to the "on" colour.
That will work for most of it but I've got some drop down kind of popups for some of them that I'd also like to change. That all works with the HMI tags but they get set by other clients.
  Reply With Quote
Old August 13th, 2018, 09:20 PM   #9
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,668
Still probably doable. The HMI tags (as mentioned previously) are server-based, so you'd need each client to be monitoring those tags and performing an action on tag change. And probably also at startup, to ensure you catch any changes that were made by Client 2 while Client 1 was offline, etc. Monitoring tags for change using VBA is a bit of a PITA, but definitely doable, I've done it plenty of times. Search this forum and you'll probably find a few threads on it.
  Reply With Quote
Old August 14th, 2018, 09:09 AM   #10
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 85
Not sure I follow. I could see using a Public VBA variable on the header screen and then have the main process screens update it but I can’t get the VBA register to work and don’t know how to monitor the VBA variable to update the buttons or write to the headers VBA variable from one of the main screens on open.

As the tags are server based it seems like you would need to have a set for each login and or get the PC name and know the PCs names to keep them separate from each other.
  Reply With Quote
Old August 14th, 2018, 06:56 PM   #11
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,668
Maybe I've misunderstood what you're trying to do. Can you give some more info?
  Reply With Quote
Old August 16th, 2018, 10:40 AM   #12
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 201
I see your point. With VBA, the variables are local to the Display (even public variables, as far as i know), which is bad. If you use tags, they are global to all stations, which is bad also.
My first thought would use files or the registry to interchange variables between Displays on a Station, but thats ugly.

Is there a nice way to interchange VBA variables in different Displays without going through tags?

Edit: Maybe at the end the best way is to have different client application for every station, so that you have a tag open_display_01 for Station 1, open_display_02 for Station 2, open_display_03 for Station 3, and so on. With find and replace thats done in 10 seconds. And you are not depending on vba. The ugly point is to have to manage a separate application for every station.
I'm having the same problem for a upcomming project, so i'm very interested your solution.

Last edited by crawler009; August 16th, 2018 at 11:15 AM.
  Reply With Quote
Old August 16th, 2018, 11:16 AM   #13
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 85
Quote:
Originally Posted by crawler009 View Post
I see your point. With VBA, the variables are local to the Display (even public variables, as far as i know), which is bad. If you use tags, they are global to all stations, which is bad also.
My first thought would use files or the registry to interchange variables between Displays on a Station, but thats ugly.

Is there a nice way to interchange VBA variables in different Displays without going through tags?
If you Google there are a few talking about how to get public variables between Excel workbooks and that you need to register them. Seems like that would be something like screens. ???
  Reply With Quote
Old August 17th, 2018, 08:48 AM   #14
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 201
Quote:
Originally Posted by Tanquen View Post
If you Google there are a few talking about how to get public variables between Excel workbooks and that you need to register them. Seems like that would be something like screens. ???
I couldnt get in working, maybe you?

But what i found out that transfer through files is actually easy.
To write a variable to a file
Code:
Dim x As Integer
x = 55

Open "displayNr.txt" For Output As #1
Write #1, x
Close #1
and to read it back
Code:
Dim x As Integer
x = 0

Open "displayNr.txt" For Input As #1
Input #1, x
Close #1
Add the corresponding error handling and i'm confident it could be a solution. But for me i like it better without vba, even if it means to create a separate application for every station.

Last edited by crawler009; August 17th, 2018 at 08:53 AM.
  Reply With Quote
Old August 17th, 2018, 09:51 AM   #15
Tanquen
Member
United States

Tanquen is offline
 
Join Date: Jul 2014
Location: CA
Posts: 85
Quote:
Originally Posted by crawler009 View Post
I couldnt get in working, maybe you?

But what i found out that transfer through files is actually easy.
To write a variable to a file...
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?
  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 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


All times are GMT -5. The time now is 08:33 PM.


.