Generic Modbus Slave - Modbus Channel how to use the Application trigger
Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-01-1702:42 AM
Generic Modbus Slave - Modbus Channel how to use the Application trigger
Hi,
I am trying to use Machine Expert on a M241 for writing to a modbus serial RTU (RS485) device. I am trying to use the Modbus_IOScanner and Generic Modbus Slave. For reading it works fine (I am using Cyclic as the trigger it is ok), but for writing I would like to use the Application trigger. The documentation is very vague in terms of how to use it (https://content.helpme-codesys.com/en/CODESYS%20Modbus/_mod_edt_slave_com_channel.html ) this is what it mentions:
Application: The Modbus request is triggered by the PLC application. This happens by means of the ModbusChannel function block, which is included in the respective I/O driver library. This function block provides complete control of and information about the execution of this command, for example the start time, the processing time, and the result.
So I followed the step by step, but the ModbusChannel part does not work
When I try to use the ModbusChannel it asks for a slave (ModbusSlaveComPort type), how do I get an instance of this? If I try to pass the Generic Modbus Slave device variable name SERIAL_POWER_METER it does not work (type does match)