08-10-2016 05:20 PM - edited 08-10-2016 05:20 PM
@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.
08-10-2016 05:26 PM
Yeah, I'm already aware about that problem. I'm trying to discover as many interesting facts as possible to do "robust" works.
08-10-2016 05:26 PM - edited 08-10-2016 05:30 PM
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.
08-10-2016 07:27 PM
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.
08-10-2016 08:24 PM
@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.
08-11-2016 10:36 AM - edited 08-11-2016 10:39 AM
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 😉
08-11-2016 10:40 AM
That seems to be very interesting. I'll try to have a look at it. Thank you