09-05-2018 08:20 AM
It sounds like you don't really understand how to use myDAQ. This is an interesting gadget, one of the first "made for Engineering Majors" devices that NI produced to get LabVIEW-compatible hardware into the hands of Engineering undergraduates so they could (a) do simple Labs from Circuits and Signals courses without needing a Scope, Power Supply, Waveform Generator, Multi-Meter, etc., (b) could have something with modest capabilities that was portable, inexpensive (cost of a Textbook or two), could be theirs to keep, (c) would facilitate "extra" experimentation ("let me take this home and see what happens when I add two more resistors to this circuit ..."), and (d) sneak learning LabVIEW into the agenda in a fun, relatively painless, way.
However, sometimes the "simplicity" gets in the way of progress, particularly if there is no background or context. So I'll try to provide a little.
You have two capacitative sensors, each of which makes a voltage when an object passes through them. You want to measure the two voltages and from these measurements, deduce the time between the object passing Sensor 1 and Sensor 2. Correct?
First question -- if you had a Multimeter (a Volt-Ohm-Milliammeter, with a needle or an LED display), the actual physical object, would you use it (or two of them) to do this task? How would you get the time? Would you hold a stopwatch and start it when the needle moved? [I truly hope the answer is "no"]. What instrument would you use to look at the output signal and think to get some time measurement? [Hint -- it's a fairly long word starting with "o"].
What you need to do is to acquire many voltage readings, equally spaced in time, and determine the time that the voltage changed. The device that does this is called an Analog-to-Digital Converter, and the myDAQ has two, AI0 and AI1, accessed by the multi-pin jack on the side.
Do you know about MAX, the NI Measurement and Automation Explorer? If you plug your myDAQ into your PC and run MAX, you can find your myDAQ under Devices and Interfaces. Select it, and open a Test Panel. It should come up with AI0 selected. Change Mode from On Demand (use Help to learn what these terms mean) to Continuous, leave everything else the same, and push Start. You should see 1000 points plotted each second, and they should look noisy. If you touch one of the pins, you should see the noise dramatically increase (and it may take it a while to decay away). [Do you know enough Electronics to be able to explain what is happening?] Before leaving MAX, change Samples to Read to 100 and push Start again. Why did the display change? You can, and should, "play" with MAX to learn the capabilities of your DAQ equipment -- that's why NI provides it for you.
You have two analog input channels, so each can measure one sensor. If you acquire the two channels together, you can (in principle) figure out what time the each sensor "fired" (how? Where is "time" measured?]. Incidentally, have you learned about LabVIEW's Waveform type? If not, look it up.
I think you'll find that the myDAQ's AI channels are well-designed to accomplish this task. Use MAX to learn more about the capabilities of your myDAQ, write a simple (start small!) VI to acquire data from the two channels for a few seconds and show the data to you, think about how you would analyze the data to get Start and End times, and try it out.
Bob Schor