⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 进行单片机与LCD的接口通讯与显示。使用清华的液晶。
💻 C
📖 第 1 页 / 共 5 页
字号:
void disp4311()  //modify group 6
 {
  modify_group(14,disp435);
 }

void disp4312() //display modified
 { CLEAR1();
  dispes(0,5,28,"groups in operation modified");}

void disp440()  //basic v/f control
{CLEAR1();
   dispes_f(0,3,18,menu_str[37]);   //"basic v/f control:"
   dispes(0,5,21,menu_str[38]);      //"advanced v/f control:"
   dispes(0,7,15,menu_str[39]);      //"vector control:"
   }
void  disp441()  // advanced v/f control
{CLEAR1();
   dispes(0,3,18,menu_str[37]);   //"basic v/f control:"
   dispes_f(0,5,21,menu_str[38]);      //"advanced v/f control:"
   dispes(0,7,15,menu_str[39]);      //"vector control:"
   }
void  disp442()  //display modified
 {CLEAR1();
 dispes(0,5,30,"modified to advanced v/f contr");}

void  disp443()  // vector control
{CLEAR1();
   dispes(0,3,18,menu_str[37]);   //"basic v/f control:"
   dispes(0,5,21,menu_str[38]);      //"advanced v/f control:"
   dispes_f(0,7,15,menu_str[39]);      //"vector control:"
   }
void  disp444() //display modified
 {CLEAR1();
 dispes(0,5,27,"modified to vector control");}

void  disp450()  //fwd/rev:
{CLEAR1();
   dispes_f(0,3,8,menu_str[40]);    //"fwd/rev:"
   dispes(0,5,28,menu_str[41]);    //"jog freq. in Hz:          HZ"
   dispes(0,7,28,menu_str[42]);    //"jog time in sec.:        SEC"
   if(buf[4]==1)
  { dispes_f(10,3,3,"fwd");
 //  dispes(100,2,3,"rev");
 }
   else
  { //dispes(80,2,3,"fwd");
   dispes_f(10,3,3,"rev");}

   float1=int_float2(buf[6],buf[7]);
    dispf(25,5,float1,1);

    int1=int_2(buf[8],buf[9]);
    dispint(23,7,int1);
   }
void  disp451()  //jog freq. in Hz
{ blank_line(3);
  blank_line(5);
   dispes(0,3,8,menu_str[40]);    //"fwd/rev:"
   dispes_f(0,5,28,menu_str[41]);    //"jog freq. in Hz:          HZ"
   if(buf[4]==0)
  { dispes(10,3,3,"fwd");
 //  dispes(100,2,3,"rev");
 }
   else
  { //dispes(80,2,3,"fwd");
   dispes(10,3,3,"rev");}
     float1=int_float2(buf[6],buf[7]);
    dispf_f(25,5,float1,1);
  }
void  disp452()  //jog time in sec.:
{ blank_line(5);
  blank_line(7);
  dispes(0,5,28,menu_str[41]);    //"jog freq. in Hz:          HZ"
   dispes_f(0,7,28,menu_str[42]);    //"jog time in sec.:        SEC"
    float1=int_float2(buf[6],buf[7]);
    dispf(25,5,float1,1);
    int1=int_2(buf[9],buf[10]);
    dispint_f(23,7,int1);
  }
void  disp453()  //modify fwd/rev:
 {switch(key2)
  {case 5:buf[4]=1;
  disp450();
  break;
  case 4: buf[4]=2;
  disp450();
  break; }
 }
void  disp454()  //modify jog freq. in Hz
 {
 modify_float2(float1,disp451,6,7);
 }

void  disp455()  //modify jog time in sec.:
 {
 modify_int2(int1,disp452,9,10);
 }

void  disp456() //display modified
 {CLEAR1();
 dispes(0,5,22,"fwd/rev & jog modified");}

