09-04-2009 03:04 PM
Hi smercurio,
I have connected string output ( thick purple wire) only to string to array.vi.
Thanks
senthil
09-04-2009 03:16 PM
09-04-2009 03:27 PM
I still prefer the Match Pattern method to get straight at your string, but if you want to index the string there is also the Pick Line function.
That said, you should still try to figure out VADave's example.
09-04-2009 03:32 PM
Hi smercurio,
Thanks for the rapid response. Let me explain my experimental setup. The output of automated reactor is connected to PC via RS-232 interface. I am using visa read.vi to read the signal and the output of this VI is in string format. As I discussed earlier, I need to seperate out the red highlighted whole lengthy string (string length = 77) same as it is in original from the remaining unwanted buffer. If I use scan string.vi with offset 'o' and string match as "{" (or) "{!A=" I could not able to get the required string since a single set of data O/P has multiple '{' characters. This is same for the case of using 'match expression.vi', 'string subset.vi' etc. Finally I felt of converting this whole dataset in to array and tried to seperate the required string by indexing. But while connecting the string O/P from VISA read.vi, the array o/p all string characters as numerical form.
Note: I dont have labview on my laptop and could only attach the block dig. by Monday only.
Regards,
Senthil
09-04-2009 04:29 PM - edited 09-04-2009 04:30 PM
In understand your setup, and I understand what you're trying to do. What I'm saying is that if you wired up VADave's example correctly you would not be getting "numerical form". You would be getting an array of strings. Without seeing your code that's unfortunately all that I can keep saying.
Several examples have been shown on how to extract that string. Here's another simple method using the Match Regular Expression function:
09-04-2009 04:55 PM - edited 09-04-2009 04:57 PM
09-05-2009 02:44 AM
Hi Smericurio,
Thanks for the response. I will try on Monday and get back to you. Have a nice weekend.
Regards,
Senthil
09-07-2009 06:18 AM
Hi,
I tried both options (match expression.vi and string to array.vi), but could not able to extract the required string. 'String to array.vi' output is in dbl form. How can I make it as string array output? How can I get each array index having each line of string as it is in original form? For better understanding I provided here the block dig.
Thanks
Senthil
09-07-2009 06:20 AM
09-07-2009 07:24 AM
Hi Harold,
If I use 'number to string.vi', still the output will be the same but in string format for e.g. 4.8000 (dbl) to 4.8000 (string). But my original data out from instrument is set of strings as shown in my previous posts. I wish to sort out the set of strings in to each array index comprising individual strings.
For E.g., Source data format:
{ A<
{ A<
{A 4563201866388750305875790202
Need to converts in array with index as
Index 'o' { A<
Index'1' { A<
Index'2' { A 4563201866388750305875790202
Simply I wish to convert the data in array with each index has each line of source data.
Regards,
Senthil