LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI RT (Real Time) - HOST TCP/IP Communication

Hi,

 

I am using CVI 2012 Real Time with PXI hardware. I am using TCP/IP communication b/n RT and Host. RT is server and Host is client. In my application, after TCP connection is established between client and server, client will send a command , take for example "GET_DATA" to RT, RT has to respond to that by sending that data.

 

I am successful in

  • Establishing RT-Host TCP communication ( I am able to see that host is reading the welcome message sent by RT).
  • Host is sending the command "GET_DATA" to RT.
  • RT is receiving the "GET_DATA" command from Host.

In TCP server call back function, in TCP_DATAREADY event, i am using ServerTCPRead() to read data from Host. After reading the data, i am comparing the data with expected command and based on that i will be sending the data using ServerTCPWrite().

 

RT is reading the command from Host, but it is not writing the data to client. I am not sure whether I can use ServerTCPWrite() in TCP Server call back function.

 

I also tried using multithreaded concept, but not getting success.

 

Please suggest any solution for this.

 

Thanks,

Haari

0 Kudos
Message 1 of 1
(2,775 Views)