General Category > Additional Components

TCP Client Socket

(1/1)

Archie:
The attached component is a group of files that will add a generic TCP client. After adding the files and building the solution, you will get a new component in the Toolbox. Add this to your form, set the IPAddress and port number, then double click the component to get back to the code that will receive the data from the server.

An example of its use would be an Serial to Ethernet converter with a barcode scanner hooked up to the serial port. This component will receive the data from the scanner.

Installation and use:

- Download and unzip the files
- Open your AdvancedHMI solution in Visual Studio
- In Solution Explorer, expand down the AdvancedHMIControls project
- Right click the PurchasedControls folder and select Add-Existing Items
- Browse to the extracted files and select all 4 files
- Build the solution
- Open the Mainform
- From the ToolBox, add a GenericTCPClient to your form
- Set the IPAddress and port to that of your TCP server
- Double click the GenericTcpClient1 component which will take you back to the code
- Enter this code:

MsgBox ("Received: " & e.DataAsString)

- Run the application and have your server send data


It also has the capability to send data back to the server like this:

GenericTCPClient1.SendString("MyDataString")

Archie:
This is a software tool that can be used for testing the GenericTCPClient. Use the TCP Server tab

https://www.hw-group.com//products/hercules/index_en.html

seth350:
Now this is something I could use. Thank you Archie!
I need to send a String to a Domino DSeries laser marker and I think this will do the trick.

Definitely easier to do it in AHMI than in the plc, in my case that is.

Holmux:
Thanks Archie

I know this is an old post, but You just saved this Christmas for me :)

/Holmux 

Navigation

[0] Message Index

Go to full version