LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tcp ip basics

Hi,

 

 

          I'm doing a new project wrt to tcp, there is a real time server and my pc is a client. So i would like to know how to communicate from client (pc) to server, I mean i would like to know abt the efficient architecture for communicating between these two. pls help me with a description of how to do or if there any examples with respect architectures pls post it.

 

 

 

0 Kudos
Message 1 of 13
(3,832 Views)

Hi,

 

If you want to do communication between your client and server there are various ways for it.

You can either use shared variables or UDP or TCP/IP to do this communication.

Depending on your application you need to select it.

If dataloss is your concern and you want to get notify on dataloss probably TCP /IP is better optiona s it provides acknowledgement for the message received. Whereas UDP does not provide it basically, however you can write wrapper for UDP also to get acknowledgement.

 

You can refer NI help for getting examples related to TCP IP and UDP so that you will come to know their architechtures.

Or post want you want to do in details so that idea can be clear.

0 Kudos
Message 2 of 13
(3,818 Views)

Hi,

 

 

       Thank you for that information. My concern is about  data loss, I think TCP/IP is better in case of it. So could pls tell me in detail what kind of a structure i should say?  and pls tell me methods of efficient programming wrt to client using TCP

0 Kudos
Message 3 of 13
(3,812 Views)

Hi,

 

I've found 3 white paper articles that explain client server communication at a basic level, with respect to TCP. Perhaps you could have a look and see if any are helpful?

 

All of the articles give recommendations on architecture. 

 

http://www.ni.com/white-paper/4433/en#toc2

 

http://www.ni.com/white-paper/2710/en

 

http://www.ni.com/white-paper/3055/en


ShalimarA | CLA
0 Kudos
Message 4 of 13
(3,807 Views)

Thank you, Is there any example or description of how to read and write a tdms over network 

0 Kudos
Message 5 of 13
(3,781 Views)

When you say you'd like to read/write a TDMS file over a network, what exactly are you trying to achieve? Do you want to write the TDMS file on the client and then read it back on your RT server? Or something else?


ShalimarA | CLA
0 Kudos
Message 6 of 13
(3,769 Views)

Hi,

 

 

            Its the opposite way, the server has tdms file read the channels of tdms from client and plot.

0 Kudos
Message 7 of 13
(3,765 Views)

There are several examples of using the TCP VIs that ship with LabVIEW. Use the example finder to find them. You really haven't provided enough detail to give you suggestions on what architecture would be best. What is the protocol the two devices will use? Are you writing the code for both the client and the server? Are they both written in LabVIEW? If so may want to consider using network streams. Network streams are a peer to peer connection so if you will have multiple clients you may want to use the TCP primitives.



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
Message 8 of 13
(3,735 Views)

HI,

 

 

           Sorry , I didn't give enough details.  Below are the details.

 

1)  Embedded Controller (Ni PXI 8106) is connected to a Machine. This controller acts as a server, the code is written in cvi. The tdms files which are gathered from Machine is stored on this embedded controller .

2)  Pc with Labview which acts as a client .

 

      The task is to access the Controller using TCP/IP from labview programme (client)  and to get tdms data or channels and plot in labview.

0 Kudos
Message 9 of 13
(3,731 Views)

Hi jay090909,

 

if i understood your correctly you want to make a VI in LV to get the tdms files from your PXI-Controller via TCP/IP.

 

Have a look at the LV example finder under the expression "TCP/IP". There are several examples how to manage your question.

 

For more informations or questions write back.

 

Regards,

 

Stefan

0 Kudos
Message 10 of 13
(3,642 Views)