LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change detection to record multiple inputs

Hardware:
NI PCI-6220 M-Series DAQ
26-bit reference encoder, A B quadrature
8 bit test encoder (Device Under Test), TTL
 
Software:
Labview 7.1
 
 
The reference encoder is wired to counter 0, using 4x quadrature encoding.  The DUT is wired to the P0 digital input block.  Currently, there is only 1 digital output from the DUT, however, in the future I will be using 6.
 
I want to use the change detection feature to trigger the recording of all of the digital input states, as well as the counter value.  This can be done all togeather (so all of the data is in one array), or seperate (so there is an array for each digital input).  The second method would be prefered, or better yet recording both.  The change detect will detect rising or falling edges on any of the 6 outputs from the DUT.
 
I want to have a start button to begin recording the data.  Eventually I am going to do tests and analysis, but until I get the recording done, displaying the values or using indicator lights or somehting like that will let me know what Im doing.
 
I am new to labview, but trying to learn as fast as possible.  Could anyone please offer some guidance in how to approach this?  I have seen a few examples, but they only seem to let you record one piece of data at a time, but I need to record both digital and counter values simotaniously.  Most of the other VIs I have seen are for labview 8, so I cant see them.  Any help anyone can offer would be greatly appreciated.
 
Thank you,
Garrett
 
 
 
0 Kudos
Message 1 of 3
(2,725 Views)

Would it be better for me to build my own external triggering device?  I could make a black box to hook up to the DAQ that will give a pulse at any edge change for my six inputs that I want to measure.  With that pulse, I can initiate a recording of the digital inputs and the counter.  Would this be the better approach?

Thanks!

0 Kudos
Message 2 of 3
(2,696 Views)

Hello Garrett,

I believe the easiest way to do this is to create a buffered counter input task and a buffered digital input task.  You then would then specify the clock source for these tasks to be your trigger from your DUT.  Since you are only recording a single value each trigger I assume the triggers are happening relatively frequently.  Having the trigger as your clock allows you to buffer the current state of your digital lines and counter.

You can see how to perform a continuous position counter measurement with an external clock in LabVIEW's Example finder under Hardware Input and Output >> NI-DAQmx >> Counter Measurements >> Position >> Meas Angular Position-Buffered-Cont-Ext Clk.vi.

You can see how to perform a continuous digital measurement with an external clock in LabVIEW's Example Finder under Hardware Input and Output >> NI-DAQmx >> Digital Measurements >> Meas Angular Position-Buffered-Cont-Ext Clk.vi

You can specify the same external clock for both tasks.  Since the samples are buffered automatically with the trigger you just have to perform DAQmx reads on your tasks.  You can display/graph and save this data to disk anyway you like.

I hope this helps.

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 3 of 3
(2,674 Views)