奥特QT DDS 插件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425
  1. 一、PLC 相关
  2. 1、安装 snap7 库
  3. 从 https://snap7.sourceforge.net/ 下载 snap7 库,并按照说明进行安装。
  4. 这里下载的是snap7-full-1.4.0.zip,解压后,将snap7-full-1.4.0文件夹复制到C:\Program Files\snap7\lib\snap7-full-1.4.0
  5. 这里使用的是 snap7 1.5.2 版本。
  6. 2、配置 snap7 库
  7. 在 CMakeLists.txt 文件中添加以下内容:
  8. find_package(snap7 REQUIRED)
  9. include_directories(${SNAP7_INCLUDE_DIRS})
  10. link_directories(${SNAP7_LIBRARY_DIRS})
  11. target_link_libraries(your_target ${SNAP7_LIBRARIES})
  12. 1. 配置数据块号:1
  13. 2. 命令数据块号:2
  14. 3. 状态数据块号:3
  15. 4. 采样点数据块号:4
  16. 二、PLC 数据区定义
  17. 1. 配置数据块: