This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#include "buffer0autoexecode.h"
Buffer0AutoExeCode::Buffer0AutoExeCode()
{
}
QString Buffer0AutoExeCode::getCode()
{
QString code("\n");
/*
* ECUNMAPIN 此函数用于将ECIN定义的所有映射重置为特定偏移量
* ECIN 将EtherCAT偏移地址的值映射到变量
*/
code+=
"AUTOEXEC:\n"
"ECUNMAPIN(RangeSAddr)\n"
// 禁用报警
"SAFETYCONF ALL,#NT,\"-\"\n"
"ECIN(RangeSAddr, RangeVInt)\n"
"WAIT 50\n"
"WHILE 1\n"
// 测距值换算为mm
"RangeV=RangeVInt/10000\n"
"END\n"
"STOP";
return code;
}