Quote:
Originally Posted by Greg McKaskle
It isn't clear to me if you want to stop the code and loops, or stop the motors.
It is best to leave the motors being updated in a single place. Anytime you try to coordinate loops to share a motor, it gets unpredictable. So if you want to build a motor override functionality, I'd make a subVI that goes in front of, or even wraps the various calls to update the motor. Pass in the requested motor speed, and in the subVI, check the global override and choose between the requested speed and 0.0. Pass that value to the motor.
If you wish to actually stop the code, I'd look at the Abort or Exit. Not the cleanest, nor what I think you are asking for, but it exists.
Greg McKaskle
|
Fixed it with a SubVi.
We have been told that FIRST as some sort of an override to the robot. So we don't really need an emergency stop button.
Quote:
Originally Posted by Omar
Then use the space bar. That will stop ALL motors!
Then get rid of the loops.
THERE SHOULD BE NO LOOPS IN YOUR TELEOP.
The space bar will do that.
Either rework your architecture to get rid of the time grabbing loops or put a Joy Stick Get in each loop to kill the loops.No comment.
I do not understand this question. I do not know how to add a stop button without adding or "stucking the robot with running code". We do not have some magic trick for you without adding "running code" to your code.
A "professional" programmer would have planed out the correct architecture before wiring the first node on the block diagram and avoided endless loops that block the rest of the code from running.
|
Critizing me is easy... It's my first time using LabView. It was an hard time just to get use to the D&D.
I've fixed it with a subVI I programed.
The loops are used to put a delay so we'l have a timed controlled actions.
Some other question:
1) How can I run the motors without a loop(I need to run a controlled by time motor action).
2)I have some values to put in the dashboard. How can I send the values to the dashboard?
3) How can I run another thread?(I want an multi threading system which the shooter wont interrupt the driver).