05-01-2013 10:37 AM
Hello,
I would like some help to extract the lines of code after the "CALL ZocSend" command and place the extracted data into another array file.
INPUT ARRAY:
CALL ZocTimeout 60
CALL ZocWaitForSeq 100000000
CALL ZocDelay 0.1
CALL ZocWaitForSeq 100000000
CALL ZocSend "prog:gpio:w:dsp_rf_reset:00^M"
CALL ZocDelay 0.1
CALL ZocTimeout 60
CALL ZocWaitForSeq 100000000
CALL ZocDelay 0.1
CALL ZocSend "PROG:I2C:CODECA:WRITE:0000^M"
CALL ZocWaitForSeq 100000000
CALL ZocDelay 0.1
CALL ZocSend "poc:powerup_config^M"
CALL ZocWaitForSeq 100000000
CALL ZocDelay 0.1
EXTRACTED OUTPUT ARRAY:
prog:gpio:w:dsp_rf_reset:00
PROG:I2C:CODECA:WRITE:0000
poc:powerup_config
Any help will be greatly appreciated.
Thanks,
hiNi.
05-01-2013 11:46 AM
I'm not clear on precisely what you're after because there are several instances of the "CALL ZocSend" command in your file.
This will give you all the results after the first instance:
05-01-2013 12:06 PM
Thanks for getting me started. In the attached updated VI, I would like to get rid of the empty cells and have the output array with just the three enteries:
prog:gpio:w:dsp_rf_reset:00
PROG:I2C:CODECA:WRITE:0000
poc:powerup_config
05-01-2013 12:39 PM
05-01-2013 12:43 PM
05-01-2013 02:59 PM
You can also get rid of the quotation marks using the String Subset vi. Set the offset to 1 to remove the first one, and set the length to be the initial string length minus 2.
05-01-2013 03:50 PM
@pjr1121 wrote:
You can also get rid of the quotation marks using the String Subset vi. Set the offset to 1 to remove the first one, and set the length to be the initial string length minus 2.
Even easier than that, and for fun with Regular Expressions, change the contents of the For Loop to this: