LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous Digital and Analog Acquisition PCI 6221

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:

  • We sample as quickly as possible
  • We can monitor speed before acquisition (digital and analog channels)
  • Must be able to set duration of acquisition
  • Must start acquisition on command.
  • Data is written to file.

 

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!

0 Kudos
Message 1 of 2
(2,067 Views)

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

Matt Surridge

National Instruments
0 Kudos
Message 2 of 2
(2,015 Views)