PDA

View Full Version : dmg dmc105v tnc530 fixture offset



jelmerra
05-03-2007, 03:06 PM
Hi I am programming post processors and encountered a challenge with this machine. This is a five axis machine with b-axis (head) and c-axis(table).

The postprocessor drives a machine model in the cad/cam system. I used the center of the table as reference in my machine model. When they put an actual part on the real machine the part is not exactly the same way positioned i.e. the part is translated.

I intended to have the nc-program cope with this offset. When I have a combination of b and c the spatial plane function does the job properly. However, if I only have a c-axis rotation I cannot seem to get it to work. The program below is one of my test programs. It is a block from which one edge is milled under different orientations 0 90 180 270 and two debur paths. This does not work according to the operator hopefully somebody is willing to share how to solve this challenge.

Thanks,

Jelmer

0 BEGIN PGM PROGRAM MM

1 ; MILL_CONTROL

2 ; PLANAR_MILL

3 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

4 BLK FORM 0.1 Z X0.0 Y0.0 Z-20.

5 BLK FORM 0.2 X100. Y100. Z0.0

6 FN 0: Q8=250.00 ; Engage XY-feedrate

7 FN 0: Q9=250.00 ; Cutting feedrate

8 FN 0: Q10=250.00 ; Engage Z-feedrate

9 TOOL CALL 0 Z S0 ; ST20-UL55-SL38-WD20

10 CYCL DEF 7.0 DATUM SHIFT

11 CYCL DEF 7.1 X0.0

12 CYCL DEF 7.2 Y0.0

13 CYCL DEF 7.3 Z0.0

14 L Z-100. B0.0 R0 F MAX M91

15 L C0.0 R0 F MAX M91

16 L Z-50. B0.0 R0 F MAX M91

17 L C0.0 F MAX

18 L X58. Y65.745 F MAX M3

19 L Z220. F MAX

20 L X58. Y65.745 C0.0 F MAX

21 L Z220. B0.0 F MAX

22 L Z203. F MAX

23 L Z200. FQ10 M8

24 CC X62. Y60.

25 C X55. Y60. DR+ FQ8

26 L Y-48. FQ9

27 CC X62. Y-48.

28 C X58. Y-53.745 DR+

29 L Z220. F MAX

30 ; PLANAR_MILL_COPY

31 L Z-100. B0.0 R0 F MAX M91

32 L X1050. Y797. R0 F MAX M91

33 L R0 F MAX M91

34 CYCL DEF 7.0 DATUM SHIFT

35 CYCL DEF 7.1 X0.0

36 CYCL DEF 7.2 Y0.0

37 CYCL DEF 7.3 Z0.0

38 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

39 ; read preset table

40 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

41 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

42 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

43 ; assign rotation angle

44 FN 0: Q33 =0.0

45 ; calculate cosine and sine

46 FN 6: Q34 = SIN +Q33

47 FN 7: Q35 = COS +Q33

48 ; calculate products

49 FN 3: Q36 = +Q30 * +Q35

50 FN 3: Q37 = +Q31 * +Q34

51 FN 3: Q38 = -Q30 * +Q34

52 FN 3: Q39 = +Q31 * +Q35

53 FN 1: Q40 = +Q36 + +Q37

54 FN 1: Q41 = +Q38 + +Q39

55 ; add to existing fixture offset

56 FN 1: Q42 =45. + +Q40

57 FN 1: Q43 =6. + +Q41

58 FN 2: Q44 = +Q42 - +Q30

59 FN 2: Q45 = +Q43 - +Q31

60 FN 0: Q46 =200.

61 CYCL DEF 7.0 DATUM SHIFT

62 CYCL DEF 7.1 X+Q44

63 CYCL DEF 7.2 Y+Q45

64 CYCL DEF 7.3 Z+Q46

65 L Z-50. B0.0 R0 F MAX M91

66 L C0.0 F MAX

67 L X13. Y59.745 F MAX

68 L Z20. F MAX

69 L F MAX

70 L Z3. F MAX

