From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send data from Labview to C#

Solved!
Go to solution

Hi all.

Firstly i want to apologize if this subject was in other posts.

I have an table in Labview and i want to send it into C#( visual studio 2015).From what i read, i need a connection TCP/IP where C# must to start the server and client fromLabview must to connect.Can you say me, please, how to write in console line in C# these values?I don't know how to acces them.

C# code 
StreamReader streamReader;
NetworkStream networkStream;

TcpListener tcpListener = new TcpListener(8006);
tcpListener.Start();

Console.WriteLine("The Server has started on port 8006");
Socket serverSocket = tcpListener.AcceptSocket();

Now i try to write the values from the photo for test because is simpler than table, but nothing.

0 Kudos
Message 1 of 2
(3,017 Views)
Solution
Accepted by topic author Claudinho18

I do not see reading data in your code.

I liked second link in google "tcplistener c#": https://stackoverflow.com/questions/19387086/how-to-set-up-tcplistener-to-always-listen-and-accept-m...

client.Receive(data)

"client" is instead of your "serverSocket", "data" is buffer for data

 

Message 2 of 2
(2,964 Views)