LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Output

Hi smercurio,

   I have connected string output ( thick purple wire) only to string to array.vi. 

 

Thanks

 

senthil

0 Kudos
Message 11 of 59
(1,784 Views)
The string output of what? I don't quite understand what this means. VADave's example may be unclear at first because he has hidden the index display for the array constant. If you are not getting a string array output then you have not wired it up correctly. Please show us what you have.
Message 12 of 59
(1,777 Views)

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.

 

0 Kudos
Message 13 of 59
(1,760 Views)

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

 

 

0 Kudos
Message 14 of 59
(1,757 Views)

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:

 

 

Message Edited by smercurio_fc on 09-04-2009 04:30 PM
Message 15 of 59
(1,740 Views)
By the way, the regular expression means match a string that begins with the characters "{ " (that's a space after the curly bracket) and then has a sequence of letters and numbers that is exactly 75 characters.
Message Edited by smercurio_fc on 09-04-2009 04:57 PM
0 Kudos
Message 16 of 59
(1,729 Views)

Hi Smericurio,

  Thanks for the response. I will try on Monday and get back to you. Have a nice weekend.

 

Regards,

Senthil

0 Kudos
Message 17 of 59
(1,709 Views)

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

 

String Output.JPG

0 Kudos
Message 18 of 59
(1,648 Views)
did you try the number to decimal string function in the string pallett?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 19 of 59
(1,646 Views)

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

 

 

 

0 Kudos
Message 20 of 59
(1,642 Views)