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

📄 action1.inc

📁 使用三菱芯片开发的空调程序,具有低压保护功能
💻 INC
📖 第 1 页 / 共 4 页
字号:
;        endif
        rts

Fun_OutFan:
     if [b_stopoutfan]== 0
                seb     Out_FanHigh
     endif
     rts

;*****************************************************
;
;
;*****************************************************
Fun_AutoMode:
 if [sensor_reback] <=3
       rts
 endif
 if [Autodel_flag] == 0
                JMP    AutoAction
 else
       ; endif
    lif [b_sencerErrorGUAN] == 0 && [b_sencerErrorHUAN] == 0   ;2005-10-27 20:25
        if  [M_RoomTempsel] > 1Ah
                if [au_mode2] == RUN_HEAT && [b_SigerCool]== 0
                              [modetime]=[CompStopSecond]
                              seb    trun_mode
                              [oldmode]  = RUN_HEAT
                endif
                [m_AutoMode] = RUN_COOL
                [au_mode2]  = RUN_COOL
        endif
        if    [M_RoomTempsel] >= 20 && [M_RoomTempsel] <= 26  ;      2005.11.25
                if [b_SigerCool] == 0
                        if [au_mode2]== RUN_HEAT && [M_RoomTempsel] < 18h
                                [m_AutoMode] = RUN_HEAT
                                [au_mode2]  = RUN_HEAT
                        else
                                if [au_mode2]  == RUN_HEAT
                                        [oldmode]  = RUN_HEAT
                                        [modetime]=[CompStopSecond]
                                        seb    trun_mode
                                endif
                                [m_AutoMode] = RUN_DRY
                                [au_mode2]  = RUN_DRY
                        endif
                else
                        if [au_mode2]== RUN_FAN && [M_RoomTempsel] < 24
                                [m_AutoMode] = RUN_FAN
                                [au_mode2]   = RUN_FAN
                        else
                                [m_AutoMode] = RUN_DRY
                                [au_mode2]  = RUN_DRY
                        endif
                endif
        endif
        if    [M_RoomTempsel] < 20
                if    [b_SigerCool] == 0
                        if [au_mode2] == RUN_DRY || [au_mode2] ==RUN_COOL
                            [oldmode] = [au_mode2]
                            [modetime]=[CompStopSecond]
                            seb    trun_mode
                        endif
                        [m_AutoMode] = RUN_HEAT
                        [au_mode2] =  RUN_HEAT
                else
                        [m_AutoMode] = RUN_FAN
                        [au_mode2]   = RUN_FAN
                endif
        endif
        if   [m_AutoMode] != [oldm_AutoMode]             ;20050915
                 clb     Autodel_flag                    ;20050113
                 ldm     #00H,m_AutoADtime
                 [oldm_AutoMode] = [m_AutoMode]
        endif
    endif
  endif
AutoAction:
        ;if  [Autodel_flag] == 0
                ;if  [CompRunSecond] == 180 || [CompRunSecond] == 1
                        ;BRA     Actionloop
                ;else
                        ;BRA     AutoActionend
                ;endif
        ;else
        ;if  [Autodel_flag] == 1
                ;clb     Autodel_flag
                ;ldm     #00H,m_AutoADtime
        ;endif
        ;endif
Actionloop:
        switch   [m_AutoMode]
                case  RUN_FAN
                        ldm   #14h,settempval
                        [settempvaldis] = 14h
                        jsr   Fun_FanMode
                break
                case  RUN_COOL
                        ldm   #1Ah,settempval
                        [settempvaldis] = 1ah
                        jsr   Fun_CoolMode
                break
                case  RUN_DRY
                        ldm   #18h,settempval
                        [settempvaldis] = 18h
                        jsr   Fun_DryMode
                break
                case  RUN_HEAT
                        ldm   #14h,settempval
                        [settempvaldis] = 14h
                        jsr   Fun_HeatMode
                break
                default
                break
         ends
AutoActionend:
         rts