void  disp460()  //DC mag. Time :
{CLEAR1();
  dispes_f(0,3,27,menu_str[43]);    //"DC mag. Time :          SEC"
  dispes(0,5,27,menu_str[44]);    //"DC mag. current:          %"
  dispes(0,7,27,menu_str[45]);    //"DC braking time:        SEC"
  dispes(0,9,28,menu_str[46]);    //"DC braking current:        %"

   int1=int_2(buf[3],buf[4]);
    dispint_f(24,3,int1);

   int2=buf[7];
    dispint(24,5,int2);

   int3=int_2(buf[9],buf[10]);
   dispint(24,7,int3);

   int4=buf[13];
    dispint(24,9,int4);

  }
void  disp461()  //DC mag. current
 {blank_line(3);
  blank_line(5);
  dispes(0,3,27,menu_str[43]);    //"DC mag. Time :          SEC"
  dispes_f(0,5,27,menu_str[44]);    //"DC mag. current:          %"
    int1=int_2(buf[3],buf[4]);
   int2=buf[7];
    dispint(24,3,int1);
    dispint_f(24,5,int2);
   }

void  disp462()  //DC braking time
 {blank_line(5);
  blank_line(7);
  dispes(0,5,27,menu_str[44]);    //"DC mag. current:          %"
  dispes_f(0,7,27,menu_str[45]);    //"DC braking time:        SEC"
     int2=buf[7];
   int3=int_2(buf[9],buf[10]);
    dispint(24,5,int2);
   dispint_f(24,7,int3);
   }
void  disp463() //DC braking current:
 {blank_line(7);
  blank_line(9);
  dispes(0,7,27,menu_str[45]);    //"DC braking time:        SEC"
  dispes_f(0,9,28,menu_str[46]);    //"DC braking current:        %"
    int3=int_2(buf[9],buf[10]);
   int4=buf[13];
   dispint(24,7,int3);
    dispint_f(24,9,int4);
  }
void  disp464()  //modify DC mag. Time
 {
 modify_int2(int1,disp460,3,4);
 }

void  disp465()  //modify mag. current
 {
 modify_int1(int2,disp461,7);
 }

void  disp466()  //modify braking time
 {
 modify_int2(int3,disp462,9,10);
 }

void  disp467()  //modify braking current
 {
 modify_int1(int4,disp463,13);
 }

void  disp468() //display modified
 {CLEAR1();
 dispes(0,5,20,"DC applying modified");}

void  disp470()  //DC unblance limit:
{CLEAR1();
  dispes_f(0,3,29,menu_str[47]); //"DC unblance limit:          %"
  dispes(0,4,29,menu_str[48]);   //"output overvoltage limit:   %"
  dispes(0,5,29,menu_str[49]);   //"output over current limit:  %"
  dispes(0,6,29,menu_str[50]);   //"trans overtemp. limit:      %"
  dispes(0,7,29,menu_str[51]);   //"cabinet overtemp. limit:    %"
  dispes(0,8,29,menu_str[52]);   //"motor overtemp. limit:      %"
  int1=buf[4];
  dispint_f(28,3,int1);
  int2=buf[7];
  dispint(28,4,int2);
  int3=buf[10];
  dispint(28,5,int3);
  int4=buf[13];
  dispint(28,6,int4);
  int5=buf[16];
  dispint(28,7,int5);
  int6=buf[19];
  dispint(28,8,int6);
    }
void  disp471()  //output overvoltage limit
 {blank_line(3);
  blank_line(4);
 dispes(0,3,27,menu_str[47]);   //"DC unblance limit:        %"
  dispes_f(0,4,29,menu_str[48]);   //"output overvoltage limit:   %"
  int1=buf[4];
  int2=buf[7];
  dispint(28,3,int1);
  dispint_f(28,4,int2);
   }
void  disp472()  //output over current limit:
{ blank_line(4);
  blank_line(5);
  dispes(0,4,29,menu_str[48]);   //"output overvoltage limit:   %"
  dispes_f(0,5,29,menu_str[49]);   //"output over current limit:  %"
  int2=buf[7];
  int3=buf[10];
  dispint(28,4,int2);
  dispint_f(28,5,int3);

  }
void  disp473()  // trans overtemp limit
 { blank_line(5);
  blank_line(6);
  dispes(0,5,29,menu_str[49]);   //"output over current limit:  %"
  dispes_f(0,6,29,menu_str[50]);   //"trans overtemp. limit:      %"
  int3=buf[10];
  int4=buf[13];
  dispint(28,5,int3);
  dispint_f(28,6,int4);

    }
