各位前輩好~
再編寫完NC程式並上傳NCU後,執行時會出現12080的警報,查警報說明為程序段編寫有問題,附上程式請各位前輩指導是哪個地方編寫出了錯,謝謝
=====================================================
PROC DRYCYC1
;---------------------------------------------------------------
;Copyright (C) Techint 1998 All Rights Reserved. Confidential
;---------------------------------------------------------------
;$Revision:840D.1.0
;$Author:D.Gaidano
;$Date:05-Apr.-2000
;===============================================================
;This program remove coolant from the Roll
;===============================================================
DEF REAL Zspeed ; Z Speed in drying pass
DEF REAL CarrStartPos, CarrEndPos
DEF REAL Zfinishwiperpos
;================== GEOMETRY INITIALIZATION (mm) ======================
; For grinders with wiper device
;before MD_DistWheelFlangePxWiper=1573
IF (MD_DistWheelFlangePxWiper==0); Distance wheel flange - proximity HD side
LOOP
MSG("$8000200");Error: GUD MD_DistWheelFlangePxWiper with value 0
ENDLOOP
ENDIF
;before MD_DistPxEndRubberFootPos=230
IF (MD_DistPxEndRubberFootPos==0); Distance from PRX end to rubber at end position
LOOP
MSG("$8000203");Error: GUD MD_DistPxEndRubberFootPos with value 0
ENDLOOP
ENDIF
;before MD_SpreadWitdh=34
IF (MD_SpreadWitdh==0); Spread width
LOOP
MSG("$8000204");Error: GUD MD_SpreadWitdh with value 0
ENDLOOP
ENDIF
;================== END GEOMETRY INITIALIZATION(=======================
STOPRE
CarrStartPos=RollParameters[0]+MD_DistWheelFlangePxWiper ; start at headstock side
CarrEndPos=RollParameters[1]+MD_DistWheelFlangePxWiper+MD_DistPxEndRubberFootPos ; finish at footstock side
; Roll Speed Calculation to Have a Teoretical Peripherical Speed = 1.2 m/sec
ActHeadSpeed = ABS((38.197/(RollParameters[3]+RollParameters[4])* MD_DryCyclePeripSpeed
STOPRE
M18 M09 ; rotac out and stop coolant
M1=4 S1=ActHeadSpeed
STOPRE
G00 G90 Z=CarrStartPos ; position Z carriage with wiper arm at roll begin
STOPRE
M44 ; Wiper down
G04 F2
STOPRE
ZSpeed=ActHeadSpeed*MD_SpreadWitdh ; ( ex. HD=50 rpm => Z=1700 mm/min )
G90 G01 Z=CarrEndPos F=Zspeed ; Drying pass
G04 F2
STOPRE
M45 ;wiper up
G04 F2
STOPRE
Zfinishwiperpos=CarrEndPos-MD_DistPxEndRubberFootPos
G00 G90 Z=Zfinishwiperpos
STOPRE
MSG("")
M17
最佳答案
楼主只需要把程序打开,按扩展件,垂直菜单有一个“程序编号”的选项,按一下这个按键,把程序段编号,然后再执行一次程序,这是在出现报警就会指向N**,直接就可以找到出错的地方了!
提问者对于答案的评价:
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc162703.html