|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Autonomous problem.
From your description, my guess is that the motors are starting, and are then being shutdown by the safety timeout. Since there isn't much time, your best option may be to disable it in Begin. The other option is to change your code so that you update the motor speed at least every 100ms, similar to how the initial code did.
Greg McKaskle |
|
#2
|
||||
|
||||
|
Re: Autonomous problem.
I can see a few different things that would cause that. The first is that you forgot to save, rebuild, and reupload the code.
Other than that, did you just delete that large "page"y looking thing (the vi reference) outside the robot main loop? Since there is a feedback node inside the "autonomous enable" part of the case structure, it will just use the last value, which is the old autonomous independent. What you want to do is go inside the "autonomous enabled" state of the case structure and put a diagram disable structure around the case structure inside of that. Or you could replace the vi reference, then put a diagram disable structure around everything inside the vi. |
|
#3
|
|||
|
|||
|
Re: Autonomous problem.
can i simply set the motor values to 0 and have nothing else in autonomous
|
|
#4
|
|||
|
|||
|
Re: Autonomous problem.
If i go to the case structure in the Robot main Vi. and go to the autonomous enabled in the case structure. if i change something in there then will it achieve the same result of having no autonomous or do i just have to set a value of my motors to 0 in the vi itself?
|
|
#5
|
|||
|
|||
|
Re: Autonomous problem.
There are many ways to break the autonomous routine so that the robot sits still.
The correct answer as to how you should disable it depends a bit on how you have modified the framework and initial code. The VI that launches the autonomous has the green light on it. If you disable that, no auto. Periodic tasks will still run, so if you have control code there, be sure to set your setpoints in Begin or elsewhere. You can also write another autonomous VI that does nothing and drag that over the VI refnum on Begin. That will specify that you would rather it call that VI instead of the Autonomous Init. This is also easy to fix and even make dependent on a DS setting. And of course there is nothing wrong with disabling the code in the Auto VI. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|