Teststand Manager Controls in Code Modules

  I am trying to understand how UI controls work in code modules called by TestStand steps.  I can pass a reference to an Application Manager (perhaps the application manager?) to my code module using RunState.engine.GetInternalOption(InternalOption_ApplicationManager).  Does the sequence editor have an application manager?  Or the engine?  Is this the same as the Application Manager control I put on the front panel of the code module?  What about SequenceViewManagers and ExecutionViewManagers?  Can I create those in my code modules to display sequences or executions?  Or can I somehow get those from the sequence editor/engine, or from the Application Manager?
I know that I just asked a lot of questions, but I guess what I am looking for is some general guidelines for using the manager controls in code modules.  This all came about by an attempt to display an Execution View Manager control in my code module.  Feel free to ignore the following description of my various attempts to get this to work.  This exercise helped me understand the managers a little bit more, but I'm still a little confused.
Suppose I want to create a custom step type for debugging to display the variables for the current sequence context on the front panel of a code module VI.  (LabVIEW 8.6, TestStand 4.1.)  In my code module, I call ExecutionViewMgr.ConnectVariables to connect to a VariableView control.  Where do I get my ExecutionView Mangager from?  I tried two methods:
1) create an ExecutionViewManager control; set the manager's current execution using ExecutionViewMgr.Execution (pass RunState.Execution from TestStand to the code module).
It seems like this should work, but when I run my sequence from the sequence editor, the ExecutionViewMgr.Execution property node returns error -17500.
When I run from a LabVIEW Operator Interface (using the LabVIEW environment, not the exe), I don't get an error.  But I must connect a list control using ExecutionViewMgr.ConnectExecutionList, and select the execution from the list when the code module is running.  Then I can see the variables when I select the execution in the list.  However, the execution display on the OI goes blank.  I can see either the variables on my code module or the execution on my OI, but not both simultaneously.  It appears that an execution cannot be attached to more than one manager at once (I guess that's reasonable).
2) pass the result of RunState.engine.GetInternalOption(InternalOption_ApplicationManager) to the code module; set the manager's current execution using ApplicationMgr.GetExecutionViewMgr() (pass RunState.Execution from TestStand to the code module, then as a parameter to GetExecutionViewMgr() ).
In this case, I would expect that there is no ExecutionView Manager associated with the execution when running from the sequence editor.  But the ApplicationMgr.GetExecutionViewMgr() function returns a non-Null reference.  ExecutionViewMgr.ConnectVariables() causes an error dialog to be displayed (from the function itself, not from TestStand), although it doesn't actually output an error (and the VariableView control remains blank).  The error is "Unable to connect Variables View control."  (See attachment.)
When I run from my LabVIEW OI, it works perfectly--I see the variables on my code module's UI, and the execution appears on the OI simultaneously.  I guess this makes sense since the TestStand engine is returning the Execution manager that was already created by the OI.
Attachments:
Error Dialog.PNG ‏20 KB

TestStand only allows a single ApplicationMgr per process, creating a second one will error. So the engine will always return the one in either the UI or the Sequence Editor. Events should be seen by both handlers. You have to be careful to ensure that your extra handler does not mess up the UI's handler if yours is called first, like preacknowledging a message. As far as setting up a handler in a code module, you should be able to. However, we have not fully tested this capability, so we cannot say that we fully support this because you might run into issues. In addition, using LabVIEW might present additional issues that might not be seen in other development environments like CVI and Visual Studio. Performing some functionality that can process messages in a COM callback can cause potential hang conditions, to the less you do in a callback the better when using LabVIEW. Keep in mind that you have to ensure that you unregister your handler if the code module returns to the calling execution and you no longer want the handler to be called.
Attempting to use a new TestStand UI control in a different thread than the UI thread is not recommended because we have done almost no testing on this use case because it is not done in typical UIs.
Now, for customers that want to create a nice GUI that includes serial number prompting, but still want to be able to work with the Sequence Editor, I suggest that you implement a behavior that works with a supporting GUI, but support an alternative when a non-supporing GUI is present.
For example, you could do the following:
1. The process model can send a custom UI message synchronously to the GUI to ask for a serial number. The custom message would contain a reference to a property that contains (a) a boolean to indicate that the UI will "respond" to the message, (b) a string for specifying the serial number, and (c) a notification object from the TestStand Synchronization Server.
2. When receiving the UI message, a supporting UI will set the boolean to True, duplicate the reference passed locally, and acknowledge the UI message.
3. When the UI message returns, the exectution will determine if the UI supports the message. If yes, the exectution will (a) wait on the notifcation (b) When the user enters a serial number, the GUI will set the string property and then pulse the notification, and release the reference to the properties passed via the UI message. (c) The execution will return from the notification wait, read the serial number, and continue execution.
If no, the execution will need to use the default process model prompting or custom prompting that you devise when using the Sequence Editor.
The process model could use a UI message to determine if the GUI is supportive of this mechanism once instead of with each serial number prompt, but you get the idea.
Scott Richardson
National Instruments

