Charles Chickering Posted April 21, 2009 Report Share Posted April 21, 2009 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 Quote Link to comment
jdunham Posted April 22, 2009 Report Share Posted April 22, 2009 QUOTE (Charles Chickering @ Apr 20 2009, 03:32 PM) 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. Just to make sure, you know you can create a new dynamic dispatch VI by right-clicking on the class in the project window, right? You may also want to check out http://forums.lavag.org/Providing-a-template-for-overrides-t13289.html&p=58591' target="_blank">this thread. It's not your specific problem, but AQ posts some code (which I haven't looked at) involving scripting a new DD VI. Quote Link to comment
Charles Chickering Posted April 22, 2009 Author Report Share Posted April 22, 2009 QUOTE (jdunham @ Apr 20 2009, 05:57 PM) Just to make sure, you know you can create a new dynamic dispatch VI by right-clicking on the class in the project window, right?You may also want to check out http://forums.lavag.org/Providing-a-template-for-overrides-t13289.html&p=58591' target="_blank">this thread. It's not your specific problem, but AQ posts some code (which I haven't looked at) involving scripting a new DD VI. 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 Quote Link to comment
Aristos Queue Posted April 22, 2009 Report Share Posted April 22, 2009 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. Quote Link to comment
Charles Chickering Posted April 22, 2009 Author Report Share Posted April 22, 2009 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 Quote Link to comment
Aristos Queue Posted April 22, 2009 Report Share Posted April 22, 2009 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. Quote Link to comment
Charles Chickering Posted April 22, 2009 Author Report Share Posted April 22, 2009 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 Quote Link to comment
Aristos Queue Posted April 22, 2009 Report Share Posted April 22, 2009 Unfortunately the VI changed between 85 and 86, so it isn't as easy as just saving for previous. 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.