12-19-2024 10:04 AM - edited 12-19-2024 10:09 AM
I've created VI that grabs data from several DMMs Siglent SDM3065x and handles several electronic loads and power supply. All devices are connected via USB.In Labview IDE everything works perfectly, but when i build an executable and open them on the same PC, communication with DMMs slows 5-10 times. I tried all optimization strategies which i found here on forum and on NI website. Debugging is off.
To ensure that there is no problem in my VI which is pretty big and complicated i've created a small VI which uses only SDM3065x drivers from here . In this VI i just configured several DMMs and use Read (Single Point) VI to collect measurements from them in while loop. The problem still exist. My suggestion is that something is wrong with VISA drivers and every query to any DMM takes a long time but i have no idea why everything is works great in LabVIEW.. By the way i also checked communication with only power supply and it works very quickly as it should be. Electronic loads don't use VISA driver, they are connected as COM-port devices and works quickly as well. Please give me some ideas
12-20-2024 12:57 AM
Hi Eugene,
@EugeneNeva wrote:
To ensure that there is no problem in my VI which is pretty big and complicated
Maybe the problem is described in your sentence…
How should we suggest improvements when you don't show the current state of your code?
12-20-2024 01:31 AM
it would make sense if i tried only with my VI. But as i said i've created a small VI which only configures DMMs and read data from them in while loop. Block diagram attached. And with it the problem is the same. It works quickly in IDE but when i build an exe file it significantly slows down.
12-20-2024 02:10 AM - edited 12-20-2024 02:11 AM
Hi Eugene,
@EugeneNeva wrote:
it would make sense if i tried only with my VI. But as i said i've created a small VI which only configures DMMs and read data from them in while loop. Block diagram attached. And with it the problem is the same. It works quickly in IDE but when i build an exe file it significantly slows down.
Could you measure the loop iteration time and so define the "significant slow down" with numbers?
I'm on LV2019, so I cannot look into your VI right now. (Please consider downconversion before attaching the next VI…)
12-20-2024 02:20 AM - edited 12-20-2024 02:24 AM
Now i measured time for acquiring data from 3 DMMs in one loop and it's aroud 0.5s for LabVIEW and around 2s for exe. And what the most interesting thing. I found that if i build exe on my desktop PC and run it on my laptop, exe runs slowly, but if i build exe on the laptop and run it on the same laptop - everything works as fast as in LabVIEW. It's quite good result, but strange anyway.
As for other questions:
12-20-2024 09:18 AM
This is no good. You should have one loop for each Read Vi. In general, if you have more than one error wire entering a loop, you should re-think what you are expecting to happen in that loop. In this case, which read do you expect to execute first? Because they are all in the same loop the loop can not iterate until each VI has completed execution, which might be desired. If so, you sh