Skip to main content

示例:Modbus

产品: CODESYS Modbus

这些示例展示了如何使用 ModbusFB.compiled-library 用于创建 Modbus TCP/串行服务器和客户端的 Modbus 功能块库。

描述

这些示例基于 ModbusFB.compiled-libraryModbusFB non standard extensions.compiled-library 图书馆。这 ModbusFB.compiled-library 库包含在 CODESYS Modbus 产品。这 ModbusFB non standard extensions.compiled-library 库包含在示例包中。

ModbusFB_examples.project 展示了如何使用 ModbusFB.compiled-library 创建标准 Modbus TCP/串行服务器和客户端。

ModbusFB_non_standard_extensions_examples.project 展示了如何使用 ModbusFB non standard extensions.compiled-library 创建具有扩展“数据模型”(宽寄存器> = 16位)的Modbus TCP/串行服务器和客户端,该模型未包含在Modbus标准中,但用于实际的Modbus设备中。

附加信息

ModbusFB_examples.project 包括独立 PLC 上的三个应用程序:

  • Example_BasicOverview 为您提供可用功能块的概述以及如何在 ST / CFC 中使用和组合它们

  • Example_Serial 展示如何创建串行 Modbus 服务器和客户端

  • ExampleTCP 展示如何创建 Modbus TCP 服务器和客户端

系统要求和限制

编程系统

CODESYS Development System (版本3.5.16.0或更高版本)

运行时系统

CODESYS Control Win (版本3.5.16.0)

附加组件

串行示例使用 PLC 上的两个串行端口,因此您必须连接它们。

与一个 CODESYS Control Win,可以使用虚拟串口驱动。

注意

_example_icon.png 下載 项目