|
|
|
@ -1,5 +1,6 @@ |
|
|
|
#include "SC828_DATA_table.h" |
|
|
|
#include <rtthread.h> |
|
|
|
#include "Variable.h" |
|
|
|
|
|
|
|
// 系统数据状态表(表格)
|
|
|
|
IO_State_DATA data_table[] = { |
|
|
|
@ -260,3 +261,89 @@ void DATA_Table_Init(){ |
|
|
|
rt_snprintf(step_table[i].StepID_S3, 3,"000"); |
|
|
|
} |
|
|
|
} |
|
|
|
//运行指令:开始
|
|
|
|
void DATA_INSTRUCTION_START(char p[25]){ |
|
|
|
for(int i=0;i<99;i++) |
|
|
|
{ |
|
|
|
step_table[i].RUN = 0; |
|
|
|
step_table[i].Parameter1 = 0; |
|
|
|
step_table[i].Parameter2 = 0; |
|
|
|
step_table[i].Parameter3 = 0; |
|
|
|
step_table[i].Parameter4 = 0; |
|
|
|
step_table[i].Parameter5 = 0; |
|
|
|
step_table[i].Parameter1_S1 = 0; |
|
|
|
step_table[i].Parameter2_S1 = 0; |
|
|
|
step_table[i].Parameter3_S1 = 0; |
|
|
|
step_table[i].Parameter4_S1 = 0; |
|
|
|
step_table[i].Parameter5_S1 = 0; |
|
|
|
step_table[i].Parameter1_S2 = 0; |
|
|
|
step_table[i].Parameter2_S2 = 0; |
|
|
|
step_table[i].Parameter3_S2 = 0; |
|
|
|
step_table[i].Parameter4_S2 = 0; |
|
|
|
step_table[i].Parameter5_S2 = 0; |
|
|
|
step_table[i].Parameter1_S3 = 0; |
|
|
|
step_table[i].Parameter2_S3 = 0; |
|
|
|
step_table[i].Parameter3_S3 = 0; |
|
|
|
step_table[i].Parameter4_S3 = 0; |
|
|
|
step_table[i].Parameter5_S3 = 0; |
|
|
|
rt_snprintf(step_table[i].StepID, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S1, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S2, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S3, 3,"000"); |
|
|
|
} |
|
|
|
Pump = 0;TC = 0;Fan = 0;Pull = 0;Swing = 0; |
|
|
|
STA = 0;STB = 0;STC = 0;Time = 0;StepN = 0; |
|
|
|
P6 = 0;P7 = 0;P8 = 0;P9 = 0;P10 = 0; |
|
|
|
P1 = 0;P2 =0;P3 =0;P4 =0;P5 =0; |
|
|
|
P1S1 =0;P2S1 =0;P3S1 =0;P4S1 =0; |
|
|
|
P5S1 =0;P1S2 =0;P2S2 =0;P3S2 =0; |
|
|
|
P4S2 =0;P5S2 =0;P1S3 =0;P2S3 =0; |
|
|
|
P3S3 =0;P4S3 =0;P5S3 =0; |
|
|
|
rt_snprintf(StepID, 3,"000"); |
|
|
|
rt_snprintf(SIDS1, 3,"000"); |
|
|
|
rt_snprintf(SIDS2, 3,"000"); |
|
|
|
rt_snprintf(SIDS3, 3,"000"); |
|
|
|
} |
|
|
|
//运行指令:结束
|
|
|
|
void DATA_INSTRUCTION_STOP(){ |
|
|
|
for(int i=0;i<99;i++) |
|
|
|
{ |
|
|
|
step_table[i].RUN = 0; |
|
|
|
step_table[i].Parameter1 = 0; |
|
|
|
step_table[i].Parameter2 = 0; |
|
|
|
step_table[i].Parameter3 = 0; |
|
|
|
step_table[i].Parameter4 = 0; |
|
|
|
step_table[i].Parameter5 = 0; |
|
|
|
step_table[i].Parameter1_S1 = 0; |
|
|
|
step_table[i].Parameter2_S1 = 0; |
|
|
|
step_table[i].Parameter3_S1 = 0; |
|
|
|
step_table[i].Parameter4_S1 = 0; |
|
|
|
step_table[i].Parameter5_S1 = 0; |
|
|
|
step_table[i].Parameter1_S2 = 0; |
|
|
|
step_table[i].Parameter2_S2 = 0; |
|
|
|
step_table[i].Parameter3_S2 = 0; |
|
|
|
step_table[i].Parameter4_S2 = 0; |
|
|
|
step_table[i].Parameter5_S2 = 0; |
|
|
|
step_table[i].Parameter1_S3 = 0; |
|
|
|
step_table[i].Parameter2_S3 = 0; |
|
|
|
step_table[i].Parameter3_S3 = 0; |
|
|
|
step_table[i].Parameter4_S3 = 0; |
|
|
|
step_table[i].Parameter5_S3 = 0; |
|
|
|
rt_snprintf(step_table[i].StepID, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S1, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S2, 3,"000"); |
|
|
|
rt_snprintf(step_table[i].StepID_S3, 3,"000"); |
|
|
|
} |
|
|
|
Pump = 0;TC = 0;Fan = 0;Pull = 0;Swing = 0; |
|
|
|
STA = 0;STB = 0;STC = 0;Time = 0;StepN = 0; |
|
|
|
P6 = 0;P7 = 0;P8 = 0;P9 = 0;P10 = 0; |
|
|
|
P1 = 0;P2 =0;P3 =0;P4 =0;P5 =0; |
|
|
|
P1S1 =0;P2S1 =0;P3S1 =0;P4S1 =0; |
|
|
|
P5S1 =0;P1S2 =0;P2S2 =0;P3S2 =0; |
|
|
|
P4S2 =0;P5S2 =0;P1S3 =0;P2S3 =0; |
|
|
|
P3S3 =0;P4S3 =0;P5S3 =0; |
|
|
|
rt_snprintf(StepID, 3,"000"); |
|
|
|
rt_snprintf(SIDS1, 3,"000"); |
|
|
|
rt_snprintf(SIDS2, 3,"000"); |
|
|
|
rt_snprintf(SIDS3, 3,"000"); |
|
|
|
} |
|
|
|
|