Sunday, 14 May 2017

SPS and Config Logic for Obara Servo Spot Welding

SPS Logic:


;Make your modifications here
    ;WATER OFF LOGIC
IF $IN[24]==TRUE THEN
$OUT[150]=FALSE
ELSE
$OUT[150]=TRUE
ENDIF


;**********************************************
;TIMER AND OTHER FAULT LOGIC FROM SYSTEM FAULT
;**********************************************
;WELD FAULT
IF $IN[308]==TRUE THEN
$OUT[104]=TRUE
ELSE
$OUT[104]=FALSE
ENDIF

;WELD TIMER N/W FAULT
IF $IN[333]==FALSE THEN
$OUT[111]=TRUE
ELSE
$OUT[111]=FALSE
ENDIF


;WATER FAULT
IF $IN[150]==FALSE THEN
$OUT[100]=TRUE
ELSE
$OUT[100]=FALSE
ENDIF

;TIP DRESSER FAULT
IF $IN[151]==TRUE THEN
$OUT[116]=TRUE
ELSE
$OUT[116]=FALSE
ENDIF



;WELDING ON/OFF FOR AUTO spot count
IF $EXT THEN
  IF $IN[19] THEN ;I_DRY RUN
    $OUT[309] = FALSE
  ELSE
    $OUT[309] = TRUE
  ENDIF
ENDIF
;FOLD SPOT COMPLETE ;spot count logic
IF $IN[300]==TRUE THEN
PULSE ($OUT[105],TRUE,0.5)
ENDIF
;ENDFOLD

IF SCHEDULE>15 THEN
GP=SCHEDULE/15
P=SCHEDULE-(GP*15)
ENDIF
IF SCHEDULE<=15 THEN
GP=0
P=SCHEDULE
ENDIF
IF SCHEDULE==GP*15 THEN
P=15
ENDIF

IF $OUT[308]==TRUE THEN   ; TRANSFER OF SCHEDULE NO.
GROUP=GP
PG=P
ELSE
GROUP=0
PG=0
ENDIF



Put This: inside  $Config.dat  :


; Userdefined Types 
;==================================
SIGNAL SCHEDULE $OUT[910] TO $OUT[918]
SIGNAL GROUP $OUT[304] TO $OUT[307]
SIGNAL PG $OUT[300] TO $OUT[303]
INT GP, P