表格信息

This commit is contained in:
sc committed 2026-01-28 23:41:22 +08:00
1 parent 3c27178f57
commit 5f9242f64d
8 files changed
+148 -36

No files matched your search

+3 -1
View File
@@ -30,6 +30,7 @@ struct rt_messagequeue *response_mq; // Proc → UART
char cjson_falg=0;//是否解析cjson
char *json_buffer=NULL;//
char select_data[1024] = {0};
/**
* 截取两个指定子串之间的内容
* @param src 源字符串
@@ -377,7 +378,8 @@ void pasre_DAT(const char *api, const char *json_str)
}
else if (strcmp(api, "SC822") == 0)
{
printf("Processing:SC822\n");
db_send_select(DB_CMD_SELECT, "SELECT * FROM WorkOrderSet LIMIT 10;", 500,select_data);
cJSON_AddItemToObject(dat,"ERR",cJSON_CreateString(select_data));
}
else if (strcmp(api, "SC827") == 0)
{
+1 -1
View File
@@ -383,7 +383,7 @@ void table_thread_entry(void *parameter)
{
while (1)
{
rt_thread_delay(1000);
rt_thread_delay(500);
//Ai输入
MTT = get_ai_value(4001)/10.0f;
+44 -1
View File
@@ -20,7 +20,50 @@ typedef struct {
} IO_State_AIO;
typedef struct {
int pin; // PLCID
char Dyelot[32]; // 单号
int ReDye;
char *ProgramName; // 工艺
int lock;
int State;
char *Remark; //
} WorkOrder_DATA;
typedef struct {
char Dyelot[32]; // 单号
int ReDye;
char *Mode;
char StepID[4];
char *StepName;
char *ParameterName;
double P1;
double P2;
double P3;
double P4;
double P5;
int P6;
int P7;
int P8;
int P9;
int P10;
double P1_S1;
double P2_S1;
double P3_S1;
double P4_S1;
double P5_S1;
double P1_S2;
double P2_S2;
double P3_S2;
double P4_S2;
double P5_S2;
double P1_S3;
double P2_S3;
double P3_S3;
double P4_S3;
double P5_S3;
} Step_DATA;
typedef struct {
int pin; // ID
rt_int32_t current_data; // 当前状态
str_id_t name; // 名称(可选,用于调试)
} IO_State_DATA;
+2 -2
View File
@@ -28,8 +28,8 @@ rt_bool_t MACHINE_CALL = 0;
rt_bool_t MACHINE_USER = 0;
// 字符串变量(RAM 中可修改)
char Work[25]="SC----------";
char Dye[25];
char Work[32]="SC----------";
char Dye[32];
char Process[50];
char Message[40];
char Step[60];
+2 -2
View File
@@ -29,8 +29,8 @@ extern rt_bool_t MACHINE_CALL;
extern rt_bool_t MACHINE_USER;
// ===== 字符串 =====
extern char Work[25];
extern char Dye[25];
extern char Work[32];
extern char Dye[32];
extern char Process[50];
extern char Message[40];
extern char Step[60];