找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
查看: 2008|回复: 2

[求助] 请教大神,如何在UG后处理中添加机床专用程序指令

[复制链接]

2

主题

9

回帖

178

积分

上等兵

积分
178
发表于 2021-2-19 23:16:12 | 显示全部楼层 |阅读模式
要添加的程序段如下:

N0005 $AC_TIMER[1]=0  
N0010 $AC_TIMER[2]=0
N0015 $AC_TIMER[3]=0
N0020 ;-----------------------------------------------------------
N0025 WITHOUT_TAPS=0
N0030 DBR_CONTROL_TOL_L1=0.5 DBR_CONTROL_TOL_R=0.5
N0035 HOME_PROG="HOMEPOS"
N0040 IF DBI_Pallet_1_in_Workarea==1 GOTOF PALETTE_OK
N0045 IF DBI_Pallet_2_in_Workarea==1 GOTOF PALETTE_OK
N0050 MSG("FEHLER PALETTE")
N0055 WHEN TRUE DO SETAL(65???) DBO_CYCALARMC1
N0060 M0
N0065 ENDIF
N0070 PALETTE_OK:
N0075 IF($P_PROG[0]=="_N_OP10_01_MPF")AND (DBI_PALLET_1_IN_WORKAREA==FALSE)
N0080 OP0010_1040_01_VALUES
N0085 PROGRAM_NAME_ZOS="OP10_1040_ZOS"
N0090 ELSE
N0095 MSG("WRONG PROGRAM FOR THIS PALLET")
N0100 WHEN TRUE DO SETAL(65???) DBO_CYCALARMC1
N0105 M0
N0110 ENDIF
N0115 R22=0 R70=199
N0120 IF (O_PROG_READY==1)
N0125 IF (WITHOUT_MEASURING==FALSE) AND (WARMUP_ACTIVE==FALSE)
N0130 CHECK_REF_MEAS_NEXT_PART
N0135 ENDIF
N0140 IF (REF_MEAS_NEXT_PART==TRUE) AND (WITHOUT_MEASURING==FALSE) AND (WARMUP_ACTIVE==FALSE)
N0145 T=T_NAME_TOUCHPROBE
N0150 DBR_SPI1_CONTROL_L1=LENGTH_TOUCHPROBE DBR_SPI1_CONTROL_R=RADIUS_TOUCHPROBE
N0155 ELSE
N0160 T="10011"
N0165 DBR_SPI1_CONTROL_L1=150.158 DBR_SPI1_CONTROL_R=0
N0170 ENDIF
N0175 GOTOF PROGRAMMOK
N0180 ENDIF
N0185 CALL PROGRAM_NAME_ZOS
N0190 IF ($P_SEARCH==FALSE) AND (WITHOUT_MEASURING==FALSE) AND (WARMUP_ACTIVE==FALSE) AND ((LAST_TOOL==0) OR (O_START_PROBE==1) OR (CALIBRATED==FALSE) OR (REF_MEASURED==FALSE) OR (PRECUT_FINISHED==FALSE) OR (PART_MEASURED==FALSE))
N0195 NEXT_TOOL_SELECTED=FALSE
N0200 OP0010_CHECK_MEAS_CONDI
N0205 IF (CALIBRATION_REQUIRED==TRUE)
N0210 T_NAME_FOLLOWING_TOOL="10011"
N0215 OP0010_CALIBRATION
N0220 ENDIF
N0225 IF (REF_MEASUREMENT==TRUE)
N0230 T_NAME_FOLLOWING_TOOL="CHT10011"
N0235 OP0010_REF_MEASUREMENT
N0240 ENDIF
N0245 T_NAME_FOLLOWING_TOOL="CHT10011"
N0250 OP10_ATEECH_ROUGH_MEAS
N0255 CALL PROGRAM_NAME_ZOS
N0260 O_START_PROBE=0
N0265 ;======= PROGRAMMEINSPRUNG / PROGRAM JUMP IN ===============
N0270 IF (LAST_TOOL <> 0)
N0275 WHEN TRUE DO $R21=1
N0280 T=(<<"CHT"<<LAST_TOOL)
N0285 GOTOF (<<"T_"<<LAST_TOOL)
N0290 ENDIF
N0295 WHEN TRUE DO $R21=0

20

主题

493

回帖

4223

积分

中尉

积分
4223
发表于 2021-2-20 21:50:47 来自手机 | 显示全部楼层
如果是在程序头固定输出这一段 很好解决  可以联系我,有偿解决问题

4

主题

431

回帖

6713

积分

上尉

积分
6713
发表于 2023-8-31 16:35:41 | 显示全部楼层
UG后处理文件每行之间加指令代码,譬如Y10.356 Z-10.673;
G65 P9623 A2;
Y10.361 Z-10.792;
G65 P9623 A2;
Y10.37 Z-10.965;
G65 P9623 A2;
Y10.38 Z-11.101;
G65 P9623 A2;
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

咨询QQ:1359218528|发帖须知!|Archiver|手机版|小黑屋|UG爱好者论坛 ( 京ICP备10217105号-2 )

GMT+8, 2025-2-1 00:58

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表