TestStand - dynamically retrieve a prototype of code module

Hi all

Thank you for reading me

I am currently trying to find little code (if it exists), or some ideas/directions to automatically retrieve a prototype of code module.

This code can be written in any language (LabVIEW, C, TestStand, or other)

My final goal is to scan a directory for screws, dll (and so on) and get their prototype in order to have an external database generator module filled code.

Where there is no such thing as this code, could you please let me know what methods I could interact with the TS engine to retrieve a code module.

Best regards.

Hello

This c# example you will see what needs to be done to get the list of parameters

SequenceCallModule objModule is step (SequenceCallModule). Module;  Just a note: only if you're sure it's a SeqenceCall
objModule.UseCurrentFile = true;
objModule.SequenceName = strSeqName;
objModule.UseSequenceParameterPrototype = false;
objModule.LoadParametersFromSequence (sequence); Parameters SequenceCallParameters = objModule.Parameters;

Concerning

Jürgen

Tags: NI Software

Similar Questions

  • Get the array of unknown size of the CVI code module

    I'm creating a type custom for my client, and I've encountered a problem that I'm not sure how to solve.

    Here's the situation:

    We have a custom step in which the main code is executed within a step after step. The code acquires samples of an instrument, but it is unclear how many samples will be returned. The CVI function has a table, the size of this table and an output parameter that indicates how many samples have been returned as parameters.

    void AcquireSamples (double* samples, int samplesBufferSize, int *numSamplesRetrieved)
    

    The goal is to have the array returned by the size of the number of samples taken.

    I tried several ways, none of which works completely. The problem is that, as described here, TestStand creates a temporary table to move to the code module. but it does not resize the TestStand array property. So I need to manually resize the properties of the table, and I did not understand an elegant way to do it.

    It would be easy if I had to create just a not, because I could use expressions after. I'm creating a type but I don't have that luxury (my code should allow the customer to enter expressions of post, but I run the risk of my client, removing any expression after default I get home).

    First question:

    I noticed when I was creating a stage with a CVI code module, that additional results allowed me to specify logging in both settings [in] and [out]. This I extrapolated that the parameter expression was evaluated before calling the function both again after the call to the function. I did some tests, and it doesn't seem to work that way.

    (1) this is expected behavior? I don't see it documented anywhere, if can I rely on it remains the same in future versions of TestStand?

    I used this behavior to my advantage to create an expression that does what I need an an step code module. But it does not work for a module of code to a later stage.

    I did a small test DLL file and sequence illustrates my problem. I tried to document the file in sequence to show where I'm stuck. You will need to put the DLL in one of your directories to search for the type of custom work.

    Any help would be greatly appreciated!

    I think the problem is that the C programming language does not provide enough information for a caller to know the size of an output table in any kind of standard. I recommend again, you pass a CAObjHandle which is the variable of array instead and set the table directly using CA_Array1DToSafeArray() to create a safearray and SetValVariant on the propertyobject which is the property of the table to set the table. Don't forget to free the array (using CA_SafeArrayDestroy()) that you created with CA_Array1DToSafeArray after that SetValVariant call to avoid leaks.

    Hope this helps,

    -Doug

  • Dynamically retrieve "rank" in the hierarchy to determine the next member to be inserted into the structure?

    Hello

    I have a hierarchy with the structures of members following leaves:

    Depending on which division they are ZEN-A, ZEN - B and C ZEN with 7 numbers after them.

    Is there a way to dynamically retrieve the Member in the ZEN-A, ZEN-B and C ZEN in three separate properties so that the user DRG can determine the next member must be added?

    For example, if I have a structure that looks like this:

    ZEN-A0000001
    ZEN-A0000002
    ZEN-A0000003
    ZEN-A0000004

    I want a property which would show the user DRG WHAT ZEN-A0000004 is the largest number so that he or she must insert ZEN-A0000005.

    Thank you!

    Hello

    How do you combine them?

    If something like this ParentABCD-AliasABCD

    Then, you can use the formula Concat to do the same thing:

    Concat ((HierNodePropValue (Hierachy2, ABBREV (), PropValue (Core.ParentName)))-, (HierNodePropValue (Hierachy2, ABBREV (), PropValue (Custom.AliasXXX))))

    Thank you

  • Change the parameter Prototype of a Module DLL TestStand Programmaticaly

    Hello.

    I started this post inside the LabWindows, but there was no response.

    Hope I can get help here.

    Please see the following link

    http://forums.NI.com/NI/board/message?board.ID=180&message.ID=46129&query.ID=804485#M46129

    Thanks in advance.

    Hi Doug.

    I'm sorry for the delay.

    Here is how I solved the problem: I changed the module of the BCI to the DLL module.

    Here is a sample of my code:

    I changed CVIModuleGetParameters() and CVIParametersGetItem() to TS_DllModuleGetParameters() and TS_DllParametersGetItem and now it works fine.
    seqContextCVI = object reference ThisContext
    __declspec(dllexport) __stdcall GetControlarParameters (CAObjHandle seqContext) Sub
    {
    error int = 0;
    ErrMsg errMsg = {'\0'};
    ERRORINFO errorInfo.
    char strItemLabel2 [1024] = "";
    Step CAObjHandle = 0;
    CAObjHandle seqFile = 0;
    Module CAObjHandle = 0;
    Parameters CAObjHandle = 0;
    Parameter CAObjHandle = 0;

    tsErrChk (TS_SeqContextGetStep (seqContext, & errorInfo, &step));))
    tsErrChk (TS_StepGetModule (stage, & errorInfo & module));
    tsErrChk (TS_DllModuleGetParameters (module, & errorInfo & settings));
    tsErrChk (TS_DllParametersGetItem (parameters, & errorInfo, CA_VariantInt (1) & parameter));
    sprintf (strItemLabel2, "\"%s\"", "TEST" ");
    tsErrChk (TS_CommonCParameterSetValueExpr (parameter, & errorInfo, strItemLabel2));

    NOTE: After make a change to a stage you must mark the file, as amended by
    increment the number of changes to the file. It is also necessary for the change to show
    upwards in the sequence editor immediately.
    tsErrChk (TS_SeqContextGetSequenceFile (seqContext, & errorInfo, seqFile));
    tsErrChk (TS_SeqFileIncChangeCount (seqFile & errorInfo));

    Error:

    CA_DiscardObjHandle (Step);
    CA_DiscardObjHandle (seqFile);
    CA_DiscardObjHandle (module);
    CA_DiscardObjHandle (Parameters);
    CA_DiscardObjHandle (Parameter);

    If an error occurs, set the error indicator causes an error of execution at TestStand.
    If (error<>

    TS_SetStepError (seqContext, error, error);
    }

    Thanks for all the help.

    My best regards.

  • Use the same code module to multiple steps in the sequence

    Hi all

    I tried to implement a sequence that uses the same code for all steps module in the order, but I'm not returning to it when I need to send it commands.  I got regarding the appellant the VI in a new thread so that it can be executed asynchronously.  I can run the simple sequence and it will indeed open the VI and move to the next step.  When I close the VI manually from the front, the TestStand sequence is completed, as planned.  So it turns out that I have a lot more work.

    My question is how to call the thread separate from the main sequence and other sequences overtime when I need to change the settings.  If I insert a step in the Action, I have to select a file of VI, but from what I can tell, it opens another instance of the file and does not provide an interface with the other asycronously running instance.  My next guess was to use a stage of education, but I was not able to understand how to configure the search string to call the VI settings.  In addition, I don't know how to proceed.  Please notify.

    My intention is to start the module code (asynchronously) VI, run several different subsequences in the main sequence, which call this same VI and edit its settings, close everything and report the results.  If I'm understand how TestStand is supposed to work, please let me know.

    Thank you

    GSinMN

    What I do is use a queue to send data to the asynchronous VI.  So he can run and whatever, but also receive orders from the queue.  I use a motor of Action that contains the reference to queue and sends the commands.  If you really just call the engine of the Action of your sequences.

  • Can I add a dynamic object in the CSS code?

    Is it possible to insert a picture of the smart object in the CSS rather than HTML code?

    If I want to change the background of the site, I can change it in one place. I thought that was the point of CSS.

    Am I missing something?

    No, not missing anything. As I explained in my original answer, you can use Dreamweaver CS4 to convert a PSD to a background image in an external CSS file or a block of style incorporated. However, Dreamweaver CS4 don't treat it like a dynamic object.

    The Smart Objects PSD works only in HTML. When you select a PSD to CSS, it generates an image compatible with the web (.gif, .jpg, or .png), but not a dynamic object.

  • Change the boundaries of the code module

    Hello

    For a test (numerical limit, TS4.2), that I want the limits for this test of in the module.

    To do this, I spent the context module (LV8.6) so that I can access the Step.Result.Limits property, however I could not find any property named result. I tried to do this using as an object of property, but I couldn't.

    Any help?

    K.

    Sorry guys,

    Everything to be perfect now. I've made a typo (unit instead of units) and I removed the 'step' in the names of properties naturally.

  • file retrieved via JavaLoader.exe .cod signatures

    Everyone could see the signatures for a .cod JavaLoader.exe file?  According to the following link:

    http://docs.BlackBerry.com/en/developers/deliverables/5779/Retrieve_infomation_about_a_cod_file_5123...

    You should be able to do the following:

    JavaLoader.exe info - v MyApp.cod

    and see the signatures for MyApp.cod but I don't see (I know that the applications in question were signed).

    This ability was out of JavaLoader.exe (or it was ever really there?)

    Thanks for any idea.

    I have confirmed that it is a mistake in the documentation.  JavaLoader does not support the list of signatures applied to a COD file.

    This will be fixed in a future version of document.

  • Dynamic Action run PL/SQL Code runs is not after 4.2.5 upgrade

    APEX 4.2.4 to 4.2.5 11.2 database upgrade

    I have a button to click on DA who owns shares run of PL/SQL Code and update point who worked in version 4.2.4 which is no longer running after the 4.2.5 patch.

    The PL/SQL procedure has been tested autonomous and it runs correctly.

    I tested him DA is actually shot on the click event by adding an alert "DA xxxx pulled" action before the execution of work of PL/SQL action and action alert.

    There is also a similar on DA click which makes the action opposite to the DA problem and it works both are configured in the same way:

    Static DA, run Code PL/SQL - check waiting for result, and not repress with the same Submit and return items.

    Any ideas on a possible cause/solution much appreciated

    Fixed it, the question was the Page elements of return of goods on the action of PL/SQL Code:

    If the target element was empty the action failed, by adding a value in the database through a normal SQL insert then the insert DA completed successfully.

    Removing Page elements at the point of return of the action of PL/SQL and together action update the target element after the DA fires in all scenarios.

    But thanks for the lead

  • How to dynamically retrieve the host name of the server APEX?

    Hello

    I have request Express installed 3.1.0.00.32 on 2 servers in a configuration of dataguard, which means I can failover from one server to the other.

    The problem I encounter is the URL. I wrote a beautiful PL/SQ/procedure to send mail, in the body of the mail it is a URL that points to a hard-coded host name (teleg1:7777)
    BEGIN
    ....
     l_url := 'http://teleg1:7777/pls/apex/f?p=109:29:::NO::P29_ID:'||C1.ID ;
    ....
    It can occur I the digital switchover to the other server which name would be teleg2, but then the url change because the host name is "teleg2:7777".

    It should be like this:
     l_url := 'http://teleg2:7777/pls/apex/f?p=109:29:::NO::P29_ID:'||C1.ID ;
    Is there a way to retrieve the host name of a global variable of APEX, something like G_HOSTNAME? Or from another source? As a result, the procedure is as follows:
     l_url := 'http://||G_HOSTNAME||:7777/pls/apex/f?p=109:29:::NO::P29_ID:'||C1.ID ;
    The varialbe G_HOSTNAME would contain etiher "teleg1" or "teleg2" according to the APEX server that executes the PL/SQL procedure at this time.

    I hope I am clear.

    Good day!

    Christian

    Use the functionowa_util.get_cgi_env . You'd be interested in CGI environment variables SERVER_NAME and SERVER_PORT.

  • TestStand performance is slow after deployment.

    Hello.
    We have created a TestStand sequence using labview mainly vi code modules. The test sequence is over and is running as it should be in the sequence editor.
    After that I used the Deploument tool to build an image that could be moved a production PC, something went wrong. The test sequence always starts and it looks good, but enforcement is extremely slow!
    It doesn't matter if I run on the production of PC or on my computer (where the sequence has been created). I can run the sequence of the location of development and everything is ok, I then close the sequence and load it from the situation created by the deployment tool and it runs slow...
    It's not because the speed of tracing is set to slow down, and it seems to be the vi "s themselves that run slowly. Almost as if "highlight the execution" is on.

    Any idea what's going on...?

    Best regards
    Stephan.

    Hello Anand and thank you for your response.

    I just find the answer to my problem yesterday.

    We have a vi logger that is used during the development and debugging, and it is meant to be disabled afetr the build - it wasn't.

    The logging feature uses a VI server that it has not found after the build and then exceeded several times - causing the slowdown.

  • Environment programs began within a module of code Teststand, CVI

    What environment is seen by an executable file, which is started by LaunchexecutableEx() in a module of Labwindows/CVI code using Labwindows adapter in Teststand? Is is possible to change this environment?

    We noticed that an executable file, which creates directories for files logging and configuration in its installation directory data, which autonomous road, now creates these directories somewhere under C:\Dokumente und 4.2.1\ Instruments\TestStand Users\Dokumente\National All Anwendungsdaten launched from the CVI code module.

    The executable you are using is probably the addition of things based on the current working directory. It is not a best practice. If you have the source code for the executable, you should consider changing to use GetModuleFileName ( http://msdn.microsoft.com/en-us/library/ms683197%28v=vs.85%29.aspx ), passing NULL for the handle of the module to get the path where the executable file is located and use this path rather than the current working directory. I would say that using the working directory current is almost never the correct thing for a program to do it.

    That said, if do not have the code for the executable file and is enough to make it work, you can use the Windows SDK CreateProcess ( http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx ) function that allows you to specify a currentdirectory (I don't think that the environment is the problem in your case, I think that it is the current directory). Or you can use the type of executable step TestStand call place that has a setting for the current directory (I think they call it the Working Directory).

    Hope this helps,

    -Doug

  • Code/sequence TestStand sharing best practices?

    I am the architect for a project that uses TestStand, Switch Executive and LabVIEW code modules to control automated on a certain number of USE that we do.

    It's my first time using TestStand and I want to adopt the best practices of software allowing sharing between my other software engineers who each will be responsible to create scripts of TestStand for one of the DUT single a lot of code.  I've identified some 'functions' which will be common across all UUT like connecting two points on our switching matrix and then take a measure of tension with our EMS to check if it meets the limits.

    The gist of my question is which is the version of TestStand to a LabVIEW library for sequence calls?

    Right now what I did is to create these sequences Commons/generic settings and placed in their own sequence called "Functions.seq" common file as a pseduo library.   This "Common Functions.seq" file is never intended to be run as a script itself, rather the sequences inside are put in by another top-level sequence that is unique to one of our DUT.

    Is this a good practice or is there a better way to compartmentalize the calls of common sequence?

    It seems that you are doing it correctly.  I always remove MainSequence out there too, it will trigger an error if they try to run it with a model.  You can also access the properties of file sequence and disassociate from any model.

    I always equate a sequence on a vi and a sequence for a lvlib file.  In this case, a step is a node in the diagram and local variables are son.

    They just need to include this library of sequence files in their construction (and all of its dependencies).

    Hope this helps,

  • How can I retrieve the execution of TestStand 4.0 Test results in a c sharp Application?

    I am writing a c sharp application to launch a test sequence in TestStand 4.0.1 and then collect the results of the tests to update our own screens / report (s).  I'll need some sort of recursive routine to collect the following information (if available) for each stage: name, result, Min value, Max Value, measured value, units.

    My attempts have been to an event to end execution allows to collect data:

    void EndExecution (sender As object, EndExecutionEvent ev)
    {
    Results PropertyObject = ev.exec.ResultObject.GetPropertyObject ("ResultList", 0);

    int numContainers = Results.GetNumElements ();

    for (int i = 0; i)< numcontainers;="">
    {
    PropertyObject resultData = results. GetPropertyObjectByOffset (i, 0);
    String testResult = resultData.GetValString ("Status", 0). ToString();

    PropertyObject testStep = resultData.GetPropertyObject ("TS", 0);
    Dim testName = testStep.GetValString ("StepName", 0). ToString();

    MessageBox.Show (i.ToString () + "". "") testName + "=" + testResult);
    }
    }

    But this only gives me MainSequence data.

    How to cross the ResultsList tree to access the results of all the test steps?

    tlaford,

    There are a couple of big problems with what you are doing:

    (1) it is best to call the code from a test report of the result of your sequence treatment reminder (just use an action step) or change the process template to call your code rather than to call for EndExecutionEventHandler of the user interface, because if you use Test DUT and then there is a separate resultlist by USE not by execution, and it is generally processed at the end of each use not at the end of execution. If you use the EndExecutionEventHandler then you should NOT use the process templates provided with TestStand because they don't work that way. Instead, you just run your sequences without a process template. Although I really recommend the path of process model, even if you write your own a custom, because it is more flexible, and then hardcode your treatment result in the user interface as you do. A few reasons why a process model is that more flexible or better are that it will work in any user interface, including the sequence editor (no changes to the user interface is needed), and it can do everything you can do in a sequence, for example to call a code module in any language supported , asynchronous sequences, call sous-séquences, etc.

    2 recursion) through each property at such a low level is bad because the names of the properties are not guaranteed to be unique for what you expect them to be. Anyone can write their own types step custom with some result properties that they would like. You must make sure that the full path to the properties is what you expect it, and you can even check that the type of step is one you expect. You should rather loop through the result of higher level items ONLY and are looking for the complete data lookupstrings that you expect from these elements. For example, instead of WalkTree you might have the following instead:

    This must be called from a step in a test recall report or in a custom process template
    rather than from EndExecutionEventHandler of the user interface, because if you use Test DUT then
    There is a separate resultlist by USE, not by execution, and it is usually processed
    at the end of each use not at the end of execution.
    Sub ProcessResultList (PropertyObject resultList)
    {
    numElements int = resultList.GetNumElements ();
    < numelements;="">
    {
    Element PropertyObject = resultList.GetPropertyObjectByOffset (i, 0);
    String stepTypeName = string. Empty;

    If (point. There are ("TS. ((StepType', 0))
    stepTypeName = GetValString ("TS. (StepType", 0);

    If (stepTypeName is "NumericLimitTest")
    {
    If (point. Exists ("Limits.High", 0))
    {
    Double highLimit = item. GetValNumber ("Limits.High", 0);
    Do something with the value
    }
    }

    NOTE: The two step type SequenceCall and NI_Wait can have subresults like that. A stage of waiting waiting on an asynchronous thread or the execution will have this.
    If (point. There are ("TS. ((SequenceCall.ResultList', 0))
    {
    Recurse for results call sequence.
    PropertyObject sequenceCallResultList = item. GetPropertyObject ("TS. (SequenceCall.ResultList', 0);
    ProcessResultList (sequenceCallResultList);
    }
    }
    }

    Hope this helps to clear things up,

    -Doug

  • Module CVI written TestStand property, property value resets after the step execution.

    Hello

    I did a lot of research and find nothing relevant to the question that I have. I've created a DLL in CVI containing several functions I call TestStand. I also created a type of step customized for each function call. Every function in the DLL has a runtime version and a version edit-time. Time edition features each have a UI associated with them are called from teststand. Change these functions are placed in the custom under the heading "change" step step-type tab Before executing a sequence with these custom steps the edit-time user interface is launched to allow the user to input values that will be passed to the run function. originally, I tried to set up my functions as a 'post step' step in the step properties. However, the sequences would fail to run because the parameters of the step module was empty. Then, I selected CVI as the adapter in the step properties and specified a default module for each type. This filled the tab module settings step like I wanted. However, when I ran the sequence each function execution of measures was called twice, once for the stage of the post, and once for what was in the tab module I suppose. I then re-entered the types of step and deleted all the steps of the post office. I thought that all the problems have been resolved at this point, however, after doing some more extensive tests I always have a bug, I was unable to get rid of that.

    The problem is that two of my step types have to write data to current TestStand to execution after they ask an external device for IT. I know that the query works because my log text that generates the DLL displays the correct values. However, the data are not get rewritten on TestStand correctly. In the enforcement functions after checking the valid data has been returned, I try to write to TestStand using: "TS_PropertySetValNumber (seqContextCVI, NULL,"ThisContext.Step.ParameterValue.NumericParameter", 0, (double) ushortint);" »

    I checked that this call generates an error and also used the TS_PropertyExists method to check that I had the correct search string. These extract so I added then another command that reads the value written to TestStand two return immediately after to write it. I printed this in my log file and found that the value is written to the property of TS. So, the problem is that TestStand is defining the property to reset after the code module is running. How to prevent this?  

    Thanks for all comments, let me know if anything specified needs.

    Josh Meyer

    Well, I came to the conclusion that my 'problem' is not really a problem. I had a bit of a basic misunderstanding of the works of TestStand (I don't actually use it, I am writing just a code which will bring an existing one of the tools of the features inside the TS).

    in any case, what I learned is that these properties are retained (so you can set up a sequence, save it, re - open and be able to run it without any reconfiguration for example), when you write to a property when installing editting/sequence. The run time values are not preserved (if connected) because they are only required to carry out. For example, if a user calls one of these functions to extract value from a controller, they probably do so because they want to check the value, it's what they expect it to be. Rather than watching the value after execution (which is what I me assuming they would do), they would set up the step after step "read value" to test the value that it returned. This value is available in 'RunState.PreviousStep.valuename' in the downloaded step step "read value".

    Hope that I did not confuse anyone a lot, I'm completely new to TestStand.

Maybe you are looking for

  • Satellite L10-102: screen goes down and then comes very quickly.

    Hi, I have Nooteboom L10-102. Sometimes during work, the screen down abruptly then comes very quickly. Like the natural eye blinking. ? s there a kind of great power problem or comes from the different fault. I need advice to fix the problem. Thank y

  • disable printing in simple OI

    I have TestSTAND 4.1 and LV 8.6 I use Testexe. simple OI after the sequence run to the end and after the banner of PASS/FAIL, there is a pop up with two button start a new market or STOP. If the operator press STOPS, I use the report in simple text f

  • disk-read error press ctrl alt del

    I start to load Windows XP Pro and I get an error MSG before it comes to the first Windows XP logo, it reads the disk read error press ctrl, alt, del start I have checked all my connections and cables. I can add another hard drive and use bad like a

  • Add or remove programs is empty and REGSVR32 APPWIZ. CPL command does not set it.

    I tried the: REGSVR32 APPWIZ. CPL without change. I also tried without prevail the following: ·       [HKEY_CLASSES_ROOT\CLSID\ {00000535-0000-0010-8000-00AA006D2EA4}]'ADODB. Recordset '. ·       [HKEY_CLASSES_ROOT\CLSID\ {00000535-0000-0010-8000-00A

  • Cannot open volume for access reacts

    I get the following message when my computer restarts after scheduling a chkdsk 'C: file system checking. The type of file system is NFFS Cannot open volume in direct access Windows has finished checking the disk. How can I get around that way I can