LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending array over TCP receiving array and creating image

Solved!
Go to solution
Highlighted

Hi

 

I am working with process tomography;

I want to send a 2-D array of double over TCP, receive the same array (2-D array of double) and create an image from this array.

 

From unflatten to string, I got 2-D array of string. How can I create the original array from this array of string?

 

Please take a look to my vi s.

Thanks in advance

 

 

 

0 Kudos
Message 1 of 8
(2,871 Views)

Hello,

 

I think the solution is to remove the "Number to Fractional String.vi" that you have in the transmit1.vi. You create a 2D array of doubles and you convert that array into an array of strings, and then you flatten them into a single string. This is not nessecary. You can simply wire the 2d array of doubles directly to the flatten to string vi.

See the pictures below.

 

hope this solves your problem,

labjunky

 

in the transmit vi

example2.png

 

in the receive vi

 

example.png

0 Kudos
Message 2 of 8
(2,862 Views)

Thank you for your suggestions Labjunky

 

I have modified the vi s accordingly, but unfortunately it did not solve the problem

 

In this case I do not get the data even in the form of string. Array in the receiver is empty.

 

Can you please take a look to the modified vi s?

 

 

Thanks:)

0 Kudos
Message 3 of 8
(2,851 Views)
Solution
Accepted by topic author Mittani HD

You are writing a 2D DBL array, but are reading it as a 2D array of strings. replace the 2D string array constant with a 2D DBL array constant. (I haven't studied the rest of the code, because I don't have IMAQ)


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 4 of 8
(2,846 Views)

Hi

 

I made a search and could find the solution at

http://forums.ni.com/t5/LabVIEW/Convert-2D-string-array-to-2D-number-array/td-p/626652

 

It works fine now:)

Thank you for your advice.

 

Regards,

 

Mittani

0 Kudos
Message 5 of 8
(2,839 Views)

I can' t find this particular labview thing Capture.PNG how is it called?
Thanks in advance

0 Kudos
Message 6 of 8
(2,638 Views)

@HenkMCFree wrote:

I can' t find this particular labview thing Capture.PNG how is it called?


Unflatten From String Function


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 7 of 8
(2,613 Views)

Thanks alot!

0 Kudos
Message 8 of 8
(2,576 Views)