FactoryTalk View- Display change

jwm9876

Member
Join Date
Mar 2015
Location
Orange
Posts
24
I want to be able to change the value of a tag and change to a different display by hitting one button. Is this something I need to do with a macro? If so can anyone give me an idea on how to start on something like this?

Thanks
 
I has hoping to instead change the display by somehow linking the display to a tag. So far I have not been able to figure out how to do this.

Also on another thread someone suggested putting two buttons on top of each other. When I tried this, only the top button could be pressed.

Any ideas?
 
I am currently running FactoryTalk View ME. From my understanding I cannot run VBA. Please let me know if this is incorrect.

Otherwise I would like to try to find some way to accomplish changing a tag and display with one button.
 
Global Connections -> Display -> Remote Display Number

Is what I have used before. All the displays have to be numbered, and remember to reset it to 0 so the actual screen can change displays again.
 
But to answer your original question about using a Macro. Yes, you can do so, but you do have a couple of options here...

As mentioned, you can use the Global Connections>Display> RemoteDisplayNumber to ascertain when the Display number you want to navigate to, with your button, is currently active. RemoteDisplayNumber is usually for reading the current Display number in a PLC but can be read just locally.

Using this current Display number, you can locally change a tag value using a Macro, or remotely in the PLC using logic.

Locally using Macro...

Create a HMI tag of Analog type and call it Current_Display_Number, for instance.
Make its Data Source Memory.
Go to Global Connections>Display>RemoteDisplayNumber and assign it the tag...

{Current_Display_Number}

...exactly as I have just typed it, brackets and all.
The current Display number will now always be written to this tag.

Next, create a HMI tag that you want to change when you press the button or select an existing one.
For my example I'm using HMI_Digital_Tag_To_Change.

Next, under Global Connections>Macro for Remote Macro1 select the Exprn... button to open the Expression editor.

Type...

If {Current_Display_Number} == 5
Then {HMI_Digital_Tag_To_Change} == 1
Else {HMI_Digital_Tag_To_Change} == 0

...using the syntax above, but replace my examples with your actual tags and values.

Press the Check Syntax button as you go to make sure the Expression is Valid.

This Macro will execute at the set update rate and as soon as the current Display number equals your GoTo button's Display number, the tag will be written to with the new value, else it is always set to the other value.

If you were just looking to change a HMI tag value then I would recommend using this method. It can, however, also be used to update a PLC tag.

Remotely using PLC logic...

This is what the others are referring to, I think, and what is probably most often used. I just outlined the Macro option to show it can be done.

For the same Global Connections>Display>RemoteDisplayNumber assign it a PLC tag which will always be written to with the current Display number. In the PLC, use an EQU (Equals) instruction with the PLC tag and a constant value, matching the relevant Display number. From a true evaluation of this instruction you can then execute whatever logic you require to update the tag(s) you want.

Regards,
George
 
Thanks for the help.

Geospark, I went through what you outlined and this seemed like exactly what I was looking for. However, I cannot get the macro to execute. I then tried to get a simpler macro to run and still could not. Here is the expression I put in remote macro1:

if tag1==1
then tag2==1
else tag2==0

I have a maintained push button connected to tag1 and an indicator for tag2. When I push the button for tag1, tag2 does not turn on.

Is there something fundamental about macros I am missing?
 
Forgive me if I'm covering ground you already know - but a macro doesn't run continuously like a PLC program. It only runs when called. So you can't just set tag1 to 1 and expect the macro to execute the rest of the logic. You have to call the macro - typically by using a macro button
 
Yes, I was correcting that silly mistake while you were typing ASF. Can't you see I was replying? Give me a chance I'm not that quick!

But you don't necessarily need a macro button, just a trigger for the Global macros...

jwm9876,

I beg your pardon. I wrote that in a hurry just before I was going home and made a hash of it!

You do not enter the macro syntax under the Expression for Remote Macro1, as I had explained...

In Global Connections>Macro, Remote Macro1, 2, 3, 4, 5 all execute user created macros which MUST be named Macro1, 2, 3, 4, 5. The tag or expression you enter for Remote Macro1 is a trigger or condition to execute Macro1.

As a trigger you can add an expression for the current display number tag = to the display number your button will navigate to. This will tell Remote Macro1 to go execute Macro1.

So you must create a macro named "Macro1" under Logic and Control>Macros and enter your syntax in that macro. The syntax is now much simpler as you can just set the tag value you want in one line.

So just add...

tag1 == 1

...or whatever.

When the display is navigated to, the trigger expression is true for Remote Macro1. This will execute Macro1 and assign the tag value you have set.

If you need to reset the tag then you need to decide when you require this. Like when the Display is navigated away from again?
To do that, for instance, you can use Remote Macro2 and Macro2. Use the same trigger as Remote Macro1 but instead make it not equal. In Macro2 set the tag value back to 0 or whatever you want. So when the Display is navigated away from, the trigger for Remote Macro2 is true and Macro2 will execute resetting your tag value.

You get the jist?

p.s. Midnight again and I'm off home again. Hopefully nothing silly overlooked this time?

Regards,
George
 
Last edited:
Maybe we need those little "George is typing" dot things like you get on an iPhone message ;)
 

Similar Topics

Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
130
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
177
Hi Guys, How can I display Current logged in User Name display on FactoryTalk View studio Site Edition? What I did: String Display object >>...
Replies
3
Views
1,143
Considering the incredible time it would take to get a Panelview Plus 7 , I'm going to get the FactoryTalk View ME Station 30 Display Single...
Replies
1
Views
1,140
Hi everyone, I have to convert keypad HMI to Touch screen but I don't know how to convert my Display List Selector from navigation key to touch...
Replies
12
Views
4,225
Back
Top Bottom