LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my first set of acquisitions slow?

I am writing a LabVIEW Real-time application that takes in multiple digital and analog inputs (accurate timing not necessary) and outputs a good number of digital and analog signals, in an effort to emulate a system that we don't have available yet.  My problem is this:  I have setup all the signals in NI-MAX.  Now when I start the application, it takes about 30 seconds for the acqusition/outputs to work properly.  Also, the first time I change an output, it doesn't work right the first time.  Subsequent calls are usually great, but that first one is proving to be annoying...
 
Any ideas?  I'm using NI-DAQ 7.4...
 
Dan Marlow
General Dynamics Land Systems
0 Kudos
Message 1 of 7
(2,539 Views)
Dan,
 
One thing that came to my mind is if your doing an analog measurement with a DMM, they do take a longer time for the first measurement than all subsequent measurments.  I ran into the same thing when doing DMM measurements and I cant remember a reason but this is just inherint to ni DMMs,  or at least the 4060 which I used.  If you are using a DMM you'll notice that the chassis controller light doesn't blink at first and after the first DMM call it will continue blinking, this is because it will continue to keep the DMM "warmed up" so subsequent calls will be quicker.
 
Brian
0 Kudos
Message 2 of 7
(2,525 Views)
I'm not using a DMM card.  Just a simple AI card, in addition to a multi-function I/O card and a 6515 for discrete I/O. 
0 Kudos
Message 3 of 7
(2,519 Views)

Hello Dan,

It is a known issue that some functions take longer in RT than in Windows.  R&D is looking into this issue and will make a fix in a future version of NI-DAQ.  In the meantime, it is much faster to programmatically create tasks in LabVIEW than it is to use tasks or virtual channels created in MAX.

Try programmatically setting up your tasks in LabVIEW and see if that improves your performance.
 
I hope this helps.  Let me know if you have any further questions.
 
Regards,
Sean C.
0 Kudos
Message 4 of 7
(2,503 Views)
I have the same proble.  Im using a PXI- 6071E, and my instrument is NI PXI-1042.  I am just trying to simulate one signal and it is soo slow.  I dont know why. When I run labVIEW in the RT execution mode its very slow and sometimes it will pause the signal.  I was not sure by what one of the authors meant by writing your tasks in labvIEW.
 
Whats the difference between the Viritual Channel DAQmx Vi, and just using the DAQ from the inputs bottom in the block diagram Function Panel?
0 Kudos
Message 5 of 7
(2,486 Views)

I believe that Sean C. was referring to creating tasks at run-time using the DAQmx Create Virtual Channel VI and then using the outputs with the read and write DAQmx VIs, rather than setting up my channels in NI-MAX and using their names as the inputs to the read and write DAQmx VIs.  It apparently takes less load time for the former than the latter. 

Please excuse my confusion with your question: "Whats the difference between the Viritual Channel DAQmx Vi, and just using the DAQ from the inputs bottom in the block diagram Function Panel?"  I'm not sure what you mean by the "DAQ from the inputs bottom in the block diagram Function Panel".  By using the DAQmx Create Virtual Channel VI, you are creating tasks at run-time.  Otherwise, LabVIEW and NI-DAQmx have to go to MAX to find out whether the channels you specified are legal, and their specifics.  Apparently, this interface takes more time (especially with a large number of channels, such as I have) than creating the tasks programmatically. 
 
As far as your problem with only a single channel to acquire...I couldn't begin to suggest where you might be going wrong without looking at your VI.  Make sure that your channel is indeed slow and pausing.  Don't rely on what the screen says while running the program on a remote system.  You may be acquiring data so fast that the screen cannot be redrawn fast enough. 

 

0 Kudos
Message 6 of 7
(2,469 Views)
According to what I have understood and to my experience, for using Viritual Channel DAQmx Vi you need a DAQmx driver. The other option would be designing a vi which helps in providing the same functionality as DAQmx driver. I belive that using Viritual Channel DAQmx vi is easier compared to deising the whole VI for DAQ funcaitonality. Hope this helps!
0 Kudos
Message 7 of 7
(2,442 Views)