question

juan manuel tirado avatar image
juan manuel tirado asked

How to set negative values for AcPowerSetPoint using MQTT or Modbus TCP?

I,m trying set a negative value via mqtt and Modbus TCP in CCGX. I can write positive values.

What can I do?

Modbus TCPMQTT
2 |3000

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

2 Answers
juan manuel tirado avatar image
juan manuel tirado answered ·

In case someone would like to know, I have already figured out how to write negative values via ModbusTCP in the CCGX in register 2700 of the Register List.


This specific register is int16 and admits values between -32768 and 32768, but .... to write negative values you have to send 65536 minus the absolute value to send.


Example: if I want to write -50W in the GridSetPoint, via modbustcp I would have to write 65536-50, I mean, 64486.


I hope someone will find it useful.


It wasn't that difficult .....


Por si a alguien le viene bien saberlo, Ya he averiguado como escribir valoras negativos via ModbusTCP en la CCGX en el registro 2700 del Register List.

Este registro concreto es int16 y admite valores entre -32768 y 32768, pero....para escribir valores negativos hay que enviar 65536 menos el valor a enviar absoluto.

Ejemplo: si quiero escribir -50W en el GridSetPoint, via modbustcp tendria que escribir 65536-50, osea, 64486.

Espero que a alguien le sea útil.

No era tan dificil.....

2 |3000

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

nervousfrog avatar image
nervousfrog answered ·

Thanks, I was scratching my head over this one never would have worked that out in a month of Sundays.

2 |3000

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