This function writes the specified HOLDING REGISTERS to a Modbus server via a support structure in pass-through mode and using the Modbus function code of the corresponding multiple writes FC 16, unlike mbc_write_reg_s() which can also use FC 06.
Syntax |
i32 mbc_write_multiple_regs_s (i32 mbc, stru_modbus stru, source) |
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mbc |
Handle value returned by mbc_init() |
||||||||||||||||||||||||||||||||||||
stru |
Structure of type stru_modbus containing the parameters |
||||||||||||||||||||||||||||||||||||
source |
Area where to take data to be written. Can be i16/u16/i32/float/real or array of i16/u16/i32/float/real |
||||||||||||||||||||||||||||||||||||
Result |
Returns:
|
||||||||||||||||||||||||||||||||||||
Validity |
Task |
||||||||||||||||||||||||||||||||||||
Note |
The function is pass-through. As long as it returns MBC_WAIT, it must be continuously called within the task |