void  disp474()  //cabinet overtemp. limit:
 { blank_line(6);
  blank_line(7);
 dispes(0,6,29,menu_str[50]);   //"trans overtemp. limit:      %"
  dispes_f(0,7,29,menu_str[51]);   //"cabinet overtemp. limit:    %"
  int4=buf[13];
  int5=buf[16];
  dispint(28,6,int4);
  dispint_f(28,7,int5);
   }
void  disp475()  //motor overtemp. limit:
 {blank_line(7);
  blank_line(8);
 dispes(0,7,29,menu_str[50]);   //"trans overtemp. limit:      %"
  dispes_f(0,8,29,menu_str[51]);   //"cabinet overtemp. limit:    %"
  int5=buf[16];
  int6=buf[19];
  dispint(28,7,int5);
  dispint_f(28,8,int6);
   }
void  disp476()  //modify DC unblance limit:
 {
  modify_int1(int1,disp470,4);
 }

void  disp477()  //modify output overvoltage limit
 {
  modify_int1(int2,disp471,7);
 }

void  disp478()  //modify output over current limit:
 {
  modify_int1(int3,disp472,10);
 }

void  disp479()  //modify trans overtemp limit
 {
  modify_int1(int4,disp473,13);
 }

void  disp4710()  //modify cabinet overtemp. limit:
 {
  modify_int1(int5,disp474,16);
 }

void  disp4711()  //modify motor overtemp. limit:
 {
  modify_int1(int6,disp475,19);
 }

void  disp4712() //display modified
 {CLEAR1();
 dispes(0,5,25,"limit parameters modified");}

void  disp480()  //scale of Vab:
{CLEAR1();
  dispes_f(0,3,28,menu_str[53]);   //"scale of Vab:"
  dispes(0,4,28,menu_str[54]);   //"scale of Vbc:"
  dispes(0,5,28,menu_str[55]);   //"offset of Vab:"
  dispes(0,6,28,menu_str[56]);   //"offset of Vbc:"
  dispes(0,7,30,menu_str[57]);  //"scale of current A:"
  dispes(0,8,30,menu_str[58]);  //"scale of current C:"
  dispes(0,9,30,menu_str[59]);  //"offset of current A:"
  dispes(0,10,30,menu_str[60]);  //"offset of current C:"

   float1=int_float3(buf[3],buf[4],buf[5]);
    dispf_f(25,3,float1,1);

    float2=int_float3(buf[6],buf[7],buf[8]);
    dispf(25,4,float2,1);

    float3=int_float3(buf[9],buf[10],buf[11]);
    dispf(25,5,float3,1);

    float4=int_float3(buf[12],buf[13],buf[14]);
    dispf(25,6,float4,1);

   float5=int_float3(buf[15],buf[16],buf[17]);
    dispf(25,7,float5,1);

    float6=int_float3(buf[18],buf[19],buf[20]);
    dispf(25,8,float6,1);
     float7=int_float3(buf[21],buf[22],buf[23]);
    dispf(25,9,float7,1);
    float8=int_float3(buf[24],buf[25],buf[26]);
    dispf(25,10,float8,1);

  }
void  disp481()  //scale of Vbc:
{ blank_line(3);
  blank_line(4);
  dispes(0,3,28,menu_str[53]);   //"scale of Vab:"
  dispes_f(0,4,28,menu_str[54]);   //"scale of Vbc:"
   float1=int_float3(buf[3],buf[4],buf[5]);
    float2=int_float3(buf[6],buf[7],buf[8]);
   dispf(25,3,float1,1);
    dispf_f(25,4,float2,1);
  }
void  disp482()  //offset of Vab:
 { blank_line(4);
  blank_line(5);
  dispes(0,4,28,menu_str[54]);   //"scale of Vbc:"
  dispes_f(0,5,28,menu_str[55]);   //"offset of Vab:"
   float2=int_float3(buf[6],buf[7],buf[8]);
    float3=int_float3(buf[9],buf[10],buf[11]);
    dispf(25,4,float2,1);
    dispf_f(25,5,float3,1);
  }
