Output on LabVIEW the TestStand step results
Hi,
I'm building on LabVIEW 8.5 a simple TestStand User Interface.
My sequences return some values but I don't know how to output them on LabVIEW.
I was thinking of a table to store the results.
Any hints on how I'm able to do so?
I apreciate all the help.
Thanks in advance.
Regards,
Daniel Coelho
Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
Use the TesStand ExecutionView Manager available in the TestStand tool pallet of LabVIEW and the Execution View. Then when you call our test code (dll, LabVIEW, CVI or what ever) and the return values are returned to the step.Result container based on the type of step. The ExecutionView Manager will automatically display the return value in the Execution View indicator on front panel, if it is a string, a number or a Boolean or etc.
Look at "C:\Program Files\National Instruments\TestStand 4.1\UserInterfaces\Simple\LabVIEW" as a starting point.
Notice that there is not any code that reads the return value from the test steps and displays it. The TestStand Engine automatically does it for you. Using the ExecutionView Manager and the Execution View, your LabVIEW user interface will not know when a test step is run or what the return values are without setting up events to trap UI messages from the TestStand Engine.
If all you need is to see the return value and results this is the way to go.
Omar
Similar Messages
-
By default, Teststand will not include the test step result in subsequence, is there any way to include these step results in report?
Thanks
JackyHi,
If your subsequence is in a separate sequencefile, then check the properties of the sequencefile to make sure that the record has not been disabled.
Regards
Ray Farmer
Regards
Ray Farmer -
I am accessing a VI many times which is run on a remote PC.
When I click Step Settings, click on the Module tab, then click on the Labview Advanced Settings, there is are options for running a VI on a remote PC.
An annoyance is having to enter the remote host, remote VI path, port number and timeout settings every time I created a step to call the VI in the tests. These are a constant, or at least the rule by far rather than the exception. The TestStand step settings default is the VI does not run on a remote PC (unticked) and there are of course no IP addresses etc as defaults. So if I make a minor change to the tests such as the remote VI location, I have to manually change it is every occurrence of the VI being called. This is very time consuming and is prone to human error.
Is there a way I can preset these settings so that every time I call a Labview module, these defaults are invoked without me having to set them every time?
I guess a workaround is to have the VI run in a subsequence, so that the settings are made just once, but I would prefer not to have to do that.
regards to the NI community,
Dave
Solved!
Go to Solution.Hi,
What you can do if you are using TS4.x is create your first step, then add it to the Template List. Then use the step from the template list when you require similar steps. See User Manual Chapter 3-6.
Regards
Ray Farmer
Regards
Ray Farmer -
The Step Result element in the DITA tasks
While creating a task in DITA, the Steps element contains Step > Step Result element. If I insert the Step Result element, the text "Step Result:" is also displayed in my published output. I would like to use the Step Result tag, but I do not want to see the Step Result text being displayed in my output. I have gone through the style guides, edds, dtds, but don't know where the text is coming from. Please help.
Hi ScottPrentice,
Thanks very much for the response. I followed your instructions, but no luck so far. Here's what I did:
1. Opened my task document > View > Reference pages. I could not locate Step Result referenced frame there.
2. Locate the template for this structured application - The template is Task.template. The template file is blank, so I opened the corresponding edd file: Task.edd
3. The First Format Rules and Text format Rules for the Step Result element are as follows:
First Paragraph Rules:
If Context is Step, use Step.result.begin
else use substep.result.begin
Text Format Rules:
If Context is Step, use paragraph format Step.result.begin
4. The Step.paragraph.begin paragraph style is being used here. You asked me to change the referenced file to none, but I did not find such syntax where I can make it none.
The easiest way to determine the right tag to edit is by checking the paragraph definition in the task topic you're editing.
The paragraph definition is step.result.begin. Could you please help me edit and remove the step result text from it? -
Hello,
I have searched TestStand reference manuals, help, and the forums, and I haven't yet found exactly how Parameters.Result should be used in callbacks (if at all).
I'm trying to figure out how to take a step that normally is not recorded in the result list, and force it to be recorded on the infrequent occasions that it fails. I'm thinking I should be using the Result, but I'm not sure how. If I set Parameters.Step.RecordResult = True then the step does get set to record results, but that seems to be permanent in the sequence file and AFTER the failure goes unreported.
Thanks in advance for your expert help!
- Gizmogal
Solved!
Go to Solution.In stepping through the SequenceFilePostResultListEntry I finally discerned the difference between Parameters.Step.Result and Parameters.Result, which is only visible at run time:
Parameters.Result has a TS container which refers to the current step, giving information such as StepGroup, StepName, StepType, among others. Its results-related properties are equivalent to the Parameters.Step.Result properties as far as I can tell.
Parameters.Step.Result has a much more extensive TS container of type TEInf which appears to be test executive information.
It seems kind of backwards from what I would expect, but there it is.
I'm partway through shifting my paradigm - recording all results and then discarding those not of interest. I ended up adding a status string "RecordAlways" to force some steps to be recorded every time, and I toss any that are not equal to that or "Passed", "Failed", "Error", or "Terminated". It's working pretty well so far.
Thanks again for your help!
- Gizmogal -
Negate Boolean for Step.result.passfail
Ok, I'm looking for why TestStand is doing what I did not expect.
The first passes "Fail" to "!Step.result.PassFail" and uses a data source of "Step.result.PassFail" this step always Regardless of the value of "Fail"
The second passes "Fail" to "Step.result.PassFail" and uses a data source of "!Step.result.PassFail" and operates as I intended. (Fails if Fail is True).
A brief search yeilded the "Don't do that... negate in code" answers to the old "how to Negate Boolean for Step.result.passfail?" question. But this does not explain the unexpected behavior and I'd really like to understand whats really happening here.
Attached is a simple example that demos the behavior using dialog express vis
Jeff
Attachments:
Funny.seq 24 KB"!Bool" equals "!bool", as long as you make no case sensitive string compare
Ok, the trick is understanding expressions.
Play a little game with me please. Here are the steps to follow:
1. Open your sequence file Funny.seq. Select step one.
2. In code module tab, select the parameter Error Out value. Current content is "Step.Result.Error". Open the expression editor.
3. In the expression, type "ABC" (including quotation marks). Press "Evaluate". You will see that the expression must either
3. a) point to a container or
3. b) be a container itself.
4. Close the dialogs (cancel expression edit dialog) and open on for the parameter Fail (current value "Step.Result.PassFail"). Open the expression editor.
5. Again, type "ABC" in the expression. Evaluate it again. You will see that the expression must either
5. a) point to a boolean or
5. b) be a boolean itself.
What do we learn from this steps?
"Step.Result.PassFail" is the lookup string for a boolean variable. So the evaluation results in a pointer to a boolean.
"!Step.Result.PassFail" is the negation of a boolean variable. Evaluation will therefore fetch the value of the lookup string (type: boolean) and then negate it. So the result will be a boolean value, but it does not point to the variable "Step.Result.PassFail" anymore! Since the result is boolean, the expression passes evaluation.
That is the reason why "!Step.Result.PassFail" as parameter will NEVER pass the boolean return value of the VI to the TestStand dataset (aka execution).
Let's proceed:
6. Move to step two. Switch to tab "Data Source". Open the expression editor for the data source expression.
7. Again, type "ABC" in the expression. Evaluate it again. You will see that the expression must either
7. a) point to a boolean or
7. b) be a boolean itself.
So, catch up: We have the same issue here as step 5! We are not referring to any variable anymore once the expression gets evaluated!
So why does it work as desired nevertheless?
I gave the explanation in my previous post:
Norbert_B wrote:
The reason why your negation in the data source works is the status expression:
Step.DataSource !="Step.Result.PassFail"? Step.Result.PassFail = Evaluate(Step.DataSource):False, Step.Result.PassFail ?"Passed":"Failed"
As you can see, your expression does NOT equal "Step.Result.PassFail". Hence your negated value of this variable is evaluated as stated in the case-select part (Step.Result.PassFail = Evaluate(Step.DataSource)). This evaluation results in your negated value. Next, the Result is set to either "Passed" (evaluated to True) or "Failed (evaluated to False).
You make a STRING compare in the first part of the status expression. YOUR data source DOES NOT MATCH the expected string.
So in the TRUE case, you evaluate your new data source and write the result back to Step.Result.PassFail. So essentially, this step (in your case) simply negates the content of Step.Result.PassFail! Next expression will query the boolean value of Step.Result.PassFail and write either "Passed" or "Failed" into the Step.Result.Status....
hope this is now more clear,
Norbert
EDIT: The only weird thing is, that in the first step during execution TS does not create a warning (or error) because you assign a return value of the module to a "True" (boolean value).
One thing you can also do to increase understanding about the "issue": Simply write "True" or "False" (without quotation marks!) into the expression field "Value" for the boolean return value of the VI.....
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
Import data from a spreadsheet (data file) into TestStand steps
Hi,
I have some 100+ customers with different configuration data. Whenever I need to run test for a different customer, I need to update the TestStand steps in each sequence file with new values.
I'm thinking if there's a better way to simplify this, perhaps by using a spreadsheet/data file to input the data? But I have no idea how to do this?
My steps are from two sources, one type is a dotNET DLL, another type is Active X/COM (calls TestComplete software).
Any suggestion would be appreciated!
Thanks!
ph2Yes there is, make use of the PropertyLoader. Checkout the examples found in the TestStand Examples folder.
Regards
Ray Farmer -
I am retrieving high and low limits from step results in VB code that looks something like this:
' (This occurs while processing a UIMsg_Trace event)
Set step = context.Sequence.GetStep(previousStepIndex, context.StepGroup)
'(etc.)
' Get step limits for results
Set oStepProperty = step.AsPropertyObject
If oStepProperty.Exists("limits", 0&) Then
dblLimitHigh = step.limits.high
dblLimitLow = step.limits.low
'(etc.)
So far, so good. I can see these results in
VB debug mode.
Immediately after this is where I try to put the limits into the results list:
'Add Limits to results
call mCurrentExecution.AddExtraResult("Step.Limits.High", "UpperLimit")
call mCurrentExecution.AddExtraResult("Step.Limits.Low", "LowerLimit")
(No apparent errors here while executing)
But in another section of code when I try to extract the limits, I get some of the results, but I do not get any limits results.
That section of code occurs while processing a UIMsg_EndExecution event and looks something like this:
(misc declarations)
'Get the size of the ResultList array
Call oResultList.GetDimensions("", 0, sDummy, sDummy, iElements, eType)
'Step through the ResultList array
For iItem = 0 To iElements - 1
Dim oResult As PropertyObject
Set oResult = oResultList.GetPropertyObject("[" & CStr(iItem) & "]", 0)
sMsg = "StepName = " & oResult.GetValString("TS.StepName", 0) & _
", Status = " & oResult.GetValString("Status", 0)
If oResult.Exists("limits", 0&) Then
Debug.Print "HighLimit: " & CStr(oResult.GetValNumber("Step.Limits.High", 0))
Debug.Print "LowLimit: " & CStr(oResult.GetValNumber("Step.Limits.Low", 0))
End If
'(handle the results)
Next iItem
I can get the step name, I can get the status, but I can't get the limits. The "if" statement above which checks for "limits" never becomes true, because, apparently the limit results never made it to the results array.
So, my question again is how can I pass the low and high limit results to the results list, and how can I retrieve the same from the results list?
Thanks,
GriffGriff,
Hmmmm...
I use this feature all the time and it works for me. The only real
difference between the code you posted and what I do is that I don't
retrieve a property object for each TestStand object, instead I pass the
entire sequence context (of the process model) then retrieve a property
object for the entire sequence context and use the full TestStand object
path to reference sub-properties. For example, to access a step's
ResultList property called "foo" I would use the path:
"Locals.ResultList[0].TS.SequenceCall.ResultList[].Foo"
My guess is the problem has something to do with the object from which
you're retrieving the property object and/or the path used to obtain
sub-properties from the object. You should be able to break-point in the
TestStand sequence editor immediately after the test step in question
executes, then see the extra results in the step's ResultList using the
context viewer.
For example, see the attached sequence file. The first step adds the extra
result "Step.Limits" as "Limits", the second step is a Numeric Limit (which
will have the step property of "Limits") test and the third step pops up a
dialog if the Limits property is found in the Numeric Limit test's
ResultList. In the Sequence Editor, try executing with the first step
enalbled then again with the first step skipped and breakpoint on the third
step. Use the context viewer to observe where the Limits property is added.
That might help you narrow in on how to specify the property path to
retrieve the value.
If in your code, you see the extra results in the context viewer, then the
problem lies in how you're trying to retrieve the property. If the extra
results aren't there, then something is wrong in how you're specifying them,
most likely a problem with the AddExtraResult call itself.
One other thing to check... its hard to tell from the code you posted... but
make sure you're calling AddExtraResult on the correct execution object and
that you're calling AddExtraResult ~before~ executing the step you want the
result to show up for. Another programmer here made the mistake of assuming
he could call AddExtraResult ~after~ the step executed and TestStand would
"back fill" previously executed steps. Thats not the case. Also, another
mistake he made was expecting the extra results to appear for steps that did
not contain the original step properties. For example, a string comparison
step doesn't have a "Step.Limits.High" property, so if this property is
called out explicitly in AddExtraResult, then the extra result won't appear
in the string comparison's ResultList entry. Thats why you should simply
specify "Step.Limits" to AddExtraResul so the Limits container (whose
contents vary depending on the step type) will get copied to the ResultList
regardless of the step type.
I call AddExtraResult at the beginning of my process model, not in a UI
message handler, so there may be some gotcha from calling it that way. If
all else fails, try adding the AddExtraResult near the beginning of your
process model and see if the extra results appear in each step's ResultList.
Good luck,
Bob Rafuse
Etec Inc.
[Attachment DebugExtraResults.seq, see below]
Attachments:
DebugExtraResults.seq 20 KB -
Is it possible to programatically create a TestStand step (using the API), that calls a LabVIEW module, without loading the prototype of the module to get a reference to the Module Parameters.
I want to specify a VI Pathname, but I dont want to use that pathname to load the prototype. I want to programatically specify the name, type, representation etc. of each of the controls and indicators.
My reason for attempting this is that I only want the VIs called by the steps to exist on the target hardware not on the numerous development machines running my application.
Any thoughts greatly appreciated.
Steve
https://decibel.ni.com/content/blogs/DailyCLADHi Steve,
Unfortunatly it is not possible to do what you want within Test Stand but I am not sure why it is necessary, I think I am understanding your application incorrectly. The only time you will need to load the prototype is if you are creating the step but if you are creating the step you will need the VI that the step calls so that VI will need to be present on the system. If you are not calling the step then you shouldn't need to load the VI prototype. If this is how you program funtions it may be a problem with your architecture but if not please could you correct my misunderstanding so that I can go about finding a suitable solution.
Regards,
Tom
Applications Engineer
National Instruments UK & Ireland -
Using LabView to Programatically Specify the Module of a TestStand Step Problems
I am writing a LabView App that generates TestStand Sequences.
When programatically 'specifying the module' of a TestStand Step calling a LabView VI, is it possible to set the values of the parameters passed to the VI by Name? I am currently creating steps fine, but the only way I can set parameter values is by using the parameters index.
It would be really nice if I could reference the parameters by the name specified in the VI rather than the index derived when the VI is created.
Any ideas?
Steve
There are 10 types of people in the world that understand binary, those that do and those that don't.Hi Steve,
you've also posted this on the TestStand forum and it's been answered there.
For anyone else looking for the approach :
http://forums.ni.com/ni/board/message?board.id=330&message.id=9585
Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer -
How to make use of the results of one step at the other step in the same sequence
Hello
I am new to the Teststand.
I am using labview8.0 with teststand 3.1
Plz get me solution for the below
I am configuring the serial port resources like resource name, baud rate etc..,I made the initialization using setup task.I made serial port write and serial port read as independant vi's in labview and called them from teststand as steps.Now i need the same resource name appear in some other steps in the sequence .how can i get them using teststand commands instead of specfying them at each step.
Also how to pass values or results obtained from one step to some other step in the same sequence using teststand commands.
Also help me in parameter passing
Regards
KiranHi Kiran,
I wrote some example code that demonstrates what you are trying to do. The sequence file relies on a local variable named visa_resource of type LabVIEWIOControl.
Regards,
Attachments:
test.zip 11 KB -
Getting Step Results into Labview
Hi,
I'm having what seems to be an easy problem but one which I cannot figure out quickly.
I'm trying to do the following. I am trying to do some custom logging to a specific format for my Teststand results. I'd basically like to pass the Results parameters of each step into Labview Code where I will process there. To make it more user friendly I have created a Callback for SequenceFilePostResultListEntry. What I don't exactly know how to do is get the Results from the current step into LabVIEW
At first I used the SequenceContext.PreviousStep but that did not give me what I needed. Hopefully I'm clear in what I am asking.
Thanks for the help,
PatrickHi Patrick,
Are you having trouble doing this with a LabVIEW Adapter Action Step? If you are trying to pass specific run-time values to your LabVIEW VI, you will be able to find them by setting breakpoints and looking at the available variables.
For example, in your SequenceFilePostResultListEntry callback, if you wanted to use the test's Status result as an input to your LabVIEW Adapter Action Step, you could use the expression RunState.Caller.Step.Result.Status as the value you pass.
Please let me know whether this answers your question.
Warm Regards,
Daniel D.
National Instruments
Automated Test Software R&D -
The concept of associating teststand objects to unit requirements for traceability purposes was added to TS 3.5, and I need to find out how to access the array of strings used to store unit requirements in step objects, sequence objects and sequencefile objects. The teststand help file points out that the requirements list of a sequencefile object is accessible using the PropertyObjectFile interface, and also points out that Requirements is a property of the sequence and step classes. Furthermore it implicitly states that the requirements property has a Links subproperty which is an array of strings, but that is pretty much the extent of the documentation on this new feature so far. There seems to be no expression function available to get to those requirements either.
I know that this feature was added to allow TestStand to interface with RG, and I am planning on using RG, but I would also like to do things with the requirements information within TestStand.
Anyone?Are you talking about the Requirements Gateway? It is a separate product from NI that will do what you are looking for. I haven't used it so I am not sure of the API chain to make it work. Take a look and see if that is what you were thinking of.
Hope that this helps,
Bob Young
Sorry, I just re-read your original post and see that you are looking to also use the Requirements Gateway, so you obviously know about it. I don't know what the API changes were that made it work so I am not going to be much help.
Sorry about posting before getting the correct information from the original.
Bob Young
Message Edited by Bob Y. on 08-24-2006 04:54 PM
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected] -
Modify TestStand Step parameters from LabVIEW in runtime
Hi all,
I try to change parameter values of a TestStand step in LabVIEW. When I return from the modifying vi (Learn Barcode Template), the following happens:
1. I watch RunState.SequenceFile.Data..., I see the changed parameter
2. I watch RunState.Sequence.Main..., which is basically the same target as mentioned above, but here the parameters are unchanged.
3. I need the changed parameters in the Read Barcode.vi. This vi returns an error, because the parameters are unchanged.
4. When I restart the sequence, and halt at the first step, and watch again both parameters (the sam parameters but different path), the changed values appear.
Is there a method, which enables to refresh the changed parameters immediately? I tried for example IncChangeCount, but it just marks the sequence as changed. In the learn Barcode Template.vi I open and close the references properly.
regards
MB
Attachments:
screenshot_01.JPG 140 KBHi,
the parameters will be tranfered when the code module execution is finished. I don't understand what exactly you're changing inside your VI, possibly you can post the VI for getting some more information.
When you change your parameters inside the file you're calling in the first step, it's normal that the parameter in TestStand first will be refreshed when you execute the sequence once again in my understanding.
When you use the ActiveX API inside the LV VI and want to change values in TestStand, you can use variables. Parameters will be transfered when calling the code module or returning from the code module.
Another point is the interactive execution, is there a special reason why you execute without a process model? Possibly there could be changes in the runstate property object also...
regards,
Nikolai -
Howto get result of the calling-step in SequenceFilePostStepFailure
Hello,
i have a sequence with a SequenceFileCallback "SequenceFilePostStepFailure".
How can i create a popup that displays the following values:
- Name of calling-step
- sequence-name of calling step
- result of calling step
- limit (low, high, string) of calling step
I found:
RunState.Caller.Step.Name,
RunState.Caller.Sequence.Name
but nothing for result and limits.
Thanks for any helpThis should handle what you're looking for and then some. I use this with the retry expression that allows for the whole sequence to be repeated. Probably shouldn't allow for the "Force Pass". I think it origianally came from TestStand examples and I modified it, but I couldn't tell you which example.
Why do geeks think Halloween and Christmas occur on the same day?
Because 31oct = 25dec!
Attachments:
PostStepFailure2.seq 13 KB
Maybe you are looking for
-
IPod Nano 4g reseting it's self!?
Yesterday I was opening a game on my iPod and all of a sudden the music stoped and the apple logo appered on my screen and the menu came back in a few seconds the same thing happend today but i was only listening to music?!
-
CRM factsheet and BI 7.0 Web-Templates in Federated Portal Network Scenario
Hi All, i have some essential questions regarding a Federated Portal Network Scenario. Our costumer works with 1 CRM-Portal (CRM 5.0, EP 7.0) and 1 BI-Portal (BI/EP 7.0). He decided to implement a Federated Portal Network, using the CRM-Portal as the
-
Aperture Library Very Slow Copy to LaCie Thunderbolt Drive
Just installed new LaCie Thunderbolt drive and copying various media files to it. Music and video files copied like a rocket. My Aperture folder is copying as slow as molasses. Right now it says 2 days to copy 211GB. Any help would be appreciated.
-
Cs6 Trying to import .mov I keep getting the error "no audio or video streams"
I have 2 projects and I can not import .mov I keep getting the error msg "no audio or video streams"
-
Adjusting isOpen function for Collapsible Panels
I am interested in modifying the .js file or adding additional JS, to allow for when a page loads, to apply the proper tab class to the Collapsible tab. It seems with the curent .js as contructed, the page does not know to apply the proper class to a