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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
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.
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.