Having a lot of variance (Signal Noise) with HRXL-MaxSonar-WR
Posted 18 November 2012 - 10:28 PM
Posted 19 November 2012 - 10:10 AM
I would ask MaxBotix the expected noise of the analog output of the sensor. If it has a resolution of 5mm (which makes sense for a 10-bit DAC output), then 10mm of noise would just be +/-1 count, which is good.
Section 4.3.2 describes how to configure an FIO as analog:
... but in LabVIEW there is a handy utility VI you can use instead. Look at an example such as "U3 Single AIN Example.vi", or just use eAIN (see "U3 eAIN Example.vi") as the easy function automatically configures the line as analog for you.
To measure pulse-width, I would use a timer in duty-cycle measurement mode:
Looks like pin 2 gives you a 7.5Hz (133333us) signal with a high-time of 300us to 5000us. I would not worry about measuring the low time properly, but would instead set the timer clock to give good results for the high-time. I suggest you start with the 12Mhz/Div base clock with a divisor of 12, which gives you a 1MHz timer clock. That means each timer tick is 1us, which is simple to start with. Once you see that work, you could change the divisor to 1 to get higher time resolution, although the sensor resolution is only 1mm anyway.
Try it in the test panel in LJControlPanel first, then try LabVIEW by starting with an applicable example.
Posted 19 November 2012 - 11:25 AM
Posted 19 November 2012 - 12:08 PM
Posted 21 November 2012 - 12:49 PM
Also, in LJControlPanel you want to use the DUTYCYCLE mode. SYSTIMERHIGH mode reads the upper 32 bits of the system timer, which is an internal timer.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users