Similar Messages

  • Is it possible to launch the SequenceAnalyzer from a C# code module in a Custom TestStand Editor

    The Sequence Analyzer is not available in the Custom TestStand Editor Mode GUI.
    Is it possible to add the Sequence Analyzer to a menu in the custom TestStand Editor?
    Is it possible to launch the sequence analyzer from a C# code module, this method is then called from a sequence call back.
    Best regards
    Patrick

    From the TS Help:
    TestStand Sequence Analyzer Application
    Select Start»All Programs»National Instruments»TestStand»Tools»TestStand Analyzer or run <TestStand>\Bin\AnalyzerApp.exe to launch the stand-alone TestStand Sequence Analyzer application. Use this application to analyze projects outside of the TestStand Sequence Editor.
    The sequence analyzer application window contains the following tabs:
    Files—The files and directories to analyze.
    Rules—The rules to use for analysis. Use this tab to enable, disable, and configure rules for analysis in the current project.
    Options—Contains the project options that control the analysis and determine whether the sequence editor automatically saves the current analyzer project.
    Messages—Contains the list of messages for the most recent analysis of the current project, sequence file, or workspace file. The sequence analyzer overwrites the content of the Messages tab each time you start an analysis session.
    Analysis Summary—Contains a summary of the most recent analysis of the project.
    Command-Line Usage
    You can use the following command-line syntax to open an analyzer project:
    AnalyzerApp.exe "C:\My Documents\MyProject.tsaproj"
    CTA, CLA, MTFBWY

  • TestStand internal mechanism: call sequence/ architecture c++ code module adapter, .dll functions

    I would like to know more about this particular aspect of TestStand's architecture:
    What exactly happens "internally" (class/seq diagram ?)when a c/c++ dll code module adapter step invokes/ calls an exported .dll function (testStand sequence executed from sequenceEditor) ?
    My guess (wrong/correct ?) is that:
    I execute
    SeqEdit.exe
    which hosts
    teengn.dll
    which hosts
    cppAdp.dll
    which hosts
    "myDllWithExportedFunctions.dll"
    and (finally) directly calls exported functions of "myDllWithExportedFunctions.dll"

    Christoph -
    Your binary file presentation at a high level is correct.
    The object relationship is:
    - The Sequence Editor is just a client of the TestStand engine.
    - The Engine is the creator of all TestStand objects.
    - The Engine creates the Sequence File object for the Sequence Editor.
    - The Sequence File has a reference to a Sequence object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"]
    - The Sequence has a reference to a Step object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"]
    - The Step has a Module object, i.e. RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"].TS.SData
    - The Module object uses its associated Adapter class to Load/Run code modules.
    - The DLL handle and function pointer are stored
    in the Module object.
    - The Module object with the Adapters help knows how to call the function in the DLL.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • LabView code module to perform simple pass/fail *IDN? query?

    LabView 7.1, TestStand 3.1, NI PCIGPIB board controlling a communications service monitor and a power supply. I'm having problems with my application sync correctly between the service monitor and GPIB board. I suspect the driver. Does anyone have a simple LabView code module to perform a *IDN? with a partial (in case they change firmware versions)string comparison that I can use in a TestStand seq. At this point if failure I could pop-up and tell operator to abort test and reboot instrument. (only way I've found to clear the buffer). Note: At times this app works fine and is inconsistant in failure times/rates.
    Sorry so wordy and thanks in advance.
    Using LabVIEW 2010SP1 and TestStand 4.5

    Thanks for the reply Craig.
    I've found I can perform a *IDN? using the Instrument I/O Assistant.vi. Ive placed this on a new block diagram and am changing it as I need. I've found in this particular case the *IDN? yields 3 tokens one of which I can use to perform a string comparison on. This will give me a boolean which I can wire to the pane for use by TestStand.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • Use the same code module for several steps in the sequence

    Hello All,
      I have been trying to set up a sequence that uses the same code module for all of the steps in the sequence, but am having trouble referring back to it when I need to send it commands.  I have gotten as far as calling the VI in a new thread so that it can be run asynchronously.  I can run the simple sequence and it will indeed open the VI, and move on to the next step.  When I close the VI manually from the front panel, the sequence in TestStand completes, as expected.  So it appears that I have that much working. 
      My question is how to call the separate thread from the main sequence or other sub sequences when I need to edit the parameters.  If I insert an Action step, I am required to select a VI file, but from what I can tell, it opens a different instance of the file, and does not provide an interface with the other instance running asycronously.  My next guess was to use a Statement step, but I was not able to figure out how to configure the lookup string to call the VI parameters.  Beyond that, I'm not sure how to proceed.  Please advise.   
      My intention is to start the code module VI (asynchronously), run several different subsequences within the main sequence that call that same VI and edit it's parameters, close everything and report on the results.  If I am misunderstanding how TestStand is supposed to work, please let me know. 
    Thanks,
    GSinMN    
    Solved!
    Go to Solution.

    What I do is use a Queue to send data to the asynchronous VI.  So it can run and do whatever, but also recieve the commands from the queue.  I use an Action Engine that holds the queue reference and sends the commands.  So you really just have to call the Action Engine from your sequences.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • It is possible to programmatically disable the "Executing Code Modules in an External Instance of CVI" feature?

    It is possible to programmatically disable the "Executing Code Modules in an External Instance of CVI" feature within a CVI project?
    I know how to do it manually (Configure > Adapters... > Adapter Configuration).
    Thanks in advance,
    --M

    Yes. TestStand 2.0 added the Engine.CVIAdapter_ExecuteStepsInCVI property.

  • The application has accessed a fund managements or cash mgt module with par

    When I am trying to post a entry Mesage appears F1030
    The application has accessed a fund managements or cash mgt module with parameters missinfg or defective
    Please solve

    Hi,
    This error occurs when you post data which is not related to that specific company code.
    post the correct data and check.If the problem still exits.Please clearly explain the problem.
    Thanks
    micheal

  • Change name of parameters output by code module

    Hi guys,
    I am calling this  code module everytime but pass different parameters as input  & get different results
    I want to customize the  Parameter Name  for the output parameters as they get saved in my report.
    & so I can be very specific.

    Hi,
    I think it is not an option or configuration in TestStand. You can try to change the parameter name in the code module.
    Have you tried this?
    best regards
    Richard

  • Creating variables/parameters from a code module that persist when the sequence is over

    I am creating variables/parameters programmatically in a code module (C#) by passing in the Locals object and calling the method 'NewSubProperty'.
    I've also tried SetValNumber with PropOption_InsertIfMissing.
    But it seems they are only being created in that instance of the sequence, because they are gone when the sequence is over. I really wanted them to persist.
    I wanted to avoid creating station globals dynamically like this, but maybe that's all I can do to make them last.
    Any ideas would be gratefully appreciated.
    Thanks,
    Ronnie
    TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
    Solved!
    Go to Solution.

    Hi,
    Check out the links on this response
    http://forums.ni.com/ni/board/message?board.id=330&message.id=11226&query.id=267719#M11226
    It maybe of help
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to save Custom control records through module pool program ?

    Hi guru ,
    1. How to save Custom control records through module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi,
    can refer following code -
    IN PAI , CODE is as follows-
    *&      Form  editor_output
    FORM editor_output .
    NARRATION1 is name of custom controller
      IF v_editor IS INITIAL.
      Create obejct for custom container
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name              = 'NARRATION1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT v_editor
          EXPORTING
            wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position
            wordwrap_position          = line_length
            wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                     = v_custom_container
          EXCEPTIONS
            error_cntl_create          = 1
            error_cntl_init            = 2
            error_cntl_link            = 3
            error_dp_create            = 4
            gui_type_not_supported     = 5
            OTHERS                     = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " editor_output
    getting textdata in internal table as follows
    *&      Form  create_text
    FORM create_text .
      REFRESH : it_texttable,
                it_text.
      IF v_doc_number IS NOT INITIAL.
        IF v_editor IS NOT INITIAL.
          CALL METHOD v_editor->get_text_as_r3table
            IMPORTING
              table                  = it_texttable
            EXCEPTIONS
              error_dp               = 1
              error_cntl_call_method = 2
              error_dp_create        = 3
              potential_data_loss    = 4
              OTHERS                 = 5.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Now, our final text data is in internal table it_texttable.
    pls, Reward if found helpful.

  • I am trying to debug HTBasic code modules while using Test Stand, how do I refresh the subs that have been loaded in memory?

    I am writing an application for Test Stand, we are using modules previously written in HTBasic. Whenever I make a change to the code and try to re-run the program, it just runs the old version of the code. The only way to refresh the code is to close Test Stand down and restart it. Is there a way to flush the memory of modules?

    Hi,
    I haven't used HTBasic with TestStand 2.0.x, but I'm assuming that you have the steps in the sequence set to unload when sequence file is closed (look under the step properties -> run options tab).
    If you're still prototypeing, use the File->Unload all modules option. Have a look at page 4-3 in the user manual - it refers to .DLLs, but I'm assuming the HTBasic falls into the same methodology.
    Altering the run options from it's default will affect the memory useage and speed of execution of the test sequence. Have a look at page 5-22 (page 158 in the .pdf) in the TestStand user manual - basically, if a code module is loaded into memory already, when the step gets to execute, the loading overhead is already done. If it stays in memory after this, then it's avail
    able for next time (quicker second run 'cos it doesn't need to load again. However, the balanceing factor is the sequence is useing more memory at a time, by haveing the module ready.
    My usual setting is to use Load dynamically, and Unload after sequence executes. I use this is only during development however, as this is not the most speed friendly, but a compromise so that if I don't call a step I don't load it, but if I do use a step, I'm sure it's free again when I need to modify the .dll modules I create. If you have a look on page 5-7 (143) of the user manual you can set the sequence file to effectively over-ride each step's load and unload settings - useful if you want to revert back again later. If you use this, you'll see that the top two run options for the step are greyed out, but if you set it back with the sequence file options, they do revert back to their original settings.
    Hope that helps (and works!!)
    S.
    // it takes almost no time to rate an answer

  • Compare two sequences loaded in a C# code module.

    Hi,
    Is it possible to compare two sequences loaded in a C# code module using functionality from the TestStand API?
    Best regards

    Hello,
    Here you can find a related post:
    http://forums.ni.com/ni/board/message?board.id=330&message.id=26058&requireLogin=False
    Let me know if you have further questions or if this doesn't help you.
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • [svn:fx-trunk] 10050: Per-Module Style Management: Create a style manager for each application/module.

    Revision: 10050
    Author:   [email protected]
    Date:     2009-09-08 07:43:16 -0700 (Tue, 08 Sep 2009)
    Log Message:
    Per-Module Style Management: Create a style manager for each application/module.
    The singleton StyleManager is still the only style manager that is currently used.
    QE notes: None.
    Doc notes: None.
    Bugs:
    Reviewer: Alex
    Tests run: checkintests, Managers/StyleManager
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/IModuleInfo.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleLoader.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Sequence File Documentation adding code module inputs/outputs

    Hi there,
    I would like to document my sequence file. I have used the TS tools| Sequence File Documentation which works fine but I would like to add more information like the code module input and outputs.
    I am using LabVIEW code modules.
    How can I access the VI Parameter table: parameter name, type, in/out and value and then add them to docgen_txt.seq ?
    Any suggestion would be much appreciated.
    Thanks in advance..
    Marken

    Hi Marken
    In this thread there is an example how to create a LV-Module dyamically. Accessing the LV-Parametertable is a sub topic there.
    http://forums.ni.com/t5/NI-TestStand/Create-a-LabVIEW-Step-dynamically/m-p/977348#M25792
    Hope this helps,
    Regards
    Juergen 
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Mughamrat Releases Mobile Inventory Management Control

    Mughamrat Releases Mobile Inventory Management Control
    MS3 Inventory Suite 1.2
    Ifran, Morocco -May 4, 2007- Mughamrat, CO. has announced the release
    of their Multilingual Mobile Inventory Management Control Suite 1.2
    for Window CE & Window Mobile. The Market leader in advanced mobility
    solutions and personalized technical customer support has designed MS3
    Inventory Suite 1.2 from the ground up to enable companies to create
    an all inclusive and highly integrated inventory tracking solution.
    MS3 Inventory Suite 1.2 unlike other existent mobile solutions offers
    an Arabic/English easy-to-use interface and a user support that works
    together to provide a reliable inventory option. Based on
    Microsoft's .NET 03 & 05 technology, it enables users to access
    multiple databases using a single application, and can streamline data
    entry with its highly "customizable" interface. Users can work in real
    time, offline or a combination of both, depending on connectivity
    availability. In addition, MS3 Inventory Suite 1.2 offers the perfect
    balance of performance and affordability.
    "MS Inventory Suite 1.2 module is an offspring of many successful
    years" Said Rudy R. Lachhab, Mughamrat's Regional Manager "Our
    extensive expertise in the supply chain of Mobile Solutions with a
    comprehensive approach to implementation are now offering MS3 with a
    significant leap in functionality, it is designed to operate side-by-
    side in handling daily operational requirements of daily distribution
    and inventory control activities within any organization"
    Since Mughamrat's foundation, its focus has been on developing the
    expertise and skills to implement mobility application solutions.
    Mughamrat has being offering tailor-made mobile solutions to large
    companies and organizations. The company now focuses on five specific
    areas of mobile solutions including Electronic Meter Reading, Mobile
    Van sales, Mobile Survey, Inventory Management control and General
    Inspection solutions. In addition, Mughamrat has extensive expertise
    in the migration of information technology products to support the
    Arabic language, along with the development of Arabic SDKs for all
    platforms, and mobility drivers for Arabic language applications.
    For more information, please contact:
    Rudy R. Lachhab
    Regional Manager
    Tel: +212 3 556 7409
    Fax : +212 3 556 7630
    [email protected]

    Radwan,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

Maybe you are looking for

  • IPhone 5s screen freezes for minutes at a time after iOS 8.0.2 install

    My previously perfect iphone 5s has just been updated to iOS 8.0.2 and now for minutes at a time  the touch screen doesn't work. The buttons do, but not the screen. It then comes back to life for a minute or two before it stops working again. Anythin

  • How to count the number of lines dynamically,

    In the below code am trying to read the lines which are selected using a check box, also am categorizing the contents depending on the follow up material. after displaying one category contents am displaying a line which also counts to a line in the

  • Complex Data into ArrayCollection

    Hi, i am getting complex data from web service,i want to load into ArrayCollection and then posted into UI Component (Datagrid). Sample Data: <CoreProgramming> <BasicProgramming> <ProductId>1004679</ProductId> <ProgrammingName>America'sTop60</Program

  • Insanely slow export in CC

    Hello, I'm pretty new to Premiere Pro CC, and I just finished editing my first video.  I was stunned by how long it says it will take to export the project, and I figure I've got to be doing something wrong because I'd like to think that my computer

  • My volume down button is no longer working. What is there for me to do?

    Is there anything I could do? I've had my iPhone less than 2 months. This isn't my fault at all. It seems right after I updated it last week it stopped working. Please help.