Hello,
I’m trying to read out some Sensors via Modbus RTU. Works nicely with WagoAppPlcModbus but I couldn’t get it to work with ModbusFB (4.3.0.0), which I’d prefer. The PLC is a CC100 with FW 26, Codesys V 3.5.SP16P2. Has anyone done that yet? Maybe some tweaking on the CLI is required?
Any hints are appreciated!
Hello wmg,
For FW 26 I recommend using CODESYS V3.5 SP19 Patch2.
WAGO devices that have a Modbus Serial Port offer the ability to use the CODESYS Modbus Configurator. The CODESYS Modbus Configurator is a great way of setting up your Modbus devices versus using function blocks (see attached demo project).
wmg_demo.project (266.2 KB)
Setting Up Modbus Devices Using CODESYS Modbus Configurator:
ModbusConfigurator_Guide.pdf (96.5 KB)
- In the Project window, right-click on your project’s device and select “Add Device”.
- In the “Add Device” dialog, search for “Modbus” and open the tree. Select “Modbus COM” and
“Add Device”. - After adding the Modbus_COM component, right-click on it and select " Add Device".
3.1 Double-Click Modbus_COM component to configure properties such as slave ID, baud rate,
parity, etc. - In the “Add Device” dialog, search for “Modbus Serial Master” and open the tree. Select “Modbus
Master, COM port” and “Add Device”. - After adding the Modbus_Master_COM_port component, right-click on it and select " Add
Device".
5.1 Double-Click Modbus_Master_COM_port component to configure properties such as
Response timeout. - In the “Add Device” dialog, search for “Modbus” and open the tree. Select “Modbus Slave, COM
port” and “Add Device”. - After adding the Modbus_Slave_COM_port component, double-click on it.
- The Modbus Configurator will open in a new window. Here, you can define the slave address, add
Modbus channels, and map Modbus words to application variables.
Best Regards,
3 Likes
@Jacob is it possible to set it up to be an RTU slave. Please explain how if it is possible.
@m2brenesp When adding the RTU device select “Modbus Serial Device” instead of “Modbus Serial Master”: