Go to Post ask not what your alliance picks can do for you, but what you can do for your alliance picks. - Swan217 [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
  #46   Spotlight this post!  
Unread 11-02-2013, 16:31
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.

i have it hooked up and i had just hooked it up to the solenoid breakout card. but not there is no power to the photosensor
__________________
Think Outside The Frame
Reply With Quote
  #47   Spotlight this post!  
Unread 11-02-2013, 16:40
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.

NOw i got it to work at 24 volts. Now i need the code to work
__________________
Think Outside The Frame
Reply With Quote
  #48   Spotlight this post!  
Unread 11-02-2013, 17: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.

I am getting a reeding now of Rpms between 500 to about 3000. But still my motor keeps going very fast
__________________
Think Outside The Frame
Reply With Quote
  #49   Spotlight this post!  
Unread 11-02-2013, 17:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,134
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 Bunniy View Post
I am getting a reeding now of Rpms between 500 to about 3000. But still my motor keeps going very fast
Post a PNG screenshot of your speed controller code.

With a 20ms execution rate using counts to read a one-per-rev sensor on a wheel spinning at 2000 rpm, you're going to see a *lot* of noise.

Attached Thumbnails
Click image for larger version

Name:	2000_1_20.png
Views:	24
Size:	2.9 KB
ID:	13943  

Last edited by Ether : 11-02-2013 at 17:19.
Reply With Quote
  #50   Spotlight this post!  
Unread 11-02-2013, 17:19
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.

The value (10) you put underneath the indicator, what does that number mean exactly.
__________________
Think Outside The Frame
Reply With Quote
  #51   Spotlight this post!  
Unread 11-02-2013, 17:24
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:	periodic task.png
Views:	28
Size:	25.6 KB
ID:	13944  
__________________
Think Outside The Frame
Reply With Quote
  #52   Spotlight this post!  
Unread 11-02-2013, 17:30
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,134
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 Bunniy View Post
The value (10) you put underneath the indicator, what does that number mean exactly.
@ Mr Bill: He's talking to you again.

@ Bunniy: Many folks don't use the threaded display and can't tell who you are talking to if you just use the pronoun "you".


Reply With Quote
  #53   Spotlight this post!  
Unread 11-02-2013, 17:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,134
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 Bunniy View Post
here
I don't think the "counts" method is going to work with a one-per-rev sensor. I think you need to use the "period" method that Mark posted.


Reply With Quote
  #54   Spotlight this post!  
Unread 11-02-2013, 17:41
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.

@ Ether: Thank you, im new to chief delphi so i dont know this
__________________
Think Outside The Frame
Reply With Quote
  #55   Spotlight this post!  
Unread 11-02-2013, 17:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,134
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 Bunniy View Post
@ Ether: Thank you, im new to chief delphi so i dont know this
We all started out new and had to learn. Try clicking the "quote" icon instead of "quick reply" and it will quote the message to which you are replying.

That will provide sufficient context.


Reply With Quote
  #56   Spotlight this post!  
Unread 11-02-2013, 17:48
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.

Quote:
Originally Posted by Ether View Post
We all started out new. Try clicking the "quote" icon instead of "quick reply" and it will quote the message to which you are replying.

That will provide sufficient context.


thank you
__________________
Think Outside The Frame
Reply With Quote
  #57   Spotlight this post!  
Unread 11-02-2013, 17:56
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.

Quote:
Originally Posted by billbo911 View Post
Mark,
I created a "Count only" version of the Bang-Bang control. Does this look correct? If so, I'll add it to my "White Paper" options.

The only modifications needed are to replace the counter and motor names with the actual names.
If actual RPM is needed, that can be added here or elsewhere.

I also put a version together that uses the period approach you described earlier.
the period one is not speeding my motor
__________________
Think Outside The Frame
Reply With Quote
  #58   Spotlight this post!  
Unread 11-02-2013, 18:12
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.

Quote:
Originally Posted by Ether View Post
I don't think the "counts" method is going to work with a one-per-rev sensor. I think you need to use the "period" method that Mark posted.


Why would using the period method be better?
__________________
Think Outside The Frame
Reply With Quote
  #59   Spotlight this post!  
Unread 11-02-2013, 18:42
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.

Quote:
Originally Posted by Mark McLeod View Post
A feedback node and subtraction would preserve the integrity of the counter.
You do have to be aware of how high the Counter can count and provide for wraparound if resolution makes that a potential problem.
Counter Reset can be used when the shooter is turned off or first turned on, i.e., before or after the count integrity matters.

Also, it should be made clear that a crude filter and a loss of resolution is being applied by converting the Counter to RPMs before doing the tests.
My preference is to do all processing and comparisons in native units and only convert to RPMs for the human display.

Bunniy, your Counter initialization in Begin.vi looks fine.

See, you get your license and immediately you're doing errands.
I have literally tried so many times to just get my wheel to my desired rpm. Can you show me or help me in anyway to get it to work with my photosensor
__________________
Think Outside The Frame
Reply With Quote
  #60   Spotlight this post!  
Unread 11-02-2013, 18:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,134
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 Bunniy View Post
Why would using the period method be better?
To understand why, you have to do the math.

Using the "period" method, like Mark posted earlier in this thread, the FPGA samples the sensor at 153KHz and records the elapsed time between pulses with a 1MHz clock. For a one-per-rev sensor (like yours) on a wheel spinning at, say, 2000 rpm, that gives you a very accurate and hi resolution signal. See attachment.

The "count" method is very accurate for high speeds with high counts-per-rev sensors like a 360CPR encoder. But for a one-per-rev sensor like yours, it's not very good. At a wheel speed of 2000 rpm and sampling every 20ms, you don't get enough counts to accurately determine what the speed is. Sometimes you'll get 1 count, and sometimes you'll get *no* counts. You can't convert that into a useable speed signal.
See attachment.


Attached Thumbnails
Click image for larger version

Name:	period.png
Views:	17
Size:	4.3 KB
ID:	13946  Click image for larger version

Name:	counts.png
Views:	15
Size:	3.5 KB
ID:	13947  
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 12:25.

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