07-27-2012 02:51 AM
I am running TestStand 2010 SP1.
I have a LabVIEW VI which generates an Unsigned 64-bit Integer value. On each run of the sequence I want to test the new value from the VI against the previous value from the same VI.
I wanted to compare the numbers with "Numeric Limit Test" but it errors on the Limits tab with "Expected Number, found Number {Unsigned 64-bit Integer}". So I used "Pass/Fail Test" instead.
I want to display the numbers however. If I pass the Unsigned 64-bit Integer value to the Str function the number is displayed but as a negative number! Is this a bug in TestStand?
Solved! Go to Solution.
07-29-2012 06:02 PM
Alhtough I am using a older version of TestStand which ofcourse does not support 62bit Int.
It could be a bug in TS2010 as some of the documents say 2010 supports 64bit Ints but I am not certain of that.
But for older versions I add two terminals to act as upper and lower word for 64bit value. Can set display mode set to hexadecimal to see this.
On LabVIEW side igmore the two 32bit terminals. In TestStand (and believe should be visible for 2010 also) 64bit unknown will show as greyed out and only 32bit values are valid. Split number function found in Numeric->Data maniputation is useful.
Hope this helps.
07-29-2012 11:56 PM
What exactly did you pass to the Str() function? Did you also pass a format specifier as optional second argument ?
As far as I know this is required because Str() function defaults to interpret a number as signed number.
07-30-2012 01:42 AM
I passed:
Str (Locals.OutputNumber.Numeric,"%d")
where Locals.OutputNumber.Numeric is shown as: Number {Unsigned 64-bit Integer}
As a temporary work round I pass the number back to another LabVIEW VI which then converts it to a string. I then insert that string into the TestStand report rather than using the "Str" function.
07-30-2012 02:14 AM
@ChristopherPovey wrote:
I passed:
Str (Locals.OutputNumber.Numeric,"%d")
I would try "%ul" instead of "%d", "u" because it's unsigned and "l" because it's a long (64 bit ) number.
07-30-2012 02:21 AM
@mkossmann wrote:
@ChristopherPovey wrote:
I passed:
Str (Locals.OutputNumber.Numeric,"%d")
I would try "%ul" instead of "%d", "u" because it's unsigned and "l" because it's a long (64 bit ) number.
Yes that worked!
I assume that "Numeric Limit Test" and "Multiple Numeric Limit Test" are not 64-bit compatible as their "limits" sections error if you try to assign a "Number {Unsigned 64-bit Integer}" to them?
07-30-2012 10:25 AM
The Numeric Limit and Multi-Numeric Limit step types do not yet support 64-bit integers, however the expression function they use CheckLimits() does (though all values must be the same representation or you will get an error). So you could use that expression function, either in a pass/fail step, or in your own step type if you like.
Also for Str() it's better to just leave the format string parameter out. It's an optional parameter and if you leave it out, TestStand will use the format that makes the most sense based on the representation.
Hope this helps,
-Doug
07-31-2012 01:40 AM
@dug9000 wrote:
The Numeric Limit and Multi-Numeric Limit step types do not yet support 64-bit integers, however the expression function they use CheckLimits() does (though all values must be the same representation or you will get an error). So you could use that expression function, either in a pass/fail step, or in your own step type if you like.
Also for Str() it's better to just leave the format string parameter out. It's an optional parameter and if you leave it out, TestStand will use the format that makes the most sense based on the representation.
Hope this helps,
-Doug
Thanks.
Are there any examples of creating steps using CheckLimits functions?
07-31-2012 08:46 AM
The numeric limit test itself is such an example. Or just look at the expression dialog help for the CheckLimits function. Help for all of the expression functions is located in the expression browser dialog.
-Doug
08-01-2012 08:08 AM
@dug9000 wrote:
The numeric limit test itself is such an example. Or just look at the expression dialog help for the CheckLimits function. Help for all of the expression functions is located in the expression browser dialog.
-Doug
If I create a "Statement" and set the "Status Expression Field" to:
CheckLimits (Locals.CurrentTimeStamp, Locals.PreviousTimeStamp,0ui64,"GT")
where Locals.CurrentTimeStamp, Locals.PreviousTimeStamp are Numbers { Unsigned 64-bit }
It populates my report with just the step name and "Passed", however what I want it to output is the same as the Limits Step i.e.:
Test Measurement Units Comparison Lower Limit Upper Limit Status
==== =========== ===== ========== =========== =========== ======
00000000 Limit Test 10 N/A GT (>) 9 N/A Passed
How would I do this?