LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending more than one string from a server to a client in TCP/IP

hi,

i have two VIs where one is the server and the other the client in TCP/IP. I need to send more than 2 strings to the client at the same time.i have used the XML method but then by using XML i cant send any thing else to the client because of the byte sizes. so either i need a new way to send the strings or a new way to send more data. i have attached my VIs to this post if you need to take a look.

thanks,

Rambaldi.

0 Kudos
Message 1 of 3
(2,297 Views)

Well, after looking at the code it is very difficult to understand what you are trying to do. Not to be nasty or anything but your code is a mess. Did you know that in both VIs you have an infinite loop? The only way to exit your VIs is to use the Abort button. This is bad since it doesn't allow you to actually perform any type of cleanup. Your wiring is very difficult to follow. You should also avoid using local variables to pass data through your application. If you need to pass data between two parallel processes use queues, notifiers or an action engine. You can get rid of all of the sequence frames that you have. They aren't really doing anything for you and are unnecessary.

 

As to your particular question I would have to assume that it is simply a result of bad coding that is preventing you from sending more than one string. You have logic in the second loop that appears to be impossible to get to since the conrol used to switch the case statement is placed on a hidden part of the front panel. Take a look at the TCP server example I posted in this thread. The example is on the second page of that thread.

 

In order to help you I think you need to provide a good description of exactly what you want your server and client to do. You also need to do some code cleanup to make it readable and easier to follow.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 3
(2,290 Views)

hey Mark,

im really new in labview and dont really know much about it.i have tried to clean up the code however its still a mess i thinkSmiley Wink

also i explained in the client VI that what im trying to do and what is the problem.

also i tried to fix the loops but i wasnt able to and they are still infinite. and for the local variables i need so many of them and i dont really know how to use a queue or notifier. would they cause any problem?

0 Kudos
Message 3 of 3
(2,268 Views)