控制工程师论坛

电机与运动控制

同时执行S、T坐标系下正弦曲线运动

wuwei01
wuwei01

2017-09-21

菜鸟求助,我现在用DMC4020控制两个音圈电机作正弦运动,目前可实现单个轴在S或T坐标系下的循环运动,但是同时执行却想不出怎么实现,望各位大神指点一二!

下面是目前的程序

BR1,1

SHAB

R1=100

R2=100

VST= 10000

VSS= 10000

I=1000

J=1000

A=0

B=0

WT3000


#A

CA T;' Specify T coordinate system

VM AN;' Declare A and N-axis as S-plane

CR R1,0,360;' Generate circle with radius of 1000 counts

VE;' End Sequence

BG T;' Start motion of T-plane

#LOOA

A=A+1

CR R1,0,360

VE

#WAITA

JP#LOOA,_LMT>1

JP#WAITA,A<I

STT

AMT

CST


#B

CA S;'Specify S-plane

VM BM;'Declare B and M-axis as S-plane

CR R2,0,360;' Generate circle with radius of 1000 counts

VE;' End Sequence

BG S;'Begin movement on S-plane

#LOOB

B=B+1

CR R2,0,360

VE

#WAITB

JP#LOOB,_LMS>1

JP#WAITB,B<J

#STOP

ST;   'stops motion

AMS;  'waits for motion to complete

VE;  'ends vector mode

CSS;  'clears all sine waves out of vector buffer

MG"finished"

EN



回帖

评论3

总共 , 当前 /
首页 | 登录 | 注册 | 返回顶部↑
手机版 | 电脑版
版权所有 Copyright(C) 2016 CE China