Notifications
Clear all

Modbus TCP FC16 write multiple registers

5 Posts
3 Users
0 Reactions
1,128 Views
(@argo-oil-gr)
Posts: 4
Member
Topic starter
 

Dear Sirs,

I need to write 30 * 16-bit (Ushort) registers as one block ,to a modbus tcp device, at 40000 address.

I have created 30, ushort, holding register, variables and an action in a button with mutliple (30) SET_VARIABLE commands ,where i set each variable the needed value.

I also have set for each variable starting address 0 (and as a anothher solution each variable with ascending address of 0,1,2,3 ..29).

Unfortunately it doesn't seem to work. 

Can you advise how to do this ?

Regards,

Antonis

This topic was modified vor 2 Jahren by argo-oil.gr
 
Posted : 20/05/2024 6:03 p.m. CET
Dominik
(@d-vermehren-2542)
Posts: 24
Member Admin
 

Hello Antonis,

In principle, your approach looks right. Setting starting address 0 for all variables does not work.
Do you get any error message? Are the values written to the modbus tcp device or is there a problem beforehand?

Regards,

Dominik

 
Posted : 29/05/2024 3:58 p.m. CET
(@argo-oil-gr)
Posts: 4
Member
Topic starter
 

The values are written to the Modbus tcp device one-by-one using FC=06 (Write Single Holding Register) 30 times

We need to write the 30 registers as one block, using FC=16 (Write Multiple Holding Registers) 1 time, in order for the device to accept the message.

Changing the QuickHMI settings:

Data sources > Advanced > Register Write Function > F16

in the editor options does not solve the issue (still uses F06 multiple times).

 

 
Posted : 29/08/2024 9:18 a.m. CET
Matthias
(@m-folte-9469)
Posts: 34
Member Admin
 

Hello,

there is currently a technical limitation where only one variable/register can be writte per request. So even though FC16 is used it will send 30 individual request using FC16.

 
Posted : 04/09/2024 6:02 a.m. CET
(@argo-oil-gr)
Posts: 4
Member
Topic starter
 

Is there an estimate of whether this technical difficulty will be overcome?

This post was modified vor 1 Jahr by argo-oil.gr
 
Posted : 16/01/2025 1:08 p.m. CET