LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify LabVIEW code while it is running

Solved!
Go to solution

@diegocava wrote:

I see, I was thinking that you were talking about some informatics-kind of danger. Thank you again for your help and time


Well what happens if while you are modifying the code remotely someone else is modifying the same code locally?

 

Only the last saved changes wins.

 

So either your changes get lost or the local users changes get lost, depending on who saved last.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 11 of 17
(1,290 Views)

Yeah, I'm already aware about that problem. I'm trying to discover as many interesting facts as possible to do "robust" works.

0 Kudos
Message 12 of 17
(1,287 Views)

Also think about this scenario.

 

You have an automated Widget test that test Widgets that run at 120 or 240 volts.

 

You modify the code and introduce an error that flips the Boolean on the 120/240 selection.

 

The operator who is currently testing 120 volt Widgets starts another test with the, unknown to him, now modified and buggy code.  

 

Now that 120 volt Widget gets powered up at 240 volts and blows up in the operators face.

 

If the operator had known the code he was running is untested, he might have taken more precautions.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 13 of 17
(1,286 Views)

Use source code control, such as git or subversion.  I prefer git, but either will work.  You can have a local copy on your machine and edit to your heart's content.  The copy on the remote machine will not change.  You then "push" your changes to the remote system to put your copy over there.  The benefit of this is your code can still be broken when someone else needs to run the current version.  Also, if someone else modifies the same code, the source code control will catch the double edit when you try to bring everything together so that you can fix it.

 

You also build a history of your changes and can revert back to a stable version if a change you make causes problems.  Source coe control will save you hours of frustration and provides that robust editing control that you need.

0 Kudos
Message 14 of 17
(1,275 Views)

@RTSLVU wrote:

But what you are doing is "dangerous" and you should not be remotely modifying code that is currently running on another machine.

 

Modify a copy, stop the running process, and run your new code.


Even better would to to use a Source Code Control software like GIT or SVN.  Then you can keep a history of your changes and revert to older code if needed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 17
(1,270 Views)



Even better would to to use a Source Code Control software like GIT or SVN.  Then you can keep a history of your changes and revert to older code if needed.


Full Ack!!

 

So , even when marked as solved:

Assume you have a EndOfLine-TestMC running LV and capable to test different devices.

If you need to update / add new subroutines for new devices/changed tests without stopping the TestMC:

(Say, you have a validated new subroutine OK 😉

You can use a vi-server approach, your main program can dynamicly load the needed vis and unload them when they are not needed anymore. Now you can update unloaded subroutines without stopping the main application. (But while the subroutine is running no update is done)

If the loading (main) vi keepd track of the vi history (say you use a version number in the vi name, and while loading you look for the highest version number and (because you stored the last called version/vi-name) you can even inform the enduser that a updated subroutine is used. 

The testprotocoll should log the actually used subroutines anyway 😉

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 16 of 17
(1,243 Views)

That seems to be very interesting. I'll try to have a look at it. Thank you 

0 Kudos
Message 17 of 17
(1,238 Views)