71 L Z0.0 FQ10

72 CC X17. Y54.

73 C X10. Y54. DR+ FQ8

74 L Y-54. FQ9

75 CC X17. Y-54.

76 C X13. Y-59.745 DR+

77 L Z20. F MAX

78 ; PLANAR_MILL_COPY_1

79 L Z-100. B0.0 R0 F MAX M91

80 L X1050. Y797. R0 F MAX M91

81 L R0 F MAX M91

82 CYCL DEF 7.0 DATUM SHIFT

83 CYCL DEF 7.1 X0.0

84 CYCL DEF 7.2 Y0.0

85 CYCL DEF 7.3 Z0.0

86 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

87 ; read preset table

88 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

89 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

90 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

91 ; assign rotation angle

92 FN 0: Q33 =270.

93 ; calculate cosine and sine

94 FN 6: Q34 = SIN +Q33

95 FN 7: Q35 = COS +Q33

96 ; calculate products

97 FN 3: Q36 = +Q30 * +Q35

98 FN 3: Q37 = +Q31 * +Q34

99 FN 3: Q38 = -Q30 * +Q34

100 FN 3: Q39 = +Q31 * +Q35

101 FN 1: Q40 = +Q36 + +Q37

102 FN 1: Q41 = +Q38 + +Q39

103 ; add to existing fixture offset

104 FN 1: Q42 =-6. + +Q40

105 FN 1: Q43 =45. + +Q41

106 FN 2: Q44 = +Q42 - +Q30

107 FN 2: Q45 = +Q43 - +Q31

108 FN 0: Q46 =200.

109 CYCL DEF 7.0 DATUM SHIFT

110 CYCL DEF 7.1 X+Q44

111 CYCL DEF 7.2 Y+Q45

112 CYCL DEF 7.3 Z+Q46

113 L Z-50. B0.0 R0 F MAX M91

114 L C270. F MAX

115 L X-59.745 Y13. F MAX

116 L Z20. F MAX

117 L F MAX

118 L Z3. F MAX

119 L Z0.0 FQ10

120 CC X-54. Y17.

121 C X-54. Y10. DR+ FQ8

122 L X54. FQ9

123 CC X54. Y17.

124 C X59.745 Y13. DR+

125 L Z20. F MAX

126 M140 MB MAX

127 PLANE RESET STAY

128 ; PLANAR_MILL_COPY_2

129 L Z-100. B0.0 R0 F MAX M91

130 L X1050. Y797. R0 F MAX M91

131 L C0.0 R0 F MAX M91

132 CYCL DEF 7.0 DATUM SHIFT

133 CYCL DEF 7.1 X0.0

134 CYCL DEF 7.2 Y0.0

135 CYCL DEF 7.3 Z0.0

136 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

137 ; read preset table

138 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

139 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

140 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

141 ; assign rotation angle

142 FN 0: Q33 =180.

143 ; calculate cosine and sine

144 FN 6: Q34 = SIN +Q33

145 FN 7: Q35 = COS +Q33

146 ; calculate products

147 FN 3: Q36 = +Q30 * +Q35

148 FN 3: Q37 = +Q31 * +Q34

149 FN 3: Q38 = -Q30 * +Q34

150 FN 3: Q39 = +Q31 * +Q35

151 FN 1: Q40 = +Q36 + +Q37

152 FN 1: Q41 = +Q38 + +Q39

153 ; add to existing fixture offset

154 FN 1: Q42 =-45. + +Q40

155 FN 1: Q43 =-6. + +Q41

156 FN 2: Q44 = +Q42 - +Q30

157 FN 2: Q45 = +Q43 - +Q31

158 FN 0: Q46 =200.

159 CYCL DEF 7.0 DATUM SHIFT

160 CYCL DEF 7.1 X+Q44

161 CYCL DEF 7.2 Y+Q45

162 CYCL DEF 7.3 Z+Q46

163 L Z-50. B0.0 R0 F MAX M91

164 L C180. F MAX