;***************************** Action Timer ******************************
Comp_timer:
        ;if  [b_sencerErrorHUAN1] == 1
             ;if [sencererrorsechuan] <= 30
                ;[sencererrorsechuan] = [sencererrorsechuan] + 1
            ; else
               ; seb   b_sencerErrorHUAN
                ;[sencererrorsechuan] = 0
             ;endif
       ; endif
        ;if  [b_sencerErrorGUAN1] == 1
             ;if [sencererrorsecguan] <= 30
                ;[sencererrorsecguan] = [sencererrorsecguan] + 1
             ;else
                ;seb   b_sencerErrorGUAN
                ;[sencererrorsecguan] = 0
             ;endif
        ;endif
        if  [Comp] == 1
                ldm    #00h,CompStopMinute
                ldm    #00h,CompStopSecond
                if [CompRunSecond] < 0F0h
                        [CompRunSecond] = [CompRunSecond] + [ADDSECOND]
                endif
                ;if  [CompRunSecond] == 1
                        ;[M_RoomTemp1] = [M_RoomTemp]             ;20050721
                ;endif

        else
                ldm    #00h,CompRunSecond
                ldm    #00h,CompOnminute
                if [CompStopSecond] < 0F0h
                        [CompStopSecond] = [CompStopSecond] + [ADDSECOND]
                endif
        endif

        if [Heat] == 0
                if[heatoffsecond] < 0F0h
                        [heatoffsecond] = [heatoffsecond] + [ADDSECOND]
                endif
        else
                ldm    #00h,heatoffsecond
        endif
        if [run_mode] == RUN_HEAT || [m_AutoMode] == RUN_HEAT
                if  [Comp] == 1
                        if [m_PVCLowTemp] <= 10 && [M_PipeTemp] <= [TPipepot50]
                                INC     m_PVCLowTemp
                        endif
                endif
        endif
        rts


RoomFan_time:
        ;if [M_RoomFan] == 0
                if  [mRoomActSec] <= 215
                        INC    mRoomActSec
                endif
        ;endif
   if [run_mode] == RUN_HEAT || [m_AutoMode] == RUN_HEAT                    ;20050109
        if  [Comp] == 1 && [Ltemp5D_flag] == 1 && [min3_flag] == 0
         ;if  [Comp] == 1 && [min3_flag] == 0                     ; 20050109
             if  [nofan3min] <= 120;181       20041218
                [nofan3min] = [nofan3min] + 1
             else
                 [min3_flag] = 1
                 [nofan3min] = 00h
             endif
        endif
        if     [Lfanrun5] == 0 && [Lfanrun] == 1
              if  [Lfanrunmin1] <= 1
                    if    [Lfanrunmin] <= 29;90;150      20041218
                          [Lfanrunmin] = [Lfanrunmin] + 1
                    else
                          [Lfanrunmin] = 00h
                          [Lfanrunmin1] = [Lfanrunmin1] + 1
                    endif
              else
                    [Lfanrun5] = 1
                    [Lfanrunmin1] = 0
              endif
        endif
   else                                                    ;;20050109
             [nofan3min] = 00h
             [min3_flag] = 0
             [Lfanrunmin] = 00h
             [Lfanrunmin1] = 00h
             [Lfanrun5] = 0
   endif



        if [run_mode] == RUN_AUTO
                if [m_AutoADtime] < 0f0h
                        inc    m_AutoADtime
                endif
                if   [m_AutoADtime] >= [m_Autofastdel]
                       ldm      #00H,m_AutoADtime
                       SEB      Autodel_flag
                endif
        endif
        if  [b_sencerErrorHUAN] == 0 && [b_sencerErrorGUAN] == 0       ;20050915
             if  [sensor_reback] <= 3
                  [sensor_reback] = [sensor_reback] + 1
             endif
        endif
        [m_FanAction] = [port0] & RoomFAN_Enable
        if [m_FanAction]  !=0       ; port0 2000,5,18
                if [RoomOnsecond] < 0F0h
                        [RoomOnsecond] = [RoomOnsecond] + [ADDSECOND]
                endif
        else
                LDM     #00h,RoomOnsecond
        endif
        RTS


Fun_sleep:
        if [ir1_sleep] == 1
                if  [sleepMinute] < 60
                  [sleeptemp] = [settempval]
                  [sleepm_ir1fantem] = [m_ir1fantem]
                 endif
                inc     sleepsecond
                ;clb     ir1_fan0       ;20050709   20050803
                ;seb     ir1_fan1       ;20050709
                if  [sleepsecond] >= 60
                        [sleepsecond] = 00H
                        if [sleepMinute] <=0F0h
                                inc     sleepMinute
                        endif
                        if  [sleepMinute] == 60 || [sleepMinute] == 120
                                if  [run_mode] == RUN_COOL ||  [run_mode] == RUN_DRY
                                        if [settempval] < 30
                                                INC     settempval
                                                INC     m_ir1fantem    ; 2002/10/23

                                        endif
                                endif
                                if  [run_mode] == RUN_HEAT
                                        if [settempval] >= 17
                                                DEC     settempval
                                                DEC     m_ir1fantem
                                        endif
                                endif
                        endif
                endif
        endif
        RTS
