Подключение внешних устройств/en — различия между версиями

Материал из WebHMI Wiki
Перейти к: навигация, поиск
(Новая страница: «External devices connecting»)
 
 
(не показано 7 промежуточных версий этого же участника)
Строка 1: Строка 1:
 
<languages/>
 
<languages/>
== Варианты подключения внешних устройств ==
+
== External devices connecting variants ==
Устройства автоматики и другие интеллектуальные устройства, данные с которых необходимо получать можно подключать следующими способами:
+
Automation devices and other intelligent devices, which you need to receive the data from, can be connected with the following ways:
*через встроенный порт RS-485, при этом на один и тот же порт '''можно ставить устройства с разными протоколами'''. это является отличительным преимуществом WEBHMI. Драйвер порта умеет динамически ("на лету") переконфигурировать приемопередатчик.
+
* through the built-in RS-485 port, while on the same port '''you can put devices with different protocols'''. This is the distinctive advantage of WEBHMI. The port driver can dynamically (on the fly) reconfigure the transceiver.
*устройства с другими интерфейсами, такими как RS-232,422 или дополнительные сети RS-485 можно подключать через переходники USB в СОМ порт, используя встроенный USB порт.
+
* Devices with other interfaces, such as RS-232, 422 or additional RS-485 networks, can be connected via USB adapters to the COM port using the built-in USB port.
*устройства с протоколом Modbus/TCP можно подключать через порт Ethernet LAN или WAN.  
+
* Devices with Modbus/TCP protocol can be connected via Ethernet LAN or WAN port.
Конфигурирование данных соединений описано [http://wiki.webhmi.com.ua/index.php/%D0%A1%D0%BE%D0%B5%D0%B4%D0%B8%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F здесь].
+
The configuration of these connections is described [http://wiki.webhmi.com.ua/index.php/%D0%A1%D0%BE%D0%B5%D0%B4%D0%B8%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F here].
  
== Рекомендации по подключению устройств с интерфейсом RS-485 ==
+
== Recommendations for connecting devices with RS-485 interface ==
Схема подключения WEBHMI к устройствам с интерфейсом RS-485.<br>
+
Wiring diagram of WEBHMI to devices with RS-485 interface.<br>
 
[[Файл:RS-485 conn.png|400px]]<br><br>
 
[[Файл:RS-485 conn.png|400px]]<br><br>
Вероятно (если у Вас уже имеется опыт работы с данным интерфейсом), прочитав фразу RS-485 Вы сразу же решите использовать 2-х проводную схему, подключившись к стандартным выводам А и В, поскольку для передачи сигнала в нем действительно достаточно только 2 провода (этого же мнения придерживается довольно много специалистов). Однако это является '''общепринятым заблуждением'''. Стандарт EIA/RS-485 говорит о том, что '''3-й провод нужен''':
+
Probably (if you already have experience with this interface), after reading the phrase RS-485, you immediately decide to use a 2-wire circuit, connecting to the standard terminals A and B, since only 2 wires are really enough to transmit the signal (a lot of specialists adhere to this opinion). However, this is a '''generally accepted error'''. The EIA/RS-485 standard says that '''3rd wire is needed''':
 
[[Файл:Standard 485.png|750px]]<br>
 
[[Файл:Standard 485.png|750px]]<br>
Источниками формирования подобного заблуждения могут быть:
+
Sources for the formation this fallacy can be:
*документация в интернете по теме:
+
* online documentation on the topic:
 
[[Файл:485 неправильная вики.png|750px]]<br>
 
[[Файл:485 неправильная вики.png|750px]]<br>
*некоторые устройства автоматизации, имеющие на борту всего две клеммы для подключения RS-485.  
+
* some automation devices that have only two terminals for connecting RS-485 on board.
 
[[Файл:Трм-200 схема.png|400px]]<br>
 
[[Файл:Трм-200 схема.png|400px]]<br>
*широко распространенные кабели для RS-485, имеющие '''всего два провода'''.  
+
* widely distributed cables for RS-485, having '''only two wires'''.
 
[[Файл:Pg-cable.jpg|400px]]
 
[[Файл:Pg-cable.jpg|400px]]
*данные руководств производителей микросхем интерфейсов,
+
* interfaces microchips manufacturers manuals
[[Файл:Max IC.png|400px]]<br>
+
[[Файл:Max IC.png|400px]]<br>
* положительный опыт использования 2-х проводной схемы
+
* a positive experience of using a 2-wire circuit
* и т.д.
+
* etc.
В действительности оказывается, что:
+
In fact, it turns out that:
* документация неофициальная
+
* Informal documentation
* устройство с 2 клеммами предполагает подключение программатора коротким проводом на низкой скорости обмена
+
* A device with 2 terminals implies the connection of the programmer with a short wire at a low exchange rate
* производитель кабеля не напоминает покупателю, что меры по обеспечению "выравнивания" общих точек приемопередатчиков никто не отменял и они прописаны в руководствах по эксплуатации на устройства (использованием отдельного провода или сажая "общие" на "чистую" землю)
+
* The cable manufacturer does not remind the buyer that measures to ensure the "equalization" of the common points of the transceivers have not been canceled and they are spelled out in the operating manuals on the devices (using a separate wire or planting "general" on "clean" ground)
* производитель микросхемы для упрощения восприятия совмещает принципиальную и функциональную схемы
+
* The manufacturer of the microchip combines the principal and functional circuits for simplification of perception
* 2-х проводная схема работала на столе, на коротком проводе, на длинном проводе, но была благоприятная электромагнитная обстановка
+
* The 2-wire circuit worked on a table, on a short wire, or on a long wire with a favorable electromagnetic environment
Таким образом, для надежного соединения необходимо использовать 3-х проводную схему.  
+
Thus, for a reliable connection it is necessary to use a 3-wire circuit.
Работа трех-проводной схемы приведена на следующем рис.<br>
+
The operation of the three-wire circuit is shown in the following figure: <br>
 
[[Файл:Рис7 тексас 2.png|500px]]<br><br>
 
[[Файл:Рис7 тексас 2.png|500px]]<br><br>
  
<p>Здесь Vos - напряжение смещения передатчика (измеряется относительно общего и средней точки делителя напряжения с одинаковыми плечами, подключенного к выходам А,В), Vgpd - напряжение между "общими точками" передатчика и приемника, Vnoise - напряжение электромагнитной "наводки" на линию, Vcm - напряжение помехи "общего вида" прикладываемое к обоим входам приемника, которое складывается в итоге как Vgpd+Vos+Vnoise.  
+
<p> Here Vos is the transmitter bias voltage (measured relative to the common and midpoint of the voltage divider with the same shoulders connected to the A and B outputs), Vgpd is the voltage between the "common points" of the transmitter and receiver, Vnoise is the voltage of the electromagnetic " line, Vcm is the common-mode interference voltage applied to both inputs of the receiver, which adds up as Vgpd + Vos + Vnoise.
Передатчик модулирует дифференциальное напряжение, формируя сигнал. Приемник должен распознать этот сигнал в условиях сильных помех, и делает это очень эффективно, но в определенных пределах. Величины напряжений  для передатчика и приемника ограничены стандартом и составляют от -7 до +12В (+/- 7В относительно сигнала 0..). В реальности кроме помех, между общими точками приемника и передатчика может существовать  разность потенциалов "земель" Vgpd, которая прикладывается через выходы формирователя ко входам приемника. В случае превышения Vcm указанных выше уровней, связь становится ненадежной либо вообще пропадает.  
+
The transmitter modulates the differential voltage, forming a signal. The receiver must recognize this signal in the presence of strong interference, and it does this very effectively, but within certain limits. The voltage values ​​for the transmitter and receiver are limited by the standard and range from -7 to + 12V (+/- 7V with respect to the 0..5V signal). In reality, in addition to interference, between the common points of the receiver and transmitter there may be a potential difference of the "ground" Vgpd, which is applied through the outputs of the shaper to the inputs of the receiver. In case of exceeding the Vcm of the above levels, communication becomes unreliable or even disappears.
Наводимую помеху эффективно подавляет экран, заземленный в одной точке. Помеху через разность потенциалов "общих" точек подавляет третий провод, замыкая на себя токи, порождаемые Vgpd, которые в противном случае стали бы входными токами линий А и В приемника. <br>
+
The induced interference is effectively suppressed by a screen grounded at one point. Interference through difference of potentials "common" points suppresses the third wire, closing the currents generated Vgpd, which otherwise would have been input currents lines A and B the receiver. The <br>
Что касается 2-х проводной схемы '''изолированного''' RS-485, она также является нестабильной по следующей причине. Система может подвергаться наводкам и в этом случае, но токи помехи "общего вида" всегда стремятся вернуться к источнику, независимо от того в каком месте и как цепь захватила помеху, т.е. в том числе и вернуться через изолированный "общий" схемы. Эта точка может стать в свою очередь источником электромагнитных помех, например для другой части электронной схемы (например, через емкостные паразитные связи).
+
As for the 2-wire circuit of the isolated RS-485, it is also unstable for the following reason. The system can be under parasitic induction in this case, but the current noise "general form" always eager to go back to the source, no matter where and how the chain captures interference, ie, including return through an isolated "general" scheme. This point can in turn become a source of electromagnetic interference for another part of the electronic circuit (for example, through capacitive parasitic links).
Cтоль большое объяснение роли одного провода приводится только лишь с целью уберечь пользователя от потери драгоценного времени на наладку связи.
+
A large explanation of the role of one wire is given only to save the user from the loss of valuable time for setting up communications.
Кроме этого, на длинных линиях и при высоких скоростях обмена рекомендуется использование согласованного кабеля (витая пара в экране, волновое сопротивление 120 Ом) и согласующих резисторов на концах сегмента сети.
+
In addition, on long lines and at high exchange rates, it is recommended to use a matched cable (twisted pair on the screen, 120 ohm impedance) and termination resistors at the ends of the network segment.
== Диагностика подключения ==
+
== Connection Diagnostics ==
В первую очередь после подключения устройства и создания соединения можно создать регистр находящийся в заведомо известном состоянии, например бит "всегда включен" и т.п. После создания регистра его значение (Value) будет отображаться с списке регистров:<br>
+
First of all, after connecting the device and creating a connection, you can create a register in a known state, for example, the bit "always on", etc. After the register is created, its value (Value) will be displayed with the register list: <br>
 
[[Файл:Regs pack не читается.png|750px]]<br>
 
[[Файл:Regs pack не читается.png|750px]]<br>
  
Перечеркнутое соединение означает, что связи нет. В случае отсутствия связи в первую очередь еще раз стоит проверить кабель и соответствие настроек с обоих сторон.<br>  
+
A crossed link means that there is no connection. If there appears, first check the cable and the settings on both sides again. <br>
Помочь разобраться с вопросами связи на встроенном порту RS-485 помогут диагностические светодиоды TX/RX на передней панели - при нормальной работе они должны мигать поочередно. При отсутствии RX - понятно что устройство не отвечает вообще, т.е. возможно неправильно настроен формат или скорость обмена. Если светодиод RX мигает аритмично, как бы "пробиваясь" через равномерное мигание TX скорее всего дело в наличии сильных электромагнитных помех, необходимо выполнить рекомендации под подключению RS-485.<br>  
+
To deal with communication issues on the built-in RS-485 port will help diagnostic TX/RX LEDs on the front panel - during normal operation they should flash alternately. In the absence of RX - it is clear that the device does not respond at all, i.e. the format or speed of the exchange may be incorrectly configured. If the RX LED flashes in an irregular manner, as if "breaking through" through a uniform flashing TX is likely to be in the presence of strong electromagnetic interference, it is necessary to follow the recommendations for RS-485 connection. <br>
Если значение читается, но неправильно - задан не тот тип данных в описании регистра, поэтому например может читаться только байт параметра вместо целого слова.
+
If the value is read but incorrect - the wrong data type is specified in the register description, so for example only the parameter byte can be read instead of the whole word.

Текущая версия на 09:33, 18 октября 2017

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

External devices connecting variants

Automation devices and other intelligent devices, which you need to receive the data from, can be connected with the following ways:

  • through the built-in RS-485 port, while on the same port you can put devices with different protocols. This is the distinctive advantage of WEBHMI. The port driver can dynamically (on the fly) reconfigure the transceiver.
  • Devices with other interfaces, such as RS-232, 422 or additional RS-485 networks, can be connected via USB adapters to the COM port using the built-in USB port.
  • Devices with Modbus/TCP protocol can be connected via Ethernet LAN or WAN port.

The configuration of these connections is described here.

Recommendations for connecting devices with RS-485 interface

Wiring diagram of WEBHMI to devices with RS-485 interface.
RS-485 conn.png

Probably (if you already have experience with this interface), after reading the phrase RS-485, you immediately decide to use a 2-wire circuit, connecting to the standard terminals A and B, since only 2 wires are really enough to transmit the signal (a lot of specialists adhere to this opinion). However, this is a generally accepted error. The EIA/RS-485 standard says that 3rd wire is needed: Standard 485.png
Sources for the formation this fallacy can be:

  • online documentation on the topic:

485 неправильная вики.png

  • some automation devices that have only two terminals for connecting RS-485 on board.

Трм-200 схема.png

  • widely distributed cables for RS-485, having only two wires.

Pg-cable.jpg

  • interfaces microchips manufacturers manuals

Max IC.png

  • a positive experience of using a 2-wire circuit
  • etc.

In fact, it turns out that:

  • Informal documentation
  • A device with 2 terminals implies the connection of the programmer with a short wire at a low exchange rate
  • The cable manufacturer does not remind the buyer that measures to ensure the "equalization" of the common points of the transceivers have not been canceled and they are spelled out in the operating manuals on the devices (using a separate wire or planting "general" on "clean" ground)
  • The manufacturer of the microchip combines the principal and functional circuits for simplification of perception
  • The 2-wire circuit worked on a table, on a short wire, or on a long wire with a favorable electromagnetic environment

Thus, for a reliable connection it is necessary to use a 3-wire circuit. The operation of the three-wire circuit is shown in the following figure:
Рис7 тексас 2.png

Here Vos is the transmitter bias voltage (measured relative to the common and midpoint of the voltage divider with the same shoulders connected to the A and B outputs), Vgpd is the voltage between the "common points" of the transmitter and receiver, Vnoise is the voltage of the electromagnetic " line, Vcm is the common-mode interference voltage applied to both inputs of the receiver, which adds up as Vgpd + Vos + Vnoise. The transmitter modulates the differential voltage, forming a signal. The receiver must recognize this signal in the presence of strong interference, and it does this very effectively, but within certain limits. The voltage values ​​for the transmitter and receiver are limited by the standard and range from -7 to + 12V (+/- 7V with respect to the 0..5V signal). In reality, in addition to interference, between the common points of the receiver and transmitter there may be a potential difference of the "ground" Vgpd, which is applied through the outputs of the shaper to the inputs of the receiver. In case of exceeding the Vcm of the above levels, communication becomes unreliable or even disappears. The induced interference is effectively suppressed by a screen grounded at one point. Interference through difference of potentials "common" points suppresses the third wire, closing the currents generated Vgpd, which otherwise would have been input currents lines A and B the receiver. The
As for the 2-wire circuit of the isolated RS-485, it is also unstable for the following reason. The system can be under parasitic induction in this case, but the current noise "general form" always eager to go back to the source, no matter where and how the chain captures interference, ie, including return through an isolated "general" scheme. This point can in turn become a source of electromagnetic interference for another part of the electronic circuit (for example, through capacitive parasitic links). A large explanation of the role of one wire is given only to save the user from the loss of valuable time for setting up communications. In addition, on long lines and at high exchange rates, it is recommended to use a matched cable (twisted pair on the screen, 120 ohm impedance) and termination resistors at the ends of the network segment.

Connection Diagnostics

First of all, after connecting the device and creating a connection, you can create a register in a known state, for example, the bit "always on", etc. After the register is created, its value (Value) will be displayed with the register list:
Regs pack не читается.png

A crossed link means that there is no connection. If there appears, first check the cable and the settings on both sides again.
To deal with communication issues on the built-in RS-485 port will help diagnostic TX/RX LEDs on the front panel - during normal operation they should flash alternately. In the absence of RX - it is clear that the device does not respond at all, i.e. the format or speed of the exchange may be incorrectly configured. If the RX LED flashes in an irregular manner, as if "breaking through" through a uniform flashing TX is likely to be in the presence of strong electromagnetic interference, it is necessary to follow the recommendations for RS-485 connection.

If the value is read but incorrect - the wrong data type is specified in the register description, so for example only the parameter byte can be read instead of the whole word.