Access a Linked Variable on a Popup Screen
Hello,
I am using VBA to write a variable "showblocking" which is linked to the visibility property in a red button on a popup screen.
My popup has a tab selector, uses recipes and is called from two different places in my project, only one of this calls should be using this red button, the other should never show it.
The porpuse of the button is to block the users from clicking another element in the popup. (I am already using authorization level on the rest of the buttons, so this is extra safety).
I have 3 conditions to set that visibility variable "showblocking" to 1.
1 Popup should have been called from screen FS01 (i have a way to know it)
2 MUV.Permission bit is on (Bit comming from the PLC)
3 PW_TabSelected is equal to 3
Now, PW_Tab Selected is an internal variable aswell, but as it is used inside the popup i dont know if Zenon creates another instance (a copy of the variable) in orther to use it inside the popup, that way if i open one popup in the server and i open the same exact popup from the client the PW_TabSelected will be independant. (Which aparently works like that because there is no conflict between server and client using the same screen at the same time).
So what i want is to say something like this
If thisProject.DeviceName = "PT3P25_FS01" And thisProject.variables.Item("PW_TabSelected").Value = 3 Then
If thisProject.variables.Item("MUV.Permission").Value = 1 Then
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 0
Else
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 1
End If
Else
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 0
End If
Now the thing is, this code is working but only in the server and the standby server. The red button will never show if i am in the client.
Hope you guys can help! Thanks
This is a migrated post! Originally posted on 22.09.2016 by user kikonio2. Please be aware that information can be outdated.
Disclaimer
This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.
The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.
Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.
Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.
COPA-DATA reserves the right to change this document from time to time at own discretion.
Ing. Punzenberger COPA-DATA GmbH
Karolingerstraße 7b · 5020 Salzburg · Austria
www.copadata.com