void  disp483()  //offset of Vbc:
 { blank_line(5);
  blank_line(6);
  dispes(0,5,28,menu_str[55]);   //"offset of Vab:"
  dispes_f(0,6,28,menu_str[56]);   //"offset of Vbc:"
   float3=int_float3(buf[9],buf[10],buf[11]);
    float4=int_float3(buf[12],buf[13],buf[14]);
    dispf(25,5,float3,1);
    dispf_f(25,6,float4,1);
    }
void  disp484()  //scale of current a
  {  blank_line(6);
  blank_line(7);
   dispes(0,6,28,menu_str[56]);   //"offset of Vbc:"
  dispes_f(0,7,30,menu_str[57]);  //"scale of current A:"
  float4=int_float3(buf[12],buf[13],buf[14]);
   float5=int_float3(buf[15],buf[16],buf[17]);
    dispf(25,6,float4,1);
    dispf_f(25,7,float5,1);
    }
void  disp485()  //scale of current c
 {blank_line(7);
  blank_line(8);
   dispes(0,7,28,menu_str[57]);   //"offset of Vbc:"
  dispes_f(0,8,30,menu_str[58]);  //"scale of current A:"
  float5=int_float3(buf[15],buf[16],buf[17]);
    float6=int_float3(buf[18],buf[19],buf[20]);
    dispf(25,7,float5,1);
    dispf_f(25,8,float6,1);
  }
void  disp486()  //offset of current a
 {blank_line(8);
  blank_line(9);
   dispes(0,8,28,menu_str[58]);   //"offset of Vbc:"
  dispes_f(0,9,30,menu_str[59]);  //"scale of current A:"
  float6=int_float3(buf[18],buf[19],buf[20]);
     float7=int_float3(buf[21],buf[22],buf[23]);
    dispf(25,8,float6,1);
    dispf_f(25,9,float7,1);
    }
void  disp487()  //offset of current c
 {blank_line(9);
  blank_line(10);
   dispes(0,9,28,menu_str[59]);   //"offset of Vbc:"
  dispes_f(0,10,30,menu_str[60]);  //"scale of current A:"
   float7=int_float3(buf[21],buf[22],buf[23]);
    float8=int_float3(buf[24],buf[25],buf[26]);
    dispf(25,9,float7,1);
    dispf_f(25,10,float8,1);
   }
void  disp488()  //modify scale of Vab:
 {
 modify_float3(float1,disp480,3,4,5);
 }

void  disp489()  //modify scale of Vbc:
  {
 modify_float3(float2,disp481,6,7,8);
 }

void  disp4810()  //modify offset of Vab:
  {
 modify_float3(float3,disp482,9,10,11);
 }

void  disp4811()  //modify offset of Vbc:
  {
 modify_float3(float4,disp483,12,13,14);
 }

void  disp4812()  //modify scale of current a
  {
 modify_float3(float5,disp484,15,16,17);
 }

void  disp4813()  //modify scale of current c
  {
 modify_float3(float6,disp485,18,19,20);
 }

void  disp4814()  //modify offset of current a
  {
 modify_float3(float7,disp486,21,22,23);
 }

void  disp4815()  //modify offset of current c
  {
 modify_float3(float8,disp487,24,25,26);
 }

void  disp4816() //display modified
 {CLEAR1();
 dispes(0,5,19,"calbration modified");}

void  disp501() //第五层phase A:
{CLEAR1();
  dispes_f(0,3,7,menu_str[61]);  //"phase A"
  dispes(0,5,7,menu_str[62]);  //"phase B"
  dispes(0,7,7,menu_str[63]);  //"phase C"
  }
void  disp502() //phase B:
 {CLEAR1();
  dispes(0,3,7,menu_str[61]);  //"phase A"
  dispes_f(0,5,7,menu_str[62]);  //"phase B"
  dispes(0,7,7,menu_str[63]);  //"phase C"
  }
void  disp503() //phase C:
  {CLEAR1();
  dispes(0,3,7,menu_str[61]);  //"phase A"
  dispes(0,5,7,menu_str[62]);  //"phase B"
  dispes_f(0,7,7,menu_str[63]);  //"phase C"
  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -