01-23-2009 09:20 AM
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
01-23-2009
11:03 AM
- last edited on
06-26-2024
09:36 AM
by
Content Cleaner
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,
01-23-2009 11:10 AM
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
01-23-2009
11:20 AM
- last edited on
06-26-2024
09:36 AM
by
Content Cleaner
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...
01-23-2009 11:29 AM
thanks jigg!
Yes, using Labview....ok, will change my labview function to report true or false.