Teststand 2012 plugin architecture

Hi all,
Any tutorials on teststand 2012 plugin architecture. I searched on net but could find only few white papers and video tutorial which gives you an overview.
Thanks

You have three options:
A. Make your plug-in a result processor, even if it doesn't process results. This allows it to be inserted and configured in the Result Processing Dialog Box.
B. Make your plug-in an Addon. See http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/pmpconfiguring/,  Model Plug-in Add-ons and Addons.cfg section.
C. Create your own configuration file:
For option (C), you can create additional model plug-in configuration files in the following ways:
1. Call the DisplayModelPluginDialogEx function from ModelSupport2.dll as defined in ResultProcessing.h to display a dialog that creates and edits a configuration file.
Note that this dialog will be programmatically customizable in a future version of TestStand. Also, the complete source code is already provided.
2. Copy an existing configuration file to a new file name. Open the new file in a text editor. Replace any occurrence of the previous file name with the new file name. Thus, you could use the Result Processing Dialog Box to create a ResultProcessing.cfg file with your plug-in in it and then copy the file before removing your plug-in from the dialog.
3. Create a configuration file programmatically using the TestStand API. You create a Model Plug-in configuration file with an instance of the PropertyObjectFile class with a file type of FileType_PropertyObjectFile. The PropertyObjectFile.Data property of the file must be of type NI_ModelPluginConfigurationSet. Currently there is no example of this, but the source code in ResultProcessing.c performs similar actions.

