Good morning Bertil,
I've put through a bug report on that delay not working as expected.
It's not a big deal as there is a work around in that you can use the delay command i.e. 1DSO=1 DELAY=5000 IDSO=0
The DELAY command, either a digital delay or directly with the command, will delay ALL schedules. That is if you have several schedule running then they will all be delayed by the time amount specified by the delay set in any one of the schedules.
There are other ways of turning the I/O's without using the any delays and that is to use IF statements and / or boolean logic
For example.
Toggling a bit on and off at a set rate.
BEGIN
1CV=1
2CV=0
RA1S
2CV(W)=1CVXOR2CV 'Or more clearly 1CV XOR 2CV
1DSO=2CV T
END
This next code turns on bit on for 2 second and then off for 8 seconds.
BEGIN
1CV=1
2CV=0
3CV=0
RA1S
3CV=3CV+1
2CV=(3CV<=2)
1DSO=2CV T
IF(3CV>10){[3CV=0]}
END
Regards,
Roger
Good morning Bertil,
I've put through a bug report on that delay not working as expected.
It's not a big deal as there is a work around in that you can use the delay command i.e. 1DSO=1 DELAY=5000 IDSO=0
The DELAY command, either a digital delay or directly with the command, will delay ALL schedules. That is if you have several schedule running then they will all be delayed by the time amount specified by the delay set in any one of the schedules.
There are other ways of turning the I/O's without using the any delays and that is to use IF statements and / or boolean logic
For example.
Toggling a bit on and off at a set rate.
BEGIN
1CV=1
2CV=0
RA1S
2CV(W)=1CVXOR2CV 'Or more clearly 1CV XOR 2CV
1DSO=2CV T
END
This next code turns on bit on for 2 second and then off for 8 seconds.
BEGIN
1CV=1
2CV=0
3CV=0
RA1S
3CV=3CV+1
2CV=(3CV<=2)
1DSO=2CV T
IF(3CV>10){[3CV=0]}
END
Regards,
Roger