I wonder if someone already managed to create a FB that emulates the Modbus Slave COM Port that is normally added to the Device Tree.
I need to do that via a FB, because I do not know how many slaves will be added. That information will be provided on site during the installation of the equipment, e.g via the visualization - 2 slaves, 3 slaves, .. 30 slaves.
I have created a FB that EXTENDS ModbusSlaveComPort, which is the same type of object that is added to the device tree. However, I do not know what to do next regarding how to create the channels and link the Slave(s) to the Master.
Any help is appreciated.
You could use the FB ModbusRequest2, so you don't have to create devices in the device tree:
To open the COM port, see:
Thank you for your suggestions Tim, (timvh)! The software is now working.
Log in to post a comment.