init
This commit is contained in:
28
device/control/acs/buffercode/buffer0autoexecode.cpp
Normal file
28
device/control/acs/buffercode/buffer0autoexecode.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user