07-19-2013 04:40 AM
Hi,
We're trying to sync digital data from two light gate sensors which give pulse trains with an analog input voltage. Our project requires that these be as synched as possible as the digital pulses represent the position of gear teeth at a given time and the analog input is collecting data which needs to be matched to these positions
It is important that:
A start has been made, but we would like to ensure that we are being as accurate as we can with the hardware available. Our vi is attached
We are using an M Series PCI 6221 card.
Thanks!
Tom & Ingram!
07-30-2013 08:01 AM
Hi Tom & Ingram,
I think if you look in the NI example finder you will find some examples that will give you all the parts you need to get up and running with this application. First you need to open the example finder found under Help >> Find Examples... once the example finder opens Navigate to Hardware Input and Output >> DAQmx >> Analog Input – Synchronization.vi This vi shows how to synchronise two analogue input tasks.
The second example show how to log data to a file using the DAQmx in built logging VI. It can be found at the link below. The pause will allow you to see the data before starting the log to file.
https://decibel.ni.com/content/docs/DOC-16359
In terms of setting the duration of the acquisition you can do this by using a finite acquisition of using a continuous acquisition with the Time elapsed.vi depending on how accurate you want the timing. In terms of starting acquisition on command this will just be a dependant on your coding.
Let me know how you get on with this and if you need more information then please feel free to post back
Best regards