|
|
1 年之前 | |
|---|---|---|
| .. | ||
| include | 1 年之前 | |
| lib | 1 年之前 | |
| AQTSampleMachinePlug.cxx | 1 年之前 | |
| AQTSampleMachinePlug.hpp | 1 年之前 | |
| AQTSampleMachinePlug.json | 1 年之前 | |
| CMakeLists.txt | 1 年之前 | |
| ConfigDialog.cpp | 1 年之前 | |
| ConfigDialog.hpp | 1 年之前 | |
| DDSSampleMachine.IDL | 1 年之前 | |
| DDSSampleMachine.hpp | 1 年之前 | |
| DDSSampleMachineCdrAux.hpp | 1 年之前 | |
| DDSSampleMachineCdrAux.ipp | 1 年之前 | |
| DDSSampleMachinePubSubTypes.cxx | 1 年之前 | |
| DDSSampleMachinePubSubTypes.hpp | 1 年之前 | |
| DDSSampleMachineTypeObjectSupport.cxx | 1 年之前 | |
| DDSSampleMachineTypeObjectSupport.hpp | 1 年之前 | |
| PLCController.hpp | 1 年之前 | |
| readme.md | 1 年之前 | |
一、PLC 相关
1、安装 snap7 库
从 https://snap7.sourceforge.net/ 下载 snap7 库,并按照说明进行安装。
这里下载的是snap7-full-1.4.0.zip,解压后,将snap7-full-1.4.0文件夹复制到C:\Program Files\snap7\lib\snap7-full-1.4.0
这里使用的是 snap7 1.5.2 版本。
2、配置 snap7 库 在 CMakeLists.txt 文件中添加以下内容: find_package(snap7 REQUIRED) include_directories(${SNAP7_INCLUDE_DIRS}) link_directories(${SNAP7_LIBRARY_DIRS}) target_link_libraries(your_target ${SNAP7_LIBRARIES})
二、PLC 数据区定义