GR -
Hello, and thanks for using Developer Zone!
The key to getting the output that you are looking for is going to be a case structure. If you place a case structure inside of your while loop, it will respond to the changing value of your DIO line, which you should wire to the input of the structure. Whichever case you equilibrate with the high state of your DIO line, you can place the necessary VIs within it in order to get the proper saving format for your array. You can leave the remainder of your cases blank since you wish to ignore the value of the GPCTR line unless the DIO line is high.
I hope that this has helped with your program. If you have any other questions, please feel free to utilize Developer Zone again. Thanks again for your question.
Best regards,
Greg Wempe