技术论坛

回复:帮忙提供西门子s7-200的具体编程

作者 主题
侠客

经验值: 903
发帖数: 361
精华帖: 0
回复:帮忙提供西门子s7-200的具体编程


只看楼主 2009-07-14 14:25:05
Network 1 //
// 上抬
LSCR S0.0
Network 2
LD S0.0
S Q0.0, 1
Network 3
// 上抬到位
LD I0.3
SCRT S0.1
Network 4
SCRE
Network 5
// 上抬到位,上抬延时
LSCR S0.1
Network 6
LD S0.1
R Q0.0, 1
TON T101, VW210
Network 7
// 延时到
LD T101
SCRT S0.2
SCRT S6.0
Network 8
SCRE
Network 9
// 回原点
LSCR S0.2
Network 10
LD S0.2
= L60.0
LD S0.2
= L63.7
LD L60.0
CALL SBR6, L63.7, M0.4, VB422
Network 11
// 回原点正确
LDB= VB422, 0
A M0.4
SCRT S8.0
Network 12
// 回原点错误
LDB<> VB422, 0
A M0.4
SCRT S2.7
Network 13
SCRE
Network 14
LSCR S6.0
Network 15
LD S6.0
= L60.0
LD S6.0
= L63.7
LD L60.0
CALL SBR10, L63.7, M1.5, VB1022
Network 16
// 回原点正确
LDB= VB1022, 0
A M1.5
SCRT S8.0
Network 17
// 回原点错误
LDB<> VB1022, 0
A M1.5
SCRT S2.7
Network 18
SCRE
Network 19
LSCR S8.0
Network 20
LD M0.4
A M1.5
LPS
AN M1.3
SCRT S0.3
SCRT S1.0
LPP
A M1.3
SCRT S11.0
Network 21
SCRE
Network 22
// 纵退
LSCR S1.0
Network 23
LD S1.0
= L60.0
LD S1.0
= L63.7
LD L60.0
CALL SBR8, L63.7, VD290, VD500, 1, Q6.3, M1.6, VB1034, VD1036, VD1040
Network 24
LD M1.6
AB= VB1034, 0
LPS
AN M1.3
SCRT S1.1
LPP
A M1.3
SCRT S11.1
Network 25
LD M1.6
AB<> VB1034, 0
SCRT S2.7
Network 26
SCRE
Network 27
// 换夹
LSCR S1.1
Network 28
// 换夹延时
LD S1.1
AN Q0.1
R Q0.5, 1
TON T104, VW230
Network 29
LD T104
SCRT S15.0
S M14.6, 1
Network 30
SCRE
Network 31
// 下压
LSCR S0.3
Network 32
LD S0.3
S Q0.1, 1
Network 33
// 下压限位到,记刀数
LD I0.4
LPS
EU
INCW VW224
INCD VD710
LPP
SCRT S0.4
Network 34
SCRE
Network 35
// 停止下压,延时
LSCR S0.4
Network 36
// 下压 延时
LD S0.4
R Q0.1, 1
TON T102, VW212
Network 37
LD T102
LPS
AN M1.3
SCRT S0.5
LPP
A M1.3
SCRT S3.5
Network 38
SCRE
Network 39
// 上抬
LSCR S0.5
Network 40
LD S0.5
S Q0.0, 1
Network 41
LD I0.3
SCRT S0.6
Network 42
SCRE
Network 43
// 上抬结束
LSCR S0.6
Network 44
// 上抬延时
LD S0.6
R Q0.0, 1
TON T103, VW210
Network 45
// 切割未完成,右移一步
LD T103
AW< VW224, VW222
LPS
AN M1.3
SCRT S0.7
LPP
A M1.3
SCRT S3.6
Network 46
// 切割完成,右移半步
LD T103
AW= VW224, VW222
LPS
AN M1.3
SCRT S3.0
LPP
A M1.3
SCRT S3.7
Network 47
SCRE
Network 48
// 右移一步
LSCR S0.7
Network 49
LD S0.7
= L60.0
LD S0.7
= L63.7
LD L60.0
CALL SBR4, L63.7, VD214, VD218, 1, Q7.3, M0.5, VB424, VD426, VD430
Network 50
// 右移结束正确,转入s0.3,循环执行
LD M0.5
AB= VB424, 0
LPS
AN M1.3
SCRT S0.3
LPP
A M1.3
SCRT S4.0
Network 51
// 右移结束错误,转入s2.7
LD M0.5
AB<> VB424, 0
SCRT S2.7
Network 52
SCRE
Network 53
// 右移半步
LSCR S3.0
Network 54
LD S3.0
= L60.0
LD S3.0
= L63.7
LD L60.0
CALL SBR4, L63.7, VD226, VD218, 1, Q7.3, M0.6, VB434, VD436, VD440
Network 55
// 右移半步结束正确,纵进
LD M0.6
AB= VB434, 0
LPS
AN M1.3
SCRT S7.0
LPP
A M1.3
SCRT S4.1
Network 56
// 右移半步结束错误
LD M0.6
AB<> VB434, 0
SCRT S2.7
Network 57
SCRE
Network 58
// 右移半步后,等待右位换夹到位后,纵进
LSCR S7.0
Network 59
LD M14.6
SCRT S1.2
Network 60
SCRE
Network 61
// 纵进
LSCR S1.2
Network 62
LD S1.2
= L60.0
LD S1.2
= L63.7
LD L60.0
CALL SBR8, L63.7, VD200, VD500, 1, Q6.3, M1.7, VB1044, VD1048, VD1052
Network 63
// 纵进限位到
LD M1.7
AB= VB1044, 0
MOVW 0, VW224
+R MD4, VD740
MOVR VD740, VD670
/R 10.0, VD670
R M14.6, 1
SCRT S1.4
SCRT S7.1
Network 64
LD M1.7
AB<> VB1044, 0
SCRT S2.7
Network 65
SCRE
Network 66
LSCR S7.1
Network 67
LD S7.1
TON T120, 10
Network 68
LD T120
SCRT S1.3
Network 69
SCRE
Network 70
// 纵进结束,换夹及延时
LSCR S1.3
Network 71
// 换夹及延时
LD S1.3
AN Q0.1
TON T105, VW230
S Q0.5, 1
Network 72
LD T105
LPS
AN M1.3
SCRT S2.1
LPP
A M1.3
SCRT S11.2
Network 73
SCRE
Network 74
// 纵退
LSCR S2.1
Network 75
LD S2.1
= L60.0
LD S2.1
= L63.7
LD L60.0
CALL SBR8, L63.7, VD290, VD500, 1, Q6.3, M1.6, VB1034, VD1036, VD1040
Network 76
LD M1.6
AB= VB1034, 0
LPS
AN M1.3
SCRT S2.2
LPP
A M1.3
SCRT S11.3
Network 77
LD M1.6
AB<> VB1034, 0
SCRT S2.7
Network 78
SCRE
Network 79
// 换夹
LSCR S2.2
Network 80
LD S2.2
AN Q0.1
R Q0.5, 1
TON T108, VW230
Network 81
LD T108
SCRT S15.1
S M14.7, 1
Network 82
SCRE
Network 83
// 下压
LSCR S1.4
Network 84
LD S1.4
AN M12.0
S Q0.1, 1
Network 85
LD I0.4
LPS
EU
INCW VW224
INCD VD714
LPP
SCRT S1.5
Network 86
SCRE
Network 87
LSCR S1.5
Network 88
LD S1.5
R Q0.1, 1
TON T106, VW212
Network 89
LD T106
LPS
AN M1.3
SCRT S1.6
LPP
A M1.3
SCRT S4.4
Network 90
SCRE
Network 91
LSCR S1.6
Network 92
LD S1.6
S Q0.0, 1
Network 93
LD I0.3
SCRT S1.7
Network 94
SCRE
Network 95
LSCR S1.7
Network 96
LD S1.7
R Q0.0, 1
TON T107, VW210
Network 97
// 左移切割未完成,左移一步
LD T107
AW< VW224, VW222
LPS
AN M1.3
SCRT S2.0
LPP
A M1.3
SCRT S4.5
Network 98
// 左移切割完成,纵进
LD T107
AW= VW224, VW222
LPS
AN M1.3
SCRT S7.2
LPP
A M1.3
SCRT S4.6
Network 99
SCRE
Network 100
// 等到延时换夹到位后,纵进
LSCR S7.2
Network 101
LD M14.7
SCRT S2.3
Network 102
SCRE
Network 103
// 左移一步
LSCR S2.0
Network 104
LD S2.0
= L60.0
LD S2.0
= L63.7
LD L60.0
CALL SBR4, L63.7, VD232, VD218, 1, Q7.3, M1.0, VB444, VD446, VD450
Network 105
LD M1.0
AB= VB444, 0
LPS
AN M1.3
SCRT S1.4
LPP
A M1.3
SCRT S4.7
Network 106
LD M1.0
AB<> VB444, 0
SCRT S2.7
Network 107
SCRE
Network 108
// 纵进
LSCR S2.3
Network 109
LD S2.3
= L60.0
LD S2.3
= L63.7
LD L60.0
CALL SBR8, L63.7, VD200, VD500, 1, Q6.3, M1.7, VB1044, VD1048, VD1052
Network 110
// 纵进限位到
LD M1.7
AB= VB1044, 0
MOVW 0, VW224
+R MD4, VD740
MOVR VD740, VD670
/R 10.0, VD670
R M14.7, 1
SCRT S2.5
SCRT S7.3
Network 111
LD M1.7
AB<> VB1044, 0
SCRT S2.7
Network 112
SCRE
Network 113
// 纵进完毕后延时
LSCR S7.3
Network 114
LD S7.3
TON T121, 10
Network 115
LD T121
SCRT S2.4
Network 116
SCRE
Network 117
// 换夹
LSCR S2.4
Network 118
LD S2.4
AN Q0.1
S Q0.5, 1
TON T109, VW230
Network 119
LD T109
LPS
AN M1.3
SCRT S1.0
LPP
A M1.3
SCRT S5.1
Network 120
SCRE
Network 121
// 回原点或左移半步
LSCR S2.5
Network 122
// 回原点
LD S2.5
A M1.1
LPS
AN M1.3
SCRT S10.0
LPP
A M1.3
SCRT S5.2
Network 123
// 左移半步
LD S2.5
AN M1.1
LPS
AN M1.3
SCRT S3.1
LPP
A M1.3
SCRT S5.3
Network 124
SCRE
Network 125
// 左移半步
//
LSCR S3.1
Network 126
LD S3.1
= L60.0
LD S3.1
= L63.7
LD L60.0
CALL SBR4, L63.7, VD236, VD218, 1, Q7.3, M1.2, VB454, VD458, VD462
Network 127
// 左移半步完成
LD M1.2
AB= VB454, 0
LPS
AN M1.3
SCRT S0.3
LPP
A M1.3
SCRT S5.4
Network 128
// 左移半步错误
LD M1.2
AB<> VB454, 0
SCRT S2.7
Network 129
SCRE
Network 130
LSCR S10.0
Network 131
LD S10.0
= L60.0
LD S10.0
= L63.7
LD L60.0
CALL SBR6, L63.7, M0.4, VB422
Network 132
// 回原点正确
LDB= VB422, 0
A M0.4
SCRT S0.3
R M1.1, 1
Network 133
// 回原点错误
LDB<> VB422, 0
A M0.4
SCRT S2.7
Network 134
SCRE

恋”是个很强悍的字,它的上半部取自“变态”的“变”,而下半部取自“变态”的“态”。。。。。。
以下网友喜欢您的帖子:

  
重要声明:

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

帖子链接:https://www.ad.siemens.com.cn/club/bbs/post.aspx?a_id=571878&b_id=3&s_id=0&num=0

  • 上一页
  • 1
  • 下一页
收起
回复:帮忙提供西门子s7-200的具体编程
×
扫描打开手机版
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。