Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DIO as Arbitrary Waveform Gen but limited by loop iteration of 1ms

Hi, i tried using a FOR loop to read out a set of data (spaced out at 0.1ms interval) from a file and converting it to Boolean before sending them to a DIO card to generate a arbitrary waveform. But found out the each loop took 1ms to execute and ended up with a waveform that is 10x slower. I tried using pxie and USB DIO cards but the FOR loop still executes at 1 loop per ms.

 

How can i make each FOR loop execute faster? Should i use a Waveform Generator card instead or switch to LV CVI? 

 

 

0 Kudos
Message 1 of 6
(1,536 Views)

Foremost - DONOT use the DAQ assistant to generate anything. Please use DAQmx drivers instead. You're limited by a lot using the DAQassistant.

Second - DONOT post images, attach the actual VI preferably in 2016 format so that most forum users can open it

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(1,526 Views)

I think the limitation is the USB overall communication interval of 1 kHz or 1 msec. 

 

I am also interested in being able to send out a digital line change from a software command and have it change state in less than 1 msec.  I do not need repetitive or waveform changes, once in a while is enough. 

 

Would the handshake lines of a USB serial port adapter respond quicker ?

 

Would a USB-C device if it exists be faster ?

 

0 Kudos
Message 3 of 6
(1,387 Views)

The limitation is not the USB itself but rather the overhead in terms of OS, driver etc., and only for software timed DIO.

 

If you were to go with hardware-timed DO, you can easily go up to 10MHz rate if streamed from FIFO and up to 1MHz if streamed from memory (like USB-6363)

santo_13_0-1647571661489.png

 

There are no USB DAQ devices that use USB 3.0 or USB C.

 

Updating 1 sample at a time is not the best approach and you might have to rethink your application better.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 6
(1,381 Views)

I cannot use waveform for my application.  I am monitoring analog channels continuously and need to change a digital output line when certain conditions based on the analog measurement occurs.  It is a fault monitoring application.  My digital line is High/On when there is no fault and needs to be changed to Low/Off when a fault is detected.

 

0 Kudos
Message 5 of 6
(1,378 Views)

In that case, you would need to implement it in an FPGA to guaranteed response time or on RTOS.

 

Given you run on Windows OS, if the OS is busy doing something or hangs, your fault monitoring application cannot read or respond to a change.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 6
(1,374 Views)