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: 

can i edit my program while the program is running?

With some programming languages you can pause the program while it's running, make a change to it and continue. This feature would be very usefull to me. Does anyone know a routine to accomplish this in LabView?
Thanks
Dusty
0 Kudos
Message 1 of 13
(3,034 Views)
I really know of no way of doing this, because you are either in run mode or in edit mode. You can do some debugging but not like that. If someone else out there knows of a way to do that then I would like to know also.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 13
(3,024 Views)
Hello Dusty,

there's a way to do that: You can edit all those subvi's that you call by reference from a (running) main vi.

Hope this helps,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 13
(3,021 Views)
But if he is not calling any subvi's by reference then he cannot. lets say his code is running then he realizes he needed to add 1 instead of subtract 1 then he cannot pause the code and change this. Correct



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 13
(3,021 Views)
Thanks for the response,
however GerdW I do not understand what you are saying. I was looking for a way to "Pause" the program while running and edit some constant or something in the program and start it back up again.
Thanks
Dusty
0 Kudos
Message 5 of 13
(3,021 Views)
jhoskins, you got it right, thats what i want to do
0 Kudos
Message 6 of 13
(3,019 Views)
Hello Dusty,

I have a program with some filter routines in a library. The user can select one of the filters and process data with it.

Because of the "call by reference" I can edit those filters while the main vi is running. And I can even add or delete the filters, as the main vi has a "scan" routine to check for new filters... I thought such a mechanism could be helpful to you.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(3,011 Views)
Hey GerdW I would like to know how you did that. I would find this very useful



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 8 of 13
(3,006 Views)
GerdW,
Are you saying that the main.vi will not call your filter subvi until a user selects a specific vi to run?
0 Kudos
Message 9 of 13
(3,001 Views)
The short answer, once again, is that you can't pause the VI in the middle and change a constant. You can't change code that's "running" or "waiting to run". If you want to change a value during development, you should have it as control until you've determined the proper value for it. There are ways of manipulating objects on the BD programmatically, but it's not supported by NI and you probably don't want to go into that for something as small as this.

___________________
Try to take over the world!
0 Kudos
Message 10 of 13
(2,887 Views)