Hi Malte,
thanks for this very interesting request.
There are different ways of implementation, but sometimes the naive approaches are the best, and here I would suggest one of the following:
- You can create a direct ports of type array to forwared 1:1 the Modbus coils/reg. They might be quite big, but than you’ve always the complete access of the transfered messages and not the need to create for every reg/coil a single port.
- As you mentioned it might be in deed the best to implement the modbus server as nativ cpp lib. In that case please make sure that the used lib does not have a blocking behaviour (or call it directly in a thread).
Normally we analyse the application demands and the best way within a workshop. If you are interested I can arrange I contact to create a specific offer for you.
Take care,
Frank