Difference between revisions of "Modbus notes"
From Wiki at Neela Nurseries
m |
|||
Line 12: | Line 12: | ||
When working with FreeModbus, be sure to pay attention to the versions of protocol available, and likely, we only want to enable one of these. See Modbus/include/mbconfig.h. See also Modbus/include/mb.h for instructions on how to initialize and begin to use an instance of FreeModbus stack in given program. Also mention that eMBPoll() routine may be set up as a task in an RTOS, to realize the periodic polling which is part of the stack's runtime manifestation . . . | When working with FreeModbus, be sure to pay attention to the versions of protocol available, and likely, we only want to enable one of these. See Modbus/include/mbconfig.h. See also Modbus/include/mb.h for instructions on how to initialize and begin to use an instance of FreeModbus stack in given program. Also mention that eMBPoll() routine may be set up as a task in an RTOS, to realize the periodic polling which is part of the stack's runtime manifestation . . . | ||
+ | Looks like also this function to register callbacks for end-user-device-specific Modbus registers will be important: | ||
+ | |||
+ | |||
+ | eMBErrorCode eMBRegisterCB ( UCHAR ucFunctionCode, | ||
+ | pxMBFunctionHandler pxHandler | ||
+ | ) | ||
<!-- comment --> | <!-- comment --> |
Revision as of 22:47, 8 November 2019
- https://libmodbus.org/ . . . Ubuntu package is 'libmodbus5' and 'libmodbus-dev'
- 2019-11-08 FRI -
When working with FreeModbus, be sure to pay attention to the versions of protocol available, and likely, we only want to enable one of these. See Modbus/include/mbconfig.h. See also Modbus/include/mb.h for instructions on how to initialize and begin to use an instance of FreeModbus stack in given program. Also mention that eMBPoll() routine may be set up as a task in an RTOS, to realize the periodic polling which is part of the stack's runtime manifestation . . .
Looks like also this function to register callbacks for end-user-device-specific Modbus registers will be important:
eMBErrorCode eMBRegisterCB ( UCHAR ucFunctionCode, pxMBFunctionHandler pxHandler )