?? b_home_17.pmc
字號:
/******************************************************************
File Name : Xx_linea.plc
Description : Phasing PLC Program for Motor #1
NOTICE: This PLC program should only be used AFTER PMAC2 has been
powered up AND AFTER YOUR AMPLIFIERS have are powered up.
Not observing this precaution could result in damage to
your motors and/or amplifiers! It is recommended that you
run this PLC program upon confirmed request from the user.
******************************************************************/
;I5 = 0 //; this is a precaution so that this PLC does not run instantly after reset
#include "address.h"
#include "oem.h"
#include "tsodick1.h"
#include "tsodick2.h"
#include "tsodick3.h"
//M994->X:$78118,20,4 ; UVW position register
//M995->X:$1e4,0,24,S ; phase position register
//;M960->Y:$0814,10,1 ; home
//;M961->X:$003D,13,1 ; move zero
DELETE GATHER
DELETE TRACE
OPEN PLC 17 CLEAR
//home sequence
//RESTORE_HM_OFF_P = I126
i7082=11
If (PULSES_PER_UNIT_1 < 0)
i822=-100
Else
i822=100
EndIf
I51 = 0
// for release from home dog 2000.04.04
If (B_ORG_LIMIT_M = 1)
If (I823 < 0)
cmd"#8 j^1000000"
Else
cmd"#8 j^-1000000"
EndIf
While (B_ORG_LIMIT_M = 1)
EndWhile
cmd"#8 j/"
//waiting time
TIME_WAIT_CNT_P=2
While (TIME_WAIT_CNT_P > 0)
TIME_WAIT_CNT_P=TIME_WAIT_CNT_P-1
EndWhile
While ((MOTOR8_STATUS_M&MOTOR_IN_POS_BIT) = 0) //;MOTOR1_STATUS_M(M730) INPOSITION BIT
EndWhile
EndIf
cmd"#8 hm"
//waiting time
TIME_WAIT_CNT_P=2
While (TIME_WAIT_CNT_P > 0)
TIME_WAIT_CNT_P=TIME_WAIT_CNT_P-1
EndWhile
While ((MOTOR8_STATUS_M&$400) = 0) //;MOTOR1_STATUS_M(M730)->Y:$814,0,24,U INPOSITION BIT
EndWhile
//waiting time
TIME_WAIT_CNT_P=5
While (TIME_WAIT_CNT_P > 0)
TIME_WAIT_CNT_P=TIME_WAIT_CNT_P-1
EndWhile
While ((MOTOR8_STATUS_M&$1) = 0) //;MOTOR1_STATUS_M(M730)->Y:$814,0,24,U INPOSITION BIT
EndWhile
I51 = 1
@SET_OFF(CS_STATUS4_M,CS_HOME_INIT)
@SET_OFF(CS_STATUS4_M,CS_HOME_INPROGRESS)
DISABLE PLC 17
CLOSE
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -