Go to Post Nuts for breakfast!!! Thats just screwy!!! I guess you could just bolt it down..... - Wayne C. [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-2013, 09:32
MysterE's Avatar
MysterE MysterE is offline
FRC Team #3337
AKA: Coach Eiland
FRC #3337 (Panthrobotics)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baton Rouge
Posts: 509
MysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond repute
Send a message via AIM to MysterE
Photosensor as encoder for bang bang.

Hello folks,

Helping my programmer do a bit of research. How would we go about pulling the period of time between rotations of a flywheel using a photosensor and tape to use with a bang bang in Labview.
__________________
Coach. D. Eiland
Head Coach - Team #3337
Panthrobotics (Woodlawn HS)
2016: Bayou Regional WFFA Winner
2016: Rocket City Regional Judges Award
2015: Bayou Spirit Award, Bayou Chairman's Award, Bayou Dean's List Finalist (Danielle Massey), Bayou Volunteer of the Year Award
2014: Bayou Dean's List Finalist (Witni Widmeier)
2011: Bayou Regional Winner | Judges Award
2010: Rookie Inspiration Award
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2013, 10:32
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,743
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

Here's one way to do a tach with a photosensor:
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 18:08
Bunniy's Avatar
Bunniy Bunniy is offline
The Only Programmer
FRC #3337 (Panthrobotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Baton Rouge
Posts: 37
Bunniy is an unknown quantity at this point
Re: Photosensor as encoder for bang bang.

what is and where do i find the 'Dig Scr' thingy between the DIO open and the COUNTER open
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2013, 18:28
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,743
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

It's in
WPI Robotics Library -> I/O -> DigitalInput
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2013, 19:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,038
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

Quote:
Originally Posted by Mark McLeod View Post
Here's one way to do a tach with a photosensor:
Mark,

Is the Counter/ConfigTimer (blue arrow) where the FGPA sampling size is configured?

If so, does the "5" (green arrow) mean FPGA sample average is set to 5?

Does Counter/Get (red arrow) return the same thing as the GetPeriod() method in the Counter class in C++ and Java (i.e. period, in seconds, of the tooth count, based on the last 5 samples) ?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Counter.jpg
Views:	55
Size:	19.0 KB
ID:	13861  
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2013, 21:40
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,743
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

In a word, Yes.

The 5 there is just an example for # samples to average.
(For the OP's programmers, e.g., Bunniy) For example, if you have multiple pieces of reflective tape around the wheel to increase your resolution, then averaging removes any displacement errors in positioning the individual pieces of tape. You know, if the pieces of tape aren't perfectly spaced, perfectly sized, perfectly oriented. If you just use 1 piece of tape then I'd probably take the LabVIEW default of 1.

That Get wire is the average Period (in seconds) between pulses.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2013 at 21:47.
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2013, 21:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,038
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

Quote:
Originally Posted by Mark McLeod View Post
In a word, Yes.

The 5 there is just an example for # samples to average.
For example, if you have multiple pieces of reflective tape around the wheel to increase your resolution, then averaging removes any displacement errors in positioning the individual pieces of tape. If you just use 1 piece of tape then I'd probably take the LabVIEW default of 1.

That Get wire is the average Period (in seconds) between pulses.
Thank you.

I have a more general LabVIEW question if I may. Before I posted the above question, I tried for about half an hour to find the answer on the internet. Do you (or does anyone reading) know of a site where you could type, say, "Counter Config Timer" into a search box and it would display the LabVIEW help screen for that icon? I had no success with Google.


Reply With Quote
  #8   Spotlight this post!  
Unread 08-02-2013, 21:53
Bunniy's Avatar
Bunniy Bunniy is offline
The Only Programmer
FRC #3337 (Panthrobotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Baton Rouge
Posts: 37
Bunniy is an unknown quantity at this point
Re: Photosensor as encoder for bang bang.

Thank you mark for telling me that it should be set to 1. No wonder my wheel was spinning so fast!
Reply With Quote
  #9   Spotlight this post!  
Unread 08-02-2013, 22:04
Bunniy's Avatar
Bunniy Bunniy is offline
The Only Programmer
FRC #3337 (Panthrobotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Baton Rouge
Posts: 37
Bunniy is an unknown quantity at this point
Re: Photosensor as encoder for bang bang.

im still having trouble. my motor keeps spinning as fast as possible even when i set the rpm to even 200.
Reply With Quote
  #10   Spotlight this post!  
Unread 08-02-2013, 22:15
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,743
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

Show a snippet of the code you're using.
I may be a little slow responding, I'm shoveling snow.

P.S.
If you don't know what a number in the example means, ask.
You don't want the 99 for example, because you only have 1 tick per revolution.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2013 at 23:42.
Reply With Quote
  #11   Spotlight this post!  
Unread 08-02-2013, 22:21
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,748
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: Photosensor as encoder for bang bang.

Ether, I don't know of a site that does that, but the editor will. If you click on search in the palettes, type Counter Config, it will have only one item in the list. Hover and the Context help window will show that item's help. There is also a function called QuickDrop that some folks just love. You hit Ctl-Space and type some of the name and it does the same sort of list and you click and drop the node. It doesn't look like the help updates until you drop the node.

Greg McKaskle
Reply With Quote
  #12   Spotlight this post!  
Unread 08-02-2013, 23:38
Bunniy's Avatar
Bunniy Bunniy is offline
The Only Programmer
FRC #3337 (Panthrobotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Baton Rouge
Posts: 37
Bunniy is an unknown quantity at this point
Re: Photosensor as encoder for bang bang.

here
Attached Thumbnails
Click image for larger version

Name:	help.jpg
Views:	71
Size:	97.2 KB
ID:	13864  
Reply With Quote
  #13   Spotlight this post!  
Unread 08-02-2013, 23:47
Bunniy's Avatar
Bunniy Bunniy is offline
The Only Programmer
FRC #3337 (Panthrobotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Baton Rouge
Posts: 37
Bunniy is an unknown quantity at this point
Re: Photosensor as encoder for bang bang.

and this is the rest of it. The first picture us what is in the periodic task vi
Attached Thumbnails
Click image for larger version

Name:	help3.png
Views:	50
Size:	129.1 KB
ID:	13865  
Reply With Quote
  #14   Spotlight this post!  
Unread 08-02-2013, 23:53
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,743
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Photosensor as encoder for bang bang.

So you're taking the total revs since the last time you checked the counter.
Dividing by a time constant, filtering the result, and applying a slew rate limiter?
I'm not a fan of the Counter reset applied that way. There's a window to drop counts.

Seems a bit much for flywheel.
Is the slew rate limiter to avoid extended stall time at full power for the flywheel?
P.S. I overlooked that the slew rate is probably bypassed with the False Case.

Is that really 360 counts per revolution?
I thought you only had 1?
I don't think you want that 60 or 360 applied there, but maybe I haven't grasped what you are calculating.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2013 at 23:58.
Reply With Quote
  #15   Spotlight this post!  
Unread 09-02-2013, 00:03
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: Photosensor as encoder for bang bang.

Quote:
Originally Posted by Bunniy View Post
and this is the rest of it.
Are you trying to read buttons and set a global variable in Begin.vi? It only runs once when the program starts up, and usually isn't an appropriate place to do I/O actions.
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 22: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