LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two USB devices make Labview crawl

Solved!
Go to solution

Hi,

 

I have a system with two USB-6221 (OEM) cards, connected to the PC on a shared USB cable.  The PC has a Pentium 4 3GHz with 2GB Ram, running Windows XP Pro SP3.  I am building the software in LabView 8.2.1. 

 

Each USB-6221 card is connected to two analogue inputs and two quadrature encoder inputs - four of each for the whole system.  The plan is ultimately to have independent measurement / data recording capability for each analogue/encoder pair.  

 

Each signal exists as a Global Virtual Channel in MAX.  I have one VI managing data acquisition for each card.  Each VI links the two analogue channels for its card into one task, and puts each encoder signal into separate tasks.  (I know of no other way to group them.) These three tasks share the same on-board sample clock.  Triggering is set from the analogue input start signal.  

 

Each task has DAQmx read functions to extract data at 1kHz.  The three streams of data are split into two identical queues, one for each analogue/encoder signal pair.  The queues are processed elsewhere in the same VI, only recording to disk when a flag is set. 

 

The two acquisition VI's are identical, but I have ensured that the device and channel settings are different, and even the names of internal variable, indicators, etc are different.  There are a number of Global and Local variables in use, some accessed by both VI's.  There is also an DataSocket link to an external device, from which data is read by these and other VI's.  

 

Now the problem.  When both of these acquisition VI's are running the entire LabView environment slows down enormously.  The PC processor is only 20-30% loaded, there is plenty of memory available, the ethernet DataSocket link has plenty of bandwidth available, but the system grinds almost to a halt.  It does keep going, but very slowly.  

 

With only one (either, it doesn't matter which) of the acquisition VI's running, all is well and I get full speed performance.   Any ideas out there?

 

Thanks,

Ian

0 Kudos
Message 1 of 5
(3,564 Views)
Solution
Accepted by topic author IanDeaville(ZF)
Take a look at this http://zone.ni.com/devzone/cda/epd/p/id/192#0requirements it may help you out


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 2 of 5
(3,537 Views)
That's great, many thanks.  Execution does still slow a little, but nowhere as much as it had before. 
0 Kudos
Message 3 of 5
(3,509 Views)

Is there any difference in the speed of the acquisition if the USB devices are configured as Virtual Channels, rather than Physical Channels?  I have seen acquisitions using Virtual Channels run much slower or appear to be limted by a minimum sample/second floor in order to maintain efficient acquisition.

The example provided uses Physical Channels but the problem reported mentions Virtual Channels.

0 Kudos
Message 4 of 5
(3,389 Views)
I implemented the spirit of the suggestion, but with my system using virtual channels.  It works fine for me.  I can't talk about the relative speed between physical & virtual channels, but I wouldn't expect anything significant. 
0 Kudos
Message 5 of 5
(3,344 Views)