123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- #include "global.h"
- #include "Action.h"
- #if JIN_HONG_MACHINE == 1
- //初始化动作
- void JH_Mechine_InitAction(void)
- {
- switch(cMachineType)
- {
- case JIAO_YA_DIN_CUN:
- JYDC_InitAction();
- break;
- case CHU_CHI_JI:
- break;
- case JIAO_YA_CHU_CHI:
- break;
- case QIE_DUAN_JI:
- break;
- case CHUAN_TOU_QIE_DUAN_JI:
- //GL_QDCT_InitAction();
- break;
- case MXC_NILONG:
- break;
- case JIN_SHU_DIN_CUN:
- JSDC_InitAction();
- break;
- case CHUAN_TOU_JI: //´©Í·»ú
- ChuanTou_InitAction();
- break;
- default:
- break;
- }
- }
- void JH_Mechine_Action(void)
- {
- switch(cMachineType)
- {
- case JIAO_YA_DIN_CUN:
- JYDC_Action();
- break;
- case CHUAN_TOU_QIE_DUAN_JI: //穿头切断机
- //GL_QDCT_Action();
- break;
- case CHUANTOU_HELIAN_JI: //穿头合链机
- //GL_CTHL_Action();
- break;
-
- case JIN_SHU_DIN_CUN:
- JSDC_Action();
- break;
- default:
- break;
- }
- }
- void JH_Mechine_Config(void)
- {
- switch(cMachineType)
- {
- case JIAO_YA_DIN_CUN:
- //外部中断相关配置
- USE_ENCODE=0;
- USE_X30_EXTI=1;
- USE_X31_EXTI=0;
- USE_X20_EXTI=1;
-
- USE_TIMER_X30_EXTI=0;
- USE_TIMER_X31_EXTI=0;
- EXTI_TIMER_FREQ=20000;
-
- FILTER_P=1;
- FILTER_N=1;
- X30EXTI_DIR=user_datas[34];
- X31EXTI_DIR=1;
- X20EXTI_DIR=user_datas[34];
- //是否使用扩展
- USE_EXTEND_INOUTPUT=0;
- USE_EXTEND_ALARM=0;
- //脉冲配置
- SET_PULSE_TYPE = X_AXIS_PULSE_Y_DIR;
- SET_XDIR_TYPE = PULSE_OUTPUT_TYPE;
- SET_XDIR_CH = 99;//设置方向类型为“不使用”和“脉冲输出”时,方向通道设置不起作用
- SET_YDIR_TYPE = NO_USE_TYPE;
- SET_YDIR_CH = 99;//Y13作为方向
- break;
- case JIN_SHU_DIN_CUN:
- //外部中断相关配置
- USE_ENCODE=1;
- USE_X30_EXTI=0;
- USE_X31_EXTI=0;
- USE_X20_EXTI=1;
- USE_TIMER_X30_EXTI=0;
- USE_TIMER_X31_EXTI=1;
- EXTI_TIMER_FREQ=40000;
- FILTER_P=10;
- FILTER_N=5;
- X30EXTI_DIR=0;
- X31EXTI_DIR=0;
- X20EXTI_DIR=0;
- //是否使用扩展
- USE_EXTEND_INOUTPUT=0;
- USE_EXTEND_ALARM=0;
- //脉冲配置
- SET_PULSE_TYPE = X_AXIS_PULSE_Y_ON;
- SET_XDIR_TYPE = PULSE_OUTPUT_TYPE;
- SET_XDIR_CH = 99;//设置方向类型为“不使用”时,方向通道设置不起作用
- SET_YDIR_TYPE = NO_USE_TYPE;
- SET_YDIR_CH = 99;
- break;
- case MXC_NILONG: //免修齿
- //外部中断相关配置
- USE_ENCODE=1;
- USE_X30_EXTI=0;
- USE_X31_EXTI=1;
- USE_X20_EXTI=0;
- USE_TIMER_X30_EXTI=0;
- USE_TIMER_X31_EXTI=0;
- EXTI_TIMER_FREQ=40000;
- FILTER_P=2;
- FILTER_N=2;
- X30EXTI_DIR=0;
- X31EXTI_DIR=0;
- X20EXTI_DIR=0;
- //是否使用扩展
- USE_EXTEND_INOUTPUT=0;
- USE_EXTEND_ALARM=0;
- //脉冲配置
- SET_PULSE_TYPE = XY_AXIS_PULSE;
- SET_XDIR_TYPE = NO_USE_TYPE;
- SET_XDIR_CH = 99;//设置方向类型为“不使用”时,方向通道设置不起作用
- SET_YDIR_TYPE = Y_OUTPUT_TYPE;
- SET_YDIR_CH = 13;//Y13作为方向
- break;
- case CHUANTOU_HELIAN_JI: //穿头合链机
- break;
- default:
- SET_PULSE_TYPE = XY_AXIS_PULSE;
- break;
- }
-
- }
- #endif
|