Ton Plomp Posted December 17, 2010 Report Share Posted December 17, 2010 I try to use the standard LabVIEW systemexec.vi with a timeout and wrote a little wrapper around the VI: However this is not functioning as expected, the AbortVI returns an error 1000: The VI is not in a state compatible with this operation. This error can occur for several reasons. This error can occur if you attempt to edit a VI that is running or reserved for running. This error also can occur if you attempt to open a reference to a VI that is running or reserved for running. A VI is reserved for running when you open a reference to the VI by wiring a type specifier VI Refnum to the Open VI Reference function, or when you have a Static VI Reference linked to the VI within a running VI. This error also can occur if you try to run a VI using the run method while the target VI is running or reserved for running. To correct this error, ensure the target VI is idle or reentrant. If it is reentrant, use the Open VI Reference function with the options input set to 0x08 to prepare the VI for reentrant run or use the Open VI Reference function with the type specifier VI Refnum wired to a strictly typed VI reference. This error also can occur if you attempt to obtain a VI's image while the VI is being modified programmatically. Wait until the VI is not being modified to get the image of a panel or diagram. The only thing I found was a thread of last year, that concluded in a taskkill. EDIT: At the dark side there is a discussion. This has a solution where the command is run asynchronously and the output is written to a temporary file that is read the function times out, not something I am looking forward to do. Anyone ever looked at this? Ton Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.