Вверх ↑
Этот топик читают: Гость
Ответов: 70
Рейтинг: 0
#1: 2022-01-12 11:43:21 ЛС | профиль | цитата
Добрый день. Есть такой вопрос. А возможно ли как ни буть отправить команду по протоколу ModBUS TCP в контроллер?

Редактировалось 3 раз(а), последний 2022-01-12 11:51:36
карма: 0

0
vip
#1.1контекстная реклама от партнеров
Ответов: 188
Рейтинг: 6
#2: 2022-01-12 11:51:20 ЛС | профиль | цитата
Приветствую.
В какой контроллер?
Чуть подробней можно.
карма: 1
HiAsm Studio
0
Ответов: 70
Рейтинг: 0
#3: 2022-01-12 11:55:30 ЛС | профиль | цитата
По сути у меня 2 разных контроллера: один ОВЕН ПЛК110 и один Segnetics Pixel. У них у обоих есть RJ-45 выход с протоколом ModBUS TCP.

--- Добавлено в 2022-01-12 11:59:52

envoy_sky писал(а):
Чуть подробней можно.


Можно. Допустим Segnetics Pixel имеет целый ряд дискретных выходов с симисторным управлением и он стоит управляет блоком клапанов на 220В. Так же у него есть и свободные выхода которые я могу задействовать для сброса конденсата с теплообменника (но это ещё не сделано пока просто прорабатывается такая возможность).

Редактировалось 1 раз(а), последний 2022-01-12 11:59:52
карма: 0

0
Ответов: 70
Рейтинг: 0
#4: 2022-01-12 15:32:20 ЛС | профиль | цитата


--- Добавлено в 2022-01-12 15:59:06

Если я беру програмулинку Wireshark и читаю что творит моя программа то вижу вот это:
+---------+---------------+----------+
12:53:26,372,837 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|

+---------+---------------+----------+
12:53:34,365,889 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|

+---------+---------------+----------+
12:53:42,366,634 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|

+---------+---------------+----------+
12:53:50,392,220 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|

+---------+---------------+----------+
12:53:56,665,999 ETHER
|0 |ff|ff|ff|ff|ff|ff|14|58|d0|18|f6|14|08|00|45|00|00|24|52|89|00|00|41|11|69|6c|ac|10|32|b4|ac|10|32|ff|06|cf|06|cc|00|10|bd|f5|c5|0b|40|01|00|10|03|b4|

+---------+---------------+----------+
12:53:56,666,086 ETHER
|0 |ff|ff|ff|ff|ff|ff|14|58|d0|18|f6|14|08|00|45|00|00|24|52|8a|00|00|41|11|69|6b|ac|10|32|b4|ac|10|32|ff|06|cf|06|cd|00|10|bd|f5|c5|0b|40|01|00|10|03|b4|

+---------+---------------+----------+
12:53:56,666,146 ETHER
|0 |ff|ff|ff|ff|ff|ff|14|58|d0|18|f6|14|08|00|45|00|00|24|52|8b|00|00|41|11|69|6a|ac|10|32|b4|ac|10|32|ff|06|cf|06|ce|00|10|bd|f5|c5|0b|40|01|00|10|03|b4|

+---------+---------------+----------+
12:53:56,666,230 ETHER
|0 |ff|ff|ff|ff|ff|ff|14|58|d0|18|f6|14|08|00|45|00|00|24|52|8c|00|00|41|11|69|69|ac|10|32|b4|ac|10|32|ff|06|cf|06|cf|00|10|bd|f5|c5|0b|40|01|00|10|03|b4|

+---------+---------------+----------+
12:53:58,367,817 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|

+---------+---------------+----------+
12:54:00,983,788 ETHER
|0 |ff|ff|ff|ff|ff|ff|14|58|d0|18|f6|14|08|06|00|01|08|00|06|04|00|01|14|58|d0|18|f6|14|ac|10|32|b4|00|00|00|00|00|00|ac|10|32|b5|

+---------+---------------+----------+
12:54:00,984,258 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|06|00|01|08|00|06|04|00|02|00|1f|4d|00|2d|8d|ac|10|32|b5|14|58|d0|18|f6|14|ac|10|32|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|b4|

+---------+---------------+----------+
12:54:00,984,308 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|34|52|94|40|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|44|01|f6|37|13|df|97|00|00|00|00|80|02|20|00|bd|b0|00|00|02|04|05|b4|01|03|03|08|01|01|04|02|

+---------+---------------+----------+
12:54:00,984,899 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|2c|11|a1|00|00|40|06|ab|a1|ac|10|32|b5|ac|10|32|b4|01|f6|c8|44|00|6c|e3|40|37|13|df|98|60|12|01|ca|18|19|00|00|02|04|01|ca|ca|ca|

+---------+---------------+----------+
12:54:00,985,060 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|28|52|95|00|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|44|01|f6|37|13|df|98|00|6c|e3|41|50|10|40|e8|ec|cd|00|00|

+---------+---------------+----------+
12:54:00,985,474 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|2c|52|96|00|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|44|01|f6|37|13|df|98|00|6c|e3|41|50|18|40|e8|ec|c1|00|00|00|00|00|00|

