2019-08-16 07:13:54.380 [.ItemChannelLinkAddedEvent] - Link 'Presence_Mobile_John-network:device:192_168_4_10:online' has been added.
2019-08-16 07:13:54.400 [.ItemChannelLinkAddedEvent] - Link 'modbus_data_c3ae2668_number-modbus:data:c3ae2668:number' has been added.
2019-08-16 07:13:54.403 [.ItemChannelLinkAddedEvent] - Link 'modbus_data_c3ae2668_lastReadSuccess-modbus:data:c3ae2668:lastReadSuccess' has been added.
2019-08-16 07:13:54.409 [.ItemChannelLinkAddedEvent] - Link 'modbus_data_c3ae2668_lastWriteSuccess-modbus:data:c3ae2668:lastWriteSuccess' has been added.
2019-08-16 07:13:54.410 [.ItemChannelLinkAddedEvent] - Link 'modbus_data_c3ae2668_lastReadError-modbus:data:c3ae2668:lastReadError' has been added.
2019-08-16 07:13:54.412 [.ItemChannelLinkAddedEvent] - Link 'modbus_data_c3ae2668_lastWriteError-modbus:data:c3ae2668:lastWriteError' has been added.
2019-08-16 07:13:54.639 [hingStatusInfoChangedEvent] - 'modbus:poller:63d79035' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2019-08-16 07:13:54.664 [hingStatusInfoChangedEvent] - 'modbus:data:c3ae2668' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2019-08-16 07:13:54.716 [hingStatusInfoChangedEvent] - 'modbus:serial:3d753460' changed from UNINITIALIZED to INITIALIZING
2019-08-16 07:13:54.788 [hingStatusInfoChangedEvent] - 'modbus:serial:3d753460' changed from INITIALIZING to ONLINE
2019-08-16 07:13:54.814 [hingStatusInfoChangedEvent] - 'modbus:poller:63d79035' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2019-08-16 07:13:54.841 [hingStatusInfoChangedEvent] - 'modbus:poller:63d79035' changed from INITIALIZING to ONLINE
2019-08-16 07:13:54.899 [hingStatusInfoChangedEvent] - 'modbus:data:c3ae2668' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2019-08-16 07:13:54.930 [hingStatusInfoChangedEvent] - 'modbus:data:c3ae2668' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR)
2019-08-16 07:13:58.775 [vent.ItemStateChangedEvent] - DoorSensor changed from NULL to CLOSED
2019-08-16 07:13:58.779 [vent.ItemStateChangedEvent] - Button changed from NULL to OPEN
2019-08-16 07:13:58.789 [vent.ItemStateChangedEvent] - LED changed from NULL to OFF
2019-08-16 07:13:58.794 [vent.ItemStateChangedEvent] - channel1 changed from NULL to OFF
2019-08-16 07:15:01.837 [me.event.ThingUpdatedEvent] - Thing 'modbus:data:c3ae2668' has been updated.
How did you configure your Things? If it was with PaperUI, there are no special modbus files.
About the only part of your Modbus configuration that you have shown is that you have a Serial thing.
Windows has serial ports like COM1, Pi will have ports like dev/ttyUSB1, so the same configuration will never work.
Ok, step by step (Configuration in PaperUI), raspberrypi 3B+ device
Modbus serial slave
a) Serial port = / dev / ttyUSB0
b) Id = 3
c) baud = 115200 (n, 8.1)
d) no parity
e) stop bits = 1
f) data bits = 8
g) flow in = none
h) flow out = none
i) encoding = RTU
j) Time between trans = 35
So far it’s ok
Regular poll
a) bridge selection = Modbus serial slave
b) poll interval = 50
c) start = 6
d) length = 9
e) type = holding register
f) maximum tries … = 3
Ok, after confirmation, communication with the device begins.
Modbus data
a) bridge selection = regular poll
b) Read address = 0
c) Read value type = uint16
after confirmation the message “configuration_error” appears
Okay, just as you already used PaperUI to create modbus data things … you use PaperUI to create more modbus data things.
In the “Read address” box where you put 6 before, you put 10.0
In the “Read value type” box where you selected uint16 before, you select bit
and so on.
You can have many data things belonging to one poller thing.
You can have several poller things belonging to one serial/tcp thing.
That’s right, Modbus protocol does not allow you to write to individual bits in a 16-bit register.
That is why I said “If you want to write to single bits on a modbus register, that is a very different game” and then pointed you to a thread that discusses this problem and offers a workaround.
Ok, I understand that changing different bits at different times in one register, can cause problems. I used a coil. At the moment, reading and writing is working.
Thank you for your help.
If you have the choice, when programming a PLC or whatever, using the Modbus protocol purpose designed binary channels (coil, discrete) is the best idea for binary data (on/off).
When working with 1 modbus device, there is no problem with transmission. Now I have two modbus islands with addresses 2 and 3.
Unfortunately, communication stops sending data.
Packet intervals are 1.6 sec despite being set to 100 ms. (see picture)