I would like to write register on Modbus RTU Slave that contain Device Adress.
But several days in a row I see the same error in Port Monitor "Write of group with index 3 skipped".
Reading of the Modbus RTU Slave is OK, test registers show to me what they have to.
Slave device is "Vaisala HUMICAPâ Humidity and Temperature Module HMM170".
Master device is "UniPi Neuron L513".
Mervis 2.4.0 (117845).
Before rewriting the register with Device Adress, I decided to try change Response_Delay.
According to the manual,
1540 || 0603hex || Response delay || 16-bit integer || Unit: ms || Range: 0 ... 100
03 || 03hex || Read || Holding Registers <-- This function works in my project
16 || 10hex || Write || Multiple Registers
So, first I created a group to read this register and data point to see the actual value. It shows "1" ms. Seems it is a default value.
According the Modbus protocol driver, I created another group for writing the register. The parameters are:
Name || 1540_Communication_write
Groupe type || WriteOnly
Starting Element || 1540
Function || F16 Write Multiple Registers
Quantity of Element || 1
Write Only On Change || False
Logical OR over Overlapped || False
Also, the Data Point was created:
Name || Response_Delay_w
Comm. Value Mapped Type || Builtin
ST Type || int
Transform || identity
Enable SWAutogen || True
Write Offset Gap || 2
Data Offset (Parser) || 0
Bit Offset (Parser) || 0
MultiByte Length (Parser) || 2
MultiByte Order (Parser) || 12
Then I created Local Variable:
Name || Increase_Response_Delay
Initial Value || 3
Retain || False
Write on Change || False
This Local Variable is connected directly to Global Variable "HumiditySensor_1_Response_Delay_w".
As for me, Local Variable must send its initial value to Global Variable and as a result change the value of Data Point "Response_Delay_w" and write to Slave device register.
I can build and deploy the project successfully. During debugging I see that the Data Point "Response_Delay_w" get the value from Increase_Response_Delay, but the cell of Data Point is painted red (PLC Value in Variable Browser). The value of "Response_Delay_r" does not changed, because in Port monitor there is an error "Write of group with index 3 skipped".
Is it the problem on a Slave device or am I do something wrong?