LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow DAQ assisatnt with events

Solved!
Go to solution

I have a question about DAQ assistant. I am currently programing some automation application with at least 8 simultenously FOR loops and i am using 3 different AD/DA converters. My problem is that when i work with NI DAQ assistant (NI USB 6229) in this program and i comunicate between loops using event wires (structure), the loop where is DAQ assistant component really slow down. I mean i cycle per 3 seconds, this one is really killing me because everything else is really fast enough and only this one is slow (other two AD/DA converters are ok, they are not NI). Have you any idea where can be a problem and what to do, to speed up my application?

0 Kudos
Message 1 of 7
(3,032 Views)

We would really need to see your code to give you advice about any performance issues you are experiencing.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 7
(3,031 Views)

Thank you for fast reply. But as usual i found solution right now after almost 12 hours searching in my code. Problem was in local variables because i use stop button from one loop to stopp other loops using local variables. And that was problem, right now everything looks good. But i still dont know why something like local variable can slow everything so drastically. I know that property nodes can do that so i dont use them but local variable should be ok i think.

0 Kudos
Message 3 of 7
(3,026 Views)

Hi BMAJTZ,

 

I think so, the local variables are the simpliest solution to communicate between loops and there is no (significatly) limited perfomce with them.

Did you change any other thing in your code?

 

As I know, the DAQ Assistant has worse performance properties. DAQ Assistant is good for developing applications quickly, but in the final application you should replace them with normal DAQmx task. You can do this in some simple steps, you just should right-click on the DAQ Assistant icon on block diagramm and chose "Generate NI-DAQmx Code". You will get an initialization part, a code within a while loop and a task closing part. For more better performance you should place a DAQmx Start Task.vi before the while loop and a DAQmx Stop Task.vi after the while loop. Without them the DAQmx Read or Write (within the loop) will start and stop the task in every iteration.

 

I hope this will help you to increase efficience of you program.

 

Regards,

Peter

Peter Vago
0 Kudos
Message 4 of 7
(3,007 Views)
Solution
Accepted by topic author BMAJTZ

Sounds like a race condition, your local variables read an old value causing some loop to stop as you start the program. If using locals to stop several loops it's quite important to make sure they're initialized correctly at the start of the program.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(3,005 Views)

Helo, i dont wat to make new thrade for this questin so i will write it here. When i stop my program than block diagram starts blinking and pause button is pressed. I think that this is some kind of option but i dont know where to close it. It is really disturbing, can you please tell ¨me where to close this?

0 Kudos
Message 6 of 7
(2,992 Views)

Check your Breakpoint manager and/or probes, either you have a breakpoint on a full structure (if you dont see any red dots) or you're probing some error wire and have Halt on error active.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(2,978 Views)