User Tools

Site Tools


en-us_commands:reference:imodbusrtuadr

This is an old revision of the document!


ImodbusRTUAdr()

ImodbusRTUAdr() sets the start addresses of M and D memory.

ImodbusRTUAdr command operation flow

void ImodbusRTUAdr(uint16_t m_offset, uint16_t d_offset)

Commands

Command Arguments Return Value Operation
ImodbusRTUAdr(m_offset, d_offset) uint16_t m_offset
uint16_t d_offset
void Sets the start addresses of M and D memory.

Example

ImodbusRTUAdr(0, 0);

Precautions

  • Keep calling the Slave or Master execution function in loop().
  • The data array size must be at least the requested quantity.
  • Do not treat return codes BUSY and IDLE as communication failures.
  • When sharing M and D with Cnet/MC Protocol, define a single final size and initialization order. Do not call ImodbusRTUMem() or ICnetMem() again at runtime.
  • Memory allocation functions do not return success status. For nonzero sizes, verify that M and D are not nullptr before accessing them in user code.

← Built-in Command List

en-us_commands/reference/imodbusrtuadr.1788785567.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki