LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I disconcatanate an array of strings?

Hello,

I´m trying to "disconcatanate" this array of strings that I attached for you. The result that I want to see is: the plotted waveform signal, the frequency and the amplitude on their respectvelly boxes!

Thanxs...
0 Kudos
Message 1 of 8
(2,763 Views)

I don't understand what you are attempting to do with the type casting and the other stuff. None of that is necessary to do what your question asks. Look at the attachment. Since you already have controls for frequency and amplitude, I didn't wire those up as it would be redundant.

Message Edited by Dennis Knutson on 09-18-2006 08:17 AM

0 Kudos
Message 2 of 8
(2,755 Views)
Dennis,

It´s necessary that I convert numeric data array to an string array, concatante the signals (the waveform signal, the frequency and the amplitude) disconcatanate the signals and displays: the waveform signal ploted, the frequency and the amplitude on their respectivelly boxes, that is my goal!

Thanxs for help me...


0 Kudos
Message 3 of 8
(2,742 Views)
I seems like you making a lot of unneccessary work converting from numbers to strings and then back again but if that's what you want to do, fine. Don't use the type cast function. Use the String/Number conversion functions. Number to Fractional String will convert the numberic array to a string array. Then you can use the Build Array function to append the other elements.
0 Kudos
Message 4 of 8
(2,737 Views)

Dennis,

This convertions are necessary because I´m communicating two(or more) computers and the vi´s only read string data type, so because this I´m using type cast to convert an array string data to an array numeric data. The input of signals (the waveform, the frequency and the amplitude) is concatanated strings. I attach for you the vi that I said. I´m using two vi´s (Server vi and Client vi). The Server generate the signal and the Client display them. Both vi´s I see in Find Examples and I did some modifications.

Thanxs...

 

Download All
0 Kudos
Message 5 of 8
(2,728 Views)
So the first VI you posted was supposed to simulate both the client and server? If that's the case, after you type cast something to a string, you would have to type cast the string back to the original data type and you weren't doing that. Your dta was just binary garbage without doing that. Here's something that should work and is a bit closer to the actual shipping examples. The length of the array is type cast to a string and written, the type cast array is then written. The frequency and amplitude are then each type cast and written separately. In the client, the length of the array is first read and that determines the number of bytes to read for the data array. Two separate reads follow that to get the frequency and amplitude. Each are type cast spearately back to dbl.
 

Message Edited by Dennis Knutson on 09-18-2006 01:33 PM

Message 6 of 8
(2,719 Views)
Dennis,

Where I append your server part in my original server vi?! The Client I can understand...
0 Kudos
Message 7 of 8
(2,709 Views)
Put the type cast functions outside the for loop and replace the single TCP/IP Write that is inside with the separte ones for each data item.
Message 8 of 8
(2,701 Views)