question

petrnovotny75 avatar image
petrnovotny75 asked

S7-1200 modbus tcp communication with Victron CERBO GX

Ahoj všichni,

mám problém s komunikacemi modbus tcp s jednotkou cerbo gx.


V dostupných službách CERBO GX jsem vybral ID100.


Podle dokumnetace jsem nejjednodušší dotaz na protékající proud měniče, tj. ID:100, MB_MODE = 0 /čtení dat/, MB_DATA_ADDR: 808, DATA_LEN: 1.

Bohužel se mi vrátí chyba 16#8384 - Chyba v datové hodnotě pro funkci 5 ???


V případě, že použiji Simply Modbus TCP Client 8.1.2 pak mě CERBO GX bezproblému odpoví.


Proč Cerbo vrací cybu ID255, když je dotazována jednotka ID100 ??


Nenapadá Vás, kde může být chyba ??


Viz. obrázky.


Moc děkuji za případné odpovědi. Petr



mb-client.png



cerbo-gx-error.jpg

cerbo-gx-modbus-tcp-services.jpg


sw-client.png

Modbus TCP
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
virginio avatar image
virginio answered ·

rd-osek,

Ahoj, taky mám stejný problém, jak jsi to vyřešil?

Díky za pomoc...

Hi, I have the same problem, how did you solve it?

Thanks for help...

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

rd-osek avatar image rd-osek commented ·

Hi virginio,

solution is almostly easy than it looks like.

You need to go to the DB of your MB_CLIENT block. In my case it is an DB216.

1690233449731.png

I have got it at the system blocks - program resources:

1690233656336.png

You have to change at the DB row MB_Unit_ID -> this specifies the slave ID. That is important for the Victron communication with the Cerbo unit or other accessories. Slave ID needs to be typed in according to the Victron manual or at the (my case) Cerbo GX unit (MB TCP services menu). Byte 16#64 is in DEC format 100 -> communication for the main values of the Cerbo GX.

1690233890668.png Be also careful of the Connect parameters. Connection ID must be unique. If you have got more MB communications set, you have to adjust it also to be working. My opinion is to restart PLC when you are changing this parameter. Sometimes it already saw, that parameter "freezes" at the memory.

1690234394106.png

Let me know if you will have any more asks and your try won't still be working. :-)


Best regards

Honza

1 Like 1 ·
1690233449731.png (80.5 KiB)
1690233656336.png (467.9 KiB)
1690233890668.png (31.1 KiB)
1690234394106.png (229.2 KiB)
rd-osek avatar image
rd-osek answered ·

Ahoj,

dořešil jsi svůj problém s komunikací Victron/PLC?

Řešil jsem stejný problém, narazil na tvůj dotaz, a po pár hodinách tápání v TIA Portalu našel funkční řešení.


Ahoj,

Honza

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

sventheschu avatar image
sventheschu answered ·

Hello together,

finally the Modbus connection works with the tip from rd-osek.

But how do I know the register, when I look in the Manual of Cerbos, there is no register like 40841? I need the total production, the actual production, the total consumption and the actual consumption.

Best regards

Sven

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

rd-osek avatar image rd-osek commented ·

Hi @SvenTheSchu,

register 40841 is existing under the Cerbo GX, but it is interpreted like a 841 in the table:

CCGX-Modbus-TCP-register-list-2.90.xlsx

So you need to read modbus holding register (4x) --> 40841.

Try to search you requested values in the table attached.

For total E produced it should be: 44204 (com.victronenergy.dcsource/Total energy produced)

For ac. consumption AC: L1 reg. 40817, L2 reg. 40818, L3 reg. 40819


it's hard to find the right registers, sometimes, but it works.

rd-osek

0 Likes 0 ·

Related Resources