I need some help understanding how to use Modbus RTU (COM port) in Codesys enviroment. I defined a Modbus Server device (slave) in device tree and added some channels to read from (function 3). Also I set trigering mode to Application. I have a POU in which I want to trigger each channel one after the other something like this (C code for better visualisation):
I have found ModbusChannel function block documentation but examples are scarce. I don't understand how rising edge triggering works. What would be the best solution for achieving sequntial channel triggering? What is the common way to read multiple Modbus channels once every time a specified POU is executed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I need some help understanding how to use Modbus RTU (COM port) in Codesys enviroment. I defined a Modbus Server device (slave) in device tree and added some channels to read from (function 3). Also I set trigering mode to Application. I have a POU in which I want to trigger each channel one after the other something like this (C code for better visualisation):
I have found ModbusChannel function block documentation but examples are scarce. I don't understand how rising edge triggering works. What would be the best solution for achieving sequntial channel triggering? What is the common way to read multiple Modbus channels once every time a specified POU is executed?