LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send more then one data via tcp

Solved!
Go to solution

Hi,

 

I am working on a similar project to send multiple data from a DAQ card via tcp, but i just cant seem to get it to work. I am still a begineer with LV so not sure how to handle the problem, there are no errors but the client graph shows nothing. i had tried the recemended methods in this forum but havent been able to solve the problem. Some sites suggest using Data socket instead, so should i start using data socket ? or can it be done using tcp?

 

 

Thanks 

0 Kudos
Message 31 of 43
(1,195 Views)

Hi Jeshua,

can you show your vi? I'm sure it's possible with the tcp/ip functions.

 

Mike

0 Kudos
Message 32 of 43
(1,189 Views)

thanks mike for trying to help me out. Please have a look at the attached files. I have actually, replaced the daq assistant with a three waveforms and to make it easier to work with i have both the server and client in the same file.

 

thanks 

 

 

Download All
0 Kudos
Message 33 of 43
(1,184 Views)
You are flattening an array of waveforms.  But when you unflatten them up top, you defined it as an array of doubles.  Right click on the thick brown wire going into your Flatten into String and pick Create Constant.  Move that constant to the top half of your code.  Delete the empty array of doubles and wire in the Array of Waveforms constant you just moved up there.
0 Kudos
Message 34 of 43
(1,175 Views)

hey,

 

Thanks for your suggestion, please have a look at the file to make sure i used it correctly. However, the graph is still not displaying anything.

 

 

Download All
0 Kudos
Message 35 of 43
(1,171 Views)
What you are doing seems correct.  It isn't working for me either.  The TCP part is working just fine, it is something about the unflatten from string liking the array of waveforms.  I don't know what it is though at the moment.
0 Kudos
Message 36 of 43
(1,161 Views)

You need to wire a false constant to "data includes array or string size" on the receiving end.  See discussion above.

 

EDIT: after testing, I think that's part of the problem, but it still isn't working even with that false constant.

Message Edited by nathand on 08-21-2009 03:00 PM
0 Kudos
Message 37 of 43
(1,155 Views)

I tried that too.

 

Without the false constant, it doesn't unflatten, but doesn't return an error.  (Put an error indicator on the Unflatten function since automatic error handling was disabled.)  Put in a false constant and you get error 74.

0 Kudos
Message 38 of 43
(1,146 Views)

I got it working; turns out my last reply was almost the right idea.  Try removing the False constant from "prepend array or string size" on the sending side.  For some reason, it appears that unflatten from string works better for arrays of waveforms when the array size is included.

Message 39 of 43
(1,145 Views)
Dohhh!!!.  I should have seen that.  I thought I was looking for that on the sending side as well, but I must have gotten distracted before I did.
0 Kudos
Message 40 of 43
(1,139 Views)