Jump to content

Using Scripting to create Dynamic Dispatch VI's


Recommended Posts

Hi guys, I've started trying to write code to use scripting to create VI's for Dynamic Dispatch and the Override vi's for the VI's. Has anyone else been able to do this because I can't seem to get it to work in 8.5. I can get a hold of the class and create a new VI but not a Dynamic Dispatch VI. Also if I can create the main instance how do I create the override VI? Any help is greatly appreciated.

Thanks,

Charles Chickering

Link to comment

QUOTE (jdunham @ Apr 20 2009, 05:57 PM)

Yes, I've been using the standard method for the last nine months. The problem is I've got a folder of about a hundred instument VI's that I'm putting into an OOP wrapper. I was hoping to do this programmatically. Thanks for the link to the other post I'll give those VI's a try. I'll post back if I get anywhere with it.

Thanks,

Charles Chickering

Link to comment

Are you having trouble setting the connector pane to be dynamic input and/or output? Start with VI reference... get the Conpane reference... use the method/property (I don't recall which) on conpane to set the desired terminal to Required/Recommended/Optional/Dynamic. If the input is set to Dynamic, boom, you've got yourself a dynamic dispatching VI. As for how to create the override VI, sorry, but that isn't exposed directly. The long route is to take the source VI, do Save As on it, then Select All on the block diagram, unselect the FPTerminals and delete the remainder. Then replace any Parent class inputs/outputs with Child class. The VIs to do all of this ship with LabVIEW but you'll find that they're private members of a library, so you can't invoke them directly.

Link to comment

QUOTE (Aristos Queue @ Apr 20 2009, 11:05 PM)

Are you having trouble setting the connector pane to be dynamic input and/or output? Start with VI reference... get the Conpane reference... use the method/property (I don't recall which) on conpane to set the desired terminal to Required/Recommended/Optional/Dynamic. If the input is set to Dynamic, boom, you've got yourself a dynamic dispatching VI. As for how to create the override VI, sorry, but that isn't exposed directly. The long route is to take the source VI, do Save As on it, then Select All on the block diagram, unselect the FPTerminals and delete the remainder. Then replace any Parent class inputs/outputs with Child class. The VIs to do all of this ship with LabVIEW but you'll find that they're private members of a library, so you can't invoke them directly.

No I'm actually not even using dynamic data. I've simply got a parent class we'll call "Power Supply" and child classes we'll call "Agilent" and "Chroma". I'm making a wrapper so that I simply change my configuration file to switch between Agilent and Chroma models of the power supply. I think the VI's that you provided in the thread that jdunham linked to would work if I had the 8.5 versions of them. I tried saving them from 8.6 back to 8.5 but no luck w/o the password and I can about bet that there's no chance on getting a hold of that. Also, that appears to only create the over ride VI, is there a programmatic equivalent to right clicking my "Power Supply" class and clicking "VI from Dynamic Dispatch Template"? Thanks for your help.

Charles Chickering

Link to comment
QUOTE (Charles Chickering @ Apr 21 2009, 02:26 PM)
is there a programmatic equivalent to right clicking my "Power Supply" class and clicking "VI from Dynamic Dispatch Template"? Thanks for your help.
The post I gave above is the instructions for creating an override VI from an existing dynamic dispatch VI. To make a new VI do dynamic dispatching, you just need the part of the instructions where you change the conpane terminals.

Link to comment

QUOTE (Aristos Queue @ Apr 21 2009, 02:41 PM)

The post I gave above is the instructions for creating an override VI from an existing dynamic dispatch VI. To make a new VI do dynamic dispatching, you just need the part of the instructions where you change the conpane terminals.

Cool, I'll give that a shot tomorrow if I get the chance. You wouldn't happen to have a copy of the "CLSUIP_CreateOverride.vi" and "User_Scripting_For_New_Override.vi" VI's in 8.5.1 would you? Our main project is still in 8.5.1 and I can't save the first VI for previous version for lack of the block diagram password for some odd reason.

Thanks alot for your help.

Charles

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
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.