165 L X-13. Y-59.745 F MAX

166 L Z20. F MAX

167 L F MAX

168 L Z3. F MAX

169 L Z0.0 FQ10

170 CC X-17. Y-54.

171 C X-10. Y-54. DR+ FQ8

172 L Y54. FQ9

173 CC X-17. Y54.

174 C X-13. Y59.745 DR+

175 L Z20. F MAX

176 M140 MB MAX

177 PLANE RESET STAY

178 ; PLANAR_MILL_COPY_3

179 L Z-100. B0.0 R0 F MAX M91

180 L X1050. Y797. R0 F MAX M91

181 L C0.0 R0 F MAX M91

182 CYCL DEF 7.0 DATUM SHIFT

183 CYCL DEF 7.1 X0.0

184 CYCL DEF 7.2 Y0.0

185 CYCL DEF 7.3 Z0.0

186 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

187 ; read preset table

188 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

189 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

190 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

191 ; assign rotation angle

192 FN 0: Q33 =90.

193 ; calculate cosine and sine

194 FN 6: Q34 = SIN +Q33

195 FN 7: Q35 = COS +Q33

196 ; calculate products

197 FN 3: Q36 = +Q30 * +Q35

198 FN 3: Q37 = +Q31 * +Q34

199 FN 3: Q38 = -Q30 * +Q34

200 FN 3: Q39 = +Q31 * +Q35

201 FN 1: Q40 = +Q36 + +Q37

202 FN 1: Q41 = +Q38 + +Q39

203 ; add to existing fixture offset

204 FN 1: Q42 =6. + +Q40

205 FN 1: Q43 =-45. + +Q41

206 FN 2: Q44 = +Q42 - +Q30

207 FN 2: Q45 = +Q43 - +Q31

208 FN 0: Q46 =200.

209 CYCL DEF 7.0 DATUM SHIFT

210 CYCL DEF 7.1 X+Q44

211 CYCL DEF 7.2 Y+Q45

212 CYCL DEF 7.3 Z+Q46

213 L Z-50. B0.0 R0 F MAX M91

214 L C90. F MAX

215 L X59.745 Y-13. F MAX

216 L Z20. F MAX

217 L F MAX

218 L Z3. F MAX

219 L Z0.0 FQ10

220 CC X54. Y-17.

221 C X54. Y-10. DR+ FQ8

222 L X-54. FQ9

223 CC X-54. Y-17.

224 C X-59.745 Y-13. DR+

225 L Z20. F MAX

226 M140 MB MAX

227 PLANE RESET STAY

228 ; PLANAR_MILL_COPY_COPY

229 L Z-100. B0.0 R0 F MAX M91

230 L X1050. Y797. R0 F MAX M91

231 L C0.0 R0 F MAX M91

232 CYCL DEF 7.0 DATUM SHIFT

233 CYCL DEF 7.1 X0.0

234 CYCL DEF 7.2 Y0.0

235 CYCL DEF 7.3 Z0.0

236 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

237 ; read preset table

238 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

239 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

240 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

241 ; assign rotation angle

242 FN 0: Q33 =180.

243 ; calculate cosine and sine

244 FN 6: Q34 = SIN +Q33

245 FN 7: Q35 = COS +Q33

246 ; calculate products

247 FN 3: Q36 = +Q30 * +Q35

248 FN 3: Q37 = +Q31 * +Q34

249 FN 3: Q38 = -Q30 * +Q34

250 FN 3: Q39 = +Q31 * +Q35

251 FN 1: Q40 = +Q36 + +Q37

252 FN 1: Q41 = +Q38 + +Q39

253 ; add to existing fixture offset

254 FN 1: Q42 =-45. + +Q40

255 FN 1: Q43 =-6. + +Q41

256 FN 2: Q44 = +Q42 - +Q30

257 FN 2: Q45 = +Q43 - +Q31

258 FN 0: Q46 =200.

259 CYCL DEF 7.0 DATUM SHIFT

260 CYCL DEF 7.1 X+Q44

