NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Add Additional Results Using SequenceFilePostStep (looping and batch issue)

Good afternoon and morning to all,

 

  • so, goal is to split the text output of a "call executable" step type into lines of 255 characters (max) and record them as additional results of the same calling step using SequenceFilePostStep
  • it's done but there are two issues that I need the brains of the community for so far...
  1. When a call executable is looped (using the looping option under step settings) and all loop results are recorded, I would like to do this for the overall step text output...not for each loop output....so, how can one find out that this is the last iteration of a loop?
  2. When this callBack is used in a batch sequence file, the additional results come from both sockets...but I only want the results to be added to the socket that handled that data
  3. your help is greatly appreciated and the file in question is attached. test.txt contains the simulated stdOutput
  4. also, if you know of a better way, please do share...

 

so,

  1. I use SequenceFilePostStep to check if a step is an "call executable" step type
  2. Then, if it is, check if it has any additional results being recorded
  3. look through additional results and check their names until the first line_n...is found
  4. delete all additional results past the point found in step 3
  5. split call executable's stdOutput text into an array line by line
  6. check to see if any line is greater than 255 characters and if it is, split it off and insert it, as a new array element, all text past 255 characters as the next array element
  7. repeat 6 until all lines are checked
  8. I've skipped the deleting of results section (step 4)...i had some issue that haven't fully looked into yet for batch
0 Kudos
Message 1 of 1
(883 Views)