Quantcast
Channel: All NI TestStand posts
Viewing all 24425 articles
Browse latest View live

Re: How can I open an external application using NI TestStand?

$
0
0

Does VIPM have an API that you can check those things with?


Re: How can I open an external application using NI TestStand?

Re: How can I open an external application using NI TestStand?

$
0
0

Hello Jigg,

 

Thank you for the VIPM API. It was helpful.

Re: Add elements of variable containers with Teststand API

$
0
0

Basically you want to use the property object methods.  Depending on the variable type it will be different.

 

For example:

 

Step.SetValString("MyVariable", 0x1, "Foo")

 

Will create a variable called MyVariable for your step (if it doesn't exist) and set the value to Foo.  It will be a string variable.

 

You can read more about the SetValXXX  methods for the property object here: https://zone.ni.com/reference/en-XX/help/370052AA-01/tsapiref/reftopics/propertyobject/

 

Hope this helps,

Re: Using TS Expressions or LabVIEW API to map VI Call controls and indicators to Test Stand variables and report

$
0
0

Not sure if you know about the set and get XML methods for a property object: 

GetXML: https://zone.ni.com/reference/en-XX/help/370052AA-01/tsapiref/reftopics/propertyobject_getxml_m/

SetXML: https://zone.ni.com/reference/en-XX/help/370052AA-01/tsapiref/reftopics/propertyobject_setxml_m/

 

And since everything (except the engine) inherits from PropertyObject in TestStand then you can essentially convert anything into XML (including Steps, Sequences, Sequence Files, Etc....).  Then you can just manipulate the exact values you want and then read it back in.  It gets a little ugly though because it is flattening every little piece of information needed to recreate the object.

 

Basically think of a step as a large data type with a whole bunch of nested sub properties.  In the Sequence Editor you are simply defining the "attributes" of that data type.  So by making a step a LabVIEW step it will automatically have a Step.TS.SData.ViCall container.  the TS.SData container is used for when you change the adapter of a step.  The ViCall property has a sub property called Parms, which is basically an array of containers, each representing an input/output to your VI.  So if you had an error cluster going into your VI and wanted to see if it had an error then you could use Step.TS.SData.ViCall.Parms["error out"].ArrayClusterEls["status"].ArgDisplayVal. 

 

As you can see this gets very complex and ugly and is very STATIC.  So TestStand has created a nice API to do all of this.  You can find more about the API here: https://zone.ni.com/reference/en-XX/help/370052AA-01/tsapiref/reftopics/labviewadapter/  

 

Personally, I think you could accomplish what you want by simply using the property loader step and just use local variables and pass those into your LabVIEW step.  Assuming your goal is to have someone edit certain values in a text editor.

 

Hope this helps,

Re: Using TS Expressions or LabVIEW API to map VI Call controls and indicators to Test Stand variables and report

$
0
0

Hi jiggawax, thanks a lot for your reply!

 

you're right, editing the large XML is a pain and actually, I am trying to use the LabVIEW API*. But I'm getting stuck...

 

And you calling LabVIEW API simple makes me curious 😄

In hope for you shedding even more light, here's some more context:

 

I wish to create a tool, which takes a list of VIs and creates a TS sequence. So far, my best bet is to use the LabVIEW API to create a TS sequence of mainly VI Call Action steps and already map each VI's inputs and outputs to TS variables (for passing among VIs) and the TS report. Then I'd run the resulting sequence in TS and get a report from it.

 

So far, I've been able to use expressions in LV Invoke Nodes (Step.asPropertyObject.EvaluateEx(exprString)) in the translator to configure a VI call step. When I open the resulting sequence in TS, it successfully calls the VI I specified.

 

However, looking at the Variables Pane in TS, my call's Step.TS.SData.ViCall.Parms is empty, although the VI has a string indicator. 

 

Seems like I'm stuck here:

 - how can I use the LabVIEW API to determine the VI prototype in the programmatic construction of the VI Call step?

 - how can I use the LabVIEW API to map something to those parameters in the VI prototype?

 - ... I'll also need to create sequence variables and probalby types and such, but baby steps.

 

Hope you have some tips,

Rok

 

*The XML part of my strategy is secondary and we can ignore it for simplicity - it's just a way to input instuctions to the XML Translator Example [1], which I'm using as the basis of the tool that I'm describing. At the moment, I'm using XML to define steps and set their properties and pass expressions to the tool, but I'm happy to just perform these same steps in the tool directly.

[1] https://zone.ni.com/reference/en-XX/help/370052AA-01/tsexamples/infotopics/sequencefiletranslators/

Re: Add elements of variable containers with Teststand API

Re: Automatically Close C# UI without getting incomplete executions popup

$
0
0

Hi Danny,

 

It sounds like we have most of the functionality that we want other than closing the popup. 

I had a look through some documentation and it seems there isn't immediately a way to automatically select "Yes" on the prompt. It seems that calling

Runstate.Engine.GetInternalOption(InternalOption_ApplicationMgr).GetCommand(CommandKind_Exit, 0).Execute(false) will receive a pop-up if you're in an execution thread.

 

Are you able to call this from a non-execution thread instead? I believe this would skip the popup.

 

Cheers,

Nick


How to read the file name from local directory using TestStand ?

$
0
0

Hello All,

 

I need to create a sequence in TestStand(2019-32 bit) which can read a file name xyz.lvlib (LabVIEW library file name) from the local C directory in my PC and store it in a variable. Then I want to take user input (type string) by configuring buttons in message pop up step and compare the user input with the stored variable that is the library file name. 

 

So my first question is how to read the file name from local C directory?

and the second question is how to compare the output state of message pop up(when the user selects a button) with a stored variable ?

 

Your inputs are very much welcomed.

 

Thanks in advance!

Preeti

 

Event Callback prior to "Preloading Modules"

$
0
0

I am using a modified version of the Simple TestStand Interface. I would like to disable the entry point buttons when a user clicks the entry point button, so that addition executions don't get queued up.

 

I found the example for using the ExecutionStart and ExecutionEnd event callbacks to disable the button, and have that working fine.

 

(https://forums.ni.com/t5/Example-Code/Disabling-Entry-Point-Buttons-When-Executions-are-Active-in-a/ta-p/3771401)

 

The trouble I have is that "Preloading Modules" begins when the entry point button is pressed. The ExecutionStart event hasn't yet fired, so the button doesn't get enabled until the sequence actually begins to execute.

 

Is there another event (I tried testing the UI Message Event but didn't find anything appropriate), or another strategy that I can use to disable the UI button during the module preloading?

 

Forgot to mention I'm using TS 2016 32-bit.

 

Thanks,

-- Matt

Re: Automatically Close C# UI without getting incomplete executions popup

$
0
0

I shall see if I can try that tomorrow cheers Nick

STEP FILE Incorrect for NI-9472

$
0
0

Please help!  I downloaded the STEP file for NI-9472 but the 10pin connector on top is floating in space in the wrong spot!  Please send me a correct 3D step file!  please.  This is urgent.

 

 

 

Re: Announcing TestStand 2020

$
0
0

The TS 2020 documentation doesn't quite line up with reality...

Frozen_0-1609973500961.png

 

Is there a newer version of "Getting Started"? The one deployed with TS 2020 is 3 years old.

Re: failed to find analog waveform interface

$
0
0

I'm currently having the same error code -17801. Do you have an active link? 

Re: Using TS Expressions or LabVIEW API to map VI Call controls and indicators to Test Stand variables and report

$
0
0

For posterity, my colleague found these useful instructions and example, which solves my wishes above:

https://forums.ni.com/t5/NI-TestStand/Setting-VI-Parameters-in-LabView-Action-Module-with-TestStand/td-p/2850752

https://forums.ni.com/t5/Example-Code/Creating-a-Sequence-File-with-a-LabVIEW-Module-Step-Using-the/ta-p/3770799

 

Some comments:

 - Invoke Node of LabVIEWModule does not show its parent's methods :(. The trick is to first configure the Invoke Node on Module reference, then wire a LabVIEWModule reference to it.

 - Generally, making this work with the LV API has involved a lot of reverse engineering, trial&error and looking for examples & tricks, even after referring to the TS developer and TS architect online courses.

 

For all TestStand w. LabVIEW API experts out there, what was the most useful to you when learning how to navigate the TS API, its classes and methods? Which is the best way to debug your expressions and function calls?

 

Thanxx,

Rok


Two reports per test

$
0
0

I have a need to produce two different reports per test. One a simplified pass / fail document, and the other our normal detailed text report.

I am looking for advice how to approach this.

I can add steps to print the pass fail report at the end of each section, but when I tried following an example to print to a word document it failed for lack of Microsoft Word, the company use word365.

Is there a simple way to print to a pdf from a step?

I am using Teststand2020.

Thanks.

David

 

Re: Using TS Expressions or LabVIEW API to map VI Call controls and indicators to Test Stand variables and report

$
0
0

Sorry for the slow response.  I forgot to send this out the other day.

 

I've thrown together a simple example demonstrating this.

 

test.vi just needs to be in a valid search directory for this to work.

 

All you need to do is run the sequence called Add Step (no process model).  It should inject a LV step into MainSequence and set the report text parameter.

 

Obviously this is a very simplified version of what you are looking for.

Re: Change "SerialNumber" to other text in Teststand report

$
0
0

Hello,

 

Sorry, I am aware this is an old thread, but I am also working on something similar.

 

Can you please tell me where TestStand pulls the SerialNumber from using the statement:

 

"<xsl:value-of select="tr:UUT/c:SerialNumber"/>"

Re: Using TS Expressions or LabVIEW API to map VI Call controls and indicators to Test Stand variables and report

$
0
0

 wrote:

 

For all TestStand w. LabVIEW API experts out there, what was the most useful to you when learning how to navigate the TS API, its classes and methods? Which is the best way to debug your expressions and function calls?

 


For me I tried in in TS first and then got it working in LabVIEW.  The TestStand help is very well written, in my opinion, for the APIs.

 

The other lightbulb moment for doing TS API calls in LV was understanding the different APIs (adapter api vs teststand api) and typecasting is done through the data to variant node.

 

Glad you are on your way.

Re: Two reports per test

$
0
0

Just set up 2 reports in the plugin configuration and have one be XML and the other HTML(PDF) but not log any steps.

 

Shows 2 reports setup:

ResultProcessing2Reports.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

How I set up the HTML to print to PDF and only show pass/fail information:
PDFNoStepInfo.png

Viewing all 24425 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>