LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between TCP communicator vi and Data Client vi

Hi

 

I have a microcontroller with an Ethernet output. I have data coming out of it at 1 KHz speed. Its a hexadecimal data string. I observe the data using TCP Communicator- Active vi, I get the values. But when I try using the Data Client vi, it says the "not enough memory to complete the operations" and the possible reason is "memory full". Nothing of that sort happens in TCP Communication- Active vi. I do get a few points output, after which I get the above said error. What could the reason be and how do I solve this problem. Please help.

 

Thanks

 

Arvind

0 Kudos
Message 1 of 7
(2,797 Views)

Hi arvindthiru,

  Data Client.vi will not work for your application.Because in the Data client program,first it will read 4 bytes and will determine the length of actual data word to read,which is totally synchronised by Data Server vi which will be running in another remote pc.But in TCPCommunicator-Active vi,i think that the read buffer value is not a valid one...You can try changing this value for TCP Read function.Before that try to find the structure of Data frame(length in bytes) which is send by your microcontroller.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 7
(2,789 Views)

Hi Srikirishna

 

Thanks for your reply. I also have a Labview Data acquisition card, whose output I am acquiring on one computer using the data server vi and then sending to another

computer which is collecting this data using the data client vi. I thought I could use the same data client vi for my application, considering that the microcontroller will provide the data acting as the server. I know the length of each data sample, it is 1 byte. So what are the changes I need to make to the data client for my application such that it works exactly like the TCP communicator vi. Please help me out

 

Thanks

 

Arvind

0 Kudos
Message 3 of 7
(2,782 Views)

Hi arvindthiru,

  In data client vi ,first keep only TCP read Vi and wire 1 byte to Bytes to read input and remove all TCP Send Vis...

 

 

Regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 7
(2,778 Views)

Ok. I am outside now. Will try that and update you. Thank you Srikrishna

 

Regards

 

Arvind

0 Kudos
Message 5 of 7
(2,776 Views)

Hi 

 

Sorry it took me some time to get back to you, I got stuck with other work. I tried both the options that you had suggested. I changed the bytes to read to "1" still it said "Memory Full" Next I removed the TCP SEND funciton, this time it doesn't say anything, but I don't get any input either. Nothing happens. Should I change something more or is there any other way this can be accomplished.

 

Thanks

 

Arvind

0 Kudos
Message 6 of 7
(2,723 Views)

Hello,

 

Could you please post a screenshot of any error(s) you are getting when it says "not enough memory to complete the operations" or "memory full"? From there, we will be able to better diagnose the issue and get it resolved quickly.

 

As for the difference between the TCP Communicator VI and the Data Client VI:

 

As you have found, the LabVIEW Example Finder has two different pairs of code that are designed to run together using data sent via TCP (the TCP Communicator and the Data Client/Server). Both sets of VI's use the same underlying LabVIEW functions, but they are created to demonstrate different purposes.

 

The Data Client VI and the Data Server VI are meant to be used in conjunction with each other. The Data Server is the system that sends data and the Data Client is the system that receives data. This set of VIs is meant to be used for unidirectional server/client TCP communication. The purpose of this set of VI's is to send a specified waveform through a TCP port.

 

The TCP Communicator-Active VI and TCP Communicator-Passive VI are also meant to be used together with the Active VI being used to establish the connection. This set of VIs can be used for bidirectional TCP communication. The purpose of this set of VI's is to demonstrate how to send and receive a string via a TCP connection.

I hope this is helpful and we would be happy to help you further once we get a screenshot of the error(s).

Thanks!

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(2,707 Views)