|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Watch Dog stopping robot from working?
[quote=DavidGitz;1006228Since we are pulling the same reference (default "Left and Right Motors") and using Arcade on one mode and Tank on another mode that can be changed back and forth, could this result in the error noted above due to the Arcade/Tank difference?[/QUOTE]
No. If you open up the vis, it shows that the only difference is some processing of the joystick values before it runs the "runMotor" and "safetyupdate" vis. Try adding a timer to see how fast the loops are running. To do this, add a tick count to your teleop.vi, then a feedback node. Connect the tick count to the input of the feedback node (on the arrow, not the diamond) and then add a subtraction command. Wire the output of the feedback node to the bottom of the subtraction command and the tick count to the top. Then put an indicator on the end of the subtraction command and look at it while the code is running. |
|
#2
|
|||
|
|||
|
Re: Watch Dog stopping robot from working?
You may want to look for a VI called Loop Time, Loop Timing, or something similar. It is a subVI you can drop into a loop, and since it is called each iteration, it will record info about the rate of the loop. You can then open the subVI at any point and peek at what has been going on.
Additionally, you can wire up a string to different calls in other loops, and instrument as many loops as you care to watch. There is a small amount of overhead for having this in, and apparently they decided not to put this into the default framework, but it is very handy for issues like this. Greg McKaskle |
|
#3
|
|||||
|
|||||
|
Re: Watch Dog stopping robot from working?
We had a the same problem and after killing ourselves trying to find the programing error we realized that all the PWMs were in backwards which was shorting out the digital sidecar. Double check the electrical work, especially if the default drive code is having problems too. Hope that helps.
|
|
#4
|
||||
|
||||
|
Re: Watch Dog stopping robot from working?
Quote:
No that's not the problem. |
|
#5
|
|||
|
|||
|
Re: Watch Dog stopping robot from working?
I discovered that the loop timing info is described in the Troubleshooting link on the Getting Started window.
Greg McKaskle |
|
#6
|
|||
|
|||
|
Re: Watch Dog stopping robot from working?
This is team 1208's time from an elapsed time function. With default code (on the right) the time is 40 miliseconds and with our code (on the left) it is on 90 miliseconds on average. We have also included our teleop.vi. Is this a problem and if so what can we do to fix this.
Last edited by xYinx161 : 27-01-2011 at 17:15. |
|
#7
|
||||
|
||||
|
Re: Watch Dog stopping robot from working?
i need help on the motor control Set Speed icon but i cant find it so i cant finsh the while loop until i get the Set Speed icon can u help me?
![]() |
|
#8
|
|||||
|
|||||
|
Re: Watch Dog stopping robot from working?
Quote:
I don't see anything obvious that's slowing you down, although it's easy to isolate the slowdown using Disable structures on the stand-alone blocks of code. It looks like you are also setting your motors in two different places. Those two conflicting sets will be fighting for control of your robot when the time comes. You need a way to choose one or the other, not both at the same time. The Arcade/Tank mixture shouldn't be a problem. They don't remember who was called last and they both reset the Safety vi. Last edited by Mark McLeod : 27-01-2011 at 22:34. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|