problem wih vi.run
Ananda Regmi
aregmi at gmail.com
Wed Aug 31 19:38:09 EDT 2005
Hello Everybody,
I am running into a strange problem while running a vi through python.
Below is my sample code.
lv = win32com.client.Dispatch("LabVIEW.Application.7.1")
file_path = 'C:\\Documents and Settings\\administrator\\My Documents\\Python
Files\\testvi.vi'
vi=lv.GetVIReference(file_path)
vi.Run # it stays in this line until the vi finishes running.
When the execution reached the above line, it gets stuck there. It proceeds
to the next line of code only after the vi finishes running. But, I need to
change some control value in the Run-Time of the vi. I was wondering if
there is any option to select before running the VI which can distinguish
between completely running the vi and just starting the vi to run and going
to the next line of script.
I tried using vi.Run(1), vi.Run(), and vi.Run(0). In all of the above cases,
python execution gets stuck at very same place, the VI gets executed, and
when it finishes running, I get an error in Python IDLE saying "'NoneType'
object is not callable labview" and does not go any further.
I was also wondering, if vi.Run(1) is the right way to do it and if I need
some extra code to avoid that error and run it the way I want to run it.
I really appreciate your help.
Thanks,
Ananda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050831/7b04ceac/attachment.html>
More information about the Python-list
mailing list