You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
2.0 KiB
105 lines
2.0 KiB
22 hours ago
|
#include <rtthread.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
// ===== 实际定义 =====
|
||
|
|
||
|
// 动态数据缓冲区(初始化为 NULL,后续分配)
|
||
|
char *DATA_dat = NULL;
|
||
|
char *DATA_machins = NULL;
|
||
|
char DATA_api[5];
|
||
|
char *machine_name = "Q109";
|
||
|
char machine_ID[3] = "23";
|
||
|
|
||
|
// 状态标志
|
||
|
char MACHINE_ERR = 0;
|
||
|
char MACHINE_LOCK = 0;
|
||
|
char MACHINE_CALL = 0;
|
||
|
char MACHINE_USER = 0;
|
||
|
|
||
|
// 字符串变量(RAM 中可修改)
|
||
|
char Work[15];
|
||
|
char Dye[15];
|
||
|
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; // 默认目标温度
|
||
|
float MST = 0.0f;
|
||
|
float MUT = 0.0f;
|
||
|
float STTA = 0.0f;
|
||
|
float STLA = 0.0f;
|
||
|
float STTB = 0.0f;
|
||
|
float STLB = 0.0f;
|
||
|
float STTC = 0.0f;
|
||
|
float STLC = 0.0f;
|
||
|
|
||
|
// 控制输出
|
||
|
unsigned int Pump = 0;
|
||
|
unsigned int TC = 0;
|
||
|
unsigned int Fan = 0;
|
||
|
unsigned int Pull = 0;
|
||
|
unsigned int Swing = 0;
|
||
|
unsigned int STA = 0;
|
||
|
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;
|
||
|
|
||
|
// 步骤功能参数
|
||
|
float P1 = 0.0f;
|
||
|
float P2 = 0.0f;
|
||
|
float P3 = 0.0f;
|
||
|
float P4 = 0.0f;
|
||
|
float P5 = 0.0f;
|
||
|
float P1S1 = 0.0f;
|
||
|
float P2S1 = 0.0f;
|
||
|
float P3S1 = 0.0f;
|
||
|
float P4S1 = 0.0f;
|
||
|
float P5S1 = 0.0f;
|
||
|
float P1S2 = 0.0f;
|
||
|
float P2S2 = 0.0f;
|
||
|
float P3S2 = 0.0f;
|
||
|
float P4S2 = 0.0f;
|
||
|
float P5S2 = 0.0f;
|
||
|
float P1S3 = 0.0f;
|
||
|
float P2S3 = 0.0f;
|
||
|
float P3S3 = 0.0f;
|
||
|
float P4S3 = 0.0f;
|
||
|
float P5S3 = 0.0f;
|
||
|
|
||
|
// 步骤编号字符串
|
||
|
char StepID[3];
|
||
|
char SIDS1[3];
|
||
|
char SIDS2[3];
|
||
|
char SIDS3[3];
|
||
|
|
||
|
// ===== 初始化函数 =====
|
||
|
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");
|
||
|
}
|