Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
ich habe eine CODESYS anwendung , in der ich bei einer Modbusverbindung den "Write Offset" programmatisch ändern möchte z.B über eine WebVisu.
Hat einer eine Idee, wie das funktionieren könnte?
I have a CODESYS application in which I want to programmatically change the "Write Offset" in a Modbus connection, for example via a WebVisu.
Does anyone have an idea how this could work?
Greeting Georg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Serialcom lib allows you to code every read/write and port open/close.
The scanner is simpler and easier because it does this automatically. But it's less flexible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2019-03-12
Originally created by: ph0010421
When you have brought in the ModbusMaster, the IoDrvModbus library is automatically used.
In here is an FB ModbusRequest which lets you choose the slave, function code and offset/size of data.
I'm never too sure of the best way to get the hComPort parameter...maybe you'll find it
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hallo,
ich habe eine CODESYS anwendung , in der ich bei einer Modbusverbindung den "Write Offset" programmatisch ändern möchte z.B über eine WebVisu.
Hat einer eine Idee, wie das funktionieren könnte?
Gruß Georg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Hello,
I have a CODESYS application in which I want to programmatically change the "Write Offset" in a Modbus connection, for example via a WebVisu.
Does anyone have an idea how this could work?
Greeting Georg
I would not use the scanner for this.
Use CAA SerialCom lib. https://help.codesys.com/webapp/idx-CAA_SerialCom-lib;product=CAA_SerialCom;version=3.5.12.0
how should that work with the CAA SerialCom lib?
How can I change the offset of the Modbus connection?
Serialcom lib allows you to code every read/write and port open/close.
The scanner is simpler and easier because it does this automatically. But it's less flexible.
Originally created by: ph0010421
When you have brought in the ModbusMaster, the IoDrvModbus library is automatically used.
In here is an FB ModbusRequest which lets you choose the slave, function code and offset/size of data.
I'm never too sure of the best way to get the hComPort parameter...maybe you'll find it