TestStand API

Hello

I create a CVI interface that runs a Teststand sequence. I want to set/get the Teststand StationGlobals variable. I use this code to get a string:

If (TSTD_GetStationGlobalsString (ERR_RETURN_PTR, "TS. Username", & result)<>
printf ("fail\n");
on the other
printf("%s\n",result);

and the TSTD_GetStationGlobalsString function is as below:

int TSTD_GetStationGlobalsString (ERR_RETURN_DECLARATION, lookupString char *, char * pString)
{
int error = NO_TB_ERROR;
ERRORINFO errorInfo.
char * pTempString;

ERR_RETURN_INIT_NO_ERROR;

errChk (TS_PropertyGetValString (gStationGlobalsHandle, errorInfo, lookupString, 0, & pTempString));

* pString = malloc (strlen (pTempString) + 1);

strcpy (* pString, pTempString);

Error:

If (pTempString! = NULL)
{
CA_FreeMemory (pTempString);
}
If (error! = 0)
{
strcpy (* pString, "");
Returns - 1;
}
on the other
{
Return NO_TB_ERROR;
}

}

Howerver when I want to access another different variable of TS it doesn't, it works. Can someone help me please.

Thank you.

Hello

Problem solved, I only had to restart Teststand to save the new organization global ^^'

Thank you

Tags: NI Software

Similar Questions

  • How to use the Teststand API DisplayEditNumericFormatDialog method

    Hello

    I have to create a report for Teststand coustom generator plugin using c#. In the Teststand API is a built-in method called 'DisplayEditNumericFormatDialog '.

    http://zone.NI.com/reference/en-XX/help/370052M-01/tsapiref/reftopics/propertyobject_displayeditnume...

    Is there a way to set the value of the sample of the window that appears if the method is called?

    I do the following things:

    private void button1_Click (object sender, EventArgs e)
    {
    mChanged = true;
    bool tempbool;

    PropertyObject tempobject = mEngine.NewPropertyObject (PropertyValueTypes.PropValType_Number, false, "", 0); creates a temporary PropertyOgject to view the EditNumericFormatWindow

    tempobject. NumericFormat = mConfig.GetValString (P_PluginSpecific_Options_NumericFormat, 0); read the digital format of the plugin options
    tempobject. DisplayEditNumericFormatDialog ("Digital Format", out (tempbool), 1); View the EditNimericFormatWindow

    If (tempobject. NumericFormat == "") mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, "%$.13g");
    else mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, tempobject.) NumericFormat);

    MessageBox.Show (tempobject. NumericFormat.ToString ());
    }

    Thanks in advance

    Hello f4bo,

    attached is a sequence that shows how this can be done.

    Locals.Local = RunState.Engine.NewPropertyObject (PropValType_Number, False, "", 0x1),.
    Locals.Local.AsPropertyObject.NumericFormat = "%b"
    Locals.Local.AsPropertyObject.SetValNumber ("", 0, 20),.
    Locals.Local.AsPropertyObject.DisplayEditNumericFormatDialog ("false title", False, 0)

  • TestStand API: Define the relative path

    Dear community NOR!

    Could someone, please, with the following - is there an option to set the path to code modules, within the test sequence, to have a relative path, but not absolute? I add programmatically in code modules to the steps of the sequence, but currently, they have an absolute path. Is it possible to change it to relative with TestStand API?

    Thanks in advance.

    I was wrong. It is possible to manually cut path to the file (TestStand directories search function). Then, will add the modules of code with relative paths. But be careful - path should be cut properly.

    For example, I have the full path

    E:\Development\source code\supplementary\TestVIs\ Code Modules\Service\Print.vi

    My search directory is

    E:\Development\source code\supplementary\TestVIs\

    So, I need to cut like this:

    Code Modules\Service\Print.vi

    and without a bar slash at the beginning!

    Then it will be OK.

  • Toggle the runtime from Visual Studio TestStand API declaration XML file creation

    I am looking for a Visual Studio c# solution to selectively disable the creation of the generation XML report file using the API TestStand.

    These XML files are useful for active troubleshooting for technicians, but end up cluttering the important directories with unnecessary information most of the time.

    I am aware that the creation of the XML file can be disabled through the element to configure menu the TestStand sequence editor | Result processing | Name output report | Enabled the option unchecked.

    This is useful, but:

    1. I have not found a way to enable - disable this feature when running.

    2. I don't think it would be an effective solution for my paradigm of basic deployment without installation.

    Any help or ideas would be appreciated!

    Here is an example that works for me. If I run single-pass with a report on, I don't get a report.

  • Definition of the parameters of the VI in LabView Action Module with TestStand API

    I started playing with the API, TestStand, and I have questions on how to configure a TSAdp.LabViewModule.

    I use a few examples of NOR and the community of developers to get started:
    http://www.NI.com/example/30263/en/
    https://decibel.NI.com/content/docs/doc-18401

    These examples work as I expect and I understand them.  I am struggling with how to specify VI parameter values in the module when the step type is 'Action '.  In other words, how to set these parameters?

    All the examples I see use of step types that have defined fields, which are accessible through the API with 'AsPropertyObject '.  The action type, by default, has the result field.

    Set the values of the parameters of a VI with the API TestSTand?  If so, how?

    Thank you

    Jacob

    Well, I thought about it on my own so I figure I'd share the solution:

  • With the help of the Teststand API to create a .tpj file

    Hello

    I'm looking for an example on how to create a project teststand with the API file. I can not find a method or property to create it and add the project files to a workspace. I tried with PropertyObjectFile (class) without success.

    Let me know if you can help.

    THX

    Martin.

    TestStand 2010 SP1.

    CE that you say make sense, I managed to make it work differently using PropertyObject.WriteFile (format) just before SaveWorkspaceAndProjectFiles.

    Recap:

    Creating a workspace = Engine.NewWorkspaceFile (WorkspaceFile.AsPropertyObject (PropertyObjectFile.WriteFile [in writeFormat])(PropertyObjectFile.SaveFileIfModified[Prompt])) ((PropertyObjectFile.Path[Path])

    Creating a project = Engine.NewPropertyObjectFile [FileType] ((PropertyObjectFile.Path [Path]) (PropertyObjectFile.WriteFile [in writeFormat]) (PropertyObjectFile.SaveFileIfModified [prompt]

    Add a project to a workspace = Rootworkspace---> WorkspaceObject.NewFile [Path]---> [obj (NewFileReference)] [Index] WorkspaceObject.insertObject and WorkspaceFile.SaveWorkspaceAndProjectFiles of WorkspaceFile.AsPropertyObjectFile (PropertyObjectFile.WriteFile [in writeFormat]).

    Thank you for giving me a helping hand.

    Martin

  • Looking for advice on navigation in the TestStand API.

    I use TestStand for a few months now (self-taught using a LV architect with experience of the TS) and I think I will do certain things programmatically at run time and finished watching the massive array of properties/methods, etc. and ask yourself who are the properties/methods that will allow me to do what I have in mind.  Is there something fundamental missing in learning to understand which path to take to get down to the specific class and property/method interests me?

    For example, at the moment I am trigger some additional operations on the process model in addition to running the main client generated when you enter Test DUT. I would like to be able to programmatically from within TS itself, or more probably of LabVIEW or hide these tabs when running... I guess it's possible.  I know that executions can be set initially hidden but a search for 20 minutes of the API not immediately revealed magical items to let me do this programmatically.

    Hey, smoke,

    The ApplicationMgr TestStand is located within the TestStand UI control server. To access the Application Manager, you first need to action a step ActiveX (because it is an ActiveX control) and RunState.Engine.GetInteralOption (InternalOption_ApplicationManager), you get a Manager Application object.

    Example:

    "Select the Module tab then under Automation server" NI TestStand XXXX UI controls (Ver X.X)

    The object reference"RunState.Engine.GetInteralOption (InternalOption_ApplicationManager)

    Class object' ApplicationMgr (IApplicationMgr)

    Get the property executions

    Which returns an object reference and class performances, thus, create a variable(Local,FileGlobal,etc) of object reference to use to retrieve the properties of the Application Manager.

    Also note that to get the individual properties of your Application Manager object you won't be ActiveX measures for the properties you want.

    I hope this helps.

  • Load a VI (including the API, TestStand) in TestStand

    There,

    I want to load a VI in without LabVIEW TestStand.

    Version of LabVIEW 8.5

    TestStand Version 4.0

    The PC with TestStand just to LabVIEW 8.5 run-time engine, and the VI is used to import data into globals station; Also, this VI called TestStand API and motor TestStand.

    On a PC with LabVIEW and TestStand, everything is OK.

    But, on a PC with Runtime only, even if I configure adapters in time TestStand and select run in LabVIEW 8.5, an error message (unable to load VI...)

    I tested with a simple VI (dialog box), everything is ok;

    But with screws unpacking called API, TestSTand, an error

    You have an idea?

    Thank you for your answers

    Yes, I understand that you use TestStand development system and the screws are in a law degree there. What I ASKED, it was where you placed the TestStand screws on the pc only run time. Looks like you do not place them anywhere. If you do not, how do you think that the top-level VI will work? Don't you think that these screws are included in the runtime engine don't you? They are not. Only the ex of LabVIEW is the execution engine.

    You should really consider using the deployment tool.

  • The execution of the sequence TestStand in LabVIEW via TS - API: execution different times for the same sequence

    Hello - the members of the Forum.

    I have a problem about the execution of a TestStand sequence into LabVIEW. I created a VI that offers the possibility to choose a sequence TestStand-file and then executes the sequence using the TestStand API. The implementation is based on an example in C++-Application found the following link:

    http://forums.NI.com/T5/NI-TestStand/unreleased-references-using-engine-API-in-C/m-p/2927314#M46034

    The app works pretty solid where the VI is executed the first time. The VI treats the sequence chosen in an acceptable time.

    But where execution is started again, the sequence takes approx. 30 sec more than in the first case.

    So far I have not found a solution and hope someones got a clue about this problem...

    I use 2013 LabVIEW and TestStand 2013.

    I enclose my own VI, a sequence of the specimen with a small sample of VI, so you can reproduce the problem.

    Kind regards

    TobiKi


  • Using the API Teststand to get the dependencies of files to a workspace

    Hi all

    I have a very difficult time with the Teststand API to do what I want. I need to automate the deployment of the space in our system of Labview, I need to get the path of all the dependencies used in a workspace to create a label in Perforce (SCC) to version control before deployment.

    As for now, I managed to: open the workspace > get the RootWorkspaceObject > NumContainedObjects then GetContainedObject (in this case, the project files) > NumContainedObject then GetContainedObject (in this case, the files within the project) > NumContainedObject then GetContainedObject (in this case, the files in the folders).

    The problem is this: I can get the project DisplayName and path of the project by the property node file reference. However, the folder object as I get the name and no path, and with the objects of the elements, I get only the name and what looks like a relative path. I want this absolute path, on the second line, for each element in the picture below... that is, the Properties menu of one of the elements.

    Once I get these paths, I would do the same thing with a sequence to get the associated EIS. If I can get those that I think that I can get to get their secondary dependencies in Labview and will be able to build a label necessarily for all dependencies.

    P.S we use LV8.6

    THX

    OK, first of all thx Francisco, I tried this invoke node (GetAbsolutePath), but it looks like for some reason I have it did not in the right place the first time...

    So now:

    1. we can get the paths of all files included in the workspace.

    2. we can get files albums since a sequence file dependencies, (with a slight modification, sous-séquences too).

    3. we can get the top subs dependencies (in this case Vi) files.

    It is only a proof of concept, given that all the references are not closed properly. I updated 'TSDependencyGet.vi' to account for the solution of the above 3 assumptions. This example look only for the Modules of VI no other code.

    It assumes that your workspace is always at the root level of the 'projects' files and that the first search path is 'space of current work - subfolders selected' and second line of research is "* reeuse root directory * with selected sub.

    In my case, the workspace has 1 project with 7 files, the sequence is in folder 5. Specific VI are in the subdirectory of the root workspace folder and reuse of Vi in another way (second search directory).

    I hope that this example can help others.

    Martin

    See you soon

  • How to get the return parameter in sequence teststand ran by labview labview

    Hello

    Executes a test sequence of labview (essentially running "\Examples\TestStand API\Executing sequences using API\LabVIEW\Execute with no Model.vi process") I need to get a parameter returned in 'Settings', after the sequence has run.

    My problem is that I get the value upon registration of the sequence and not the value after execution.

    How?

    Vagn

    Vagn,

    in order to obtain the values of the execution, you need access to execution. The following screenshot shows how to access.

    Please note that this VI is lying will be called by TestStand. DO NOT USE THIS VI IN A CUSTOM USER INTERFACE!

    Thank you

    Norbert

    EDIT: This dummy code shows how to read the string parameter 'Return '. Each parameter must be read separately with appropriate playback function.

  • How to read and write attributes using the API?

    I'm trying attributes of access (read and write) of the following:

    SequenceFile

    Sequence

    The sequence steps

    When you look at the documentation of the API, TestStand, the following functions are available:

    PropertyObject

    Properties

    Attributes (read-only)

    HasAttributes (read-only)

    Methods

    DisplayAttributesDialog

    I tried to use the SetValString and GetValString commands using the reference of the attributes, but it does not seem that the data is stored in the file.

    I can't find the following information in the TestStand API:

    1. Where the attributes are stored in a property object?

    2. How can we access through the API?

    No advice and no information is appreciated!

    You must increment the number of changes to the file after that editing the sequence editor (or UI) won't refresh or mark the file, as amended. Use sequenceFile.AsPropertyObjectFile (). IncChangeCount().

    SequenceFile attributes are stored in the SequenceFile.Data, not the object of SequenceFile object. You can change them in the Advanced tab of the properties of the file sequence dialog box.

    Hope this helps,

    -Doug

  • TestStand and LabVIEW treat differently polymorphics with instances with bodies of private classes.

    I have a class of LabVIEW and the class contains a method that is a polymorphic VI, and that polymorphic instances has. If I put the scope of Private, and the polymorphic bodies access to the public, then I can force developers who use the class to use the polymorphic VI (and not to call directly the instances). It's great. I like that.

    but...

    I have build a TestStand API that uses a polymorphic and instances as described above. I create a time of LabVIEW, with a type of call class member, and I target my class. TestStand does not support polymorphic VIs, meaning that polymorphs or its instances appear in the name of the Member list.

    This means that, to support my LabVIEW users and my TestStand users, I need to create two separate APIs, which is not a place of happiness to be. No matter who encounter this and found a solution? Or I'm looking at this wrong?

    It dawned on me later that we could actually change TS to be a static link to a particular instance VI via the polyVI. After all, you can manually select an instance specific polyVI. It would be just a way to declare in TS "link to this particular instance of the polyVI." Allowing the TS to say "I'm going through a public interface to join a private function."

    So instead of linking "A.i" you could bind to ' PolyVI.vi: A.i ".

  • CVI Api Window7

    Hello

    Actally, I develop my stuff under XP. Everything works fine.

    Were a few machines running Windows7. The machines are broken in the custom user interface created with .net

    during execution of the models modelsupport2.dll GetReportBody_CImplementation (old deriavte comes with TS2.0 rebuilt with CVI8.5)

    I would like to set up a debug environment 2010 CVI, but fails because no TS-CVI-AP fp are installed on the machine.

    If you try to open the TS-shipped Cvi UI project. CVI said that "Program Files (x 86) \National Instruments\Shared\CVI\instr\TestStand\API\xxx.fp.

    are not present. I have a German Window7 that comes with "ERASMUS (x 86) \National... but there is no file xxx.fp to the left."

    I tried to find somewhere on the disc hole without success.

    --> How to get the api CVI TS installed on a German machine?

    Another couriousity that I reallized running sequence one model with shipped 'Interface user Simple' in .net and cvi it crashes too.

    If you try it with the editor and "Full Featured", it works fine.

    Concerning

    Jürgen

    Hello

    Just turned off the brain and that, not asking why it turns on this machine, not the otherone.

    Forget the above questions, it's nonsense. I received the TestStandxxx\API\CVI .fp as if I uesd to C/C++.

    I got the bug with the debugger in the function "RecursiveSubProperties" of the module 'c_report.c '.

    He planted when you call CA_FreeMemory (display).

    It's really funny, because he has worked for more than 10! years now and only maschine broke or

    as the proverb says: "everyone here puts his pants on the same way as you.

    Have a nice day

    Jürgen

    P.S. If you can't find the bug, please do not hesitate to answer.

  • API ActiveX vs engine API

    Hello

    I want to develop an Interface with c# operator, but I don't know if I have to use the TestStand or motor TestStand API ActiveX API. In my opinion, the API ActiveX TestStand is more a sampler than the API of the engine, but the engine API is more flexible and more powerful.

    In fact, us know not what's the different between the ActiveX API and the API of the engine, could you please tell me in this case I use the ActiveX API and in which case I should use the API of the engine?

    What is the advantage and disadvantage of the ActiveX API and API engine separately?

    Thanks in advance!

    Concerning

    Simon

    The user interface controls are ActiveX controls, designed to help you create a richer user interface, more quickly and easily. These controls are called in the engine API to interact with TestStand. The engine APIs are low-level APIs. The API UI APIs for user interface controls themselves and are usually higher level API. Step usually recommended to use the API of the engine type code non-interface user, such as code modules and code modules. The UI code must use the user interface for most controls.

    Hope this helps to clear things up,

    -Doug

Maybe you are looking for

  • Some windows don't show/answer while others

    I have been using firefox 8.0.1 for awhile. I have 4 windows, of which 3 have several groups of tabs (and, of course, multiple tabs within each group of tabs). It worked smoothly, until a few days ago. Now, two of my windows are inaccessible and 2 wo

  • try to set up a router with no cd

    How can you tell if your computer is configured to get its TCP / IT net working settings from the router via DHCP Thanks for any help

  • up to date kb/2680317 failed with the error code 646-how can I fix

    How to fix update does not install and error code 646 kb/2680317

  • Browser not blackBerry Smartphones

    Storm 9550 14 GB of free memory Unlocked Verizon OS version 5.0 SIM Roshan (Afghanistan) Upgrade to 5.0 when received from NewEgg, option browser is empty, phone connetcs wifim local but unable to use it. I also downloaded and installed Opera Mini, b

  • problem in dell inspiron 14R wireless 5420 with windows 8

    I use dell inspiron 14R 5420... I upgraded to windows 7 ultimate for windows 8 pro... now I am not able to install the driver on my system wireless... I contacted support dell several times... but the driver gave me not installed and gives error soft