LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Me about TCP/IP Please... !!

    At my program of Labview. I use tool of function > function all > communication > TCP . at TCP function there are TCP read,TCP write,. ETC. if me send data in the form of ordinary sine sinyal to other computer use function of TCP mentioned of sine graph picture will emerge. but when its sinyal in the form of input data of motor of dc that is voltage and speed by real time, graph picture of the voltage and speed do not emerge. can you assist the problem of this me? we thank you for your information and time to read my problem and my post. I hope I do not disturb you. Thank you very much. or maybe  you can email  me ( ade_p_2002@elect-eng.its.ac.id ) about  this problem... thank you so much for your help...

0 Kudos
Message 1 of 10
(3,851 Views)
TCP does not care what the data represents, it simply transfers string of bytes. The receiving end needs to know how to unflatten it.
 
Seems you are doing it wrong, but without seeing the code it is impossible to tell what the problem is. Can you please attach your code?
 
 
 
0 Kudos
Message 2 of 10
(3,845 Views)


@racoll wrote:

    At my program of Labview. I use tool of function > function all > communication > TCP . at TCP function there are TCP read,TCP write,. ETC. if me send data in the form of ordinary sine sinyal to other computer use function of TCP mentioned of sine graph picture will emerge. but when its sinyal in the form of input data of motor of dc that is voltage and speed by real time, graph picture of the voltage and speed do not emerge. can you assist the problem of this me? we thank you for your information and time to read my problem and my post. I hope I do not disturb you. Thank you very much. or maybe  you can email  me ( ade_p_2002@elect-eng.its.ac.id ) about  this problem... thank you so much for your help...



There are several examples of doing this that come right out of the box after you installed LabVIEW. Checkout examples/comm/tcp.llb.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 10
(3,827 Views)
This is my sources code, please tell me what's  wrong  with my code thank..

I will send the graphic of voltage to other computer with TCP/IP function, thank you very much..
Download All
0 Kudos
Message 4 of 10
(3,803 Views)


@racoll wrote:
This is my sources code, please tell me what's  wrong  with my code thank..

I will send the graphic of voltage to other computer with TCP/IP function, thank you very much..


These images tell absolutely nothing as they do not show how the TCP/IP messages are formated if any!!

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
Message 5 of 10
(3,799 Views)
sorry I am late
Download All
0 Kudos
Message 6 of 10
(3,755 Views)
You send it as a scalar DBL (with size information prepended), but try to unflatten it as an array of DBL (again with size information prepended).
 
There is also a serious problem with data dependency that prevents the two upper loops from running ar the same time.
 

Message Edited by altenbach on 11-01-2007 11:50 AM

0 Kudos
Message 7 of 10
(3,741 Views)
so, how to combine 2 loop so that I can send data with TCP/IP? can you give me the example of source code about it.

 Sorry to disturb you, because I'm still beginner. I can't so much understood. Thank before....
0 Kudos
Message 8 of 10
(3,721 Views)
Your code makes very little sense. Maybe you should explain in more detail what you actually want to do.
  1. Currently, you are only sending (actually more like "trying to send") the setpoint via TCP (it would be clearer to read the code if you would wire so the data flows from left to right). It would seem more reasonable to send the voltage reading from the lowermost loop instead.
  2. Maybe it is OK to only send a SGL since you are using a chart on the receiving end. In this case you don't even need to send the size information. Simply typecast it as string and read 4 bytes at the other end and cast it back to a SGL.
  3. It is very confusing to have two indicators called "voltage reading". One SGL and one DBL. Giving them the same name does not relate them in any way.  It seems the DBL only reports the setpoint, a rather uninteresting number because it is already visible from the setpoint control.
  4. Since it is not really useful to send data unless new data is available, you should place the TCP send parts in the lower loop (the one insde the case structure) and send data whenever the voltage reading SGL gets updated. Now you don't need the middle loop at all.
  5. You should use the "stop if true" feature of the while loops so you don't need to invert the OR output. Less confusing!

Sorry, I don't know these PC-lab VIs and had to do some wild guesses on the ideas behind you code. Things would be easier if you could attach a real VI.

Message Edited by altenbach on 11-01-2007 03:58 PM

0 Kudos
Message 9 of 10
(3,709 Views)
I thank you for solution which you give.
If I have something problem again, I hope you can help me ...

Thank you..
0 Kudos
Message 10 of 10
(3,658 Views)