Go to Post FIRST is privlidge that I am glad to be a part of and any award we recieve is a blessing to be cherish not an expectation to be agonized over. - Koko Ed [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 19-03-2014, 23:20
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Find Encoder Value in Teleop

To speed up our shooter aiming, we are incorporating an encoder on the tilt axle to automatically find the angle of the mechanism (and through logic adjust the shooter up or down as necessary). We have successfully found the output, and "transformed" it mathematically into an angular reading, but we can't access the value in our teleop program (where we need it) only in the periodic tasks program. Help!
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #2   Spotlight this post!  
Unread 19-03-2014, 23:24
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: Find Encoder Value in Teleop

What's keeping you from reading the encoder output in Teleop?
Reply With Quote
  #3   Spotlight this post!  
Unread 19-03-2014, 23:43
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Find Encoder Value in Teleop

Quote:
Originally Posted by Alan Anderson View Post
What's keeping you from reading the encoder output in Teleop?
I'm not the programmer - but I think if they knew that, they would have solved it. We have the encoder (AS 5030) plugged in to the first input of the analog breakout...we can read it on the dashboard, and access it in periodic tasks, but not teleop (and I assume not in autonomous, where we will also need it).
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #4   Spotlight this post!  
Unread 20-03-2014, 06:02
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: Find Encoder Value in Teleop

I suspect that the periodic is not only reading the encoder, but controlling the elevation. One approach is to share the calculated value, via a global variable. The RobotGlobal is a reasonable place to put a named numeric for this purpose.

An alternative is to call a shared subVI that reads the encoder refnum by name, reads the raw value, and calculates the angle. The subVI would be shared by Periodic, auto, tele, or wherever.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 20-03-2014, 16:33
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Find Encoder Value in Teleop

Quote:
Originally Posted by Greg McKaskle View Post
I suspect that the periodic is not only reading the encoder, but controlling the elevation. One approach is to share the calculated value, via a global variable. The RobotGlobal is a reasonable place to put a named numeric for this purpose.

An alternative is to call a shared subVI that reads the encoder refnum by name, reads the raw value, and calculates the angle. The subVI would be shared by Periodic, auto, tele, or wherever.

Greg McKaskle
Thanks - Programmers are experimenting and believe this (global variable) is the answer. You're a life saver!!!
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
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 08:52.

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