- Axis: 新增运动学/功率/错误管理属性(_position 等 10+ 项) - Axis: 新增 doPower()/readState()/cycle() 接口骨架 - MC_Power: 实现功率使能功能块(边沿检测 + 状态输出) - GlobalResource: 新增 CreateAxis/GetAxisRefById 全局轴管理 - App/CMakeLists.txt: 添加 GlobalResource.cpp 源文件 - docs: 更新 Axis 属性清单与 MC_Power 设计文档
41 lines
688 B
C++
41 lines
688 B
C++
/**
|
|
* @file main.cpp
|
|
* @author
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2026-07-03
|
|
*
|
|
* @copyright Copyright (c) 2026
|
|
*
|
|
*/
|
|
|
|
#include <thread>
|
|
#include <mutex>
|
|
#include <vector>
|
|
#include "MotionTickThread.h"
|
|
#include "UserAppThread.h"
|
|
#include "Axis.h"
|
|
#include "Types.h"
|
|
|
|
std::vector<plcopen::Axis> axisList;
|
|
|
|
int main()
|
|
{
|
|
plcopen::Axis axis1(1, "axis1");
|
|
plcopen::Axis axis2(2, "axis2");
|
|
axisList.push_back(axis1);
|
|
axisList.push_back(axis2);
|
|
|
|
std::thread userAppThread(UserAppThread);
|
|
std::thread motionTickThread(MotionTickThread,
|
|
std::move(std::make_unique<std::vector<plcopen::Axis>>(axisList)));
|
|
|
|
motionTickThread.join();
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|