This function is called from YOUR application code to write to a single 32-bit floating?point holding registers on a Modbus slave.
Prototype
CPU_INT16U MBM_FC06_HoldingRegWrFP (MODBUS_CH *pch, CPU_INT08U slave_node, CPU_INT16U slave_addr, CPU_FP32 reg_val);
Arguments
pch
is a pointer to the channel (returned by MB_CfgCh()
). This pointer specifies onto which channel the Modbus master will be communicating on. Of course, ‘pch
’ must have been configured as a Master when you configured the channel.
...
is the desired floating-point value of the holding register. The floating-point value assumes an IEEE-754 format.
Returned Value
MODBUS_ERR_NONE
if the call was successful.
...
If the expected number of bytes to receive doesn't correspond to the number of bytes received.
Notes / Warnings
None
Called By
Your Modbus master application.