Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming USB6000 DAQ to generate signals, without LabView

Solved!
Go to solution

Hello,

[context]

I am using a USB6000 DAQ to acquire analog signals *without Labview* (I don't even have a LabView license). I am using the DAQmx .NET SDK, it works pretty well in a custom software.

 

[problem]

Now, I want to program output signals, precisely bursts of <n> square pulses (TTLs).

As far as I understand, I have to create a Task to describe the signal (a serie of square pulses) and launch the task (to start the generation)

 

[questions]

-My questions are :

-Can I do that without LabView ?

-Do I need a license of Measurement studio ?

-Can I create the task programmatically (and how) ?

-Is there a free GUI to create such tasks, save them in a file, and just load the file to create the task in the final software that is using the board ?

-Will it run on a PC without any NI license ? (Neither LabView nor Measurement Studio) ?

 

0 Kudos
Message 1 of 9
(4,102 Views)

I have been pointed to NI-MAX (Measurement and Acquisition Explorer) to create tasks.

 

0 Kudos
Message 2 of 9
(4,064 Views)

@pierrechatelier wrote:

[problem]

Now, I want to program output signals, precisely bursts of <n> square pulses (TTLs).

As far as I understand, I have to create a Task to describe the signal (a serie of square pulses) and launch the task (to start the generation)

 


You might still have a problem with precisely timed square pulses, the USB 6000 DIO is software-timed.  You might need a DAQ device that has hardware-timed DIO.

 

0 Kudos
Message 3 of 9
(4,058 Views)

Interesting, I was not aware of that point.

But where in the documentation of USB-6000 is it stated that it's software-timed output ?

How can I identify a DAQ board with hardware-timed output ?

What is the average time precision of a software-timed task output (my goal is to work at the ms level, not below) ?

0 Kudos
Message 4 of 9
(4,055 Views)

Since NI redesigned their site a few years ago I find it harder to find information.  So it might be easier to call NI than to look at every product description.  I don't see an easy way to sort products by hardware-timed DIO.

 

When using software-timing with LabVIEW on a windows machine I think you can expect around 15ms.  It all depends on what windows is or is not doing at the time and how your program is written.  But since you said you are not using LabVIEW I have no idea what you should expect.

 

Here is some info about the USB-6000

http://www.ni.com/documentation/en/multifunction-io-device/latest/usb-6000/overview/

 

The USB-6221 has hardware timed DIO

http://www.ni.com/documentation/en/multifunction-io-device/latest/usb-6221/overview/

 

It looks like the 62xx series usb has hardware timing as well

http://www.ni.com/pdf/products/us/cat_usbmseries_625x.pdf

0 Kudos
Message 5 of 9
(4,051 Views)

Thanks for the useful information.

However, when you talk about 15ms, is it :

-some estimated average time for the output signal to change a value ?

-some estimated average time for the output signal to start a task ?

 

When describing the signal that the Task must emit, I expect the clock to be the inner clock (around 10kHz for USB6000 if I recall well). Thus I expected the signal granularity to be about 0.1 ms once the task is started and emitting continuously the same signal pattern.

 

Can you just point me to some resource highlighting the visible difference between software and hardware-timed behaviours ?

 

0 Kudos
Message 6 of 9
(4,047 Views)

I mean :

I generally understand how the software-timed will behave if I were to programmatically feed samples to emit while the task is running.
But In my case, I want to feed the task with a cycle of signal and make the task emit that cycle continuously. I expect the board to no rely on a software callback to schedule the cycles.
And thus, I think the software-based timing will not be a problem in such a configuration.

Am I right ?

0 Kudos
Message 7 of 9
(4,043 Views)

The 10kS/s is for the analog input sample rate.  The onboard counter has a 5MHz input frequency, but you cannot use it for output on this device.  So the digital output is software timed for this device and that means you can only change the output as fast as your program runs.  Some of the links below should explain it better.

 

 

Here is a white paper on the "Top 10 Considerations for Your High-Speed Digital Application".

http://www.ni.com/white-paper/8087/en/

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9QiSAK

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kHInSAM

 

 

0 Kudos
Message 8 of 9
(4,041 Views)
Solution
Accepted by topic author pierrechatelier

@pierrechatelier wrote:

I want to feed the task with a cycle of signal and make the task emit that cycle continuously.


You will need a board with hardware timing.  The hardware-timed boards have a buffer that you can fill with your signal that you can repeat.  The 6000 does not have a buffer or an onboard timer, so you have to programmatically feed each sample to it.

0 Kudos
Message 9 of 9
(4,039 Views)