- Create a "Standard project" and select CODESYS Control Win V3 as the device.
- Define the target system by means of the Network scan.
Insert a visualization in the device tree.In addition, a Visu_Task is also created automatically.
Then the Visualization Manager is inserted with the visu types TargetVisuand WebVisu.
Create a new POU named ClientInfo and call it from Visu_Task.
The call of the ClientInfo POU must originate from the Visu_Task because only then is the required client handle passed.
Adapt the ClientInfo POU as follows:
Start the project and set a breakpoint in line 6 of the ClientInfo POU.
- Open a browser and type in the following address: http://localhost:8080/webvisu.htm
After the client has connected, execution is halted at the breakpoint and the IP address can be read.
The information is available only for web clients. A TargetVisu connected to the controller does not contain this information.