Levie
May 24, 2019, 11:26am
1
Hello!
How can I create a timer event?
The task is as:
Start the timer (5 s, for example, the time changes every iteration).
Do something (it is known that it takes less than 5 s, but how much is unknown exactly).
Still wait until the time runs out.
Do something.
Read up on ITmer interrupt in the rapid instruction manual.
soup
May 24, 2019, 3:24pm
3
I think I’ve done something similar using PulseDO and WaitDO.
PulseDO \PLength:=5.0, doMove001;
MoveL Move001, bla, bla;
WaitDO doMove001, 0;
PulseDO \PLength:=5.0, doMove002;
MoveL Move002, bla, bla;
WaitDO doMove002, 0;
PulseDO \PLength:=5.0, doMove003;
MoveL Move003, bla, bla;
WaitDO doMove003, 0;
@Soup I would make sure to use the optional argument \High to avoid getting into a catastrophe if the signal were on already for some reason. But that is an interesting implementation.
soup
May 24, 2019, 6:56pm
5
@lemster68 Good point, could also do a SetDO to 0 before the pulse to make sure it goes low.