Evaluating NaN Comparison Type in TestStand Numeric Limit Step

I'm using a 4070 DMM to return Resistance Measurements to a TestStand numeric Limit step. How can I use a comparison type when the LabView vi returns NaN (Not a Number). I want the step to pass as long as the Resistance Measurement is > GT some value.

NAN comparison in expressions and limit tests works as follows
(NAN > x) == false
(NAN == x) == false
(NAN < x) == false
(NAN == NAN) == true
To summarize, a NAN is neither greater or less than another number and is only equal to another NAN.
If you want NAN to fail and measurement > some_limit to pass, then just use the > (GT) operator.
If you want NAN to also pass, then you need to check for it separately. You can do this dozens of ways. Here are a few:
a) Use a pass/fail step with an expression like: Locals.x > 10 || Locals.x == NAN
b) Use two limit steps, one to check for NAN and one to check the limit. Use preconditions to specify the NAN check only runs for the NAN value and the limit check only runs for non-NAN values. This will ensure
the measurement makes it to the report.
c) If NAN is your instruments way of returning "resistance too high to measure", then you could transform the NAN into an INF in the data source expression and then use a GT limit. Example data source expression:
Step.Result.Numeric == NAN ? INF : Step.Result.Numeric

Similar Messages

  • Creating numeric limit step types

    Hello,
    I'm new in TestStand and I'm trying to create my own step types.
    Right now I need a step type that reads the voltage from one channel on my MIO board and reads one Digital IO from my DIO board.
    I was able to create one step type - run VI and EDIT VI (to choose the channel), but my problem is that my step type is not a numeric step type (so it is not returning a value) and I don't know how to change it!
    1. Are there these kind of step types (DAQ) available anywhere?
    2. How do I set the type of my step type (I think the ones I'm creating are allways action step types and not tests)?
    Thanks ahead!

    Hi,
    The easies why to create your NumericLimit type is to select your step type and right mouse click and select create useing then select the NumericLimit type.
    This will create a new step type combining your step type with a Numeric Limit step type.
    Before you start just rename your step type to someother name by just appending "_1". Then when the new combined step type is created. You can then rename this step type to your original name and easily delete your "_1" named step type.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How can I tell that a default numeric format has been applied to a numeric limit step?

    I am working on generating custom HTML code for our test systems in order to reduce the 'footprint' of the standard HTML entries for numeric limits, multiple-numeric limit steps etc....
    For a Numeric Limit step, I can set the Numeric Format via the 'Limits' tab and select the pulldown arrow to select any format.  Does TestStand actually save this information with the step so I could possibly use this later?   I ask this because my modifications are within the 'ModifyReportEntry' Callback.   When I am modifying the code to generate new HTML within this callback, I have no idea if the developer has selected a Numeric Format for a given step OR simply left it as DEFAULT.
    To make matters more confusing, here is some more information....
    When I pause the execution in the callback I notice the following:
    Case 1:  User has selected a Numeric Format ( this example I will say 3 digits of precision ) %.3f. for a numeric limit step.
    Parameters.Result.Limits.Low = 10.000
    Parameters.Result.Limits.High = 20.000
    Parameters.Result.Numeric = 15.657
    Notice the numeric data is ALREADY formatted! Great, I can simply use this to generate my custom HTML table for the numeric limit step.
    Case 2 : User has left the numeric format to <Default> for the step.
    Parameters.Result.Limits.Low = 10
    Paramters.Result.Limits.High = 20
    Parameters.Result.Numeric = 15.65713515155
    Numeric data is NOT formatted.  I know that TestStand will apply the Default Numeric Format that is configured in the report options when it writes the report but since I am doing a custom report I am stuck.
    My question is how can I possibly tell that the data has already been formatted by TestStand in the ModifyReportEntry callback?  Is there some flag that I could check or anything?
    I do notice that the Parameters.ReportEntry string contains TestStand's default HTML code for the step and this is already properly formatted.. so as a possible workaround I could 'pick out' the data from this string but this is slow and time consuming.
    Thanks
    PH

    PH,
    You can find out if the numeric format has changed using the TestStand API. I use the following statement in my step's post-expression to find out the numeric format that TestStand uses for the step.
    Step.Limits.Low.NumericFormat
    If the string returned is an empty string, then it is the default format, otherwise, it's the one specified in the string.
    Hope this helps.
    Raj
    National Instruments
    Applications Engineer

  • Support for UInt64 Datatypes in Numeric Limit Step

    It would be good to be able to use UInt64 directly in numeric limit step, instead of something like this:
    Step.Result.Status = CheckLimits(FileGlobals.F1_10, Locals.FrequencyInputLimits.Freq10GhzMax, Locals.FrequencyInputLimits.Freq10GhzMin, "GELE", False)

    NikolajEgeskovOstergaard wrote:
    It works if i convert my UInt64 to Float64...
    is that really it ?
    I would advise against doing that. Not all UInt64 values can be exactly represented in a Float64 so you will get some rounding error. It depends on what you are doing whether or not that would matter.
    The numeric limit step does not currently support 64-bit integers, however the CheckLimits() expression function does support them so you could do something like:
    Step.Result.Status = CheckLimits(Locals.Measured, Locals.High, Locals.Low, "GELE", False)
    Also you might want to post a feature request to:
    http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/idb-p/teststandideas
    Hope this helps,
    -Doug

  • Import/export properties of multiple numeric limit steps

    Hello
    I have a question to the property loader and the import/export tool in TestStand 3.5.
    When I want to export the limits of a sequence with multiple numeric steps with the import/export tool, I press the Limits button to include the limits into the 'selected' field of the properties tab. But for the multiple numeric step the limits are included not for all indices but only once with an question mark instead of an index (Result.Measurement[?].Limits.Low, Result.Measurement[?].Limits.High, Result.Measurement[?].Limits.Comp).
    The property loader step acts the same way. 
    What can I do ?
    Thanks
    Olli

    Hi Olli,
    For the multiple numeric limit test, you will need to individually specify which numeric limits you want to export. Lets suppose you have 3 sets of limits for your multiple numeric limit test. If you wanted to export the first set, you would use the syntax
    Step.Result.Measurement[0].Limits.Low
    Step.Result.Measurement[0].Limits.High
    You will need to do this for each set of limits you have in your array. Simply replace the "?" with the index of the element in the array.
    Hope this helps!
    Best Regards,
    Jonathan N.
    National Instruments

  • TestStand IVI Read Numeric Limit Test

    Hey all,
    How can I turn a IVI DMM reading into a test step pass / fail based on a numeric limit test?
    I'm a TestStand newbie so be gentle.  Searches on the forum for TestStand IVI and pass fail don't return anything useful.
    I can call the DMM via IVI Read wich returns a Step.Result.Reading value but I need to turn this into a pass fail on a limit range.
    Any ideas would be very gratefully appreciated.
    Thanks,
    Solved!
    Go to Solution.

    You could insert an none_adapter numeric limit step after it and set the data source to PreviousStep.Result.Reading.
    -Doug

  • Send numeric limit data from TestStand sequence to Accesss database

    I use the "None" adapter to perform numeric limit testing on results from expression steps, but when I enable saving the report to an Access database the Name of the parameter is not shown. I noticed that when I use the multiple numeric limit step the option to name the parameter is built in, but the numeric limit test doesn't give that option. Is there a way around this? I have left the database options in their default settings.

    By default the numeric limit test doesn't log the name of the step into the MEAS_NUMERICLIMIT table. This make sense since the name of the step is already logged into the STEP_RESULTS table. For the multiple numeric limit test, make sense to have a name to differentiate the different tests within the same step. That's why the default setting is set to log the test name in the MEAS_NUMERICLIMIT table.
    Do you need the step name to be also in the MEAS_NUMERIC table or is it enough to have it on the STEP_RESULT one?
    Best Regards,
    Alejandro del Castillo
    Application Engineer
    National Instruments Co.

  • Multiple Numeric Limit Test - Evaluate Post and Status Expression

    We have a Multiple Numeric Limit Test where the limits for one of the measurements is a function of one of the other measurements.
    In the Post-Expression there are two expressions that set the low and high limit based on one of the readings.
    But the comparison does not seem to be using the calculated limits.
    The report file shows the correct calculated Low and High Limits, and shows the measured reading as being in between the Low and High limit, but fails that measurement. I feel the Status Expression is using the default limits that are out of range.
    The post expression looks like this
    Step.Result.Measurement[2].Limits.Low=Step.NumericArray[1]*1.9,
    Step.Result.Measurement[2].Limits.High=Step.NumericArray[1]*2.1
    In Table 3-4 "Order of Action that a Step Performs", Evaluate Post-Expression (Action #15) is before Evaluate Status Expression (Action #16), but it seems that is not the case.
    Or am I changing the wrong Low and High Limits. Am I just changing the Limits used in the report file and not the limits used for comparison?
    Again the correct low and high limits are in the report but not used for comparison. 
    Thanks

    Digging into the NI step type for Multiple Numeric Limit Test, I find that the comparison is done at Post-Step substep which is before my Post Expression is evaluated to set the correct limits.
    So I have added code to my VI module to set the limits after taking the measurements but before returning to TestStand.

  • Multiple Multiple Numeric Limit Test

    Hello
    I have a test that I have written (LabVIEW) that produces 2 arrays of numeric Values. 1 array of Gain data and 1 array of Noise data. I want to apply (different) limits to each array (Same limit for each element within array). How do I do this in TestStand. I have used the multiple numeric limit test for tests returning a single array of data but my test returns 2 arrays.
    It would be really in-efficient to split the test up into 2 tests as both Noise and Gain data comes back from the instruments in one sweep.
    Any clues ?
    Regards
    Chris

    Chris,
    Since your code module returns two arrays and you do not want to call the module twice you could have the LabVIEW multiple numeric limit test step to validate one of the arrays and have a None multiple numeric limit step  to validate the second array. You have to send one of the arrays to a local or global variable  so you can access it from the None multiple numeric limit step.
    You could even execute these steps in a separate sequence and call it using a Sequence Call step if you want to see all the process as  a single step.
    Another option would be to create your own multiple numeric limit step type in order to support two different arrays as the data source at the same time. This solution requires more work from you. You could take the existing multiple numeric limit step type code as a starting point.
    You can fin the code under <TestStand>\Components\NI\StepTypes\CommonSubSteps.
    If you plan on modifying the code it is better to make a copy under <TestStand>\Components\User\StepTypes and modify it there.
    This will prevent future upgrades from overwriting your changes.
    If you have any question let me know.
    Hope it Helps.
    Antonio Lie.

  • Display all measurements in Multiple Numeric Limit Test using UI SeuqenceView Control

    Hi, I found only the total result in Multiple Numeric Limit test can be show in UI SequenceView Control. How can I display more detail information in it?
    For example, If I want to display like this:
    Mulitple Numeric Limit test                       FAIL
    Measurement1                                        PASS
    Measuremtnt2                                         FAIL
    Is it possible in UI sequenceview control?
    Thanks in advance

    You might be interested in this community example: Recursive Expression in TestStand.
    It is possible (though not traightforward) to loop in an expression using recursion.  The example above shows how to use recursion in an expression to list all of the limits of a multiple numeric limit step.  This is similar to what you want to do with measurements.
    I honestly think you're better off with Doug's suggestion to hard-code a maximum number of measurements to display as using recursion in expressions is not easy.
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • Limit steps

    Hi , I'm using TS 3.1 and LV7.1 .
    I have a VI which reads the value of step.limits.low and step.limits.high via the sequencer context and get properties methods.
    This vi is called by a numeric limit step type within a flow ( loop) step in TS, the values of step.limits.low and step.limits.high are forced to different values within the loop.
    The Edit Limits TAB has this entered in the data source window:
    Step.Limits.Low = Locals.TempWindowLow ,Step.Limits.High = Locals.TempWindowHigh
    the locals being defined in a Fx step previous.
    The problem I have is that the VI gets the default test limits ( ie the relevant fixed ones ) on the first iteration of the loop, and is subsequently one behind on later iterations.However the report shows that the limits are correct by the time the results comparism in TS takes place.
    So the issue is probably in the order at which things happen when calling the vi, the Step.Limits.Low being evaluated after the properties have been sent to the VI.
    Has anyone any experience of this, and possible work arounds?.
    thanks dht

    For a numeric limit step, the data source expression gets evaluated as part of the status expression, thus, as you saw, it happens after the module is called. Move your limit initialization expression to the PreExpression on the Expressions tab of the step properties dialog box.

  • Is there any differnce between the Numeric Limit Test source code from TestStand 3.0 to TestStand 3.1? How to get the source code for the Numric Limit Test for both the versions?

    I need to know the differnece between the Numeric Limit Test between the TestStand version 3.0 to 3.1. If there is any differnec in the source code how to find it out? If somebody has the code can you share it?
    Thanks,
    Jeyan

    Hi,
    I don't believe there are any differences between the two versions. But you can check the source code for the Numeric Limit Test in TestStand\Components\NI\StepTypes\CommonSubsteps. But the main part of the step is the Code Module and this bit the users supplies this.
    What has prompted this question?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Notice -- Fix for Multiple Numeric Limit Test Status in TestStand 2.0.1

    Dear TestStand Customer:
    National Instruments is committed to product quality and customer
    satisfaction. As part of our commitment, we want to ensure your success
    with our products by delivering industry-leading support and immediate
    information regarding issues potentially affecting you. We discovered an
    issue in TestStand 2.0.1 that may affect the integrity of some test
    results. This issue affects TestStand users meeting both of the following
    criteria:
    1. You are using sequence files with instances of the multiple numeric
    limit test that were saved in TestStand 2. 0.
    2. You have recently upgraded these sequence files from TestStand 2.0 to
    TestStand 2.0.1.
    For the complete problem overv
    iew, please visit
    http://digital.ni.com/express.nsf/express?openagent&code=exjaxg
    In order to immediately remedy this problem on current TestStand 2.0.1
    installations, download the corrective patch at
    http://digital.ni.com/express.nsf/express?openagent&code=exjaxg To prevent
    this issue from occurring in future installations of TestStand 2.0.1
    development and deployment systems, we are creating a new TestStand CD,
    version 2.0.1f1, which we plan to send to all existing TestStand 2.0.1 and
    Developer Suite Test Edition customers with TestStand 2.0.1 during the next
    two to three weeks. If you have a TestStand 2.0.1 CD, please replace it with
    the new TestStand 2.0.1f1 CD.
    Thank you for your patience and understanding in this matter. We remain
    committed to your success and will continue to inform you of any issues
    potentially affecting you in the future. If you have any questions, please
    call me at (512) 683-5880 or email me at mailto:[email protected]
    Best re
    gards,
    Richard McDonell
    TestStand Product Manager
    National Instruments
    (512) 683-5880 Office
    (512) 683-5569 Fax
    mailto:[email protected]

    This issue has been resolved in TestStand 3.0. For more information on TestStand 3.0, please visit ni.com/info and enter "teststand3".
    Regards,
    Richard McDonell
    NI TestStand Product Manager
    National Instruments

  • Overriding Result Status of a (Multiple) Numeric Limit Test

    I want to be able to change the pass/fail status of a numeric limit test from a CVI DLL, whilst still displaying the numeric results in the report. I have tried ResultStatus, StatusExpression and many others but they all seem to do nothing or get replaced by the result of the numeric limit evaluation. Is there a method of supressing the numeric limit evaluation or prefferably performing the individual comparisons but overriding the overall result.
    TIA,
    Dave

    You would have to do the overriding in TestStand. On your Test Step, open the Properties page and go to the Expressions tab. At the bottom you will see the Status Expression box. This is where the limits are compared to the measured value to determine pass/fail. You could modify the code here to have Step.Result.Status be either "passed" or "failed". The actual numeric value measured would not be changed.
    - tbob
    Inventor of the WORM Global

  • Dynamically configure multiple numeric limit test measurements

    I seek to dynamically (programatically) configure a multiple numeric limit test such that I may set / increase / change the number of measurements in the step during execution. For example, I'd like to setup the step for 5 measurements:
    M1, M2, M3, M4, M5 with limits 4<=x<=13.
    I'll set the result data to {1,2,3,4,5}.
    I can successfully set:
    MyMultipleNumLimTestStep.ExpectedNumMeas = 5
    MyMultipleNumLimTestStep.NumericArray (Number of elements to 5)
    MyMultipleNumLimTestStep.DataSourceArray (Number of elements to 5)
    MyMultipleNumLimTestStep.Result.Measurement (Numer of elements to 5)
    Following that, I can access the individual measurement property objects (by offset) and set the Name, Limits.Low, Limits.High, etc...
    During execution, I can view the step variables to see the values getting set correctly.
    BUT, in the report, I only see measurement name, status and the measurement value. NOT the units, limits, comparison type.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    AmpMatchTest
    Failed
    Measurement:
    M1
    Failed
    1.000
    M2
    Failed
    2.000
    M3
    Failed
    3.000
    M4
    Passed
    4.000
    M5
    Passed
    5.000
    Take note, prior to execution, I have no entries defined in the Limits tab of the step settings for this step. If I were to define, say, two steps and run again:
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    AmpMatchTest
    Failed
    Measurement:
    M1
    Failed
    1.000
    dB
    4
    13
    GELE(>= <=)
    M2
    Failed
    2.000
    dB
    4
    13
    GELE(>= <=)
    M3
    Failed
    3.000
    M4
    Passed
    4.000
    M5
    Passed
    5.000
    If I define >5 entries, my code will limit the result to 5. Any ideas?
    Thanks,
    Derek

    Hi jigg.
    I also need to configure a multiple numeric limit test programatically. Unfortunately your solution seems not to work (in Teststand 2013). Also with your code I get limits and comparsion entries in the report only for the first measurement. This is the one already existing in the step configuration.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    Dynamic Call
    Passed
    Measurement:
    AllParts
    Passed
    1
    1 = Pass
    1
    EQ(==)
    Another Part
    Passed
    1
    Part 20
    Passed
    1
    Part 2
    Passed
    1
    Part 1
    Passed
    1
    If I add a second measurement in the step, this one is shifted (like expected) and shows the limits and comparsion in the report.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    Dynamic Call
    Failed
    Measurement:
    AllParts
    Passed
    1
    1 = Pass
    1
    EQ(==)
    Another Part
    Passed
    1
    Part 20
    Passed
    1
    Part 2
    Passed
    1
    Part 1
    Passed
    1
    Measurement 1
    Failed
    0
    1 = Pass
    1
    EQ(==)
    What is special with the preconfigured measurements, compared to the programatically created test? Any help is very appreciated.
    Thanks
    --rainer

Maybe you are looking for

  • Format SimpleDateFormat

    Hi,all I have a problem with formatting date with SimpleDateFormat. I need that the date will be of format dd/mm/yyyy hh:mm:ss With date all is showing fine,I use dd/MM/yyyy ,but if I add hh:mm:ss  instead of right time I give 12:00:00. What may be t

  • Here we go again- 3g AND Edge data problems - NYC area

    Just great.... been having great 3G data speeds for the past several weeks (after the data outage) and since last night (10/12) I cannot get a page to load. Sometimes it doesn't load at all, other times it takes about 5 minutes. What the heck is goin

  • Why won't my mini iPad record sound on the video recorder

    I'm trying to record a video, however my iPad wont record sound.  It will play sound in apps

  • Need help creating Vector table for specific class

    I am trying to create a Vector table of class Node and I think I understand the concept but in practice I am not sure why the compiler complains about non-static reference on statement mv.table.add(new Node(names[n]). Please help. I can not get this

  • Can't turn off music sharing

    Here's a strange quasi-problem. I recently noticed that my computer is sharing my entire iTunes library, whether I want it to or not! If I have sharing turned on then two librarys are available for people to connect to, and if I turn it off on librar