|
5 months ago | |
---|---|---|
.. | ||
include | 5 months ago | |
lib | 5 months ago | |
AQTSampleMachinePlug.cxx | 5 months ago | |
AQTSampleMachinePlug.hpp | 5 months ago | |
AQTSampleMachinePlug.json | 5 months ago | |
CMakeLists.txt | 5 months ago | |
ConfigDialog.cpp | 5 months ago | |
ConfigDialog.hpp | 5 months ago | |
DDSSampleMachine.IDL | 5 months ago | |
DDSSampleMachine.hpp | 5 months ago | |
DDSSampleMachineCdrAux.hpp | 5 months ago | |
DDSSampleMachineCdrAux.ipp | 5 months ago | |
DDSSampleMachinePubSubTypes.cxx | 5 months ago | |
DDSSampleMachinePubSubTypes.hpp | 5 months ago | |
DDSSampleMachineTypeObjectSupport.cxx | 5 months ago | |
DDSSampleMachineTypeObjectSupport.hpp | 5 months ago | |
PLCController.hpp | 5 months ago | |
readme.md | 5 months ago |
一、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 数据区定义