Modifying sequence variables from Labwindows User Interface

Hi,
What is the correct procedure for modifying sequence variables from a
LabWindows CVI user interface.
 I am currently using an enhanced version of the simple interface that is
shipped with TestStand.
I have tried SetValVariant etc. with a ref to the engine  and this didn't
work for me.
Should I first be passing the sequence context via PostUIMessageEx ?
Thanks in advance,
Bill
Solved!
Go to Solution.

Hey Bill,
Yeah, I forget that this process is a little bit more straightforward in LabVIEW then it is in CVI (just one type cast is necessary).  Here are the steps (and variables) to make it a usable SequenceContext object:
 LPUNKNOWN tempActiveXRef;
 VARIANT tempTSSeqContext;
 CAObjHandle TSSeqContext;
     //Get ActiveX object from UIMessage
   tsErrChk(TS_UIMessageGetActiveXData (uiMsg, NULL, &tempActiveXRef));
     //Convert LPUNKNOWN to Variant
   tempTSSeqContext = CA_VariantIUnknown (tempActiveXRef);
     //Convert variant to object handle
   CA_VariantConvertToType (&tempTSSeqContext, CAVT_OBJHANDLE, &TSSeqContext);
tsErrChk(TS_PropertySetValString(TSSeqContext, &ErrorInfo, "MyLookup.String", 0, "Testing"))
I haven't tested this exact code, but I modified some code that I know works for the purpose of demonstration.  Like I said, I wish there was a way to just type cast straight to the Object Handle, but since you are getting an LPUNKNOWN object, you have to first go the variant.  Have a good one.
Adam

