LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB vs PCI analog output card

Hi All,

 

We are currently using a USB analog output DAQ card USB 6002 to control two channels of a galvo mirror. Speed, low latency and repetability are of utmost importance to us. We time the loop as we control as the output of the galvo mirrors. We have noticed that occasionally, it takes 2-3 ms extra for the voltages to be written to the galvo as compared to the average. This non-uniformity is not ideal for us. We would want the voltage writing operation to take the same amount of time. 

 

We are wondering if its an hardware issue? Should we get a PCI or a PCIe based analog output card for low latency? Any suggestions on this matter is appreciated. 

 

Thank you,

Avinash Kumar

0 Kudos
Message 1 of 4
(1,457 Views)

Hi Avinash,

 

First, you need to classify whether this 2-3ms extra is due to the windows OS and software loopback or the USB protocol being the bottleneck. I suspect that you are implementing some kind of PID or some control system decision making in the software and that is written back to the hardware. If this is the case, the 2-3ms will be present always unless you implement your algorithm on an FPGA.

 

Please share your code to understand the way you are using the DAQmx APIs.

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 4
(1,440 Views)

@kumaravi wrote:

Speed, low latency and repetability are of utmost importance to us.


Situations where speed, low latency, and repeatability (also called "determinism") are important suggests LabVIEW Real-Time, which uses a separate processor running a Real-Time Operating System (which Windows is not).  NI makes a number of these, including Single Board RIOs (sbRIO) and a "student" device called a myRIO which would probably fulfill your timing and latency requirements, but would require additional LabVIEW expertise (including an understanding of how to work with Real-Time systems and how to create and manage a LabVIEW Project that runs on two processors, the Host PC that handles all of the User interactions and the Real-Time Processor that handles all of the time-critical I/O with its attached hardware.

 

Bob Schor

0 Kudos
Message 3 of 4
(1,394 Views)

@kumaravi wrote:

Speed, low latency and repetability are of utmost importance to us. We time the loop as we control as the output of the galvo mirrors. We have noticed that occasionally, it takes 2-3 ms extra for the voltages to be written to the galvo as compared to the average. This non-uniformity is not ideal for us. We would want the voltage writing operation to take the same amount of time.


How are you controlling what the outputs should be?  Do you have a feedback that is read and adjust the output?  Or are you just trying to run waveforms?  As previously stated, showing some code would help us understand your situation and give more detailed advice.

 

Assuming a control algorithm with feedback, I would be looking at an FPGA based DAQ where the FPGA can do all of the control.  This will have the lowest latency and fastest speed.  But if you are just playing waveforms, you probably just need a DAQ with more memory so you can keep writing the waveform as it is played.  With enough buffer depth, you can easily overcome those 2-3ms hiccups Windows likes to do.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(1,387 Views)