Hi,
first you made the worst case of wrong use of Systemtimers like ton, tof tp:
They have to be called cyclic and not on demand !
Please catch the mytime at first statement so it will be called every cycle !
Then your WHILE would do (i hope) better things...
Another idea:
One of many Solutions for your way 8)
Hope that helps
Regards
Shrimps
PS: It looks you are comming from PC-Programming ?
first you made the worst case of wrong use of Systemtimers like ton, tof tp:
They have to be called cyclic and not on demand !
Please catch the mytime at first statement so it will be called every cycle !
Then your WHILE would do (i hope) better things...
Another idea:
Code Auswählen
myTimer(IN := NOT myTimer.Q, PT := T#1S);
if increasePressureValue <= 600000 and myTimer.Q then
increasePressureValue := increasePressureValue + 10000;
end_if
One of many Solutions for your way 8)
Hope that helps
Regards
Shrimps
PS: It looks you are comming from PC-Programming ?