NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing and concatenating Error messages

The attached code has many many holes in it right now (and I'm not including all of the subVIs), so please forgive.  I'm hoping, though, that someone can help me fill in a few my holes.  What I'd like to do is (1) if the string (message) sent to Com Port A is not what I read back at Com Port B, then generate a custum message and (2) concatenate (I think) this error message with any that have come before it and (3) return this string/error to TestStand in Report Text and (4) set the Pass/Fail flag accordingly.
 
I created a couple of custom error messages using the Error Code File Editor.  Am I correct in just setting the boolean to True and providing the code for the desired message.  LV will look up the error string, correct?
0 Kudos
Message 1 of 4
(2,829 Views)
Mr. Bean,
 
I sent this to the LabVIEW team as well but I'll answer the TestStand portion of your questions.  So basically you just wire whatever text you want to be the Report Text into your indicator.  Make sure that the indicator is connected through the Connector Pane (right click the icon in the front panel and click show connector.  Click a connector and click the indicator.).  Inside of TestStand when you specify module and point it to this VI you will see Report Text as an output.  Type the lookup string Step.Result.ReportText.  Now that step will have the report text returned from your VI.
 
The same goes for the Pass/Fail.  You have to have a pass/fail step to use the default TestStand settings for this step.  You need to connect the indicator in your VI to whatever you are evaluating.  Then connect it through the Connector Pane the same as the Report Text.  And inside of TestStand you would use: Step.Result.PassFail.
 
I've attached a simple example on how to do this.
 
Regards,
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 2 of 4
(2,792 Views)
Your example makes sense, and I've done this type of thing before.  One thing I'm wondering. though, .... say you're in a loop and you want to write pieces of test data to the report.  Is it best to concatenate the desired data together into one large string then place it in Step.Result.ReportText at the end of the test?
0 Kudos
Message 3 of 4
(2,780 Views)

It all depends on where you want the text to show up.  You can do custom step types with a bunch of string variables and write to those.  You could do a custom step type with a cluster of a bunch of strings.  You can definitely concatenate the string.  You can append to it using the ActiveX VIs in the TestStand pallette.  The simplest would be to concatenate it.

Regards,

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