modbus

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
arergun
Posts:3
Joined: Tue Nov 15, 2016 2:10 pm

modbus

Post by arergun »

Hello
If you want to control some devices with ModBus, you need to write two different register addresses of the device with one command.
How can I write values ??to two different register addresses with a single command with Wincc OA?
Best regards.

alug
Posts:42
Joined: Mon Oct 18, 2010 11:00 am

Re: modbus

Post by alug »

Hallo,

are the registers immediately successive or is there a gap between?
In the first case you could write the two registers e.g. with one DPE and an uint32 transformation or your can write it with two DPE and uint16 transformation.
One the first DPE you have to select subindex 0 and on the second DPE subindex 1 in the address parameterization.
For both addresses you have to select the same register address (first register).
With these two mechanism you are sure that both registers are written in the same Modbus telegram.

If there is a gap between the two registers, you can't write it in a single Modbus telegram.
They are always send in tow separate telegrams

best regards

Andreas

arergun
Posts:3
Joined: Tue Nov 15, 2016 2:10 pm

Re: modbus

Post by arergun »

Thank you very much for your interest. I need to write different values to different register addresses. For example. The first register address is 10 and the second register address is 11. The first register address value 100 and the second register address value 110. I experimented with different Modbus programs. Control is not performed when two different register addresses are written with two telegrams. When two register addresses are written with a telegram, the check is performed.there is a gap between the two registers.Is it possible to do it with a script?

alug
Posts:42
Joined: Mon Oct 18, 2010 11:00 am

Re: modbus

Post by alug »

If there is a gap between the 2 register and they should be written in one telegram
there is the problem that all register between are also written.
You can write the register together using sub indices, but all registers in between are overwritten
with 0 values.
In any case you have to set both DPEs in one dpSet.

Best regards

Andreas

arergun
Posts:3
Joined: Tue Nov 15, 2016 2:10 pm

Re: modbus

Post by arergun »

First I apologize for my bad english.
When I use two different telegrams in two different DPEs, the process is not performed. In telegram processing, I need to create a telegram that will contain the starting register address, how many register addresses are to be written, and the values to be written. It only happens this way.
Best regards.

5 posts • Page 1 of 1