LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview the loop time of compiled exe is unstable

Hello everyone,

Recently, I find a problem about the loop time of compiled exe file.

PC system: windows 11 22h2

Labview: 2020 f2

 

I created a simple vi to see the loop times by using the default setting of the "time loop".

1.png2.png

If I run in the vi state, these loop times are very stable around 50ms +- 1,2 ms.

3.png

However, when I compile this vi to be the .exe file, the loop times are very unstable.

4.png

 

The unstable situation is found after win10 21H2 was updated to 22H2.

I have tried to update windows and Labview. Also, to re-install runtime engines is done.

The problem is still there now.

Have anyone other suggestions for me? Thank you.

0 Kudos
Message 1 of 7
(1,783 Views)

Windows OS is non-RTOS and hence it will NOT result in deterministic timing.

 

Timed Loop is intended for applications running on RTOS like pharlap or linux RTOS, it is not logical to expect it to work deterministically on regular Windows OS.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 7
(1,768 Views)

That would be fair santo_13 if they weren't running from the dev environment and the exe on the same system; same OS kernel and thread scheduling. Wouldn't expect that terrible of a performance difference between dev environment and the run-time especially on the same machine.

 

We've got someone in support that has Windows 11 on their system, we'll poke at it next week and see what we can find.

Message 3 of 7
(1,755 Views)

checkfu@itri.org.tw wrote:

Hello everyone,

Recently, I find a problem about the loop time of compiled exe file.

PC system: windows 11 22h2

Labview: 2020 f2

 

I created a simple vi to see the loop times by using the default setting of the "time loop".

1.png2.png

If I run in the vi state, these loop times are very stable around 50ms +- 1,2 ms.

3.png

However, when I compile this vi to be the .exe file, the loop times are very unstable.

4.png

 

The unstable situation is found after win10 21H2 was updated to 22H2.

I have tried to update windows and Labview. Also, to re-install runtime engines is done.

The problem is still there now.

Have anyone other suggestions for me? Thank you.


You mention in one place that the PC is running Win11 and in another it is running Win10.  The Win11/LV2020 combo isn't officially supported, and I read that the compatibility is more of an issue with Win10/Win11 than with most unofficial combos (although I still have trouble believing this to be the issue here).  Which is it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(1,735 Views)

checkfu@itri.org.tw wrote:

The unstable situation is found after win10 21H2 was updated to 22H2..


Well, so Microsoft broke something. 😄

 

  • As a first step, attach your VI and your built exe so we can try on various machines. (OS, hardware, etc.).
  • Do you run the exe on the same hardware as the development system?
  • What does the "iteration duration" data node say? (picture)
  • why don't you use the high resolution relative seconds to avoid the quantization to whole milliseconds? (picture)
  • Does it work better if you only have one or two time loops?
  • How many cores do you have? How much RAM? What's the CPU model?
  • What was the CPU use during the exe run? Especially after a fresh upgrade or during update checks, windows does a lot of maintenance and things slow down overall.
  • Does the situation improve after a few runs or after running for a while?
  • etc.

 

altenbach_0-1673108226226.png

 

 

0 Kudos
Message 5 of 7
(1,713 Views)

Thank you for your reply.

Due to the developed program, I find the compiled file on win10 21H2 is well done, and the loop time will stay around 50ms. But after I upgraded the PC sys to win10 22H2 and win11 22H2, the loop time of compiled .exe files will be unstable around 50~400 ms. So, I try to use the simple 3 loops to see what happened.

PC HW: i5-8265U, 16GB ram

 

However, I took the developed program (.exe) to another PC(win10 22H2, labview 2013 installed, 2015 2017 2018 2019 2020 sp1 run-time installed),

in the beginning, the test .exe file can stay around 50ms, after I closed and re-run the same .exe. file,

the same unstable result would be saw again.

PC HW: i7-6500U, 16GB ram 

 

  • As a first step, attach your VI and your built exe so we can try on various machines. (OS, hardware, etc.).
    • yes, I had tried. The bad result could be saw.
  • Do you run the exe on the same hardware as the development system?
    • yes.
  • What does the "iteration duration" data node say? (picture)
    • iteration duration 0~3.7, shown as below.
  • why don't you use the high resolution relative seconds to avoid the quantization to whole milliseconds? (picture)
    • I just try it. The same result as using tick count.
  • Does it work better if you only have one or two time loops?
    • No, one or two time loops in .exe file is still unstable. Only stay good in .vi state.
  • How many cores do you have? How much RAM? What's the CPU model?
    • CPU: i5-8265U (4 cores) 16GB ram
  • What was the CPU use during the exe run? Especially after a fresh upgrade or during update checks, windows does a lot of maintenance and things slow down overall.
    • CPU use 0.4~1.1% in .vi state. In .exe, CPU use 0~0.7 %, ram use 44MB.
  • Does the situation improve after a few runs or after running for a while?
    • No. The same unstable loop-time is continuous.
  • etc.

 

6.png

0 Kudos
Message 6 of 7
(1,580 Views)

@billko  已寫:


You mention in one place that the PC is running Win11 and in another it is running Win10.  The Win11/LV2020 combo isn't officially supported, and I read that the compatibility is more of an issue with Win10/Win11 than with most unofficial combos (although I still have trouble believing this to be the issue here).  Which is it?


I found the problem after I upgraded win10 21H2 to win10 22H2.

The loop-time of the .exe test file stays unstable in 50 ~ 400ms.

However, I tried to remove and install LV2020 and Run-time engines (19sp1 ~ 22Q3 f1).

This issue can still be there.

So, I upgraded win10 22H2 to win11 22H2. The result is still bad.

Only, the loop-time of test .vi file can be stable in 49~51ms. (no matter in win10 22H2 or win11 22H2)

0 Kudos
Message 7 of 7
(1,575 Views)