Introduction to Hiding Objects When Logged Out
For security reasons, there might be some objects on a display screen that you would like to hide until a particular user is logged in. This could be a temperature preset, or a timer preset that you don’t want a standard operator to access. We will configure our security so we are hiding objects when logged out.
We will walk through four steps to make this happen:
- Create a binary tag.
- Set up a macro to set a tag once a user is logged in.
- Set up a macro to reset a tag once a user is logged out.
- Configure the visibility animation of the object to be only visible if the tag is set.
Please read the document on FactoryTalk View Security before you continue.
Creating the tag
We will create an internal memory tag within FactoryTalk View. You can also create this tag within the ControlLogix processor if the program depends on a user being logged in.
Under HMI Tags, open the tag database. Configure the tag as follows:
Be sure to accept your new tag.
Create the Macros
We need to create two macros. The first macro will be used to set this tag to the value of 1. The second macro will reset this tag to the value of 0.
Right click the macros in the explorer tree to create the first macro as follows. When the macro runs, our tag will be set to 1.
Close the macro, and save this as “LoggedIn”
Create a new macro as follows: This macro will reset the our bit back to 0.
Close the macro, and save this one as “LoggedOut”.
Configure the macros to run
Go to “Runtime Security” in the explorer tree. Click on the user who will be logged in when the macro becomes visible. Configure the Login and Logout macros as follows: Be sure to press “Accept”, or your changes will be lost!!!
Configure the object to be hidden
The last thing we need to do is to configure the object so it is invisible until the user is logged in. Right-click the object you wish to hide, and go to Animation | Visibility.
Configure the visibility animation as follows:
Finally, be sure to select the tag that we are setting and resetting with the macros. Now, when the user is logged in, the UserLogin tag is 1. This makes the object visible. When the user is logged out, the object becomes invisible.
Test run your project!
— Ricky Bryce