From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if the LabView program running in the background got errors without opening LabView window

Solved!
Go to solution

Hi Everyone!

 

Am a newbie to LabView.

I have developed a recursive program that keeps running until its stopped. I have connected the test setup to my PC where I do other stuffs as well. 

So what I do is, click RUN in the LabView window, program starts running and I keep doing other works. I check whether the program is running without any errors once in a while. But sometimes I forget to check and it happens to show pop-ups explaining some error has occurred and can it STOP or CONTINUE. 

Since the whole program is on the background, am not able to track when the error actually occurred.

Is there a way to show pop-up if any errors have occurred in the background LabView program that is running while doing other stuffs in the PC?

 

Thanks!

 

0 Kudos
Message 1 of 7
(2,868 Views)

Hi Tsbsr,

 

when those "continue or stop" dialogs pop up then you forgot to implement decent error handling…

That being said: yes, you can handle errors on your own and you can do, whatever you think has to be done!

Best regards,
GerdW


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

Hi GerdW,

 

Thanks for your reply.

Yes I know that I should do some error handling but its not a consistent error. Am doing lots of I2C reads and file write each second but most of the time everything looks good.

how do I know if the VI is running or halted without visiting it?

 

Thanks!

0 Kudos
Message 3 of 7
(2,842 Views)

You could try using the Debugging Window.  Call it using this:

 

post-26690-0-29574300-1383075583.png

 

Any string you input will write to the debugging window which pops-up on first call.  It looks like this:

 

DbgPrintf window

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



Message 4 of 7
(2,814 Views)
Solution
Accepted by topic author TSBSR

Hi TSBSR,

 

but its not a consistent error. … but most of the time everything looks good.

So because the error is not popping up with each iteration of your loop you can dismiss any error handling? Fail!

Especially when such errors only occur once in a while you want to know the (possible) reasons with some additional information!

 

how do I know if the VI is running or halted without visiting it?

Implement some error handling so your VI will never "halt"…

 

Btw. Q's debug window function only works in the IDE, in an executable the debug window will not open… (Atleast it did so when I tested it with LV2011.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(2,801 Views)

Thanks GerdW for your inputs!

I did code review and found 2 bugs. Solved it and now my setup is alive for 2 days in a stretch.

 

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

Thanks Q for your inputs but I wasnt able to try it out

0 Kudos
Message 7 of 7
(2,754 Views)