NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Should I use string test module ?

Hi,

 

I am new to teststand..struggling a bit here.

 

I am reading a serial number from a device, but in order to make sure it's correct, I will check that

the lenght of the serial number is more than 5 characters long. This serial number must also

be recorded in the results report.

 

Could anyone please advise me on how I can go about doing this?

Thanks

Goose

0 Kudos
Message 1 of 5
(3,421 Views)

Hey Goose,

 

Which process model are you using?  Reading the serial number is built into TestStand already.  However, if you have to make sure that it is 5 or more digits then you will have to modify the process model.  There are a few ways to modify the process model.  1 way is to override callbacks.  The other is to modify it directly.  If you want the functionality to persist through every sequence on the machine then modifying it directly is the best way to go.  If you only want a certain behavior for a specific sequence then overriding callbacks is the way to go.  Here's a doc on callbacks: https://www.ni.com/en/support/documentation/supplemental/07/using-callbacks-in-ni-teststand.html  And: https://www.ni.com/en/support/documentation/supplemental/08/teststand-process-model-development-and-...

 

If you've taken the TestStand course or have the manuals then there are exercises for doing both. 

 

How are you reading the serial number?  Are you using LabVIEW? CVI? .NET? If you have a code module that reads it already you can replace the code in the PreUUT Callback in the process model.  This is where the serial number is being read.  By default the serial number is already in the report.  Also, you must be using the Test UUTs and not the Single Pass entry point.

 

Let me know if you have questions as this is a lot for a beginner.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,417 Views)

Hi jigg,

thanks for your reply!!

 

This is all done in my main sequence, and it's an USB function where I read the serial number of a USB Hub...not related to the

serial number you enter when starting the sequence.

 

The function returns a string, which is the serial number...the only way I can think of verifying this, is the check

that the lenght of the string returned is longer than 5 characters. So...how do i use the string test for this???

 

Another question I have ....

Some of my tests, returns about 5 values. These do not need to be verified, but only saved in the result file

how do I save these in the result file ? step.result.... only has limited scope for this ?

 

Thanks !!

 

Goose

0 Kudos
Message 3 of 5
(3,414 Views)

So how are you calling the USB device? LabVIEW?  The best way would be to modify the code module to check for the correct amount of caracters and use a Pass/Fail Step Type.  The String Step Type only checks to see if two strings are equal.  Whereas you need to check to see if a certain amount of caracters are in the string.  If you are using LabVIEW and you cannot modify the VI that is reading the serial number then pass the string to a Pass/Fail module and check to see if it has enough caracters and if not then set the return boolean to false.  Otherwise set it to true.  Unless you know what the serial number should be then you can use the String Step Type.

 

Here is a tutorial for adding custom results to the report:  https://www.ni.com/en/support/documentation/supplemental/08/teststand-report-generation-and-customiz... 

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(3,412 Views)

thanks jigg!

Yes, using Labview....ok, will change my labview function to report true or false.

 

0 Kudos
Message 5 of 5
(3,408 Views)