Automatic Modbus RTU scanner to detect several devices with DRV_mbus library

Hello!

Are you getting any errors from the function blocks? You can check by opening a watch widow and looking at the status variable.

I would start by disabling the mobus communications at the bottom of the config below. That is only for ACOPOSInverters. The rest of your config should be okay as long as it matches your slave device.

Did you setup a data module with all your reads and writes? I typically create a blank “dummy” data module for this and then use MBMCmd() to read/write entries from an initialized array of a struct containing the node, data, and address.

Regardless of whether you are using the data module, you still have to point to at least a blank one, otherwise you’ll get an error.

I write all my code in ANSI C, but below is an example of how I setup the MBMOpen FUB-