Hello!
I'm a complete beginner to programming and i have a project i'm working on in TwinCAT 3 since i'm using a Beckhoff PLC.
One of the problems i have, is this:
I have defined all the variables. If i start the program , then only variable2 reacts to change in variable1. Variable3 stays false.
I have tried adding an AND before Variable3, but that makes no change.
I'm new to this forum and i hope what i'm explaining makes sense.
I have managed to solve some problems myself but can't wrap my head around this one. Seems to be a simple logic task but it wont work.
Anyway, can anyone tell where seems to be the problem?
I'm a complete beginner to programming and i have a project i'm working on in TwinCAT 3 since i'm using a Beckhoff PLC.
One of the problems i have, is this:
Variable1 :=TRUE; //test
IF Variable1= TRUE
THEN Variable2 := TRUE;
Variable3:= TRUE;
ELSE Variable2:= FALSE;
Variable3:= FALSE;
END_IF
I have defined all the variables. If i start the program , then only variable2 reacts to change in variable1. Variable3 stays false.
I have tried adding an AND before Variable3, but that makes no change.
I'm new to this forum and i hope what i'm explaining makes sense.
I have managed to solve some problems myself but can't wrap my head around this one. Seems to be a simple logic task but it wont work.
Anyway, can anyone tell where seems to be the problem?