Go to Post [on practice robots:] Twice the work and twice the practice building seem to equal twice the experience so far. - MrBasse [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2009, 03:56
BurtGummer BurtGummer is offline
Electrical/Mechanical/Programming
FRC #3020
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Southern CA
Posts: 89
BurtGummer will become famous soon enoughBurtGummer will become famous soon enough
Speed control for Jaguars?

Hi everyone!

This is our schools first year participating in any robotic competition, so things have been going pretty rough.

We hadn't been able to get our motors spinning at all, but after hours of troubleshooting, we found that removing the watchdog from the labview project let us turn the motors on and off by the values -1 0 and 1 in the speed input box in the labview program.

However, we cannot control the actual speed of the motors with the code, even though the video "Make a simple motor in 10 minutes" shows variable speed. When we run the motors, we get the slow blinking on the sidecar, but the LEDS on the jaguars go green when they are on, regardless of the blinking LEDs on the sidecar.

I updated both the cRIO image and the Driver revision from the most recent releases.

So, in conclusion, we can turn the motors on and off without speed control when we delete the "Watchdog: Open" from the labview code. If the watchdog is in there, then it will not run the motors at all.

The tutorial had stated to set a constant of "false" for the watchdog, but that option is not present, but I did read that the option was completely taken out and it is automatically false. Is this correct?

Thanks in advance!!

-3020
  #2   Spotlight this post!  
Unread 08-02-2009, 11:13
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Speed control for Jaguars?

It looks like two things are happening:

1.Something in your code is causing the watchdog to trip.This can be solved be disabling it, but it's usually much better to either increase the timeout of fix the offending section of code(putting a few Getwatchdog.Feed)s in any internal loop should work.

Your second problem--have you tried printing out the values you're actually sending to the motors? It's possible that something else is modifying a global. If the correct values are getting sent, you might want to reclaibrate your Jaguars
__________________
Get yer robot source code here!
  #3   Spotlight this post!  
Unread 12-02-2009, 03:52
BurtGummer BurtGummer is offline
Electrical/Mechanical/Programming
FRC #3020
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Southern CA
Posts: 89
BurtGummer will become famous soon enoughBurtGummer will become famous soon enough
Re: Speed control for Jaguars?

Well, still no dice.

Recalibrating should only be necessary is we are using the joysticks right? We are just running it on the computer for now, with a direct ethernet connection to DS. When running the program, you should be able to increase or decrease the integer value on a speed control box on the screen. 1 is full on, 0 is off, -1 is reverse, but we have no control of the speed. Like I said, we had to delete the watchdog to even get the motors to have any kind of response at all.

What's odd is that when the watchdog is in the code, outside the while loop, it isn't wired to anything. I don't know if it should be or not, and to where. The tutorial video does not show it getting wired anywhere. Please keep in mind, this is the first time I've even worked with any visual programming tool, let alone labview.

The program we wrote in labview is extremely simple. It is this exact one seen in the video found here http://zone.ni.com/devzone/cda/tut/p/id/7977

We will be taking the system up to a shop on friday and saturday to see if they can help us......but time is running out! Then again, we just go the robot parts last week.......

Thanks!
  #4   Spotlight this post!  
Unread 12-02-2009, 06:58
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Speed control for Jaguars?

I'm not sure how much is explained in that video, as I didn't listen to it, just skipped to the part with the LV program, so forgive me if I repeat something that's in that video.

The watchdog is a nifty little feature that, if not "fed" for a defined period of time, will shut down the code we are running. This is for safety reasons--let's say you have a logic error in your code. You put it on the field, getting just the right conditions to trigger the logic error. Nothing about the code is wrong, but you are stuck in a While loop, say, waiting for a sensor (that's now unplugged), not doing anything else. Your motors are set for full forward, and you are going to crash full-bore into the wall.

Now, suppose you were using the watchdog. You set it at the beginning of the program, and feed it at every point of the program where you anticipate taking longer than the expiration you set, say, 0.1 seconds. That's a short time in our realm, but an eternity to a processor. The code hangs inside the While loop, waiting for a condition that isn't going to happen. The watchdog is not fed for that 0.1 seconds because, being a smart programmer, you haven't put a Feed inside the While (that sensor is only going to take a moment to respond, right?). The watchdog shuts down the code before your robot becomes a safety issue.

This feature has been mandatory on older robots; if the user processor froze up for whatever reason and stopped communicating with the master processor, the controller would shut down (and you would see a (IIRC) blinking red light of death). This year, it is optional. Deleting the watchdog from your design is probably OK, but just know the consequences.

Now, for the other part of your problem. This year, unlike other years, Integer values are not going to cut it for your speed controller outputs. The range for the outputs is -1 to 1, with 0 being off. If you want half speed, you have to output 0.5. I think you probably haven't tried it with the joysticks yet; the joystick positions aren't described as integers either. They are in the same -1 to 1 range as the speed controller outputs. The control shown is of the type Double; this is adequate because Doubles are a floating-point type--they can describe numbers with a moving decimal point. I bet you a cookie that all you need to do is type something like "0.5" into that control and you will get half speed. IIRC, those controls only increment in integer values, and you won't see any partial power steps.

Let me know if that fixes your problem, or if not. I'm not the most proficient at LabView, but I can certainly try.

Jacob
__________________
Aren't signatures a bit outdated?

Last edited by JBotAlan : 12-02-2009 at 07:00. Reason: A little clarification
  #5   Spotlight this post!  
Unread 13-02-2009, 04:47
BurtGummer BurtGummer is offline
Electrical/Mechanical/Programming
FRC #3020
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Southern CA
Posts: 89
BurtGummer will become famous soon enoughBurtGummer will become famous soon enough
Re: Speed control for Jaguars?

Haha, last night before going to bed I was pondering the possibility of the range being -1 to 1. So I tried that today and sure enough it worked. Then I came on the forums and saw your post. But thanks anyways!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can we control the amount of air to control the speed of the cylinder? Team2339 Pneumatics 22 11-02-2009 15:33
Jaguars Slow Yellow Blink - Possible Control System Issue MikeDubreuil FRC Control System 3 26-01-2009 23:04
Great PID guide. (for wheel speed control) PhilBot Programming 1 19-01-2009 11:58
Drive Control, Wheel Speed Calibration, and Rapid Speed Changes 7-11number1 Programming 3 23-01-2008 20:36
Speed Control for Balancing Vehicle sanddrag Electrical 13 16-12-2003 20:38


All times are GMT -5. The time now is 02:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi