Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx vi take long time to run first time they're called

I'm developing a Timer/Counter pulse generation vi, but it takes a very long time to set up (~4 sec) the first time the vi is run. After that it is pretty fast (~25ms). Does someone know why  ?
Jesus.
 
0 Kudos
Message 1 of 6
(3,878 Views)

Hello Jesus,

Four seconds seems slower than normal. Do you have this delay with an example from the Example Finder? (Help menu>>Find Examples) Browse Hardware Input and Output>>DAQmx>>Generating Digital Pulses.

What DAQ board are you using? What is your operating system? What version of DAQmx are you using?

What else do you have in your program? If you can, please find the smallest code that has this initial delay and post it to this forum. I will take a look at it to see what might be causing the delay. Have a great day!
 
Sincerely,
Marni S.
0 Kudos
Message 2 of 6
(3,862 Views)

Thanks Marni. I'm using a PCI-6602 Timer/Counter board on Windows 2000, NI-DAQmx v7.4,  but I've tried it also in my laptop with a DAQCard-6062E and got same results.

I've modified the code to show you only when the delay is happening, see attached. Remember this occurs only the 1st time a run the vi after just opening labview.

Thanks again.

JesusV.

0 Kudos
Message 3 of 6
(3,849 Views)
Dear Jesus,
 
When I ran your program on my E and M Series boards I got 125ms and 84ms. I have put in a request for a PCI-6602, to test that. Are you using LV RT? I have seen some issues with that. Do you have another board you can try? Does it happen in another computer? How old is your computer? How close to startup are you running this VI? If you have other programs running in the background, please shut them down. I will see what happens when I get a PCI-6602, but in the mean time please try the things I have mentioned. Have a great day!
 
Sincerely,
Marni S.
0 Kudos
Message 4 of 6
(3,834 Views)
I've tried in different PCs now, even a new Pentium4, 3.4GHZ, 2 GB RAM. And I've got kind of the same results (well the new PC gave me 2.5 sec result). All of them have been on Windows 2000 though. And I've run the vi on a PCI-6602 card, PCI-MIO-16E card and PCI-6115 card with no change, but remember that this happens only the first time I run the vi WITHOUT OPENING THE BLOCK DIAGRAM WINDOW. So, to make your test closer to mine do this:
 
- Completelly close labview.
- Open labview and open the vi front panel, DON'T OPEN THE BLOCK DIAGRAM.
- Run the vi.
 
I've noticed now that it takes long (about the same delay) the first time I open the block diagram, as if labview were slow loading those subvis.
 
Thanks.
Jesus.
 
0 Kudos
Message 5 of 6
(3,819 Views)

Dear Jesus,

The way you described it I get 254 msec. However, if I completely shut down my computer, restart, and then follow your instructions I get 6.134 seconds. I guess that is how long it takes my computer to load the DAQ drivers. To get around this, you could have an executable that runs with startup that does something easy in DAQ, like reset the driver. Please let me know if you have any questions. Have a great day!

Sincerely,

Marni S.

0 Kudos
Message 6 of 6
(3,804 Views)