Hi,
I have a Python script that (apart from a bunch of other stuff) opens and starts a Labview Vi in WIn XP, filling in its fields via COM interface (win32com.client library).
When the scripts launches the Vi, execution control is passed to that one, and the script pauses, until the Vi stops.
What I would like to obtain is the following:
1) The script runs the Vi
2) Vi starts, goes in background, and execution resumes on the script
3) I do other stuff on the script, like acting on the running Vi buttons.
I tried setting the "Wait until done" method on the Vi, but I guess I am not doing it correctly.
Can anybody tell me how to do it?
I would like to avoid multithreading programming and I guess it is not really necessary here.
I paste below some lines of my python script.
Ciao and thanks in advance, Leodp
import win32com.client
labview = win32com.client.Dispatch("Labview.Application")
VI = labview.getvireference(r"\\Path_to\my.vi")
VI.OpenFrontPanel
# does not work VI.WaitUntilDone
VI.Run
# script should continue, with my.vi still running
VI.SetControlValue('Tab Control',0)
VI.SetControlValue('last row to read in xls',126)
# and so on