Setting up virtual UART

Материал из WebHMI Wiki
Перейти к: навигация, поиск
Эта страница — перевод страницы Настройка виртуального UART. Перевод выполнен на 100%.

Другие языки:
English • ‎русский

Sometimes there is a need to access a remote PLC or other equipment with an RS-485 or RS-232 interface. To solve this problem, you can use the Virtual UART function which is built into WebHMI.

Suppose that we need to update the program in the controller Delta DVP-10SX. It is connected to WebHMI using RS-485.

1. Open the connection settings and change Mode c Normal to Virtual UART.

Vitrual uart 1.png

2. Save changes

After saving, you will see that the specified connection is disabled due to Virtual UART. This means that WebHMI will not work with it until Virtual UART mode is enabled. If this UART is used for other PLCs, they will also be disabled and WebHMI will not be able to work with them. </ P> <p> Also in the list of connections you will see the column Virtual UART. It shows the TCP port number of this UART by which to connect.

Vitrual uart 2.png

3. Download and setup the driver [Perle TruePort] for your OS.

4. Launch TruePort Management Tool. Press "Add..." to add new virtual serial port.

Vitrual uart 3.png

5. Specify a convenient name for the virtual port and IP address

Vitrual uart 4.png

6. Specify the number of virtual ports you want to create and the starting address for them. Click 'Next'

WebHMI allows you to create multiple virtual ports. To connect additional UART, you must use an external USB hub and USB-RS485 or USB-RS232 converters.

Vitrual uart 5.png

7. Select the port that you just created and click "Properties".

Vitrual uart 6.png

8. Click the 'Configuration' tab and click 'Settings'.

Vitrual uart 7.png

9. In the port settings window, select the desired port in the list on the left. On the right, select 'Initiate connection to device server' and specify the port that you saw in step 2. In our case, this is 8001. Click 'OK', then 'Close'.

Vitrual uart 8.png

If you did everything right, now you have a virtual COM-COM4 port in your system that can be used in any application to access the PLC.

Note that all port settings are specified in the 'Connections' of WebHMI. All settings (speed, parity, stop bits) specified in Windows applications will be ignored.