Jump to content

ActiveX Server VirtualInstrument.Run(async) ?


Recommended Posts

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.

Link to comment

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.