+---------+---------------+----------+
12:54:00,985,861 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|28|11|a2|00|00|40|06|ab|a4|ac|10|32|b5|ac|10|32|b4|01|f6|c8|44|00|6c|e3|41|37|13|df|9c|50|10|01|ca|2b|e8|00|00|00|00|00|00|00|00|

+---------+---------------+----------+
12:54:02,705,589 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|28|11|a3|00|00|40|06|ab|a3|ac|10|32|b5|ac|10|32|b4|01|f6|c8|44|00|6c|e3|41|37|13|df|9c|50|14|01|ca|2b|e4|00|00|00|00|00|00|00|00|

+---------+---------------+----------+
12:54:06,367,659 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|


Это совершенно не правильные запросы... А если я настраиваю стандартный OPS сервер то вижу вот так:
+---------+---------------+----------+
12:52:43,891,651 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|34|52|77|40|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|3d|01|f6|c5|ee|43|cb|00|00|00|00|80|02|20|00|bd|b0|00|00|02|04|05|b4|01|03|03|08|01|01|04|02|

+---------+---------------+----------+
12:52:43,892,234 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|2c|11|9c|00|00|40|06|ab|a6|ac|10|32|b5|ac|10|32|b4|01|f6|c8|3d|00|6b|2e|f0|c5|ee|43|cc|60|12|01|ca|d9|62|00|00|02|04|01|ca|ca|ca|

+---------+---------------+----------+
12:52:43,892,353 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|28|52|78|00|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|3d|01|f6|c5|ee|43|cc|00|6b|2e|f1|50|10|40|e8|ae|17|00|00|

+---------+---------------+----------+
12:52:43,901,421 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|34|52|79|00|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|3d|01|f6|c5|ee|43|cc|00|6b|2e|f1|50|18|40|e8|ac|fb|00|00|00|00|00|00|00|06|01|01|00|00|00|01|

+---------+---------------+----------+
12:52:43,902,014 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|28|11|9d|00|00|40|06|ab|a9|ac|10|32|b5|ac|10|32|b4|01|f6|c8|3d|00|6b|2e|f1|c5|ee|43|d8|50|10|01|ca|ed|29|00|00|00|00|00|00|00|00|

+---------+---------------+----------+
12:52:43,915,941 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|32|11|9e|00|00|40|06|ab|9e|ac|10|32|b5|ac|10|32|b4|01|f6|c8|3d|00|6b|2e|f1|c5|ee|43|d8|50|18|01|ca|eb|11|00|00|00|00|00|00|00|04|01|01|01|01|

+---------+---------------+----------+
12:52:43,960,162 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|32|11|9f|00|00|40|06|ab|9d|ac|10|32|b5|ac|10|32|b4|01|f6|c8|3d|00|6b|2e|f1|c5|ee|43|d8|50|18|01|ca|eb|11|00|00|00|00|00|00|00|04|01|01|01|01|

+---------+---------------+----------+
12:52:43,960,225 ETHER
|0 |00|1f|4d|00|2d|8d|14|58|d0|18|f6|14|08|00|45|00|00|28|52|7a|00|00|41|06|00|00|ac|10|32|b4|ac|10|32|b5|c8|3d|01|f6|c5|ee|43|d8|00|6b|2e|fb|50|10|40|de|ae|0b|00|00|

+---------+---------------+----------+
12:52:45,683,503 ETHER
|0 |14|58|d0|18|f6|14|00|1f|4d|00|2d|8d|08|00|45|00|00|28|11|a0|00|00|40|06|ab|a6|ac|10|32|b5|ac|10|32|b4|01|f6|c8|3d|00|6b|2e|fb|c5|ee|43|d8|50|14|01|ca|ed|1b|00|00|00|00|00|00|00|00|

+---------+---------------+----------+
12:52:46,367,251 ETHER
|0 |01|80|c2|00|00|0e|14|58|d0|18|f6|14|88|cc|02|0b|07|6b|6f|6e|6f|70|6c|6a|2d|70|63|04|09|07|70|6f|72|74|2d|30|30|31|06|02|00|14|0a|0a|4b|4f|4e|4f|50|4c|4a|2d|50|43|0c|3f|48|65|77|6c|65|74|74|2d|50|61|63|6b|61|72|64|20|48|50|20|50|72|6f|42|6f|6f|6b|20|34|35|30|20|47|31|2c|41|33|30|30|39|44|44|31|30|33|30|33|2c|38|43|47|34|33|34|30|36|48|5a|20|2b|20|54|49|41|0e|04|00|80|00|80|10|14|05|01|00|00|00|00|02|00|00|00|01|08|2b|06|01|04|01|81|c0|6e|fe|08|00|0e|cf|02|00|00|00|00|fe|0a|00|0e|cf|05|14|58|d0|18|f6|14|fe|09|00|12|0f|01|03|ec|03|00|1e|00|00|


А это уже то что мне нужно. И что же я делаю не так?

Редактировалось 3 раз(а), последний 2022-01-12 15:59:06
карма: 0

0
4
Сообщение
...
Прикрепленные файлы
(файлы не залиты)