10-12-2012 05:00 AM
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.
10-12-2012 05:34 AM
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.
10-12-2012 05:42 AM
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
10-12-2012 05:53 AM
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
10-12-2012 06:44 AM
Thank you, Is there any example or description of how to read and write a tdms over network
10-12-2012 07:37 AM
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?
10-12-2012 07:43 AM
Hi,
Its the opposite way, the server has tdms file read the channels of tdms from client and plot.
10-12-2012 09:05 AM
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.
10-12-2012 09:20 AM - edited 10-12-2012 09:21 AM
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.
10-17-2012 04:08 AM
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