261 CYCL DEF 7.2 Y+Q45

262 CYCL DEF 7.3 Z+Q46

263 L C180. F MAX

264 L X-45.456 Y-59.745 F MAX

265 L Z27.071 F MAX

266 PLANE SPATIAL SPA0.0 SPB-45. SPC180. MOVE DIST0.0 F9999. SEQ- TABLE ROT

267 L X-13. Y-59.745 Z51.284 F MAX

268 L Z3. F MAX

269 L Z0.0 FQ10

270 CC X-17. Y-54.

271 C X-10. Y-54. DR+ FQ8

272 L Y54.

273 CC X-17. Y54.

274 C X-13. Y59.745 DR+

275 L Z51.284 F MAX

276 M140 MB MAX

277 PLANE RESET STAY

278 ; PLANAR_MILL_COPY_COPY_COPY

279 L Z-100. B0.0 R0 F MAX M91

280 L X1050. Y797. R0 F MAX M91

281 L C0.0 R0 F MAX M91

282 CYCL DEF 7.0 DATUM SHIFT

283 CYCL DEF 7.1 X0.0

284 CYCL DEF 7.2 Y0.0

285 CYCL DEF 7.3 Z0.0

286 CYCL DEF 247 DATUM SETTING ~

Q339=1 ; DATUM NUMBER

287 ; read preset table

288 FN 18: SYSREAD Q30 = ID220 NR2 IDX1

289 FN 18: SYSREAD Q31 = ID220 NR2 IDX2

290 FN 18: SYSREAD Q32 = ID220 NR2 IDX3

291 ; assign rotation angle

292 FN 0: Q33 =0.0

293 ; calculate cosine and sine

294 FN 6: Q34 = SIN +Q33

295 FN 7: Q35 = COS +Q33

296 ; calculate products

297 FN 3: Q36 = +Q30 * +Q35

298 FN 3: Q37 = +Q31 * +Q34

299 FN 3: Q38 = -Q30 * +Q34

300 FN 3: Q39 = +Q31 * +Q35

301 FN 1: Q40 = +Q36 + +Q37

302 FN 1: Q41 = +Q38 + +Q39

303 ; add to existing fixture offset

304 FN 1: Q42 =45. + +Q40

305 FN 1: Q43 =6. + +Q41

306 FN 2: Q44 = +Q42 - +Q30

307 FN 2: Q45 = +Q43 - +Q31

308 FN 0: Q46 =200.

309 CYCL DEF 7.0 DATUM SHIFT

310 CYCL DEF 7.1 X+Q44

311 CYCL DEF 7.2 Y+Q45

312 CYCL DEF 7.3 Z+Q46

313 L C0.0 F MAX

314 L X-8.686 Y59.745 F MAX

315 L Z27.071 F MAX

316 PLANE SPATIAL SPA0.0 SPB-45. SPC0.0 MOVE DIST0.0 F9999. SEQ- TABLE ROT

317 L X13. Y59.745 Z25.284 F MAX

318 L Z3. F MAX

319 L Z0.0 FQ10

320 CC X17. Y54.

321 C X10. Y54. DR+ FQ8

322 L Y-54. FQ9

323 CC X17. Y-54.

324 C X13. Y-59.745 DR+

325 L Z25.284 F MAX

326 M140 MB MAX

327 PLANE RESET STAY

328 CYCL DEF 7.0 DATUM SHIFT

329 CYCL DEF 7.1 X0.0

330 CYCL DEF 7.2 Y0.0

331 CYCL DEF 7.3 Z0.0

332 L Z-100. B0.0 R0 F MAX M91

333 L X1050. Y797. R0 F MAX M91

334 L C0.0 R0 F MAX M91

335 ; CUTTING TIME CUTTING LENGTH TOOL TOOL NUMBER

336 ; -----------------------------------

337 ; 3.49 MIN. 871.33 MM ST20-UL55-SL38-WD20 T0

338 ; TOTAL CUTTING TIME 3.49 MIN.

339 END PGM PROGRAM MM