📄 demo5.cpp
字号:
/////////////////////////////////////////////////////////////////////
//
// 两轴直线定速多段插补DEMO (查询方式)
//
/////////////////////////////////////////////////////////////////////
#include "driver.h"
void main()
{
clrscr();
InitialBoard();
ShiftPulseOut(2);
EnableCSpeed();
SetM(1, 2);
SetM(2, 2.828);
SetSV(1, 500);
SetV(1, 500);
SetP(1, 9000);
SetP(2, 2000);
cout << "Line1 Interpolation" << endl;
Command(0, CMD_LINE);
WaitForNext();
SetP(1, -8000);
SetP(2, -8000);
cout << "Line2 Interpolation" << endl;
Command(0, CMD_LINE);
WaitForNext();
SetP(1, -6000);
SetP(2, 9000);
cout << "Line3 Interpolation" << endl;
Command(0, CMD_LINE);
WaitForStop(3);
getch();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -