question

dennis-h avatar image
dennis-h asked

How to read 4 digital inputs via modbus Cerbo-s GX?

Hello everyone,I have a question about reading out the digital inputs on the Cerbo-S GX via Modbus. According to the data sheet, this has 4 digital inputs. In the Modbus register overview there is only one register for the status (register 3422). Does this mean that the status of only one input can be queried or how do I get the status of all 4 inputs read?I hope that someone here can help me. Thanks in advance.

cerbo gxModbus 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
clarkbrothers avatar image
clarkbrothers answered ·

Not sure if you've worked this out yet, but I've had the same issue finding the GPIO registers.

In the spreadsheet it has 4 registers that refer to the inputs...

3420 - Count

3422 - State (this is not the state of the input digitally but the state of it's setup if you look at the options to the right in the spreadsheet)

3423 - Alarm (I think this is the register we need to read to see weather or not the input is active

3424 - Type (type of input related to door, pump, smoke etc


2 |3000

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

clarkbrothers avatar image
clarkbrothers answered ·

com.victronenergy.digitalinput Count 3420 uint32 1 0 to 4294967295 /Count no
com.victronenergy.digitalinput State 3422 uint16 1 0 to 1 /State no 0=Low;1=High;2=Off;3=On;4=No;5=Yes;6=Open;7=Closed;8=Alarm;9=OK;10=Running;11=Stopped
com.victronenergy.digitalinput Alarm 3423 uint16 1 0 to 2 /Alarm no 0=No alarm;2=Alarm
com.victronenergy.digitalinput Type 3424 uint16 1 0 to 65535 /Type no 2=Door;3=Bilge pump;4=Bilge alarm;5=Burglar alarm;6=Smoke alarm;7=Fire alarm;8=CO2 alarm;9=Generator
2 |3000

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

ak68 avatar image
ak68 answered ·

You have to use the different ID´s each with the 4 Registers:

1719048030064.png



1719048030064.png (10.2 KiB)
2 |3000

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