Jump to content

Suggestion - Password protect screens, tables, ...

Recommended Posts

I am studying UniVision Licensing with webinar from youtube. Very good...


I noticed that subroutines can be password protected, but screens cannot.


In my humble opinion this is not secure, because other people can look at the screen objects, discover the address of variables, and then read or write values.


Tables are also not password protected, so a developer cannot create a table with secret data, or write-protect against tweaking.



It is not usefull to put a password, because anyone can call a screen or read a table with unprotected subroutines.




Here is a suggestion, if you take the time.


Allow the screens, tables, trends to be password protected, just like subroutines - can only view and edit in Visilogic after entering the password.


Protected screens, tables, trends cannot be called by unprotected subroutines, or Links & Jumps of other screens.

Any attempt will either fail or generate compilation error.


When the program enters a protected subroutine it sets an internal "protection bit" (not an MB!!)

When the program exits a protected subroutine, it clears the "protection bit".

When a protected object is called, it first checks the "protection bit" - "Am I being called by a protected subroutine?" - Act or Fail.


Actually it is a bit more complicated than that.

A CALL will push the return address on the stack, and POP it when it finds a RET.

So when a CALL happens, the "protection bit" must be pushed on a separate stack and be updated according to the subroutine being called - protected or unprotected.

When the subroutine ends, the "protection bit" is popped from the stack and will recover it´s previous state before the call.

This way you can call an unprotected subroutne from inside a protected routine, and everything works.



The same could be done with operands, but it would take a little more tweaking....


First, each operand should be "protectable".

The same way it can have a power-up value, it must have a check box that makes it protected.


To get things started, Visilogic could protect all operands whose description starts with "PROTECTED", and hide the rest of description for safety.

(Only if the user enabled "Automatic Operand Protection", right below "Create Ladder Password"...)


Protected operands can only be used by protected subroutines, screens, trends, tables, etc.

Protected operands cannot be read or written by Modbus, Online Test, etc.

Any attempt of use of protected operand by unprotected object will either fail or generate compilation error.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...