Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This function is called from YOUR application code to perform a diagnostic check on a Modbus slave.

Prototype

CPU_INT16U  MBM_FC08_Diag (MODBUS_CH  *pch, 
                           CPU_INT08U  slave_node,
                           CPU_INT16U  fnct,
                           CPU_INT16U  sub_fnct,
                           CPU_INT16U  *pval);

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.

...

corresponds to a sub-function argument for the function. At this time, µC/Modbus does not support sub-functions.

Returned Value

MODBUS_ERR_NONE

if the call was successful.

...

If you specified an invalid sub-function.

Notes / Warnings

None

Called By

Your Modbus master application.