背景图片
可控硅数周波方式开启程序 - 啊和的博客

可控硅数周波方式开启程序 - 啊和的博客 可控硅数周波方式开启程序 - 啊和的博客

可控硅数周波方式开启程序

此方式可以降低电源负载


    if(FLAG_SCR_ON) //工作标志位
    {

      if(FLAG_OPEN_SCR)
      {

        SCR_IO=1;
        OPEN_SCR_DELAY++;
        if(OPEN_SCR_DELAY>=12) //开1.5MS
        {
          OPEN_SCR_DELAY=0;
          SCR_IO=0;
          FLAG_OPEN_SCR=0;
        }

      } else
      {
        SCR_IO=0;
        OPEN_SCR_DELAY=0;
      }

/**********************读过零信号******************************/
      if(!FLAG_GET_ONCE_ZERO)
      {
        FLAG_GET_ONCE_ZERO=1;
        FLAG_NOW_ZERO_STATE=ZERO_IO;
      }
      if(FLAG_GET_ONCE_ZERO)
      {
        if(FLAG_NOW_ZERO_STATE!=ZERO_IO)  //过零来了
        {
          FLAG_GET_ONCE_ZERO=0;
          FLAG_ZERO_COME=1;
          // OPEN_SCR_ZERO_DELAY=0;
        }
      }
/**********************读过零信号******************************/


      if(FLAG_ZERO_COME)
      {
        FLAG_ZERO_COME=0;
        OPEN_SCR_ZERO_DELAY=0;
        USER_SET_HEAT_TIME1=USER_SET_HEAT_TIME;
        if(USER_SET_HEAT_TIME1<=2)      USER_SET_HEAT_TIME1=2;
        if(USER_SET_HEAT_TIME1>=10)      USER_SET_HEAT_TIME1=10;

        if(USER_SET_HEAT_TIME1==10)
        {
          FLAG_OPEN_SCR1=1;
        } else
        {
          OPEN_2CI_COUNT++;



          if(OPEN_2CI_COUNT<=USER_SET_HEAT_TIME1)
          {
            FLAG_OPEN_SCR1=1;
          }
          if(OPEN_2CI_COUNT==1)
          {
            REC_TIME=0;
          } else
          {
            REC_TIME=2;
          }

          if(OPEN_2CI_COUNT>=10) OPEN_2CI_COUNT=0;  //最大开10个周期

        }

      }



      if(FLAG_OPEN_SCR1)
      {
        if(ZERO_IO)
        {
          OPEN_SCR_ZERO_DELAY++;
          if(OPEN_SCR_ZERO_DELAY>=78-REC_TIME) //78
          {
            OPEN_SCR_ZERO_DELAY=0;
            FLAG_OPEN_SCR=1;
            FLAG_OPEN_SCR1=0;

          }
        } else
        {
          OPEN_SCR_ZERO_DELAY++;
          if(OPEN_SCR_ZERO_DELAY>=78-REC_TIME)
          {
            OPEN_SCR_ZERO_DELAY=0;
            FLAG_OPEN_SCR=1;
            FLAG_OPEN_SCR1=0;

          }

        }
      }
    } else
    {
      FLAG_OPEN_SCR=0;
      FLAG_OPEN_SCR1=0;
      OPEN_SCR_ZERO_DELAY=0;
      FLAG_GET_ONCE_ZERO=0;
      FLAG_NOW_ZERO_STATE=0;
      FLAG_ZERO_COME=0;
      OPEN_2CI_COUNT=0;
      OPEN_SCR_DELAY=0;
      SCR_IO=0;

    }


评论 0

挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论