Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

usb-6001 triggering with Labview 15.0

I am trying to hook up my USB-6001 to Labview 15.0 with NI-DAQ 15.1.1f3 and use it as a digital oscilloscope with external triggering.  I have a 50 Hz sine at AI0 and a phase-locked 50 Hz square wave at PFI1.  The DAQ Assistant Express Task shows a perfectly sync'd sine graph, but in my block diagran, when I hook the Express DAQ Assistant 'data' output to a Waveform Graph, the graph is NOT stable, but appears to 'walk', like the sync really isn't working.  If anyone happens to have the 3rd edition of John Essick's "Hands-On Introduction to Labview for Scientists and Engineers" (which I HIGHLY recommend) the VI is the one shown on page 205 (see attached).  Thanks in advance for any and all suggestions!

Download All
0 Kudos
Message 1 of 5
(4,830 Views)

Hi bushmg,

 

The issue you're experiencing is likely related to the fact that you're utilizing a hardware timed task and a software timed task.  Because you are utilizing two different timing modes, the out of sync waveform graph is expected behavior, as the software timing is not always completely correct.  If the characteristics of the digital output waveform isn't critical, it would be possible to use an analog output task to generate a waveform that also uses the hardware timing, and could be in sync.

Chris
0 Kudos
Message 2 of 5
(4,798 Views)

Thank you, Chris, for your reply.  I'm not sure that I understand everything that you said, but the fault probably lies in my not being very clear in my description.  I am using an external signal generator for the 50 Hz sine and square waves that feed in to the USB-6001 (AI0 and PFI1, respectively).  Using the DAQ Assistant, I have the USB-6001 configured to measure analog voltage on AI0 and trigger off the rising edge of PFI1.  When I click on the blue Run Arrow in the DAQ Assistant (not Labview) the waveform shows perfect sync every time.  I then imbed this VI into a While Loop and send the output to a Waveform Graph so that it runs continuously.  Is that what you mean by two timing modes?  Perhaps I could use an analog output to generate a waveform, but I'd like to find out if it is possible to use the USB-6001 in this configuration, or maybe I am doing something wrong in Labview (I am new to the software).  Cheers, and thanks again for your response.

 

Mike

0 Kudos
Message 3 of 5
(4,784 Views)

Hey bushmg,

 

So, you are reading in two signals, which appear to be determined by your external hardware that you are feeding into your USB 6001.  Thus, the timing that determines the generation of those signals comes from your device that you are using.  The two types of signals (the analog input, and the digital signal (the square wave) in your PFI channel), will have different timing mechanisms, because digital signals are inherently software-timed, if I'm not mistaken.

 

A high level explanation of software vs. hardware timing.

http://zone.ni.com/reference/en-XX/help/370466AC-01/mxcncpts/hardwresoftwretiming/

 

There's some brief explanation of timing here as well:

http://digital.ni.com/public.nsf/allkb/3E3D74E26B8A5B83862575CA0053E4B5

 

Because the software timing of the square wave is not tied to the hardware timing of your AI signal, some lag should be expected.  The preview generated in the Express Assistant isn't the actual readout for the signal, just a preview, so it could be the synchronization you see isn't the same as the data-out you are seeing.

 

Have you reviewed the USB 6001 specifications to see if it supports this particular use case?

Chris
Message 4 of 5
(4,741 Views)

Hey, Chris.

 

Thanks again for the response and the links.  I think I see now what you were referring to earlier about hardware vs software timing.  I am new to Labview, so I think I will have to dig deeper into the capabilities of DAQmx rather than using the Express VI DAQ Assistant.  It may be that the lower-level VIs can provide the control that I am looking for.

 

As to the USB-6001 specifications, what little information that is provided is inadequate to understand how to control the hardware.  It may be that, as you said, the USB-6001 does not have the capability to support this mode.

 

I'll keep digging into Labview, with the help of John Essick's great book.  In the meantime I will continue to welcome everyone's thoughts and suggestions.

 

Mike

0 Kudos
Message 5 of 5
(4,723 Views)