Go to Post You dont get paid based on your IQ, or how many things you have memorized, or what you can invent on your feet. You get paid for results. - KenWittlief [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 17-02-2011, 20:31
nyindojin nyindojin is offline
Registered User
FRC #3059
 
Join Date: Jan 2009
Location: New York
Posts: 34
nyindojin is an unknown quantity at this point
encoder help

I have been trying to program encoders for our robot, but I am having trouble setting up a structure such that encoder A and encoder B, if they are equal the motors move at that speed, if not at the same speed, they have to be adjusted. Enclosed is a copy of the program that has been done by us so far, any help would be greatly appreciated. Thanking you all.
Attached Thumbnails
Click image for larger version

Name:	encoder code.JPG
Views:	57
Size:	103.9 KB
ID:	10183  
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2011, 21:20
nyindojin nyindojin is offline
Registered User
FRC #3059
 
Join Date: Jan 2009
Location: New York
Posts: 34
nyindojin is an unknown quantity at this point
Re: encoder help

here is what we have figured out, any help would be appreciated becuse when we deploy it, it does not run.
Attached Thumbnails
Click image for larger version

Name:	encodercode2.JPG
Views:	25
Size:	87.3 KB
ID:	10208  
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2011, 05:46
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: encoder help

What part of the program is this? Are you using the framework code that enables the robot and sets up the tele and auto modes? If not, that is the problem. The FIRST image for the cRIO will not enable any outputs until a connection exists to the driver station and communication are established by functions such as Start Communications.

If this is teleop or called from it, remove the 100ms delay as that is not small, and will cause the main loop to run slowly enough that all outputs will be disabled for safety reasons.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2011, 09:48
nyindojin nyindojin is offline
Registered User
FRC #3059
 
Join Date: Jan 2009
Location: New York
Posts: 34
nyindojin is an unknown quantity at this point
Re: encoder help

It is part of the teleop period, we went online did search for help on how to compare and set results for the encoder, our goal was to get the motors going at the same rate. We will do your suggestion. Thank you.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-02-2011, 14:59
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: encoder help

The Exclusive Or function works with Boolean true/false values. You seem to want to compare two numbers. For that, use the Not Equal? function from the Comparison palette.
Reply With Quote
  #6   Spotlight this post!  
Unread 19-02-2011, 15:21
nyindojin nyindojin is offline
Registered User
FRC #3059
 
Join Date: Jan 2009
Location: New York
Posts: 34
nyindojin is an unknown quantity at this point
Re: encoder help

Thank you, we will try that, we have re-tried the FRC sample encoder code to see if we did physical setup wrong, but that is not the case. Once again thank you.
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 09:11.

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