#include #include // ===== 实际定义 ===== //系统信息变量 rt_int32_t sys_temperature;//主机环境温度 rt_int32_t sys_humidity;//主机环境湿度 char sys_var[8];//主机版本0.0.00A char sys_time[9]="00:00:00";//系统时间 unsigned int sys_run_time=0;//运行时间 int pow_bat;//电池电压 int pow_code;//主电压 int pow_dev1;//设备电压.通讯 int pow_dev2;//设备电压,其它 // 动态数据缓冲区(初始化为 NULL,后续分配) char *DATA_dat; char DATA_machins[3]; char DATA_api[5]; char machine_name[16]; char machine_ID[3]; // 状态标志 char MACHINE_ERR = 0; char MACHINE_LOCK = 0; char MACHINE_AUTO = 0; char MACHINE_CALL = 0; char MACHINE_USER = 0; // 字符串变量(RAM 中可修改) char Work[25]="SC----------"; char Dye[25]; char Process[50]; char Message[40]; char Step[60]; char Info[30]; // 整型变量 unsigned int Redye = 0; unsigned int UserInfoStart = 900; unsigned int RUN = 0; unsigned int STEPID = 0; // 浮点变量 float MTT = 0.0f;//主缸温度 float MTL = 0.0f;//主缸水位 float MTH = 6.0f;//主缸ph float MST = 0.0f;//目标温度 float MUT = 0.0f;//主缸温度2 float STTA = 0.0f;//料a温度 float STLA = 0.0f;//料a水位 float STTB = 0.0f;//料b温度 float STLB = 0.0f;//料b水位 float STTC = 0.0f;//料c温度 float STLC = 0.0f;//料c水位 // 控制输出 unsigned int Pump = 0;//主泵 unsigned int TC_H = 0;//温度比例 unsigned int TC_L = 0;//温度比例 unsigned int Fan = 0;//风机 unsigned int Pull1 = 0;//提布 unsigned int Pull2= 0;//提布 unsigned int Pull3 = 0;//提布 unsigned int Pull4 = 0;//提布 unsigned int Pull5 = 0;//提布 unsigned int Pull6 = 0;//提布 unsigned int Swing = 0;//摆布 unsigned int STA = 0;//料a比例 unsigned int STB = 0; unsigned int STC = 0; unsigned int Time = 0; unsigned int StepN = 0; unsigned int P6 = 0; unsigned int P7 = 0; unsigned int P8 = 0; unsigned int P9 = 0; unsigned int P10 = 0; // 步骤功能参数 unsigned int P1 = 0; unsigned int P2 =0; unsigned int P3 =0; unsigned int P4 =0; unsigned int P5 =0; unsigned int P1S1 =0; unsigned int P2S1 =0; unsigned int P3S1 =0; unsigned int P4S1 =0; unsigned int P5S1 =0; unsigned int P1S2 =0; unsigned int P2S2 =0; unsigned int P3S2 =0; unsigned int P4S2 =0; unsigned int P5S2 =0; unsigned int P1S3 =0; unsigned int P2S3 =0; unsigned int P3S3 =0; unsigned int P4S3 =0; unsigned int P5S3 =0; // 步骤编号字符串 char StepID[4]; char SIDS1[4]; char SIDS2[4]; char SIDS3[4]; // ===== 初始化函数 ===== void init_global_vars(void) { strcpy(Work, "Work Order"); strcpy(Dye, "Work Order"); strcpy(Process, "Process"); strcpy(Message, "Message"); strcpy(Step, "STEP"); strcpy(Info, "user"); strcpy(StepID, "000"); strcpy(SIDS1, "000"); strcpy(SIDS2, "000"); strcpy(SIDS3, "000"); }