PLC和伺服各设置什么参数
请写个简单例子,谢谢
最佳答案
Network 1 // Network Title
// 初始化
LD SM0.1
R M0.0, 128
ATCH INT0, 19
ENI
MOVW 200, SMW68
MOVW 0, SMW70
MOVD 50000, SMD72
Network 2
LD SM0.0
CALL SBR3
Network 3
// 电机使能控制
LDN M0.1
= Q0.3
Network 4
// 设置旋转方向为顺时针方向,,红绿黄蓝接A+,A-,B+,B-
LDN M0.1
A M0.5
S Q0.2, 1
Network 5
// 设置旋转方向为逆时针方向
LDN M0.1
AN M0.5
R Q0.2, 1
Network 6
// 启动电机
LD M0.3
LPS
EU
AN M0.1
AD>= SMD72, 1
MOVB 16#85, SMB67
PLS 0
S M0.1, 1
LPP
R M0.3, 1
Network 7
LDN M0.0
R M0.3, 1
Network 8
// 停止电机
LD M0.4
EU
LD M0.0
ED
OLD
A M0.1
CALL SBR0
R M0.4, 1
Network 9
LD SM0.0
CALL SBR1
Network 10
LD M0.1
TON T102, 60
Network 11
LD T102
EU
+I 1, VW504
AENO
R T102, 1
Network 12
LD M0.1
A M0.5
MOVW VW504, VW506
Network 13
LD M0.1
AN M0.5
MOVW VW504, VW508
Network 14
LDN M0.1
MOVW 0, VW504
提问者对于答案的评价:
好
原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc346159.html