LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous i/o with dt-lv link

I am trying to perform simultaneous AtoD and DtoA using at DT9834 USB module and DT-LV Link. I've programmed the two functions in separate threads (AtoD in a while loop and DtoA in a timed loop). Occasionally I get a problem where the AtoD seems to lose one or more whole blocks of data. The data rate is well within the bandwidth for USB2.0 (about 400 kbytes/sec in total). Has anyone experienced anything like this or have suggestions on how to do simultaneous i/o with DT-LV Link?
 
Thanks
 
0 Kudos
Message 1 of 3
(2,380 Views)



Hi Colin

I am unsure whther this is an issue relating to the DT hardware you are using, and it might therefore be worthwhile contacting DT for support. It seems strange that your A to D acquisition is missing sparadic blocks of data which indicates to me that your hardware may not like the simultaneous threading. However, it is definitely worthwhile to investigate the software side of your acquisition and there are a couple of common issues which could be causing you problems. Firstly, the  DATX functions correspond to the DAQmx functions provided in LabVIEW. Have you compared your code to the examples shipped with your copy of LabVIEW? The examples help to stear you away from common issues which affect the quality and speed of any DAQ task. For example, do you have any equivalent Timing and Create Channel VI's inside you while loop in the A to D thread? This would slow your task performance because your system would have to be constantly calling and reinitialising the task and the timing sequence. Also check that you have included timing delays in your loop. It is good programming practice to place small timing delays in the loop so that the PC runs the thread at a consistent rate, and not at the maximum speed that the PC can provide.This prevents resource deprevation which helps to reduce the effects of dithering on the USB bus. I would definitely advise you to check out the examples (Help Menu>> Find Examples) and to implement timing delays in your loop, fusing the 'Wait Until Next ms Multiple' VI for example.

There are also some other important factors to consider. Are the two tasks reliant upon each other (i.e.stimulus response acquisition) or are they independent tasks? Are you running your program on a system with suitable specifications? What type of sampling (continuous, finite etc.) rates and sizes are you using? What version of LabVIEW are you utlising.

Let me know if any of this information is of use and keep me informed of your progress.

Thanks for contacting NI

Best wishes
 


Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
Message 2 of 3
(2,367 Views)

Rob L

Thanks for the speedy reply. My first attempt to resolve this issue was a call to DT but their suggestion that the USB bus was running out of bandwidth doesn't seem to apply here as the actual data rate (about 400k KBytes/sec) is well within the 4Mbyte/sec they say USB2.0 has. They then couldn't give any support for their DT-LV Link code.

I've started looking at the DATX vis in detail and the main vi which handles acquisition is in a continuous loop polling to see whether the allocated buffers have acquired the required number of data values. I may try putting a delay in that vi so that it is not continuously processing.

Re: your questions: I'm doing continuous AtoD 14 channels at 10Ksamples/sec; DtoA is intermittent currently only about 10 samples/sec although when I've solved this problem I want to be able to generate a continuous waveform. I'm running LabView 7.1 on a reasonably spec'd PC - 2.5GHz P4, 512MBytes memory, WIndows XP SP2.

When I just run the system performing AtoD only there are no problems.

I'll find the LabView samples you suggest and try comparing them.

Thanks

Colin

0 Kudos
Message 3 of 3
(2,361 Views)