Similar Messages

  • Change the HTML Report format the same as TestStand 2010 SP1 in TestStand 2012

    I have a lot of test steps (~10K)  that gets executed and the indentations on HTML report format in TestStand 2012 gets too deep.  I have to slide the horizontal bar to the right to see the report when l'm in the middle.  I did not have this issue in TestStand 2010 SP1.  
    Is ther a way to change the HTML Report format (style) the same as TestStand 2010 SP1 in TestStand 2012? 

    dexrays:
    We are currently investigating this issue. In order to help us with the investigation could you post a sequence file and configuration that reproduce the problem? The configuration file is located in C:\ProgramData\National Instruments\TestStand 2012\Cfg\ModelPlugins\ResultProcessing.cfg for Windows Vista / Windows 7 or you can use the Cfg link in the TestStand 2012 installation directory. 
    You can use the Legacy Model Switcher (included in TestStand 2012) to use the legacy models instead of the new models. The legacy models are more backward compatible, however, this also means that you will not be able to use the improvements in the new models (for example, the new plug-in architecture). If this is acceptable then you can use the legacy model switcher to switch to the legacy models. The Legacy Model Switcher is located in the Start Menu under Programs->National Instruments->TestStand 2012->Tools->Compatibility. For more information on Legacy Model Switcher please read the online help.
    Thanks for your report and for your help with diagnosing this issue. 
    - Francisco

  • Getting Report File Path location at execution in TestStand 2012 and later

    I need to include PNG pictures into my TestStand Report (HTML, XML, ATML).
    When report generation was made through plugins (before TestStand 2012), it was easy to get report file location during execution through variable RunState.Root.Locals.ReportFilePath in order to save PNG files near the report file (in same directory).
    I didn't find yet an easy an simple way to do the same in TestStand 2012 with Result Processing Plugins.
    Any idea ?
    Remarks :
    Since this functionnality has to be included within MESULOG TS+ last version which is a TestStand Add-on, I cannot modify Report Options, Process Model or include a callback (like GetReportFilePath.
    In need ReportFilePath within a Custom Step Type which cannot wait for PostUUT or ReportGeneration to save its PNG files.
    Jean-Louis SCHRICKE
    ├ CTA - Certified TestStand Architect (2008 & 2010 & 2014)
    ├ CTD - Certified TestStand Developer (2004 & 2007)
    └ CLD - Certified LabVIEW Developer (2003 & 2005)

    jiggawax,
    Thank you for you quick answer.
    RunState.Root.Locals.ModelPluginConfiguration.Plug​ins[<plugin index>].PluginSpecific.Options.Directory is valid only if  
    RunState.Root.Locals.ModelPluginConfiguration.Plug​ins[<plugin index>].PluginSpecific.Options.DirectoryType is set to "SpecificDirectory".
    It seems that I cannot get the complete ReportFilePath before "UUT Done" plugin entry which is after MainSequence execution.
    Jean-Louis SCHRICKE
    ├ CTA - Certified TestStand Architect (2008 & 2010 & 2014)
    ├ CTD - Certified TestStand Developer (2004 & 2007)
    └ CLD - Certified LabVIEW Developer (2003 & 2005)

  • Report directory property in teststand 2012

    Hi,
    I'm trying to programmatically access the report file directory in teststand 2012, the location of which changed vs. 2010.  I found one at:
    RunState.Root.Locals.ModelPluginConfiguration.Plug​ins[0].PluginSpecific.Options.Directory
    But the "[0]" tells me it's 0 probably because the report is the first item in the result processing list, and if that ever changed, my code would break. Is there another location besides the above that holds the report directory?
    Thanks
    David J.

    The problem about using [0] is that you are also under the assumption that someone has NOT reordered the list of plugins in the Result Processor list.   To fix that you could check for the name of the Plugin instead of the index.
    To do this you could utilize the ModelPluginConfiguration callback.
    Foreach { Parameters.ModelPluginConfiguration.Plugins }
     if { Locals.Plugin.Base.DisplayNameExpression == "\"Report\"" }
           Then obtain the ReportFilePath
    Now, if someone decides to delete the Report plugin, then that is another story.
    Is there someway to prevent someone from DELETING a Plugin from the Results Processor window?  I imagine privileges probably wouldn't allow a technician or operator to do this, but an admin probably still could.    When it is deleted, it does not appear in the Configuration List, I would assume.
    Thanks,
    PH

  • ModifyRepo​rtHeader from ProcessMod​el in Teststand 2012

    I need to add information to the report header.  I want to do this from the process model because all UUTs will need to put this information in the report and I don't want each client sequence file to use the modifyreportheader callback.  I had this working in 2010 by simply putting my custom report stuff in the sequence inside sequentialModel.seq.  Since report processing doesn't work the same due to the new features in 2012, I'm having trouble finding a solution. 
    I understand that I could go to NI_ReportGenerator.seq and add my code there.  However, for source control reasons I don't want any customized code to reside under C:\program files.  The "Call Model Plugin - UUT Done" step which contains the actual report gen steps seems to be hard coded to use C:\Program Files (x86)\National Instruments\TestStand 2012\Components\Models\ModelPlugins\NI_ReportGener​ator.seq. 
    I see two solutions, but haven't been successful implementing either.
    1.  Somehow change the parameter in ModelSupport.seq->"Call Model Plugin - UUT Done" to a custom path for the ReportGenerator.seq.
    or
    2. Force Teststand to use the "ModifyReportHeader" sequence that is in SequentialModel.seq instead of using the one in NI_ReportGenerator.seq
    Thanks,
    Kevin

    Yes.  I have my custom sequentialmodel.seq located in my source control local repository on disk.
    After running into this problem, I copied the entire C:\Program Files (x86)\National Instruments\TestStand 2012\Components\Models directory to my local repository.  Teststand now executes ModelSupport.seq from my copy, but when it gets to the step shown below it still points to the Program Files.
    The image below was captured after deleting the ResultsProcessing.cfg file and restarting Teststand.  Which I didn't try until you suggested it.

  • Reporting mechanism on HTML report file, using TestStand 2012 SP1

    Hi,
    I am using TestStand 2012 SP1, where the reporting mechanism is configured to be in HTML format.
    I am not getting the full report of the sequence file which is executed, however I get a part of it printed on the HTML file.
    The following are the configured "Report options",
    ===========
    Contents Tab:
    ===========
    Report Format : HTML Document
    Default Numeric Format : %$.13f
    Include Step Result: Checked
                  Result Filtering Expression : Result.Status=="Failed"
                  Include Test Limits : Checked
                  Include Measurements : Checked
                  Include Arrays : Insert Table
                  Filter : Include All
    Include Execution Times : Checked
    On-The-Fly Rporting and Only Display Latest Results : Checked
    Select a Report Generator for producing the Report Body : DLL
    ===========
    Report File Pathname Tab:
    ===========
    Generate Report File Path : Checked
           File Name/Directory Options : Specify Report File Path by Expression
           Report File Path (Sequential Model) :
                            StationGlobals.TopLevelReportPath
                            +RunState.ProcessModelClient.AsPropertyObjectFile.​DisplayName+"Report_[<FileDate>]<Unique>.<FileExte​nsion>"
    Please let me know a solution to this problem.
    Thanks,
    Dharani

    Jason,
    Thankyou for replying.
    Yes, I need only the steps which had failed to print on the report file.
    The problem what I am facing is, if there are 10 failed steps, the report is not printed for all.
    Also the order of printing is not correct for the first step and the last step which is printed on the report file.
    I had used "Post Expression" for printing data for all the failed steps. Normally these post expressions should be printed beneath the step in the report file.
    However,
    1) For the first step which is printed on the html file, the post expression gets printed just above the step and also it gets printed beneath the step.
    2) For the last step which is printed on the html file, the post expression is not printed beneath the step.
    Please let me know if i need to provide some more information.
    Thanks,
    Dharani

  • How do I add a logo in the header of a TestStand 2012 HTML report?

    I've been trying to add a company logo to the header of a HTML report on TestStand 2012 without success. I've followed the help topic below however this seems to be for TestStand 3.1 and does not work on 2012. 
    http://digital.ni.com/public.nsf/allkb/3FD69C34EEF13E3786257448006A5F43
    I'm able to add pictures to the XML and ATML reports however I want to stick with HTML and everything I try does not seem to work!
    Any help would be hugely appreciated. 
    Many Thanks
    Sam Beutelspacher

    In TestStand 2012, the ReportHeader string no longer contains a <body> tag, so you can directly append the extra HTML to the parameter without needing to do a search and replace.  The following expression worked in my case:
    Parameters.ReportHeader = "\R\N<IMG src=\"C:\\NI.JPG\" ALT=\"NATIONAL INSTRUMENTS\">" + Parameters.ReportHeader
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • To More Specific Class & Plugin Architecture

    Hello there,
    I have a plugin architecture and I want to load a particular class on demand, when a user clicks a button etc.
    I can do this using 'Get LV Class Default Value.vi' knowing the path of the .lvclass file, and I can then use the 'To More Specific Class' vi to cast it from type LV Object to the specific class I know it to be.
    However if I have 30 different classes with this method I would have to have 30 different class constants in a case structure so I can cast to the right one.  This works but it means all the classes are loaded into memory when the program is run, even though the user may never want to use most of them, which is a waste of time/memory.
    Is there a better way of doing this please?
    Thanks,
    Martin

    I wonder if minute 4:00 in Michael's video will help you. It avoids the constants, as long as all the classes are descendants of a common class:
    http://vishots.com/005-visv-labview-class-factory-pattern/

  • ClassLoaders in a plugin architecture

    Hello everybody,
    I'm developing an application which is to be launched via webstart (running in all-permissions mode) and has to implement a plugin architecture.
    The structure I've come up with so far is this:
    - every plugin is packaged in a different jar, which can be loaded/unloaded at runtime (this is a spec), thus not appearing in the jnlp.
    - The core classes of the application (the "launcher") are sealed into a jar which is listed in the jnlp, and gets the all-permissions privilege.
    - Among the core classes there's a Plugin abstract class which all plugins must extend in order to be launched by the application
    - each plugin can declare dependencies, meaning that it can use other plugins classes, which are loaded before the plugin itself
    Plugins are written by different developers, hence the need to define a Plugin class..
    My problem is with classloaders: right now I'm using a custom classloader which extends URLClassLoader and adds the URL pointing to every plugin jar when it is loaded using URLClassLoader's addURL() method.
    Everything seemed to work fine, but recently I got a java.lang.NoSuchMethodException when a plugin B tried to access the constructor of a plugin A class. The pluginA class extends one of my Plugin abstract classes and the constructor requires an Object as argument.
    To give you an idea of what causes the Exception:
    Plugin A class
    public class PluginAObject2 extends Plugin {
      public PluginAObject2(Object data) {
        super(data); // this calls one of my abstract classes
    Plugin B class
    String foo = "foo";
    PluginAObject1 object1 = new PluginAObject1(PluginAObject1.A_STATIC_FIELD, foo);
    PluginAObject2 object2 = new PluginAObject2(object1); // this causes the NoSuchMethodException
    [...]My questions are:
    - is the NoSuchMethodException thrown because of the super() call in PluginA constructor? My abstract classes are loaded by JNLPClassLoader, is it possible that classB's object1 is not recognized as a subclass of Object because java.lang.Object in JNLPClassLoader is not the same as java.lang.Object in my custom classloader?
    - if so how can I correct the error?
    - if not, can you give me a hint on what's wrong with this?
    Please don't tell me that I have to change the whole approach to the problem, unless it is really the only way to go through this issue...
    Thanks,
    mb

    Thanks jschell,
    still I have some things I don't quite understand..
    jschell wrote:
    You can't do that. You have the following situation.
    Class A loaded via classloader X
    Class B loaded via classloader Y.
    I always use the same custom classloader, having a static reference to it in my "core" classes, calling its addURL(plugin_jar_directory) method every time a plugin must be loaded before it is actually loaded. Something like
    class PluginLoader {
      static CustomClassLoader loader;
      private loadPlugin(JarFile jar, String pluginName) {   
        loader.addURL(jar);
        loader.loadClass(jar, pluginName);
    }I have only 2 classloaders: the JNLPClassLoader and one instance of, say, CustomClassLoader. Which is classloader X and classloader Y in this case?
    jschell wrote:
    One of the following would be needed.
    Class B and A loaded via classloader Z.
    Class A loaded via classloader Z1 and a child of that loads classloader Z2 which loads class B. (Thus Z1 is a parent of Z2.)
    Before using my custom class loader I used to create a new URLClassLoader for every plugin chaining them in a parent-child fashion. The resulting classloader chain looked something like
    + com.sun.jnlp.JNLPClassLoader
      + java.net.URLClassLoader plugin A
        + java.net.URLClassLoader plugin B
          + java.net.URLClassLoader plugin C   and so on, but I had to face the same issue.
    One last thing I don't get: if A and B cannot see each other, why is java.lang.NoSuchMethodError thrown instead of java.lang.ClassNotFoundException in the first line of the two of plugin B I posted before?
    Since I have to extract the manifest of the jar files to know which dependencies they declare and some other things (version, main-class and so on.. we use a custom manifest) could it be that classes inside the jar are loaded by the JNLPClassLoader, which is the classloader of my core classes? I just extract the manifest and do nothing on the classes, so it would sound weird to me but... I'm a bit lost
    Thanks in advance,
    regards
    mb

  • ClassLoading in plugin architecture

    I'm developing a Java Desktop Application with a plugin architecture. I'd like to know of any good resources for information on how to use ClassLoaders to implement different schemes of plugin isolation and sharing.
    Examples:
    Sharing Each plugin depends on the application's public API jar, and classes loaded from here must be shared between the application and all plugins.
    Isolation Plugin A may be built using version 0.2.4.1 of a third-party Xxx.jar while plugin B is built using version 1.0.0.2 of Xxx.jar, which is incompatible with the earlier version. The two plugins must be isolated from each other, so that each loads the classes from its own version of Xxx.jar.
    There are probably many other issues that my plugin mechanism needs to take care of. The application is not supposed to support hot-swapping of plugins.
    Any help and/or references will be highly appreciated.
    Edited by: nygaard on May 29, 2009 10:30 AM

    nygaard wrote:
    Here are two more things, I'd like to support:
    Plugin/application isolation Plugin A uses third-party Xxx.jar which in turn depends on version 1.2.3.4 of log4j.jar. The application itself uses version 0.1.2.3 of log4j.jar which is incompatible with 1.2.3.4.this is a little more complicated, but doable. basically, you will have to have some bootstrapping startup code for you application which only includes a few jars in the main application classloader (not including anything you want to be isolated). basically, you initial classpath should only have a bootstrap jar and any common interfaces (presumably you will have some plugin API). your bootstraping code should then load your main application in a new classloader (we'll call it the app classloader to distinguish) which has the main classloader as its parent. your plugins should be loaded with the parent classloader being the main classloader, not the app classloader.
    Plugin/plugin sharing Plugin A may depend on plugin B and should be allowed to use classes found there.this makes things a little stickier. does A just need to use classes from B, or does it need to interact with B (two different things)? the former is easy (just sharing jar files). the latter is much more difficult, and may require some custom classloading implementation. Also, you will need some sort of discovery mechanism (way for A to "lookup" B within the application).
    Edited by: jtahlborn on May 29, 2009 11:41 AM

  • TestStand 2012 Custom Report Path/Name

    Does anybody know how to get a TestStand 2012 report placed in a custom location with a custom name, both of which are determined using information obtained in MainSequence? I had a method of accomplishing this in TestStand 2010, but it does not work in 2012.
    Overriding parameters in the ReportOptions callback does not work because MainSequence has not been called yet, and moving the report file in ProcessCleanup doesn't work because the report apparently has not been closed by TestStand yet, so there's nothing that can be moved
    Thanks!

    Btw, the report file not being closed during Process Cleanup is probably due to New Thread option being set for your report in the Result Processing Dialog Box (click Show More Options to see it). You can turn this option off it you want.

  • LabVIEW 2015 - Fast File Format and PlugIn Architecture

    In LabVIEW 2015 the new "fast file format" was introduced:
    "Improving Load Time for LabVIEW-Built Applications and Shared Libraries.
    You can build stand-alone applications (EXE) and DLLs that load faster by using the fast file format in LabVIEW. <...> When you enable the fast file format, LabVIEW does not use the Application Builder object cache"
    The question about PlugIn architecture, when lot of SubVIs called dynamically (for example, from external LLBs) from relative small core application. What I observed is - the size of the executable with this option was significantly reduced (roughly twice) and the core application itself starts faster, but PlugIns load time is the same regardless from this option (I understand why - when application fully loaded then Dynamic calls just "normal" LabVIEW code and therefore this option takes no effect). Unfortunately in code distribution build spec (as well as in packed libraries) this option is not available.
    Is it possible to get "fast" application also for PlugIn-based architecture and get LLBs or packed libraries in "fast file format"? Can someone explain, what means "LabVIEW does not use the Application Builder object cache" and how this "fast load" mechanism technically working?
    Thank you in advance,
    Andrey.

    Andrey_Dmitriev wrote:
    In LabVIEW 2015 the new "fast file format" was introduced:
    Is it possible to get "fast" application also for PlugIn-based architecture and get LLBs or packed libraries in "fast file format"? Can someone explain, what means "LabVIEW does not use the Application Builder object cache" and how this "fast load" mechanism technically working?
    Thank you in advance,
    Andrey.
    Hey Andrey!  It's good to see that you guys have been getting some good mileage out of this project.  I'll go through your questions in order ...
    1) These optimization are actually always enabled by default for packed project libraries. In fact, the load time benefits for packed libraries should generally be better than what you observe for .EXEs and .DLLs!
    2) The app builder cache is something that is enabled for EXEs and DLLs that works to cache the results of previous compiles when the source has not been updated.  It is somewhat analogous to the .obj object files generated by a C++ compiler.
    3) I won't get into too many nitty gritty details but the gist of it is... LabVIEWs various non optimized file formats are treated somewhat similarly to the way that we treat 'loose' VIs. In a DLL/EXE/LVLibp we know at build time what the contents and dependencies of a given built binary are going to be.  With this knowledge we can go ahead and construct something that is more similar to a statically linked PE or ELF file (clearly we're not using either of those) while the analogy is not 100% perfect it's the best I can do without going into a couple pages worth of description   In addition to these basic file format changes we did a large amount of work on implementing a new loader which is able to take advantage of the large amounts of precomputed file data that is now included in the format which enabled us to cut a lot of corners that were there previously.

  • Plugin Architecture / Modular Design

    I'm trying to find some more information on creating a plugin capable program architecture. I would like to learn how to design a program so that it can later be extended/enhanced by plugins/modules. I would like for a compiled version of my program to be able to access these plugins.
    Has anyone completed a similar task with Java? Can anyone point me in the right direction to start learning more?
    Thank you for your help!
    DesQuite

    To be more explicit, the typical method of creating a "plugin architecture" is to use a combination of interfaces and reflection. For example, if I want to allow developers to create a forum plugin that displays a special footer, I might create an interface that looks like this:
    * A plugin interface. Developers should implement
    * this interface, and register their class.
    public interface ForumFooterWriter {
    * Writes the footer contents to the stream.
    public void writeFooter( PrintStream stream );
    Then you provide a means for the developers to 'register' their plugin. This can be as simple as them editing a properties/xml file and creating an entry with their class name. For example,
    --- Begin plugin.properties
    footerPlugin=com.foo.MyFooterPlugin
    --- End plugin.properties
    Then, you can read the file, and instantiate the plugins. For example,
    /** Your code.
    void writeFooter( PrintStream out ) {
    Properties p = new Properties();
    p.load( "plugin.properties" );
    String footerPlugin = p.getProperty( "footerPlugin" );
    Class footerPluginClass = Class.forName( "footerPlugin" );
    ForumFooterWriter ffw = ( ForumFooterWriter ) footerPluginClass.newInstance();
    ffw.writeFooter( out );
    Note, that if you want people to be able to change which plugins are registered, or just be able to re-compile a plugin and have the effect take place without restarting your app, you'll have to add some more complexity to the above (for example, using your own custom class loader), but this ought to be enough to get you started.
    God bless,
    -Toby Reyelts

  • Plugin architecture

    hi everybody
    first of all, sorry if I posted this topic in the wrong forum, but I haven't found a better one for this!
    down to business: I need a good/easy/robust/stable/everything-else-we-look-for-in-a-good-software plugin architecture to develop an application... right now a commercial one, and in the future a free one.
    I've found Java Plugin Framework (JPF)... it seems a very good solution, despite its short lifetime.
    anyway, I need more alternatives, to make a choice that best matches my needs, you know...
    does anybody can point out some other alternatives? I'll be very grateful!
    thanks for your attention!

    What type of "plugging in" do you envision/desire?hum... reading all the messages so far, maybe some people misunderstood what I meant to say...
    I'm looking for a plugin framework which I can include into my application, in order to allow it to be extended by third-party plugins using my application's API (I'll get flamed by posting such description :P )
    it's just like Eclipse, jEdit, Netbeans or Winamp that allow plugins extensions. maybe someone thought that I wanted to make my application as a plugin...
    looking for it, I have only found JPF - http://jpf.sourceforge.net/ -, which fits exactly in this funcion... but anyway I want to evaluate other alternatives...
    I think this time is clear ;)

  • Plugin architecture as exe in 7.1.

    I'm planning an application with a plugin architecture, that will look up a directory during runtime for available plugins. I know I could do it using .llb Top-Level VIs. But I would prefere to have the plugins 'compiled', so as exe or dll. Is that a straight foreward build of those plugins or do we need to take care of some things? And how about compatibility when we use plugins of a newer LabVIEW version?
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

    Perhaps using the Dynamically Loading and Calling VIs concept is the best for your application. If I remember correct the "specify path on diagram" options for calling DLLs, is not available in Labview 7.1. Anyway then calling Labview built DLLs the correct runtime engine version has to be installed. Since a DLL is compiled I guess you may use a Labview 8.x compiled DLL in 7.1.
    Tip. If you are using VIs as plugins you may password protect your code. You may also rename them to a dll extension. No one will bother to look deeper into to this. 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

Maybe you are looking for