Modbus RTU Sample
kampfwurst last edited by
I'm trying to Read over Modbus RTU some register. But i havent success yet. Is there a sample programm?
I have watched the youtube video but still no success. I would like to read vom Modbus ID 10 ten register with FC3. It sounds easy but it isnt ;-)
@kampfwurst Did you see the in-app help of Mervis IDE? There is a nice exaplanation of it in chapter Modbus driver. Anyway, you first need to create a device on a channel (Modbus, serial, baudrate,etc and address). Then double click it and create a group, set it as a read group and configure the modbus group parameter. Then you need to create datapoint, set its group to the group you previously created and configure the modbus datapoint parameters. Also do not forget to either use autoge, or map the IO=>ST to a global variable. (Btw. Mervis uses the +1 addressing! But some manufactures does not so you should check if the register 10 is not read in mervis like register 11)
Also, for simple modbus prototypes, check the possibility of importing the definition from a csv file: https://kb.mervis.info/doku.php/en:mervis-ide:30-communication-protocols:30-modbus