;------------------------ACTION Time ----------------------------
FUN_ActTimer:
				jsr Fun_Lowtimer				;add zht 20070115
				jsr Fun_LowvaAct				;add zht 20070115
        if      [m_del3ssave] < 80
                inc     m_del3ssave
        endif
        if [m_del3ssave] >= 10
                JSR     Fun_Actorder
                if [b_remamber] == 1
                        [b_remamber] = 0
                        [bzifread]=0
                        [e2enwrite]=1
                endif
        endif
        if [Comp_Iflag] == 1 && [M_OCSecond] < 0f0h
                inc     M_OCSecond
        endif
        if [Fast_test] == 0
                if    [m_fasttest] <= 10h
                        inc   m_fasttest
                endif
                if   [m_fasttest] >= 10
                        LDM     #02H,SECONDUP    ; 0cH   2000.8.19 v5.3   3/ 60
                        LDM     #01H,M_20MSUP    ;0/5
                        LDM     #1EH,ADDSECOND                          ;  10/1

                        [m_Coolsave]=01h
                        [m_Autofastdel] = 05H
                        [m_CoolMin]=03h
                endif
        else
                [m_fasttest] = 00H
                [m_Autofastdel] = 1EH
                LDM     #3CH,SECONDUP
                LDM     #05H,M_20MSUP
                LDM     #01H,ADDSECOND

                if [b_firstdry] == 0
                        [m_CoolMin]=06h
                        [m_Coolsave]=0b4h
                ELSE
                        [m_CoolMin]=03h            ;04.5.11
                        [m_Coolsave]=0afh
               ENDIF
        endif
        inc     msecond
        if [msecond] >= [M_20MSUP]
                if    [setsecond] <= 10
                   inc     setsecond
                endif
                ldm     #00h,msecond

                jsr    Systemtimer


                jsr     Round_Utimer
                jsr     Comp_timer
                jsr   	FUN_Defrosttimer
        endif


        RTS
Round_Utimer:                 ;200510117
        if [Round_Utimem] < 11
           if [ir1Round_U] == 1
              if  [Round_Utimes] < 60
                   [Round_Utimes] = [Round_Utimes] + 1
              else
                   [Round_Utimes] = 0
                   [Round_Utimem] = [Round_Utimem] + 1
              endif
           else
               [Round_Utimes] = 0
               [Round_Utimem] = 0
           endif
         endif
   rts

Systemtimer:
        if [Comp] == 1
		ldm	#00h,CompStopSec
		ldm	#00H,CompStopMinute
		inc 	CompOnSec
		if [CompOnSec] >= [SECONDUP]	;----> 1 minute get
			ldm	#00h,CompOnSec
			if [CompOnminute] < 120
				inc	CompOnminute
			endif
			if [run_mode] == RUN_HEAT || [m_AutoMode] == RUN_HEAT
				if [Comp] == 1 && [Four_valve] == 1
					if [M_CompSumMin] < 200
						inc	M_CompSumMin
					endif

				endif
			endif
		endif
	   else
		ldm	#00h,CompOnSec
		ldm	#00H,CompOnminute
		inc	CompStopSec
		if [CompStopSec] >= [SECONDUP]	; ----> 1 minute get
			ldm	#00h,CompStopSec
			if [CompStopMinute] < 250
				inc	CompStopMinute
			endif
		endif
	   endif
	        inc     m_dispCount
		inc	m_LEDflashCount
                if [m_dispCount] >= 20
                        [m_dispCount] = 00H
                endif
                if [m_LEDflashCount] >= 10
                       [m_LEDflashCount] = 00H
                endif
                JSR     Fun_sleep
                jsr     RoomFan_time

                if [run_mode] == RUN_HEAT || [m_AutoMode] == RUN_HEAT
                        if  [M_PipeTemp] >= [TPipepot56]
                                if [Htemp] < 20
                                        inc   Htemp
                                endif
                         else
                                 LDM     #00h,Htemp
                         endif
                else
                        LDM     #00h,Htemp
                endif
                if [run_mode] == RUN_COOL || [m_AutoMode] == RUN_COOL
                     if [Comp] == 0
                          if   [savepowertime] <=60H 
                              inc  savepowertime
                          endif
                     else 
                          LDM     #00h,savepowertime
                     endif
                endif
                if  [M_PipeTemp] <= [TPipepot0]
                    if [coolTemp] < 0f0h && [CompOnminute] >= [m_CoolMin]
                        inc     coolTemp
                    endif
                else
                    [coolTemp] = 0
                endif
                ;if [trun_mode]==1 && [modetime] <= 179h
                if  [modetime] <= 179         ;20050113
                        [modetime] = [modetime] + [ADDSECOND]
                endif
	   rts

⌨️ 快捷键说明

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