B4X FEED Modbus TCP Library

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Modbus TCP Library است. این موضوع تا کنون 17 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Modbus TCP Library
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
17
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
Hello everyone,
Given the difficulties in finding a "ready-made" library for Modbus TCP communication.
I have decided to create a library, adapted for my needs, i decide to publish because maybe useful to someone, maybe someone want to improve on it in this forum.

I attach the library, the library project and a test project.

The available functions:
  • FC01 - Read Coil
  • FC03 - Read Holding
  • FC05 - Write Single Coil
  • FC06 - Write Single Holding
  • FC16 - Write Multiple Holding


How it works:

From code you create Query to indicate the function you want to execute cyclically.
Before recording it in a list, it analyses the "Count" parameter (this is because I have noticed that I can request data up to a maximum of 125)
Adapts the query and eventually creates as many queries as necessary to satisfy the initial request.

The list of "Queries" proceed cyclically and it advances only if the server responds to that Query
(My idea was: "No need to continue, if...



 

عقب
بالا