Go to Post Creatively solving problems is part of the fun. Continuous improvement and sustainment of [old] programs is also important. - tim-tim [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2011, 21:04
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN, PID, Mecanums

Well, we know that the wiring of your encoders is not the issue right now. If that were the case, the Jaguars would go full-speed FWD when you pushed forward, and full-speed REV when you went reverse.

My first guess would be that you haven't set the "max RPM" in the OpenExistingMotors VI, and that you haven't set the number of lines on the encoder.
If you're on tough boxes with CIMs, the max RPM should be about 4500 / 12.6, which is around 350 RPM. The default is 1.
__________________
-- Marshal Horn
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2011, 19:55
Ceebs03 Ceebs03 is offline
Registered User
FRC #2621
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Bedford MA
Posts: 8
Ceebs03 is an unknown quantity at this point
Re: CAN, PID, Mecanums

It was in fact a failure to set the encoder lines in the open vi.

Now I have another mostly unrelated problem. The joysticks we are using no longer spring back perfectly to center, so the robot moves slightly even when the joysticks are not being touched. I looked up the jaguar calibration and found that it appeared to only apply to pwm. Is there a similar process for CAN or a way i can correct for it in the code?
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2011, 21:49
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: CAN, PID, Mecanums

Calibrating the jaguars isn't what you want to do anyway. What you need to do is implement a dead band on your joystick inputs. Basically you take any values less than some value, say 0.02 or something, and set it to 0.00. That way even if the joystick doesn't center itself completely, your robot won't be moving.
__________________

Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 21:13
Ceebs03 Ceebs03 is offline
Registered User
FRC #2621
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Bedford MA
Posts: 8
Ceebs03 is an unknown quantity at this point
Re: CAN, PID, Mecanums

I tried implementing a dead band, and it didn't work as expected. The robot will not move at all with the dead band in place. I made a VI to handle the dead band so the teleop is cleaner and it can be reusable...

I have attached screen shots and the VI itself. If someone could help me debug it that would be great.

thanks
Attached Thumbnails
Click image for larger version

Name:	deadband_use_screenchot.jpg
Views:	20
Size:	38.3 KB
ID:	10115  Click image for larger version

Name:	deadband_true_screenchot.jpg
Views:	22
Size:	70.6 KB
ID:	10116  Click image for larger version

Name:	deadband_false_screenchot.jpg
Views:	18
Size:	69.7 KB
ID:	10117  
Attached Files
File Type: vi deadband.vi (8.6 KB, 6 views)
Reply With Quote
Reply


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


All times are GMT -5. The time now is 21:19.

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