Quote:
Originally Posted by Ziaholic
I had a similar problem to solve, so I whipped up a quick VI to show you what's involved in getting the trigger to set off a timed sequence that lasts longer than the 20 msec DS packet times.
You could simply keep what you've got, and tell the driver to just tap the trigger, and it'd work OK. Your 30 msec requirement is only 2 "cycles" of the standard 20 msec main-loop timer. Tapping the button would pretty much get what you want.
But if you want the SW to take care of it for you, and allow for "driver error", or if you need it to last for 300 msec, then you'll need to get familiar with shift registers.
This isn't exactly cut/pasteable into your code, this is advanced stuff. It'd be safer for you if you created it for yourself ... maybe using the attached pics as a guide.
One of the pics shows the TRUE case, where the trigger has just been sensed as going from FALSE to TRUE. The other shows the FALSE case which gets executed until the driver2 lifts and eventually re-presses the trigger.
I didn't make a third pic, but the unshown case in the FALSE pic has nothing in it at all. While that inner-case is TRUE, you're doing nothing, waiting for the timer to go off.
|
Hi. I was using this example to provide a similar timer for kicking, automatically retracting and then waiting another delay to ensure the 2 second rule is followed. However, there is a note on the screen shot for the vi that I cannot seem to figure out how to do in Labview.
To quote the screenshot, "In order to paste this structure in the Teleop.vi, you'll need to put the shift register onto the outer while loop of Robotmain."
My question is; I can put a shift register onto the Robotmain while loop, but how do I connect it to the Teleop vi? It seems as though I need to create some connectivity between the Teleop.vi and the shift register, but I am 'fishing' around in Labview and can't seem to figure that out.
Any advice would be appreciated.