In BMG we implemented Modbus with a base object that provides IModbus as a channel. You can get such a channel by either using ModbusRtu which takes IOpconSerial and converts it into IModbus or you can use ModbusTcp which needs an IP address+port and creates IModbus from these parameters. Objects can then use IModbus as a channel parameter. If there is no existing objects then we have ModbusUniversalTemplate which makes programming a unit with Modbus interface quite easy. If you are a Bosch employee then you can contact me through Outlook/Teams (Marvin Werner) to get access to these objects and an introduction depending on your use case. If you are an external user that is working on a project for Bosch then you can try asking your Bosch contact person to contact me, if you think it's worth it. Alternatively use the solutions provided by Thorsten_Brach. That's how I was doing Modbus, too, before I created those objects.
... View more