|
|
|
|
|
- Overview
- Use in WINDEV and WEBDEV
Modbus is a "field" (industrial and/or restricted environments) communication protocol created in 1979. This protocol is widely used in industrial environments to control programmable logic controllers (PLCs). It is known for its versatility, robustness, simplicity, and the large number of compatible devices. A Modbus network is composed of at least 1 master (or client) which will ask slaves (or servers) to perform an action. In Modbus, there are only two basic actions with several variants: make a data read request, make a data write request...
WINDEV and WEBDEV support two communication methods with Modbus slaves (or servers). - Modbus RTU using serial lines (serial port, USB port converted to serial port, etc.). Slaves that use RS-232 can connect directly to the serial port of the PC. However, for RS-422 or RS-485, a converter is required (in almost all cases, computer serial ports only support RS-232). To connect using this mode, simply use ModbusConnecteRTU.
- Modbus TCP using an Ethernet link. To connect using this mode, simply use ModbusConnecteTCP.
WLanguage offers read functions:
| | ModbusReadBit | Reads one or more bits from a Modbus slave, starting at a specific address. | ModbusReadFloat | Reads one or more single-precision floats from a Modbus slave, starting at a specific address. | ModbusReadRegister | Reads one or more registers from a Modbus slave, starting at a specific address. |
and write functions:
| | ModbusWriteBit | Writes one or multiple bits to a specific address in a Modbus slave. | ModbusWriteFloat | Writes one or more single-precision floats to a Modbus slave, starting at a specific address. | ModbusWriteRegister | Writes one or more registers (16-bit values) to a Modbus slave, starting at a specific address. |
CAUTION: As writing operations involve the manipulation of automation devices, it is advisable to test the various commands before putting them into production, to ensure that the devices perform the required operations.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|