07-11-2008 10:10 AM
| Step | Status | Measurement | Units | Limits | ||
| Low Limit | High Limit | |||||
| Check Main Battery | Passed | |||||
| Check Expansion Battery | Passed | |||||
| Idle Current Test | Skipped | |||||
| Firmware Version | Passed | 12345_67 | 12345_67 | IgnoreCase | ||
| Built-In Test | Skipped | |||||
| Secure Data Disk | Passed | |||||
| USB Test | Passed | |||||
What I did was use a station global as the data source
What I want to do is use the Step.Result.String (the default source)
how do I return a result string to a sequnce call?
I would also like to know how to supply data for the other items in the report (such as units)
I did find that the property browser was the way to get info in there, only with the string value test type
07-14-2008 08:41 AM
07-14-2008 01:05 PM
07-14-2008 02:05 PM
Hi,
No parameters can be both.
By default a parameter is set to "Pass By Reference". This is a bit like the C function argument i.e. MyFunc(char *arg). Which means you can pass a value into the Sequence, modify it and have it return the modified value back to the caller.
If the parameter is set to "Pass By Value". This means you can not return the modified value back to the caller.
Hope this helps
Regards
Ray Farmer
07-14-2008 02:20 PM
Hi,
Here is a small example (its a TS4.1 version and TS3.5 version)
Regards
Ray Farmer
07-14-2008 03:00 PM
Thanks Ray that helped a lot
the thing to do is assign Step.Result.String to the parameter that I use to pass the results back
then the string value test can work with the default source
I think the reason it was such a struggle for me is that the labview steps automatically give me parameters to assign stuff to
and the sequence step does not
07-14-2008 05:52 PM - edited 07-14-2008 05:52 PM
Hello Rusty Strings,
Thank you for posting on the NI Discussion Forums. You could also do a couple of different things to pass a string parameter back to a calling sequence. One method is to pass the input parameter by reference. To pass a value by reference, you can simply go to the parameter in the Variables pane of the sub-sequence, right-click on it, and click on “Pass by Reference” so that it is checked. When this is enabled, the value of the parameter that the calling sequence passes will change according to the subsequence’s own parameter value. For example, if CallingSequence1 passes string parameter string1 with value “one” to string parameter stringA in SubSequenceA , stringA will take on the value “one”. If stringA is then re-assigned the value “two” during the execution of SubSequenceA, string1 will also have the value “two” in CallingSequence1.
You could also use RunState.CallingStep.Sequence.Parameters to pass a value directly to an existing parameter in the calling sequence. Passing by reference is the preferred method for its modularity, since it does not write back to an existing parameter by calling its name.
Examine and run the attached sequence file to observe both of these methods. SeqA passes the value using “Pass by Reference”, and SeqB passes the value using the property listed above.
As far as supplying data to the items in your report, this is all done automatically when you run any kind of test. For example, the String Value Test automatically fills in the results of your test, the string being tested, and string being compared to in the report, as seen in your report in the first post. The other values are not filled in because they are not applicable to the String Value Test. A Numeric Limit Test would automatically fill in the other fields seen in the report, according to how you set up the test’s Limits tab. These values can also be accessed/changed by accessing Locals.ResultList[x], where x is the number of the step that you are trying to access the results of.