Jump to content

Charles Chickering

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Charles Chickering

  1. I have inherited an architecture that uses LabVIEW classes to call our instrument drivers. My users write tests that call these vi's and the architecture provides a framework that calls the user's VI dynamically with settings loaded in from an Excel spreadsheet. I am not allowed to change the overall architecture of the project due to the time it would take for everyone to rewrite their code. My task is to get our architecture built into an executable which was never a requirement when the original coder wrote this architecture. Additionally, the built executable must dynamically call the user's vi so that the application does not have to be rebuilt every time a user writes a new test. The problem that I am having is that I always get error 7 when I try to call a dynamic dispatch VI. I have read a lot of forum posts about this error and they tell you to include the class files in the build and check the enable debugging but this won't help me. My application doesn't know anything about the LabVIEW classes, I am simply calling the user's vi which is calling the class vi. In the development environment, this error is fixed by having a project open with the class inside it, but in the executable I can't seem to make it work. Also, I am limited to LabVIEW 8.5.1 (with a very minor chance of switching to 8.6.1 if it fixes this issue). I appreciate any help ya'll can give and I can send code via email if needed.

    Thanks,

    Charles

  2. All, I'm trying to implement a web form using LabVIEW remote panels. I've never had the need to use remote panels before so I'm not sure if it can do what I need. I want multiple users to be able to login to the server (all through a web interface) and fill out a request form. I think this would be fairly straight forward for one connection but I can't think of an easy way to have multiple users connected to the server at the same time but viewing different request forms. Does anyone have any suggestions? Obviously there are a hundred different ways to do this with client side apps but I'm trying to keep all the LabVIEW on just the server. Any help/suggestions are greatly appreciated.

    Charles

  3. QUOTE (jdunham @ May 7 2009, 03:46 PM)

    Thanks, I knew about that. But what I really want is this... (And I've already suggested it to NI, but you never hear back about that kind of thing).

    http://lavag.org/old_files/monthly_05_2009/post-1764-1241729121.png' target="_blank">post-1764-1241729121.png?width=400

    This construction comes up all the time if you use picture controls, or you do GUI arrangements, any kind of 2D coordinate stuff, or histogram bins, or limit testing... I know it sounds like feature bloat, but having a native function for this would lead to much cleaner diagrams.

    Agreed, and mixing this with in range and coerce would really clean up a lot of my stuff.

    Charles

  4. QUOTE (jasonh_ @ Apr 28 2009, 08:22 PM)

    If you do write your own program to write to a word document, make sure it is a high performance box you run it on, because from my experience you may run into performance issues.......like the report generation portion of your program taking longer than the test itself (ahem..).

    I don't have much experience with Word but I'm very well versed in Excel would recommend that you use this statement at the beginning of your macro:

    Application.ScreenUpdating = False

    Then turn the screen refreshes back on at the end of the macro

    Application.ScreenUpdating = True

    In Excel this can save you a good deal of time.

    Charles Chickering

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

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

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

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

  9. QUOTE (asbo @ Dec 19 2008, 09:21 AM)

    You should use while loops instead of for loops so that i and i2 are not initialized.

    In some cases this would be possible but I don't understand how it would help me. In other cases I'm using for each loops and, to my limited knowledge of TestStand, there is no while loop equivalent.

    Thanks,

    Charles

  10. I've got a Test Stand app that I need to modify the error handling on and have ran into a road block. Basically, I have a series of nested loops and when I encounter an error on a step, I need to go back to the beginning of the sequence and start over but I want all the loops to pick up where they left off. I'll try to give a text based example:

    Sequence Start

    Init Test

    Init Database

    Init Instruments

    For i = 1 to 10

    For i2 = a to e

    Do x

    Next

    Next

    if an error occurs at Do x where i = 5 and i2 = c then I want to go back to Sequence Start, Execute all steps but on the loops I want i to start at 5 and i2 to start at c. Furthermore if the condition passes normal looping must resume, if the condition fails three times then the program must terminate. Is this possible to do? Any help is appreciated as I'm new to TestStand.

    Thanks,

    Charles Chickering

  11. QUOTE (Ton @ Oct 22 2008, 03:53 AM)

    The PDF from Jim Kring mention these items.

    To get a tool up in the Tools menu place it in the 'project' folder of the LabVIEW directory.

    An LLB can be placed in the same directory.

    To prohibit automatic indexing of a file (either llb or vi) start the name with an '_'

    Ton

    Thanks for the info Ton. I've got it sort of working. Is there any way to get the VI that was frontmost when the menu was called? When LabVIEW launches my "Tool" it becomes the front most vi. I have tried using the call stack vi to see what called the vi but that doesn't work. I've also tried the application node of frontmost diagram vi but that doesn't work unless I working on the diagram of the front most vi. Is there a way to get the display order of the windows?

    Thanks,

    Charles

  12. km4hr, If you'd be willing to send me what code you have so far and a description of what you intend to accomplish, I can make some recommendations on how to set up your framework. My email address is charles(dot)labviewguy(at)gmail(dot)com (replace the (dot)'s and (at)'s obviously...) Also, I can add your code to a project and setup application builder for you.

    Charles

    QUOTE (km4hr @ Oct 21 2008, 04:32 PM)

  13. You have 2 options (at least) for stopping the vi when you're done running.

    1. Use the Quit LabVIEW VI. If you're confident that the user won't be running anything else from LabVIEW, then use this.

    2. Use an Invoke node and close the Top-Level vi.

    I will include an example for you. Post back if you have the Application Builder and need help getting that setup.

    Charles

  14. QUOTE (Ton @ Oct 21 2008, 12:04 PM)

    Thanks for the quick reply Ton, one quick question on the how-to on menu launch link you provided, where do I place the directories they mention there? Also, where do I store my LLB file?

    Thanks,

    Charles

  15. QUOTE (km4hr @ Oct 21 2008, 11:44 AM)

    Thanks for the tip on accessing VI properties. For some reason the book I'm using (LabVIEW 8 Student Edition) doesn't seem to cover this topic.

    Using your tip, I discovered a VI property to put the front panel "Top-Level Application" mode. This mode claims to remove the tool bar. What it actually does is remove some icons from the tool bar. The RUN arrow remains. When the RUN arrow is clicked the toolbar goes away. The application then looks just like I want. But this raises the question, how do you start a VI without using the RUN arrow? Is there a way to start LabVIEW in run mode? Is there a way to create a START button in a VI? Is there a command line option to start LabVIEW in run mode?

    BTW, I have searched for these answers. But as usual, what phrase(es) do you search for? Perhaps I'm using the wrong ones.

    km4hr,

    Toby's reply had the answer for how to make your vi run automatically:

    "km4hr,

    As for running without the run arrow, take a look in VI Properties in the Execution category and set Run When Opened. Don't set this until you have you VI working pretty much the way you want it to. If you get stuck in a situation where you cannot get into the VI to edit it, simply drop your VI onto the block diagram of a new VI and you will be able to get into it for editing."

    Do you know if your version of LabVIEW includes the application builder? If it does this can create a stand-alone executable that is much easier to deploy.

    Charles

  16. Hi all, where is a good place to look for information on developing Add-ins for LabVIEW? What is the proper terminology for "Add-In" in LabVIEW ("Add-in" comes from Microsoft Office)? I am trying to figure out how to get a tool that I wrote in LabVIEW to add itself to the default Menu Bar so I can invoke it easily from other VI's. Any direction you can give would be appreciated.

    Thanks,

    Charles

×
×
  • Create New...

Important Information

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