LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exe file runs slowly than VI in LabVIEW

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

 

0 Kudos
Message 1 of 6
(231 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(211 Views)

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.

Download All
0 Kudos
Message 3 of 6
(199 Views)

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?

 

  • Are those subVIs set to reentrant?
  • Do you set default values in the VISA references so the executable starts with valid VISA references?
  • I don't see any error handling in the image: are there any errors when you run the executable? (Implement at least some error cluster indicators!)

 

I'm on LV2019, so I cannot look into your VI right now. (Please consider downconversion before attaching the next VI…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(190 Views)

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:

  • for now subVIs are not reentrant, but i tried every variant
  • no, there is no errors while VI execution
0 Kudos
Message 5 of 6
(184 Views)

Jay14159265_0-1734707465228.png

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