how_to:read_write_analog_value_from_to_the_registers

Read/write analog value from/to the registers

In the communication protocol, plenty of the registers stands for some analog value, i.e. the voltages, the currents, the power, they are expressed as integers. At the same time, the communication protocol has listed the scale factor (SF) for the analog values $$Actual\ value = Register\ value \div Scale\ factor$$ For example, if register value of AC line voltage L1 to L2 is 4802, since its SF is 10, the actual value shall be recognized as 4802/10=480.2 V $$Register\ value= Actual\ value × Scale\ factor$$ Example, if the EMS wants the PWS2-30K to output a 10kW energy to discharge from the battery to the grid. Then the EMS shall write -10*10=-100 to the Target active power register. The definition of the sign (positive or minus) may vary depending on different models, please refer to the protocol document

In the communication protocol, plenty of the registers stands for some analog value, i.e. the voltages, the currents, the power, they are expressed as integers. At the same time, the communication protocol has listed the Accuracy and Offset for the analog values $$Actual\ value = Register\ value \times Accuracy + Offset$$ $$Register\ value = (Actual\ value – Offset) \div Accuracy$$ The definition of the sign (positive or minus) may vary depending on different models, please refer to the protocol document.

  • how_to/read_write_analog_value_from_to_the_registers.txt
  • Last modified: 2020/09/16 21:42
  • (external edit)