|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
Quote:
|
|
#2
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
See my cad pic,
Yellow indicating where the reflector tape is mounted. 90 degrees on, 90 degrees off, 90 degrees on, 90 degrees off, as it spins. With the low resolution counter method in bang-bang, the difference between (I am going from memory from a couple of weeks ago) in a 10 ms loop, it was 9, 10, or 11 counts, which equated to 3000rpm, 3300rpm, 3600rpm. We realized that if the tape did not start at 180 degrees apart, this was an issue and an error. As we increased the loop time to get more counts, we were reducing the motor output changes which increased the error. We are using the "gear tooth" mode, and a timer avg over two counts, which is one revolution. This really reduced the error in not placing the reflector tape exactly 180 degrees apart. Does that make more sense? Edit, Banner part number DS18VN6LP Last edited by tr6scott : 24-02-2013 at 23:08. Reason: added banner part number. DS18VN6LP |
|
#3
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
Quote:
Are you referring to the code Mark posted? What you are describing is not what he posted. The code he posted is equivalent to the getPeriod() method in the WPILib, which uses the 153KHz sampling and 1μs timer in the FPGA to measure the elapsed time between counts. If you use the code Mark posted, and if you are counting rising and falling edges, and if you have the FPGA sample averaging ring buffer set to 4 samples, you should be getting rock-steady accurate rpm readings. Last edited by Ether : 25-02-2013 at 00:41. |
|
#4
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
Attached are screen shots of actual code. We are using the "Gear Tooth sensor" mode of the counter, which based on our results, must only be counting the rising edges, and not the falling edges.
The questionmark in the timed task is the TBH control. (Not sure where my son put that one Scott. |
|
#5
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
Quote:
This was the portion of your previous post which I must have misinterpreted: Quote:
If you use your present method, I can't see why bang-bang shouldn't work. |
|
#6
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
I agree, the lower performance of the bang-bang method was in the RPM calculation, and not in the control method.
We have moved on, but I have two students that understand that the difference in the performance between the two, was not control algorithm, but the RPM calculation. I would like to go back, and implement bang-bang with the same RPM calculation, and compare bang-bang to TBH for control methods. Thanks for all your great posts, I learn so much, and in turn, and some of my students do too. ![]() |
|
#7
|
|||
|
|||
|
Re: Is there a speed sensor input example for Labview?
Quote:
Cheers, -Joe |
|
#8
|
||||
|
||||
|
Re: Is there a speed sensor input example for Labview?
Thanks for the info Joe, we will change it up to the up/down mode, don't need any anomalies to pop up in competition.
I noticed I did not link to the TBH code posted by 123 last year, here is the link in case someone is searching this out later. http://www.chiefdelphi.com/media/papers/2674 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|