Similar Messages

  • Getting the value from a StationGlobal reference variable in TestExec User Interface Editor Mode.

    Hi,
    I am using the TestExec User Interface editor mode, in the SequenceFileLoad callback from my sequence an instance is made from a C# code module
    (the code module is located in another dll) , this reference is stored into a station global variable.
    Now I want to retrieve the reference from the station global variable in my TestExec User Interface code.
    So, is it possible to get this reference back from the station global variable?
    Best regards

    Reading the StationGlobal is not a problem. But the problem maybe that your reference contained in your StationGlobal is probably not valid once the SequenceFileLoad has completed its execution which it will have done once the SequenceFile has loaded.
    Any references you wish to pickup are best down via one of the ProcessModel callbacks such as ProcessSetup. 
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Access to ResultList objects from Labview user interface

    Hi!
    I would like to have access to TS Locals.ResultList[] objects from user interface (LV) after test report is generated.
    According to TS Help in this point I can get sequence context for the process model sequence file which posts UIMsg_ModelState_PostProcessingComplete message.
    But objects of my interest are located in context of client sequence file.
    Can I get access to Locals.ResultList objects with use provided model file context?
    Are there another ways to get wanted data?
    I have references to sequence file and execution in this point and tried to use Execution.RunTimeVariables property.
    But could not get wanted data with any supposed lookup string from this object.
    Thanks in advance for any ideas.
    Solved!
    Go to Solution.

    The general idea is the following:
    You have to keep in mind that Locals.ResultList on the model level (callstack) is simply the return value of a sequence call step (MainSequence). Therefore, you will only have this single entry [0].
    To get access to the results of the steps inside you MainSequence (and any other sublevel in the callstack), you have to dig into this callstack using this "root-property":
    Locals.ResultList[0].TS.SequenceCall.ResultList
    hope this helps,
    Norbert
    [EDIT]: Since i have not stated it: The screenshot displays the UIMessageEvent callback function in a simple oi where the manager control is the Application Manager.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Get overall Pass/Fail from custom User Interface

    Hi Guys
    I’m working on a custom user interface for operators and I would like to check and display the overall Pass/Fail result of the test at certain time intervals during execution.
    I added a sequence called ‘GetOverallResult’ to the ‘FrontEndCallbacks.seq’ which checks the Pass/Fail status of the sequence and I’m calling it form a SubVI within the User Interface written in LabVIEW (Check status.vi).
    The problem is that I’m getting the Pass/Fail status of the CallBack sequence not the test sequence I’m running.
    Could anyone please help me in this?
    Attachments:
    Check status.vi ‏17 KB
    FrontEndCallbacks.seq ‏5 KB

    Hi Attila,
    Have you instead tried reading the value directly from the main sequence? Have a look at the attached VI; pass the sequence context in and the Get Property Value VI will read the sequence's state.
    Is this suitable for what you had in mind?
    Regards,
    Tom
    Applications Engineering, NI UK
    Attachments:
    check.vi ‏10 KB

  • How to execute a sequence without using an User Interface

    Hi,
    I have programatically generated a TestStand Sequence File. I used C# and the TestStand API. I opened the .seq file in the default TestStand User Interface and the Sequence File runs perfectly.
    However, when I created a NewExecution using the Engine object created in the porgram, it seems that the sequence never starts execution. Please look at the following code snippet:
    // TSStep and TSSequence was created before 
    TSSequence.InsertStep(TSStep, 0, StepGroups.StepGroup_Main); SequenceFile TSSequenceFile = TSEngine.NewSequenceFile();
    TSSequenceFile.InsertSequenceEx(0, TSSequence);
    TSSequenceFile.Save("SeqGen.seq");  Execution TSExecution = TSEngine.NewExecution(TSSequenceFile, "Seq_0", null, false, ExecutionTypeMask.ExecTypeMask_Normal, System.Type.Missing, System.Type.Missing, System.Type.Missing);while (TSSequenceFile.IsExecuting == true) ; // this flag never changes to false  
    TSEngine.ReleaseSequenceFileEx(TSSequenceFile, 0);
    I know the sequence is not being executed because a COM Server (written as a Local Server in a .EXE) should start when the step within the sequence be executed.
    Any ideas why the sequence is not executing properly ?
    PacSoft

    Hi Pacsoft,
    Check out this example,
    I posted it in a former thread.
    Note: Also downloaded the .seq from the former thread! NEVER acept savings to Ni. -INI files !!!
    Greetings
    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=
    Attachments:
    ConsoleApplication2.zip ‏55 KB

  • In simple user Interface modify the sequence view to show only executing step

    I want to see only the Single executing step  in sequence view of the user interface
    are there any egs for the same!!

    This is relatively trivial to implement yourself. Handle the UIMessageEvent of the ApplicationMgr and when you get a trace UIMessage do something like the following:
    if (uiMsg.Event == UIMsg_Trace)
        int notUsed;
        String currentStepName = "";
        SequenceContext context = uiMsg.Thread.GetSequenceContext(0, out notUsed);
        if (context.NextStepIndex >= 0)
            currentStepName = context.NextStep.Name;
        /// Do something with currentStepName like update an indicator control.
    Hope this helps,
    -Doug

  • LabWindows/CVI Remote User Interface

    I have an application that I would like to modify to enable running the User Interface Panel from a remote
    computer. I have found articles on doing this with LabView. Can this be accomplished using LabWindows/CVI 7.0/7.1 ?

    Hello Hornsbyr,
    It is possible to have run remote front panels in LabWindows/CVI. First you would need the CVI Enterprise Connectivity Toolkit as an add on to 7.0 or 7.1. A web server is included in the Enterprise Connectivity Toolkit. By setting up and connecting to the web server, you will be able to monitor and control the operation of your front panel through a web browser. The INET_RegisterPanelAutoUpdate function is used to export a LabWindows/CVI user interface panel onto the Web. Once a client requests the image of the panel, the server periodically sends an updated image of the panel.
    The image of the user interface is sent as a JPEG image, but as stated in the LabWindows/CVI Function Help, the JPEG will not include your UIR's menu bar, title bar or borders.
    I have attached a document that further describes how to control your front panel remotely.
    Also, here is a link to the product pricing sheet: http://sine.ni.com/apps/we/nioc.vp?cid=11128〈=US
    Wendy L
    LabWindows/CVI Developer Newsletter - ni.com/cvinews

  • How to get the value of the global variable of test stand in labview User interface?

    Hi.
     Can anyone Please share examples and tell me to how access the test stand global variable using labview user interface.
    Solved!
    Go to Solution.

    I'm not surprised that what you are doing doesn't work.  The Start Execution UI Message is triggered when the user clicks a button to start an execution.  Realize that most executions go through a process model.  So you could be looking at the sequence context of the process model and not your client sequence file.
    I recommend reading that link I posted above.  UI Messages are your best bet but you cannot just piggy back on an existing UI Message like this.  They may not be getting sent at the time you need them to be.  The only way to ensure you get what you want is to trigger one yourself at the right time.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • CVI2009 general protection fault in user interface library commands

    I have a program which we have been using and updating since 1999.  We have updated it in various versions of LabWindows/CVI and had no problems.  We recently updated it and compiled it in CVI2009 and now we get general protection faults.  The faults are occurring in commands from the user interface library and not always in the same command.  Sometimes it will process the commands properly and sometimes not.  PlotXY, PrintCtrl, SetMouseCursor, and DiscardPanel have each caused the faults.  Any suggestions?

    Hello - 
    My initial guess is that you are running into the issue described in this KB.  What is the version of cvirte.dll in c:\windows\system32?  If it is 9.1.0.427, you need to upgrade to version 9.1.0.428, which is linked in the KB.
    Let us know if that does not resolve it for you!
    NickB
    National Instruments

  • What is the best way to get data to a user interface?

    Hi,
    I'm using labview 6i. I have an application with a handful of "core" vi's that actually run my application, doing the data acquisition, analysis, and control. I am currently using these same vi's for my user interface. I also have a number of vi's that contain menu's for configuring the "core" vi's. My questions is, what is the best way to seperate the "core" vi's from the user interface vi's. Global's, data socket, control references, others?
    Thanks for the help.

    Hi Sal,
    I have been a strong advocate of control refnums ever since LV 6i hit the streets. I recomend you look into using them to provide this conectivity.
    You could accomplish this by using a variation on the following.
    In your UI, create refnums for each of the controls or indicators that must be monitored or updated. Pass the appropriate refnums to each of the "core.i's" at program init time. Inside each of the core.vi's, use property nodes to read the control's values when appropriate and similarly for display purposes. (Note: Not all boolean mechanical actions are compatible with this technique. In those case you will have to explicitly write false values after find the control to be true or vise versa).
    By using this technique, you can keep the UI diagrams clea
    n. Depending on your app. the UI diagram could consist of the init's I mentioned above, and a while loop that watches if it's time to exit.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Numeric value variable problem with user exit

    Dear experts,
    I've created a variable (numeric value, user exit) and I want to get the value of variable from an user exit.
    Actually, I want to convert "0calyear" to a number to be albe to calculate (multiplying, dividing etc).
    If there is a possible solution only in FOX, the solution will be the best. However I couldn't find anything.
    So, the next solution I am trying is user-exit. But I am in stuck here.
    The problem is that I have no idea whether the numeric value variable has any sturcture like other variables(char. value) or not. If yes, what structure it has?
    I know, the characterisc value variables have the structure as blow,
        ls_varsel-chanm =
        ls_varsel-seqno =
        ls_varsel-sign  =
        ls_varsel-opt   =
        ls_varsel-low   =
    I've tried several times with the same way like above, but it doesn't work when I call the variable in "BPS0" or "UPSPL".
    How can I solve it? Please let me know.
    I am using SEM_BW 4.00.
    Many Thanks.
    Bruce

    Hi Ravi,
    Sorry, there's a correction. <b>var2 is used for getting the first month of the year selected by the user in var1</b>. If the user doesn't enter a value for var1, then var2 should take first month of current year from var1 which has by default last month of current year (populated in i_step1 from sy-datum). The user can select the value of var1 according to his requirement. Then var 2 should get first month of the year selected. That's why I'm using two exit variables.
    It works fine during the initial run of the query. But when the user clicks on the variable button in the toolbar and executes the query, var1 is not being displayed and an error message <i>No value could be determined for var2</i> is shown. All other variables used in the query are displayed except var1.
    Krzys, Is the option <i>Can be changed in Query Navigation</i>  available for Exit variables. I'll check that and get back to you.
    Boujema, Thanks for the OSS note.
    Thanks
    Hari

  • Navigating among user interfaces

    I want to ask how do we use HTML style hyperlinks in Swing to support navigation from one user interface to another within the same application. Please give some code sample if possible.
    Thanks.

    When you get the HyperlinkEvent, you can almost do anything you want. The navigation is just based on the information in that event.

  • Update Station Globals from LAbWindows/CVI user interface

    Hi,
    I am having a requirement such that i need to update a station global variable to true or false based on the click on a button present in User Interface.
    My Setup:
    Labwindows/CVI 8.5
    TestStand 4.2.1
    Please advice me.
    Solved!
    Go to Solution.

    Hi,
    first thing, why have you posted this query twice, http://forums.ni.com/t5/NI-TestStand/Update-Station-Globals-from-CVI-UI/m-p/1317023
    to be able to update a StationGlobal, you first need to get a reference to the Engine, this can be done using ApplicationMgr.GetEngine()
    Once you have that reference you can then get a reference to the StationGlobals by the use of Engine.Globals(). this returns a PropertyObject.
    So now you can use the SetVal methods to set your boolean, eg PropertyObject.SetValBoolean("MyBoolean",  0,  True)
    hope this helps
    Regards
    Ray Farmer

  • Remove variable from "Sequence of entry variables"

    Hi All,
    I removed a characteristic from the "free characteristic section", this characteristic has the following variable defined:
    -Type of variable: Characteristic value
    -Processing by: User Entry/Default Value
    -Variable represents: Selection option
    -Variable entry is: Optional
    "Ready for input" and "Can be changed in qry navigation" are both checked.
    From my understanding when you remove a characteristic from the query definition, the variables will be removed as well (please correct me if I'm wrong).
    In this case the input variable remains in the "Sequence of entry variables" list on the "Generic" tab of the query properties.
    I would like to remove the variable from the entry screen.
    Any suggestions?
    Thank you in advance.
    Kind regards,
    JB

    Thank you again.
    The decision is to modify (or delete) the variable which has an impact on all RFK's also if used in other queries build on this infoprovider.
    Thank you all for the quick reply.
    Kind regards,
    JB

  • Is there a way to keep Deployment Utility from modifying sequence file paths?

    While the Deployment Utility appears to be a great tool, it does some things that I'd rather it didn't. One is that it modifies all paths in sequence that it is including from Absolute to Relative. While this is a nice feature for many reasons, it is a show-stopper for our uses. This is because as part of our distribution process, we also use a checksum routine to verify that the sequence files being run by the operators on the Test Stations we deploy to are running the correct (unmodified) version of the test software. By using Absolute paths, we can detect and prevent accidental editing/changing of the sequences or paths that we have deployed, but if we have to use relative paths that is something that we could work with also.
    So my questions are: 1. Can this path update 'feature' be disabled? and 2. If not, then will pre-setting all paths in a sequence cause the deployment utility to only copy the file and not update it (thus changing it's checksum)?
    I'm going to test the latter when I have time, and if there are any other suggestions that might be useful, I'm love to hear them.
    Thanks,
    -Jack 

    Rick,
    In my experimentation to see if using relative paths, I was able to prove that a sequence that uses them will not be updated - with one caveat; if the path that is referenced by the sequence is not itself in a sub-directory, i.e.; it's in a different branch of the relative directory structure with respect to the Target (such as the TestStand directory), then the sequence file is always updated and re-saved. An example is that we have a sequence in the Tools directory that calls a DLL in the FrontEnd directory of the Components\User path. This re-saving causes a checksum change and screws up our verification mechanism. 
    It is unfortunate that I cannot prevent the deployment utility from modifying sequence files - Since we control the entire Test environment, including the location that software gets installed to - Test Station custodians can't go installing the software in a different location, or worse, multiple locations, so we don't have the issue to worry about.
    Because of this 'better' method, we now have to re-evaluate how to control the installed version of the software, or use a different installer, such as CVI, which while it has been working for us, has it 's own issues that we're trying to get away from. I'm glad that I am finding out about this now before I've locked down the sequences so that I can probably move the features in the Tools to the Frontend Callback sequence. 
    It's almost always the case thought that one persons forced enhancement is another's 'feature' or worse 'bug'.
    Thanks for confirming the behavior on the Deployment utility for me.
    -Jack

Maybe you are looking for

  • SQL*Loader and XML

    Does anyone know if SQL*Loader can read an XML file? Is this capability coming?

  • Layered menu buttons not working when built.

    I have a project that has one menu and one track. The menu has 7 buttons linked to 7 different markers in the track. When I run the simulation in DVD SP, the buttons link fine, and play as they should...but when I build the project and run it in DVD

  • Mail server setting to accept forwards from (our selected) networks

    I am in the process of moving our mail from 10.6.8 to 10.9. In ServerAdmin.app there was a place to indicate authorized networks for forwarding. That option is not available in Server.app. I am slowly working through the settings and setup of more nu

  • Solaris 10 installation failure from cd's

    Hi All, I am attempting to install Solaris 10 on my x86 laptop. I run the installation from cd #1 and go through the steps and installation will begin. I am choosing to install the entire distribution and when cd #1 finishes (about 500 mb of the 4000

  • JSAPI, speech output to file ???

    Hi all, I am not new to Java but using JSAPI first time, I have downloaded an example code which takes an Ascii string and speek accordingly, which can be hear on headphone. This code is working fine. Now I would like to know that how can I get spoke