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