LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP client server

Hi all

I am writing application in CVI .

The application communicates with devices (the number is not constant) via TCP protocol.

Each device has unique IP address and the same port number.

The CVI application will send request string to each device  (one time at the connection), and get continuously fixed size status strings from the devices.

My question is what is the best configuration of my PC:

 As client? or as server?

What kind of callback functions shell I use?

 

Thank you

 

 

0 Kudos
Message 1 of 6
(4,142 Views)

Have you looked at the examples for TCP Communication in this folder: C:\Program Files\National Instruments\<cvi>\samples\tcp?

How are you communicating with the hardware?

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(4,108 Views)

Hi

I looked at the examples and also build an application that use client's functions from TCP library.

I have troubles when I  connect >4 devices because I didn’t get event of  TCP_DATAREADY from all devices.

Yes ,I am communicating with hardware: Each device has Lantronix (http://www.lantronix.com/) XPORT01  (LAN to To RS232 TTL adaptor) that connected to MSP430 (TI) micro controller

0 Kudos
Message 3 of 6
(4,078 Views)
You are connecting >4 of the Lantronix devices to the network and that is what's throwing the error.  Or is it >4 devices connected to your Lantronix device?
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 6
(4,048 Views)

Each device has Lantronix adaptor. if  I am connecting more then 4 devices to the net (even internal without internet), sometimes I do not get event of DATA_READY from some device. Each device send cyclic status massage of  63 bytes.

It seems that data from other devices come more times then other devices (all devices send data at the same  period of time, and if I open telnet session for each device I get the data well).

My application using TCP callback.

0 Kudos
Message 5 of 6
(4,026 Views)
Maybe you could try a packet sniffer such as Ethereal?  http://www.ethereal.com/  Basically it will sniff all of the TCP packets.  This way you can assure what is really coming and going.  There are other packet sniffers out there as well.
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 6
(3,986 Views)