NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple limits for a single value

Is it possible to have a step which tests for multiple possible values in a single step? I thought of using a Multiple Numeric Limit Test and setting two tests for the same Data Source. But then I realized this would fail because I would have tested this:
if ((var0 == 128) && (var0 == 80)) { passed }, and that would never be true/passed.
But I want to test for this:
if ((var0 == 128) || (var0 == 80)) { passed }
 
Is there a way to perform my test? I am using Test Stand 3.0
 
Thanks,
 
AlanJ
 
 
0 Kudos
Message 1 of 8
(4,148 Views)
Hi AlanJ,
 
You can use  a TestStand Pass/Fail Test Step and you can simply modify the Pass/Fail Source. That will allow you to set your pass/fail conditions based on a custom expression.
  1. Right click on the step and click Edit Pass Fail Source
  2. Replace Step.Result.PassFail with your custom condition
    For example: (var0 == 128) || (var0 == 80)

Hope this helps!

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 2 of 8
(4,138 Views)

Hi,

Just expand on Jervin comment.

...you can simply modify the Pass/Fail Source...

By creating a Custom Pass/Fail Step Type based on the NI Pass / Fail Step Type.

Its not wise to modify the actual NI Step Types.

Regards

Ray Farmer

Regards
Ray Farmer
Message 3 of 8
(4,129 Views)
Creating a Pass/Fail step and editing its Pass/Fail Source works, as you both pointed out. Thanks!
0 Kudos
Message 4 of 8
(4,117 Views)
Hi AlanJ,
 
I saw you got it working. But let me ask just one question about your system. Tell me which version of NI_Types.ini is on your machine or when is date of file saving?
If you are using TS4.0 and the version is higher than 4.0.0.71 (Date 2007-04-05) then you have produced your first type virus.
 
Thats one of the reasons why Ray said : Is is not wise to modifiy ...
 
greetings and get never affected by a type virus
 
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 8
(4,100 Views)
juergen,
 
Thanks for pointing out the type virus. I haven't seen OLE errors, so I guess I haven't been affected.  I am using Test Stand 3.0; maybe that's why I haven't been affected.
 
I didn't completely understand Ray's answer. He did say "modify the Pass/Fail Source...", which is what I did...
 
Thanks for the warning. I will upgrade to Test Stand 4.0 soon and if I see the error, I'll know...
 
AlanJ
 
 
 
0 Kudos
Message 6 of 8
(4,096 Views)

Hi AlanJ,

At fist  I am sorry making you afraid. Of course playing with in NI or User Step- and DataTypes never produce a virus a we know. But at the point of view from Teststand the behaviour is like a virus.  But why ? If you change a existing Type on your Station A the internal Version counter (normally)rise. If you create a new sequence file which uses the type the sequnce file stores this version. Everything is looking fine on your station A. 
But if you are trying to run this stuff on a "clean" Station B there will be a Type version conflict Popup. Because there is no higher version on B.  Now let you to chose: If you select ..Use higher version..  TS updates the higher version from File to your Station B (this is the virus behaviour!!). By the way now your version is only in RAM at the monent. If you are closing TS you will be asked to save some .ini stuff. If you agree you "infected".

What    

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 8
(4,085 Views)

ops I have clicked on SubmitSmiley Surprised

Hi AlanJ,

At fist  I am sorry making you afraid. Of course playing with in NI or User Step- and DataTypes never produce a virus a we know. But at the point of view from Teststand the behaviour is like a virus.  But why ? If you change a existing Type on your Station A the internal Version counter (normally)rise. If you create a new sequence file which uses the type the sequnce file stores this version. Everything is looking fine on your station A. 
But if you are trying to run this stuff on a "clean" Station B there will be a Type version conflict Popup. Because there is no higher version on B.  Now let you to chose: If you select ..Use higher version..  TS updates the higher version from File to your Station B (this is the virus behaviour!!). By the way now your version is only in RAM at the monent. If you are closing TS you will be asked to save some .ini stuff. If you agree you "infected".
What really ugly is you have file which where running for years. And someboby opens them on an infected Station and only saved without any doing any "modifcation". After doning this all Stations in the production field using this file will beginn to popup a TypeConflict !
So you see that it is really not wise to do modifications on existing Types ! 
You also have this behaviour in TS3.0 and earlier.
If you have a "clean" Station just look if there is a TypeConflict. If yes never acept savings to this Station. Or just explore to Ni_types.ini. 
you will find it at. Progamm_Folder/Testand 3.0\Components\NI\TypePalettes\ if there are savings from yesterday i recomment you to reinstall TS

Maybe Ray will give you some additional hints.

Greetings

Juergen

  

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 8
(4,081 Views)