qq314941766 发表于 2017-11-9 12:19:48

cnc刻字年月日加流水号

有没有谁帮编个宏程序,就是比如今天17年11月05日,就在产品面上刻171105,深0.1,大小小点就好,明天就171106,自动变,怎么写,新代系统的。

韩寒11 发表于 2017-11-9 12:25:48

提示一下,每个字都要编一个宏程序,用什么年月日,就调什么程序

qq314941766 发表于 2017-11-9 12:34:12

是0-9都编一个子程序吗?程序头怎么写好

qq642446015 发表于 2017-11-9 12:38:59

要求太高了
宏程序 知道多难么

正在连接... 发表于 2017-11-9 12:53:06

百度文库里有一个,不过好像下载要出钱。你可以去借鉴下,提升下自己的思路。

qq314941766 发表于 2017-11-9 13:07:32

O2005
T01M6
G90G54
G43H1X67.273Y-11.183Z20.S4500M3
Z20.M7
N1#100=10.
N2#101=10.
N3#102=10.
N4#103=10.
N5M98H1000
G52X64.7Y-16.7
M98H#100
G52X64.7Y-20.
M98H#101
G52X64.7Y-23.3
M98H#102
G52X64.7Y-26.6
M98H#103
G0Z80.M9
G52X0Y0
G30Y
M0
#103=#103+1.
IF[#103LE19.]GOTO5
#102=#102+1.
IF[#102LE19.]GOTO4
#101=#101+1.
IF[#101LE19.]GOTO3
#100=#100+1.
IF[#100LE19.]GOTO2
G0Z100.M12
M5
M30

N10X2.640Y-1.627
Z2.000
Z1.500
G01Z-0.15F250
X2.418Y-1.936
X2.099Y-2.042
X1.810Y-2.122
X1.479Y-2.156
X1.144Y-2.146
X0.582Y-2.067
X0.215Y-1.925
X0.032Y-1.621
X0.295Y-1.322
X0.577Y-1.220
X0.914Y-1.161
X1.262Y-1.140
X1.828Y-1.163
X2.372Y-1.334
X2.640Y-1.627
G0Z2.000
M99

N11X2.171Y-1.293
Z2.000
Z1.500
G01Z-0.15
N22X2.235Y-1.605
N24X2.649Y-1.713
N26X-0.015
G0Z2.000
M99

N12X1.816Y-1.178
N86Z2.000
N88Z1.500
N90G01Z-0.15
N92X2.207Y-1.215
N94X2.500Y-1.355
N96X2.616Y-1.759
N98X2.403Y-2.031
N100X1.959Y-2.126
N102X1.559Y-2.024
N104X1.274Y-1.799
N106X1.022Y-1.528
N108X0.697Y-1.282
N110X0.106Y-1.129
N112Y-2.216
G0Z2.000
M99

N13X1.914Y-1.165
N126Z2.000
N128Z1.500
N130G01Z-0.15
N132X2.482Y-1.318
N134X2.617Y-1.695
N136X2.433Y-1.990
N138X2.024Y-2.120
N140X1.674Y-2.040
N142X1.405Y-1.749
N144X1.198Y-2.049
N146X0.829Y-2.181
N148X0.508Y-2.153
N150X0.216Y-2.010
N152X0.049Y-1.706
N154X0.154Y-1.354
N156X0.417Y-1.188
N158X0.841Y-1.127
G0Z2.000
M99

N14X0.742Y-2.327
N172Z2.000
N174Z1.500
N176G01Z-0.15
N178Y-1.075
N180X2.663Y-1.960
N182X-0.040
G0Z2.000
M99

N15X2.570Y-2.141
N196Z2.000
N198Z1.500
N200G01Z-0.15
N202Y-1.345
N204X1.364Y-1.217
N206X1.583Y-1.437
N208X1.646Y-1.534
N210X1.543Y-1.954
N212X1.295Y-2.125
N214X0.954Y-2.198
N216X0.621Y-2.186
N218X0.211Y-2.022
N220X0.055Y-1.732
N222X0.190Y-1.309
N224X0.551Y-1.141
G0Z2.000
M99

N16X2.085Y-2.187
N238Z2.000
N240Z1.500
N242G01Z-0.15
N244X2.448Y-2.086
N246X2.624Y-1.753
N248X2.463Y-1.462
N250X2.119Y-1.291
N252X1.688Y-1.207
N254X1.204Y-1.176
N256X0.616Y-1.210
N258X0.220Y-1.354
N260X0.044Y-1.684
N262X0.154Y-1.974
N264X0.513Y-2.172
N266X0.982Y-2.207
N268X1.303Y-2.123
N270X1.555Y-1.920
N272X1.570Y-1.560
N274X1.360Y-1.325
N276X1.032Y-1.188
G0Z2.000
M99

N17X2.576Y-1.185
N290Z2.000
N292Z1.500
N294G01Z-0.15
N296Y-2.268
N298X2.199Y-2.092
N300X1.813Y-1.936
N302X1.300Y-1.762
N304X0.775Y-1.626
N306X0.384Y-1.552
N308X-0.010Y-1.500
G0Z2.000
M99

N18X2.620Y-1.638
N322Z2.000
N324Z1.500
N326G01Z-0.15
N328X2.494Y-1.289
N330X2.146Y-1.138
N332X1.833Y-1.157
N334X1.562Y-1.325
N336X1.410Y-1.829
N338X1.131Y-2.073
N340X0.666Y-2.153
N342X0.276Y-2.020
N344X0.055Y-1.726
N346X0.170Y-1.298
N348X0.481Y-1.113
N350X0.863Y-1.080
N352X1.231Y-1.195
N354X1.418Y-1.430
N356X1.475Y-1.745
N358X1.749Y-2.035
N360X2.116Y-2.096
N362X2.433Y-1.985
N364X2.620Y-1.638
G0Z2.000
M99

N19X1.598Y-2.114
N378Z2.000
N380Z1.500
N382G01Z-0.15
N384X1.284Y-1.967
N386X1.069Y-1.629
N388X1.209Y-1.272
N390X1.493Y-1.147
N392X1.941Y-1.117
N394X2.297Y-1.188
N396X2.557Y-1.377
N398X2.603Y-1.778
N400X2.378Y-2.013
N402X2.024Y-2.116
N404X1.552Y-2.139
N406X1.251Y-2.130
N408X0.668Y-2.068
N410X0.376Y-2.001
N412X0.095Y-1.774
N414X0.058Y-1.440
N416X0.262Y-1.218
N418X0.577Y-1.126
G0Z2.000
M99

N1000X67.273Y-11.183Z20.000
N18Z2.000M7
N20G01Z-0.15F250
N22Y-12.238
N24X66.855Y-12.054
N26X66.429Y-11.889
N28X65.976Y-11.736
N30X65.513Y-11.613
N32X65.122Y-11.541
N34X64.728Y-11.496
N38G00Z2.00
N50X66.537Y-14.545
N52Z2.000
N54G01Z-.1500F250
N56X67.001Y-14.606
N58X67.289Y-14.811
N60X67.306Y-15.182
N62X66.996Y-15.458
N64X66.531Y-15.486
N66X66.221Y-15.392
N68X66.001Y-15.188
N70X65.603Y-14.790
N72X65.278Y-14.597
N74X64.799Y-14.501
N76Y-15.603
N80G00Z2.000
M99

qq314941766 发表于 2017-11-9 13:08:12

感觉不难,只是没研究透,呵呵

qq314941766 发表于 2017-11-9 13:08:51

这是朋友发给我的,只是不知原理,不知怎么改

qq314941766 发表于 2017-11-9 13:14:19

0-9的子程序有了,就是不知读取当天日期是哪个代码

所罗门_x 发表于 2017-11-9 14:54:22

你这题目很牛叉,不是一般人能做出来的,看你的宏程序个人感觉也就一般子程序模式,没看懂它哪里会自己读取当日日期,你应该验证一下是否自动识别当日日期?如果没有这功能那这宏程序做的然并卵!真的能自动读取日期的话一定是调用了模态代码,他应该有另外一套c++语言,这程序里真没看出来有啥特别的。
页: [1] 2 3
查看完整版本: cnc刻字年月日加流水号