BryCoBat Posted January 25, 2006 Report Share Posted January 25, 2006 Is there some sort of setup that I need to do before I can call vi.Run()? I can use Call and Call2, but my vi really needs to just run in the background, and let me pick up values occasionally with GetControlValue(). Right now I do the following (not all in one place, it's a C# 2.0 WinForm app): // In classLabVIEW.Application lv;LabVIEW.VirtualInstrument vi;// In constructorlv = new LabVIEW.ApplicationClass();string vipath = @"PATH TO MY VI";vi = lv.GetVIReference(vipath, "", true, 0);vi.ShowFPOnLoad = true;// On a button click eventvi.Run(true); // Get an Exception here, error 6500. Call and Call2 work, but Run does not. This is all from the CallLV example code. Quote Link to comment
Jim Kring Posted January 25, 2006 Report Share Posted January 25, 2006 You cannot invoke the Run method on a VI that is reserved for exection. So, if you want to do this you will need to set the resvForCall argument of the GetVIReference method to FALSE. However, using the Call methods does require that the VI be reserved for execution -- this is an important distinction. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.