Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to acquire data on a rising edge of a digital signal on E series DAQ

Hi:
 
I am trying to interface a quadrature encoder to the PCI 6031E Multifunction DAQ. I am using Labview 7 Express as my software. The qaudrate encoder has three outputs "Index pulse", "Phase A" and "Phase B". I am trying to use  the rising-edge of the Index pulse to start data acquisition. Once I detect a rising-edge on the Index Pulse start the real data aquisition by detecting "Phase A" count and acquire two measurements on two analog channels. One analog channel  measures a +5 volt power supply and the other analog channel is meauring an analog voltage coming from a rotary sensor that is directly connected to the shaft of the encoder. As the encoder completes 360 degree of rotation, the rotary sensor will output analog voltage from 0.25v to 5.0v. I need to meaure the position of the encoder, the power supply and the analog voltage of the sensor all at the same time. Basically, I need this process synchromous in order for this system to work.Please advise on how to design this application using PCI 6031E  Multifunction DAQ. I appreciate your time and assistance.
 
Respectfully,
 
Nirav
0 Kudos
Message 1 of 2
(3,229 Views)
Hi Nirav,
 
If I understand you correctly,  you want to trigger the analog inputs off of the encoder's Index pulse.  I'm also assuming the Phase A output is dependent on the Index Pulse.  If this is not right, let me know. 
 
You will need to create a VI with two tasks, one task for your counter input and one for your analog inputs.  Configure the counter input task to use an external clock and select the Clock Source to be the ai/SampleClockTimebase.  An example of this is the Count Digital Events - Buffered - Continuous - Ext Clk VI found at Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events >>  Count Digital Events - Buffered - Continuous - Ext Clk VI is the first example in the list. For the Analog Input channels, configure both channels in one task and trigger off of the index pulse.  An example of this is the Acq&Graph Voltage-Int Clk-Dig Start VI found at Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurement Voltage >> Acq&Graph Voltage-Int Clk-Dig Start VI is seventh from the top.
 
The E-series cards are not designed for real simultaneous sampling - if you need true simultaneous sampling, I would recommend a S Series card.  The way the E series cards  sample is by a method called interval scanning where the convert clock is used to determine when each channel in the list is to be sampled.  The time between the samples is the interchannel delay and can be set in software.  A good reference for information about the Convert Clock and how to change it is: How is the Convert (Channel) Clock Rate Determined in NI-DAQmx and Traditional NI-DAQ?
Micaela N
National Instruments
0 Kudos
Message 2 of 2
(3,204 Views)