已有23人关注
VB代码老提示缺少表达式
发表在VB答疑区 2019-03-30 悬赏:1 学分
是否精华
版块置顶:

Private Sub Command1_Click()

'生成铣削凹圆台程序

Dim G_program As String

粗加工软件编程代码:

D_program = G_program & "变量说明:" & vbCrLf

D_program = G_program & "#1=A//圆台深度" & vbCrLf

D_program = G_program & "#2=B//大端半径" & vbCrLf

D_program = G_program & "#3=C//小端半径" & vbCrLf

D_program = G_program & "#4=D//总铣削层数" & vbCrLf

D_program = G_program & "#5=E//Z层步距" & vbCrLf

D_program = G_program & "#6=F//相邻半径增量" & vbCrLf

D_program = G_program & "#7=G/Z轴深度" & vbCrLf

D_program = G_program & "#8=H/刀具半径" & vbCrLf

D_program = G_program & vbCrLf

D_program = G_program & "粗加工程序:" & vbCrLf

D_program = G_program & "O0001" & vbCrLf

D_program = G_program & " G15 G17 G21 G40 G49 G54 G80 G90  M03  S" & Text5.Text & vbCrLf

D_program = G_program & " G90 G54 G00 X0 Y0 Z0" & vbCrLf

D_program = G_program & " A" & Text1.Text & vbCrLf

D_program = G_program & " B" & Text2.Text & vbCrLf

D_program = G_program & " C" & Text3.Text & vbCrLf

D_program = G_program & " D" & Text6.Text & vbCrLf

D_program = G_program & " E" & Text7.Text


& vbCrLf

D_program = G_program & " F" & Text8.Text & vbCrLf

D_program = G_program & " G" & Text9.Text & vbCrLf

D_program = G_program & " H" & Text4.Text & vbCrLf

D_program = G_program & " N10 G01 Z[#9]F1000 " & vbCrLf

D_program = G_program & "#110=FIX[[#100-10]/1]" & vbCrLf

D_program = G_program & "G00 X[#100-#110*1-#8] Y0" & vbCrLf

D_program = G_program & "WHILE[#110GE0] DO 1" & vbCrLf

D_program = G_program & "G01 X[#2-#110*1]-#8 Y0 F800" & vbCrLf

D_program = G_program & "G02 I-[#2-#110*1-#8] F1200" & vbCrLf

D_program = G_program & "#110=#110-2" & vbCrLf

D_program = G_program & "END 1" & vbCrLf

D_program = G_program & "#2=#2-#7" & vbCrLf

D_program = G_program & "M05" & vbCrLf

D_program = G_program & "M09" & vbCrLf

D_program = G_program & "M30" & vbCrLf

Text16.Text = G_program

End Sub

生成.exe文件的效果图就是下面这样子

01010.png

分享到:
精彩评论 1
淡.印象
学分:323 LV5
TA的每日心情
学习Python
2020-11-23 22:17:24
2019-09-28
沙发

读者您好:

这个情况可能是有空值

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照