Omron Forums Support Posted March 14, 2022 Posted March 14, 2022 Add the following reference to use Microsoft TCP sockets:using System.Net.Sockets; Create the client object:System.Net.Sockets.TcpClient clientSocket = new System.Net.Sockets.TcpClient(); Connect to the camera:int port = System.Convert.ToInt32("49211"); clientSocket.Connect("192.168.188.2", port); Create stream object: Send data to the camera:NetworkStream serverStream = clientSocket.GetStream();Prepare text to send (sending jobinfo command - see user manual for details): byte[] outStream = System.Text.Encoding.ASCII.GetBytes("jobinfo\r\n"); Send the data: serverStream.Write(outStream, 0, outStream.Length); serverStream.Flush(); Receive data from the camera:byte[] inStream = new byte[10025]; serverStream.Read(inStream, 0, (int)clientSocket.ReceiveBufferSize); string returndata = System.Text.Encoding.ASCII.GetString(inStream); For the complete VisualStudio project, see attachment. Operating System Any Quote
Recommended Posts
Top Posters In This Topic
1
Popular Days
Mar 14
1
Top Posters In This Topic
Omron Forums Support 1 post
Popular Days
Mar 14 2022
1 post