Disabling forcing of specific variables

stuartjr
2024-03-15
2024-03-15
  • stuartjr - 2024-03-15

    Is there a way that I can create a variable in a GVL that I can control with logic but a user can not put a force on this variable.
    I have looked at the access rights but this seems to only limit editing the GVL or POU.
    This variable will only be assigned a value in one POU but it will be used throughout many other POUs.

     
  • stuartjr - 2024-03-15

    I also thought that if I had logic writing a value to this variable, then it would override the force anyway, since I thought that the force request was only applied at the beginning and end of the PLC scan. But this doesn't seem to be the case, the force persists throughout the logic regardless of what I write to the variable with logic

     
  • stuartjr - 2024-03-15

    OK.. so maybe I miss understood for how the forcing order works. It seems that the force list is applied at the beginning of every task call (I'm assuming this based on what I am seeing).
    If I force my variable FALSE and then write it TRUE in a task, then it stays TRUE for that task, but then in the next task it will go back to FALSE.

     
  • stuartjr - 2024-03-15

    So I think I've found a way to do what I want, but its a not as simple as I thought it would be.
    Essentially I've got to put my "logic" that decides what the GVL variable should be at the start of every task (rung 1). Then regardless of what the force is the variable will be set to what the logic decides.

     

Log in to post a comment.