Hi all,
Does anyone know if there is a way in VEE to call a function, pass a couple variables and keep the function alive?
As an example, I make a small python script that in the main I'm asking for 2 hex numbers. So from a cmd shell I could write "C:\Users\me\Desktop\Python>Python MY_script.py 0x0A 0x06" and the program starts up, writes the variables then closes. That is also possible using the Execute PC function in the same way. (See Below)
The problem I am running into is the time python takes to launch/initialize/run/close. Is there some clever keep alive statement or in VEE a way to interact with a handle in python or any language where I can use a while loop or something similar?
Thanks,
Rob
By "function" I assume that you actually mean "process" - i.e. an external program not tied to VEE. In which case one very easy way is to start the program in the background using Execute Program and then use a socket to communicate with the running program (To/From Socket in VEE). Or use file IO if you prefer. Either way your program stays alive so avoids the startup overhead. You'll want to set a very simple protocol, likely including a "kill" command.
Post your query over in VRF and you'll likely get an example or two.
Stan