05-14-2007 03:40 PM
05-15-2007 09:06 AM
05-15-2007 09:41 AM
Rahim
I have not had any luck doing that by TestStand alone.
But have had to write code that I pass in an array of regular expression of 'GOOD' strings and an array of 'BAD' strings to look for. The code looks for the expressions in order or all at once per a switch setting and returns an array of matches. The step 'Passes' if ALL 'GOOD' strings are found and no 'BAD' strings are found. I used a state machine for this.
This was used on a product boot up. The boot up messages were not all the same as different options could be added to the unit that would change the boot up messages. I also found that I had to monitor the boot up while it was running to deside if there were problems when they happened and not wait until the step returned to TestStand.
Jim D.
05-15-2007 09:55 AM
While this is probably best done in a code module, a quick and dirty option would be to use the Find expression function.
For example, you could call your code module with a Pass/Fail step and return the string of interest to a local variable. Then, you could set your Pass/Fail source for the step to an expression such as:
(
Find(Locals.rs232String, "expectedString1")) > -1 && (Find(Locals.rs232String, "expectedString2") > -1)