ActionCourse.c 1.81 KB
#include "hardware.h"
#include "all_value.h"



/*********************************************************************************
函数名: 
功能:
参数:
返回:无返回。
实现方法:
编程:pcy
日期:2021-12-16
*********************************************************************************/
Str_AgvAction  AGV;
Str_SlamPoint  EndPoint;
Str_SlamPoint  StartPoint;
Str_SlamPoint  StartVP;
Str_SlamPoint  LastEndP;//
void ActionCourse_Pro(void)//获取工作模式
{ u8 i;
	Task_Pro();
	Test_Pro();
	
	if(VaIndexB_R(&AGV.OtheSta1,3)==0)//故障复位过程中,各子分解动作不进入
	{	Conveyor_Pro();
		Load_Pro();
		Charge_Pro();
		UpDown_Pro();
		Rotation_Pro();
		Line1_Pro();	
	}
	
	
	
	
	
	
	
	
	
	
	
	
	AxisAllEn_Pro();

	if ( ( (AGV.Charge_Step>0)&&(AGV.Charge_Step<100)                           )|
			 ( (AGV.UpDown_Step>0)&&(AGV.UpDown_Step<100)                           )|
	     ( (AGV.Load_Step>0)&&(AGV.Load_Step<100)                               )|
	     ( (AGV.RotationCCD_Step>0)&&(AGV.RotationCCD_Step<100)                 )|	
	     ( (AGV.RotationSlam_Step>0)&&(AGV.RotationSlam_Step<100)               )|
		   ( (AGV.Task_Step>0)&&(AGV.Task_Step<100)                               )|
			 ( (AGV.TaskManu_Step>0)&&(AGV.TaskManu_Step<100)                       )|
//	     ( (AGV.AxisEn_Step>0)&&(AGV.AxisEn_Step<100)                           )|
			 ( (AGV.Test_Step>0)&&(AGV.Test_Step<100)                               )|
			 ( (AGV.Conveyor_Step>0)&&(AGV.Conveyor_Step<100)                       )|
			 ( (AGV.Line_Step>0)&&(AGV.Line_Step<100)                               )

      )
		VaIndexB_W(&AGV.OtheSta,4,1);
	else 	VaIndexB_W(&AGV.OtheSta,4,0);	
	
	if( VaIndexB_R(&AGV.OtheSta,4)| Handnum )AGV.Time7_NotActNums=0;
	if(AGV.Time7_NotActNums>17&&VaIndexDW_R(&F_AgvContr,15))
  { for(i=0;i<MaxMotNums;i++)
	 { Motor[i].PcToM.PowerOn=0;}
	}

}