Previous Page function in Factory Talk View Studio

djpalaz

Member
Join Date
Jan 2007
Location
Montreal
Posts
57
Hello,

Does anynbody know how I can create a button that will go back to the last active display i.e. Previous Page button

I've tried using visual basic by storing the last active page in a string input(Name: PreviousPageTag). The string input is on each page and is exposed to vba control.

This is the code I've been trying to use:

Each navigation button execpt the Previous Page Button has the following vba code:

Me.PreviousPageTag.Value = Me.Name
Me.PreviousPageTag.Download

And the screen changes based on the Button Properties Action ex: Display Area1

The Previous Page Button has the following code:

ExecuteCommand "Display " & Me.PreviousPageTag.Value
Me.PreviousPageTag.Value = Me.Name
Me.PreviousPageTag.Download

For some reason it does not want to write the name of the screen to the variable PreviousPageTag. Could this be because im changing screens or i cannot use button properties and vba together.

Any help would be appreciated.

Thanks.
 
You need to use a "Return to Display" Button.
Under the "Objects" Menu, select "Display Navigation" -> "Return To"
Then drag a small window to create the button.
 
From memory, I believe I create a button labelled BACK, and to that I attach the action of Abort me, this I think takes me back as the previous screen which is still in the Cache.
 
I do not see "Display Navigation" under the "objects" menu. Perhaps we don't have the same version. I have Factory Talk View Studio 5.00.00(CPR 9). Anyways it seems to work now with the vba code looks like one of the previous buttons didnt have the same name in its properties than in the vba code.

Thanks anyways.
 
Here is a "paste" from AB Knowledgebase for implementing Previous Display button:

1. On a display (in this example, call it Main) that you'd like to be able to call up as a previous screen from another display, issue the following command in the Main display Shutdown command:
Define Symbol_name Display Main
where Symbol_name is any symbol name you choose. This example will use PrevScreen. This symbol definition identifies Main as the previous display.
2. On another display, configure a button to execute the PrevScreen symbol. Executing the PrevScreen symbol will display the Main display.
3. On all displays that you would like to navigate to, as a previous screen, include a Shutdown command that redefines the same symbol name. In this example, our screen name is Overview.
Define PrevScreen Display Overview
4. On all displays that you would like to navigate to a previous screen from, include a button to execute the PrevScreen symbol.
 
djpalaz said:
I do not see "Display Navigation" under the "objects" menu. Perhaps we don't have the same version. I have Factory Talk View Studio 5.00.00(CPR 9). Anyways it seems to work now with the vba code looks like one of the previous buttons didnt have the same name in its properties than in the vba code.

Thanks anyways.

I'm running version 5.00 as well. (I only have Machine Edition installed)

Are you using FactoryTalk View Studio for Machine Edition, or Supervisory Edition?
 
I'm running SE.

Thanks AEI232 it works, unfortunately now the buttons are global objects so this method cannot work not unless there is a way of retreiving the name of the screen with some function.

for Ex: Define Previous Get.ScreenName
 
djpalaz,

Actually, the Release Action of your Previous Button which, I guess could be a Global Object, should have its release action set to "Previous" and nothing else and you don't have to mention the Screen Name in the Previous Button at all.

"Previous" is the Name of the Symbol that is defined in the Shutdown Command of every Display "Behaviour" Tab in the Display Setting.

So, the statement "Define Previous ScreenName" is not assigned to a button but is rather assign to a Display ShutDown Command.

What I did in a previous project, I used the VBA Display_AfterAnimationStop() SubRoutine to define the "PreviousDisplay" Symbol. I wrote this VBA on a Blank Screen that I used afterward to create the other Process Screens:

Private Sub Display_AfterAnimationStop()
Application.ExecuteCommand ("Define PreviousDisplay Display " & Me.Name)
End Sub

This is equivalent to the use of the Shutdown command in the Behaviour tab of the Display setting of a screen but I don't have to bother retyping the name of the screen...


Regards

Yves Levesque
 
AEI232,

It doesn't seem to work with the behaviour method or the VBA code when using global objects. I'm assuming when you use a shutdown behaviour you need to abort the screen. I aborted one screen that had its behaviour shutdown set to "Define Previous ScreenName". Then on another page I have button PrveiousScreen(global object) which has its release action Display #7 and its Global Object parameter vaules is set to previous. The global Object Parameter definition does have a #7. Any ideas what can be wrong.
 
djpalaz,

Well, I don't see your whole setup but...

I don't Abort Screens in my applications because I use "Replace" type displays (In Display Settings) most of the time.

So when I call a new display, the previous one unload by itself.


I don't understand why You use "Display #7" for the Release action of your Previous Button.
The release action should be set to "Previous". NO DISPLAY command and NO Parameter (#7). Just "Previous".

"Previous" is not a Screen Name, it is a Symbol or Shortcut for the command "Display ScreenName",
"Previous" is actually equal to "Display ScreenName"

So when you are Using Display #7, it becomes Display Previous and this becomes finally "Display Display ScreenName" which is wrong.


I hope this helps.


Regards,


Yves Levesque
 
AEI232,

Looks like we needed to Abort the screen from the Global object buttons and explicitly indicate where the screen is located ex "/Plant::Details" |(quotations are required) instead of just Details.
 
djpalaz,

I did some test with a Global Button (Configured as "Link with Expressions") to achieve the Previous Screen funcion and it works perfectly as I said before.

Again, no abort or any other command needed in the Button, only the Symbol PrevDisp in the Release Action. That's all.
"/Plant::Details" should then be mentionned in the DEFINE COMMAND in the Shutdown Behaviour of your "Details" screen:
DEFINE PrevDisp Display /Plant::Details.

Here's some pics:

PrevDisp01.jpg


PrevDisp02.jpg


PrevDisp03.jpg



Regards,

Yves Levesque
 
Configure RSview32 with redundant IO server

Dear All;

somebody know what we need if want to configure 2 PC RSview32 with redundant IO server?

Thanks
 

Similar Topics

I was wondering if anyone knew a script to show the previous window in wonderware, at the minute i am using a very tedious method. thanks
Replies
2
Views
3,220
Hello all, Recently, I tried to install Studio 5000 v34, v35, v36, but I mistakenly didn't install v34; is there a way to download this specific...
Replies
10
Views
438
I'm hooking up a scale to an EWEB card on a 1756 PLC through ethernet/IP sockets, and I've run into an issue that seems to defy ladder logic. See...
Replies
9
Views
2,671
Hello, I was messing around with my HMI and i decided to save some values from the previous cycles so i can see how much efficiently i was...
Replies
12
Views
3,801
Hello When using "Return to Display Button" on a screen with parameters it seems to forget what parameters were passed to that screen previously...
Replies
1
Views
1,637
Back
Top Bottom