Hi,
i would like to know what is the parameter to control power (kW) that gave the batteries, using Modbus TCP from CCGX and if can i modify ?
Hi,
i would like to know what is the parameter to control power (kW) that gave the batteries, using Modbus TCP from CCGX and if can i modify ?
Hola Nicolas,
Como realizar Mod bus TCP
https://www.victronenergy.com/live/ccgx:modbustcp_faq
Libro blanco de comunicaciones página 3
Descargarse el mapa de memoria Mod-TCP register list
https://www.victronenergy.com/panel-systems-remote-monitoring/color-control#whitepapers
Hola. Estoy intentando escribir un script python que me controle el Grid Set Point, para poder variarlo desde una RaspberryPi.
Mi conocimiento de Python es muy bajo, asi que me he guiado por ejemplos que he visto por la red.
El caso es que cuando cargo un valor igual a 0 o superior, (numero entero) no hay problema.
Pero no me deja cargar valores negativos, aunque en el mapa de registros el 2700 (grid set point) aparece como int16 (-32668 a 32668)
La parte que me da problema es esta:
if Fase_carga == 4:
a = 10
client.write_register(2700,a,unit = 100)
Cuando a es negativo me da error:
Traceback (most recent call last):
File "prueba5 individual.py", line 42, in <module>
client.write_register(2700,a,unit = 100)
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/client/common.py", line 92, in write_register
return self.execute(request)
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/client/sync.py", line 106, in execute
return self.transaction.execute(request)
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/transaction.py", line 149, in execute
broadcast=broadcast
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/transaction.py", line 213, in _transact
packet = self.client.framer.buildPacket(packet)
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/framer/socket_framer.py", line 206, in buildPacket
data = message.encode()
File "/home/pi/.local/lib/python2.7/site-packages/pymodbus/register_write_message.py", line 42, in encode
packet += struct.pack('>H', self.value)
struct.error: integer out of range for 'H' format code
------------------
(program exited with code: 1)
Press return to continue
Additional resources still need to be added for this topic
9 People are following this question.