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.

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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

  • How do i configure a FOR loop to have the behavior of the step Loop Type: Pass/Fail count?

    Hello,
    I'm using the Pass/Fail count set to one Pass to capture an event generated by my DUT.  I originally used a numerical compare step with the Looping type of Pass/Fail count to accomplish this.  Unfortunately the implementation changed and now I need to execute a few steps that can not be combined within one code module as before. Nor can these steps be put into a subroutine.  One of the steps executes a .NET asembly and I haven't figured out how to pass the reference to the subroutine.  When the subroutine is intered the reference is lost and the methode does not execute correctly.
    I have an evaluation function the exits the loop when the expected conditions are met. Everything works except for the Overall Pass/Fail result of the For loop.  If the loop exits due to the first numerical compare test passing, I want the loop overall execution to report as "Passed".  If the loop reaches it's predetermined number of iterations, the overall result needs to report as "Failed".  It would also be nice to have the radio button functionality of "Record Result of Each iteration".  Some conditions require a wait over a minute for the event to occur and I don't want to generate needless data for the report.
    Currently I get the pass/fail status for each For loop iteration, but only "Done" for each loop iteration.  I don't want the initial few failures to cause the test to fail.
    Does anyone know how to do this? Suggestions?
    Thanks,

    I have 2 steps in the loop that can not be combined into one step. This forces me to implement the behavior in some form of loop.  A While Loop could be an option.  I would need to pass the Step.Result.Status from the Multiple Numerical compaire step to the condition of the While Loop.  I tried to use the Step.TS.ID without success.  Some form of reference to the numerical compare step would be needed. I'm using a For Loop as I do want to limit the number of iterations of the loop.  In the case where the loop iterations are reached, the event I am trying to detect did not occur at the correct time and a failure needs to be reported.
    I came up with something based on my comments in the second post:
    1) To start with I configured a Locals.ForLoop_5 variable.  This is used to set the limit on the loop iterations and for comparison after the loop has finished executing. More on that later.
    2) The first step inside the loop invokes a method within a .NET assembly that has been packed in a DLL This method gets the required data from the DUT and stores it to a text file.
    3) The next step is the Multiple Numeric Limit step.  This step invokes a VI that extracts the data from the text file.  This step has been customized in several ways.
      i)  In Run Options, the Results Recording Option was disabled.  This prevents recording of "Failed" while the loop executes when waiting for the event to happen.
      ii) In Run Options, the Step Failure Causes Sequence Failure is unchecked.  Same reasoning as i)  These steps are not true failures.
      iii) A Post Action is configured to go to the nexxt step after the For Loop End step On Condition True with the logic of Step.Result.Status == "Passed".  This causes the loop to exit when the first "Passed" is encountered which corrolates with the event I'm trying to detect. On Conditon Fail remains set to default.
    4)  The step after the For Loop End is an expression step with everythin set to default except for the Status Expression logic set to: Locals.Loopindex < Locals.ForLoop_5 ? (Step.Result.Status = "Passed") : (Step.Result.Status = "Failed"). This step performs the overall Pass/Fail reporting for the For Loop.  If the number of loop iterations is less than the maximum it could have only gotten there by the previous logic triggered by the numerical compare passing, therefore "Passed".  If the loop index has reached the limit, then the event was not detected, therefore Failed.
    I have tested this work around with success, it just a pain to now have to implement this on my 40 some odd For Loops.
    If there is a better way, I'd still like to hear it.

  • How to add a field in the step Variables

    Hi guys, how to add a Field array to the Step Variables?

    Do you mean how to add properties to a Step Type?
    Steps are instances of Step Types so you can not add properties. If you need to add property to say a Numeric Test Limit step type, then you have to create a Custom Step Type based on a Numeric Test Limit Step Type then add your additional properties. Check out the TestStand documentation for Custom Steps Type.
    Depending on your needs you might beable to use the Add Attributes to meet your requirements, depends on what TestStand version you are using. This could save you the bother of having to create your own step type.
    Regards
    Ray Farmer

  • Combining results of previous steps into numerical test

    I'm relatively new to TestStand. Here is what I am trying to do.
    Call VI A with numerical limits, make measurement, store value in sequence local.
    Call VI B without numerical limits, make measurement, store value in sequence local.
    Calculate: measurement A - measurement B. Compare the result to numerical limits.
    Do I need to create a very simple VI with just two inputs, a subtraction function, and an output as a LabVIEW numerical limit step to implement step 3, or is there a more recommended way to do it?
    Thanks.
    Stephen
    Solved!
    Go to Solution.

    Here's what I would do:
    Call VI A as an action step.  Store the measurement in a local variable
    Call VI B as an action step.  Store the measurement in a local variable
    Use the None Adapter to create a Numeric Limit Step.  Set the Data Source to Locals.AValue - Locals.BValue
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Put the report into shape for custom step type

    Hi All,
    I created a custom step type and also managed to get the results logged into the report file.
    In the report file(See ‘[15 33 14][22 10 2007].xml.vi’ please remove the 'vi' extension) the 'StepResult' (created by my custom step type) appears just below the status. Is it possible to get it displayed somehow the cell(measurement column) next to it, like in a Numeric Limit Step? I’m using the ‘horizontal.xsl’ stylesheet and Teststand 3.5.
    Furthermore, is it possible to change the name of the column headers? Or the structure of the header?
    Cheers
    Attila
    Attachments:
    [15 33 14][22 10 2007].xml.vi ‏17 KB

    Hi again Attila,
    Further to my above post, I've collaborated with colleagues here and have been able to modify the horizontal.xls stylesheet such that it is suitable for what you require. This modification will ensure that all properties named StepResult will be displayed as you described, in line in the table.
    To ensure compatibility with your results in TestStand, a small modification to your sequence file is required. In your sequence file, right click the value for your custom step, go to Advanced > Edit Flags and uncheck all boxes. The text in the bottom of the window should now read "0x0". This should mean that your data is displayed correctly.
    I am attaching the modified horizontal.xls for you to use [remove the .vi extension]; please make sure a backup is created before you replace it. The file should be placed in your TestStand directory under Components\NI\Models\TestStandModels\StyleSheets. Modifications to column headers as described in the above post can be made to this file.
    I hope this soultion is satisfactory and that you are able to implement it. If you have any further questions please don't hesitate to reply.
    Regards,
    Tom
    Applications Engineering, NI UK
    Attachments:
    horizontal.xsl.vi ‏84 KB

  • 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 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.

  • How can I report a step only if it is failed?

    In order to decrease the file size of my reports, I would like to only report certain Numeric Limit step results when they are failed.  Can someone tell me how to do this in the step itself?

    Hi jnclaker,
    Hopefully the forum post that Lvrat linked you to is helpful. If you choose to use the Result Filtering Expression to exclude failing steps from your report, please keep in mind that this feature is not available for reports with an XML format.
    Regards,
    Jackie
    DAQ Product Marketing Engineer
    National Instruments

  • How can I run a step only if TestStand not is terminated?

    I want to run a step I Cleanup only if TestStand not is terminated. Is there a variable I can read who tell this?

    Jan Inge -
    I did not know whar version of TS you are using so I created the sequence using TS 2.0.
    In the example a save the state to the numeric result of a numeric limit step and the step determines that execution is normal if the state is 1, so the step passes, otherwise it fails. The precondition of the next steps use the pass/fail status of the first step. This way you do not need a local variable.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments
    Attachments:
    CleanupStepNotRunDuringTermination.seq ‏30 KB

  • Custom step type

    Hi,
    I am using TS4.0.1. and LV 7.1.
    I tried to create a custom step type (MultipleNumericTest_VBATPXI), which similiar to NI_MultipleNumeriLimitTest.  The difference is, I have two additional measured data. (I don't want to check those against Limit, but want to log to the database. )
    So I created the custome Datatype (Limit_test_VBATPXI) similar to "NI_LimitMeasurement" and add required two fields.  This datatype is passed to the "MultipleNumericTest_VBATPXI" steptype for Result.Measurement  type.
    In property browser it shows Results.Measurement as Limit_test_VBATPXI type. But when I add one value in Limit window, Result.Measurements.Measurement[0] becomes type of NI_LimitMeasurement !
    How to solve this?
    br,
    Vishal
    Attachments:
    Test_Type1.seq ‏30 KB
    test38.vi ‏13 KB

    Hello Vishal,
    When you click the "Add Measurement" button on the Limits tab of this step, it is actually calling the EditSubstep of the NI Multiple Numeric Limit Step type.  This Edit substep function, EditMultiNumericMeasurementStepUsingExpr(), is located in the  "<TestStand>\Components\NI\StepTypes\CommonSubsteps\CommonSubsteps.dll" file.  If you wanted to change the behavior of your custom step type, you would need to make your own dll (all of the source code for the CommonSubsteps.dll is provided) that would add your custom type instead of the NI_LimitMeasurement type.  I hope this helps alleviate any confusion.
    Best Regards,
    Software Engineer
    Jett R

Maybe you are looking for