|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Running the Motors Backward in WindRiver & cRIO Freezes
In order to fine-tune and test things, I was playing around with some of the motor control code and I kinda ran into this...
Code:
Jaguar1->Set(1.0); Code:
Jaguar1->Set(-1.0); Also, for some reason, the cRIO sometimes locked up and froze, running the last set of processed instructions and refusing to run anymore. For example, I might be driving the bot's left wheels when the cRIO freezes. In that case, the cRIO refuses to take any other instructions and keeps powering the left wheels at the same speed until either the power is pulled or the Disable/Enable switch is toggled. I've reflashed this unit many times and tried tweaking the code, but nothing really worked. Anyone have the same problems or is this some kind of hardware defect? |
|
#2
|
||||
|
||||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Here are my ideas:
1) You've got a jumper set on a jaguar that prevents it from going backwards. Try looking at the jumpers on the right side of the jaguar (marked F and R). They should both have jumpers on them. If it still doesn't work, try replacing the Jaguar. We had the same problem this weekend when a motor would only run in reverse. 2) Your battery is low and causing your cRIO to act funny. |
|
#3
|
||||
|
||||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
While I admit to being more familiar with Victors than Jaguars the controller may need to be calibrated. This is the procedure directly from Luminary Micro's information:
CALIBRATION PROCEDURE To calibrate the servo-style PWM input for a specific range, connect a PWM source, then: 1. Hold down the USER switch with a straightened paperclip. 2. After 5 seconds, the LED flashes Red and Green to indicate Calibration mode. 3. Instruct the controller to send a full-forward signal. 4. Instruct the controller to send a full-reverse signal. 5. Instruct the controller to return to a neutral signal. 6. The LED will flash Green and Yellow to indicate a successful calibration. 7. Release the USER switch. The MDL-BDC samples these signals and centers the speed range and neutral position between these limits. A calibration failure will be signaled if an out-of-range signal is detected. Or if you're looking to have a motor go in an opposite direction from the joystick input as in tank drive where one motor needs to be in reverse when driving in one direction. You can simply reverse the wires on the M+ and M- terminals from the motor. |
|
#4
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Hey, thanks for the quick replies.
I'll be sure to try both of the solutions when I get to school in a few hours. For the cRIO issue though, I don't think it's the battery that's causing it to act all weird. I don't remember the battery ever dipping below 11V and this is a reoccuring issue, so I'm pretty sure that's not the case... Anyway, I will look into the battery. In the meantime, do you know of any possible case/solution where the cRIO will act the way it does? |
|
#5
|
||||
|
||||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Repeat the process tethered and see if the issue goes away. Also make sure you have the gaming adapter in tne filtered 12volts.
|
|
#6
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
I think everything is hooked up right and the jumpers seem to be in the right places...
Here's some other things I've noticed... The lights on the jaguars and victors seem to flash (sometimes green other times orange) when this occurs. Also, when we connect it up to the console (we're using the SimpleTemplate project), it says something like... FATAL ERROR: Unable to access allocated resource in Resource.cpp ... or something like that... I can't remember what it exactly says... This seems to be a major problem plaguing us... We can't even get this thing to run reliably for more than 30 seconds... |
|
#7
|
||||
|
||||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Quote:
-Fast flashing green: PWM signal says "partial power forward" -Fast flashing red: PWM signal says "partial power reverse" -Solid green: PWM signal says "full speed ahead" -Solid red: PWM signal says "full speed reverse" -Solid orange: PWM signal says "neutral" -Slow flashing orange: PWM signal not present (can happen when the cRIO is booting, and when the PWM signal is unplugged) -There's on other that indicates an error, it might be fast flashing orange but I'm not sure. We get that fatal error thing every time we boot too. We haven't investigated, but it doesn't seem to affect our robot's performance. |
|
#8
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
For us, the Fatal Error constantly repeats until we disconnect the system... I'm not sure how "normal" this thing actually is...
|
|
#9
|
|||||
|
|||||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Quote:
Or you might just have a program bug that tries to connect a gyro to an unsupported analog pin... |
|
#10
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
Well... This seems to be happening with or without any other sensors plugged in (just the basic setup of the benchmark test with some connected motors).
This awful cRIO has been giving us nothing but problems... ugh... |
|
#11
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
If your cRIO is freezing, hook up a null-modem serial cable and use hyperterminal or another terminal program to see the diagnostics from the kernel. It will often tell you what is wrong, or at least give you info so that people can help.
If you truly think you have a problem with the cRIO, try isolating it. Reimage it to the latest image, make sure it is a fresh battery with nothing else hooked up that doesn't need to be, and run an example program. If that crashes, freezes, or misbehaves, contact NI tech support by phone. If it doesn't, then start adding things back on somewhat slowly. You aren't going to get this debugged without more isolation and more information. Greg McKaskle |
|
#12
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
I know this thread might be a little dead, but I think I might know the solution.
If you access the 'raw' values of the joysticks you get -1 to 1 ( 0 is stop ), if you access the 'raw' values of pwms you get 1 to 254 (128 is stop)!!! so 1 WOULD run your motor full speed, while -1 would be invalid. Try setting it to 254 (not 255) and seeing if you still get the error. I'm pretty certain the above applies for setting raw values on the pwms, I am not sure if it is true for Jaguars. ............... Edit: On second thought, after reviwing the relevant source files of the WPI library I find it unlikely that the above is true. Last edited by bomber7 : 02-02-2009 at 19:51. |
|
#13
|
|||
|
|||
|
Re: Running the Motors Backward in WindRiver & cRIO Freezes
I have the same problem and I have used both Jags and Victors. The RIO is not freezing. The motor just will not reverse when using a button. Works great when using x,y,axis.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cRIO Not Running Program | railerobotics | NI LabVIEW | 5 | 18-01-2009 08:48 |
| CRIO not working with Windriver | dpeterson3 | C/C++ | 7 | 07-01-2009 20:49 |
| Can you hurdle the Trackball's backward? | Sila741 | Rules/Strategy | 14 | 08-01-2008 02:30 |
| Heck Freezes Over: Windows 2000 & NT Source Code Leaked!?!? | Joe Matt | Chit-Chat | 9 | 14-02-2004 21:14 |
| Motors Running Fwd/Rev | Paul | Programming | 3 | 05-02-2004 17:17 |