![]() |
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. |
Re: Photosensor as encoder for bang bang.
Here's one way to do a tach with a photosensor:
![]() |
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
|
Re: Photosensor as encoder for bang bang.
It's in
WPI Robotics Library -> I/O -> DigitalInput |
Re: Photosensor as encoder for bang bang.
1 Attachment(s)
Quote:
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. |
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. |
Re: Photosensor as encoder for bang bang.
Quote:
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. |
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!
|
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.
|
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. |
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 |
Re: Photosensor as encoder for bang bang.
1 Attachment(s)
here
|
Re: Photosensor as encoder for bang bang.
1 Attachment(s)
and this is the rest of it. The first picture us what is in the periodic task vi
|
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. |
Re: Photosensor as encoder for bang bang.
Quote:
|
| All times are GMT -5. The time now is 09:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi