LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to use NI USB-6009 to generate clock signals and aquire analog signals

Hi,

 

I'm new to LabVIEW, so I believe this is a simple question.  I need to send two separate square wave clock signals to a system as well as read in two analog signals with the NI USB-6009 using LabVIEW.  I have tried DAQ Assistant to send out N Samples for a digital line, but when I try to i recieve the following error:

 

Error -200077 occurred at DAQ Assistant
Possible Reason(s):
Measurements: Requested value is not a supported value for this property.
Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand

 

I need to send one master clock signal that has 50% duty @ 1MHz and another negative going signal every 17 clocks of the master clock.

 

Should I be using the DAQ Assistant, or are there other subVIs that would be more efficient/ useful for me? Again I apoligize for the basic question, but I searched the NI forums for a while with no luck.

 

Thanks,

 

-Dan

0 Kudos
Message 1 of 7
(5,402 Views)

Hi Dan,

 

You are having this problem because the 6009 does not support hardware-timed digital input/output.  Therefore you cannot send out N Samples for a digital line with this board.  You will need to use a board that supports hardware-timed DIO at a 1MHz rate.

 

Make sure you look at the board's spec sheet when you choose your board, to ensure that it supports 1MHz clocked DIO.  The spec sheet for the 6009 clearly says 150S/sec, software timed.

 

Hope that's helpful,

Diane

0 Kudos
Message 2 of 7
(5,392 Views)

Dan,

 

The 6009 does not have the ability to do regenerated output, and it does not have the ability to output its counter pulses. Your best solution, assuming you have a slow system and have to use the 6009, would be to use a timed loop structure. The best Windows can do is about a 50ms period. Otherwise, you will have to get a card that has onboard timing capabilities to output a timer pules.

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 3 of 7
(5,391 Views)

Could someone clarify the 50 msec period in Windows?

 

Is this based on the USB-6009, the Windows clock specification, or the processor speed?

I'm trying to do 10 msec While loops and seems to be limited to 15.625 msec loop period.

0 Kudos
Message 4 of 7
(5,031 Views)

If I remember correctly, the 50 ms rating comes from a Microsoft document I saw a long time ago. Basically, the best Windows can do assuming nothing else is happening is 50 ms - though this isn't guaranteed. You may be able to do better than 50 ms, but that definitely is not guaranteed. Because Windows is time sharing all of the time, any system activity (mouse move, auto update firing, keyboard strike, indexing, etc. ) can add jitter to your loop timing.

 

Windows CE was guaranteed to a 10 ms response time. However, in either case (Desktop OS or CE) your loop must also execute in less time than the response time otherwise the loop rate defines the minimum response time.

 

 

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 5 of 7
(5,014 Views)

Thanks for the prompt reply.  50 msec gives me about 1% error on the loop cycle time as actually measured against the real-time clock, which is good enough for my purposes.  I REALLY think this limitation should be stamped on the case of the USB-6009.  It would save a lot of headaches.  The published spec for analog inputs on the USB-6009 is "up to 48kS/s". Since this 50msec limit corresponds to 20Hz.  I would be really interested in the test VI used to get that 48kS/s. 

0 Kudos
Message 6 of 7
(5,004 Views)

The 6009 can do hardware-timed analog acquisitions...hence the 48kS/s.  (I think that's a single-channel spec)  So in order to do that, set up your analog acquisition task as hardware-timed and then poll at some kind of reasonable loop rate.  It sounds like you're doing single-point acquisition instead of hardware-timed acquisition.  You'll get much higher sampling rates -- as well as much more reliable timing -- if you use the onboard clock.

 

Go under "Help...Find Examples...Hardware input and output...DAQmx...analog measurements...voltage..." and look at some of the example programs there.  That will show you how to perform a hardware-timed continuous (or finite) acquisition.

 

Hope that's helpful.

0 Kudos
Message 7 of 7
(5,000 Views)