/
MB_ModeSet()
MB_ModeSet()
This function allows you to change the Modbus mode of a channel. You would typically not need to use this function because the channel’s mode would have been set in MB_CfgCh()
.
Prototype
void MB_ModeSet (MODBUS_CH *pch, CPU_INT08U mode)
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.
mode
specifies whether you want the channel to support ASII or RTU mode and thus, you must pass either MODBUS_MODE_ASCII
or MODBUS_MODE_RTU
, respectively.
Returned Value
None
Notes / Warnings
None
Called By
Your Modbus master or slave application.
Related content
MB_CfgCh()
MB_CfgCh()
More like this
MBM_FC06_HoldingRegWr() - Modbus-M
MBM_FC06_HoldingRegWr() - Modbus-M
More like this
Configuring µC/Modbus
Configuring µC/Modbus
More like this
MB_WrEnSet() - Modbus-S
MB_WrEnSet() - Modbus-S
More like this
MB_NodeAddrSet() - Modbus-S
MB_NodeAddrSet() - Modbus-S
More like this
MBM_FC06_HoldingRegWrFP() - Modbus-M
MBM_FC06_HoldingRegWrFP() - Modbus-M
More like this