8031 Industrial Sequential Control Program

Publisher:清晨微风Latest update time:2018-03-10 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    8031 Industrial Sequential Control Program In industrial control, production processes such as stamping, injection molding, textiles, and bottle making are all continuous production processes that regularly complete predetermined actions in a certain order. The control of this type of continuous production process is called sequential control. For example, the process of the injection molding machine roughly follows the sequence of "mold closing, injection, delay, mold opening, production, stretching, and withdrawal", which is most easily achieved using a single-chip microcomputer
  
. P1.0~P1.6 of 8031 ​​controls the seven processes of the injection molding machine. Now it simulates and controls the lighting of seven light-emitting diodes. The low level is valid. Set the time of each process to be converted into a delay. P3.4 is the start-up switch, which acts at a high level. P3.3 is an external fault input analog switch with a low-level alarm. P1.7 is an alarm sound output. Set 6 processes to have only one output and the seventh process to have three outputs.
  
Program flow chart



001003

program

 

ORG 0190H

0190  75907F    PO10:    MOV  P1,#7FH

0193    43B000    ORL  P3,#00H

0196 30B4FD PO11: JNB P3.4,PO11; Are you ready to start work?

0199    43A884    ORL  IE,#84H

019C    43B801    ORL  IP,#01H 

019F 75D000 MOV PSW,#00H ; Initialization

01A2    758153    MOV  SP,#53H

01A5 75907E PO12: MOV P1,#7EH ;First process

01A8 31F1 ACALL PO1B

01AA 75907D MOV P1,#7DH ; Second process

01AD  31F1    ACALL  PO1B

01AF 75907B MOV P1,#7BH ;The third process

01B2    31F1    ACALL  PO1B

01B4 759077 MOV P1,#77H ; The fourth process

01B7    31F1      ACALL  PO1B

01B9 75906F MOV P1,#6FH ; The fifth process

01BC    31F1      ACALL  PO1B

01BE 75905F MOV P1,#5FH ;Sixth process

01C1  31F1    ACALL  PO1B

01C3 75900F MOV P1,#0FH ; The seventh process

01C6 31A5 ACALL PO12

01C8 80DB SJMP PO12

01CA 8AF0 PO16:MOV B,R2; protect the scene

01 CC     75907F PO17:MOV P1,#7FH ; turn off output

01CF 7520A0 MOV 20H,#0A0H ; Oscillation times

01D2 D297 PO18:SETB P1.7; oscillation

01D4 31EC ACALL PO1A; Delay

01D6 C297 CLR P1.7; Stop vibration

01D8 31EC ACALL PO1A; Delay

01DA D520F5 DJNZ 20H,PO18; not 0 turn

01DD    C297      CLR    P1.7

01DF 31EC ACALL PO1A; Stop vibration

01E1 30B3E8 JNB P3.3,PO17; Is the fault eliminated?

01E4 AAF0 MOV R2,B; restore the scene

01E6 32 RETI

01E7  7A10  PO19:MOV    R2,#10H

01E9 5113 ACALL DELY; Delay 1

01EB 22 COURT

01EC    7A06    PO1A:MOV    R2,#06H

01EE 5113 ACALL DELY; Delay 2

01F0 22 RIGHT

01F1  7A30  P01B:MOV    R2,#30H

01F3 5113 ACALL DELY; Delay 3

01F5 22 RIGHT

            ORG 0213H

0213 C002 DELY:PUSH 02H

0215    C002      DEL2:PUSH  02H

0217    C002      DEL3:PUSH  02H

0219 DAFE DEL4:DJNZ R2,DEL4

021B    D002        POP    02H

021D DAF8 DJNZ R2,DEL3

021F    D002        POP    02H

0221 DAF2 DJNZ R2,DEL2

0223    D002        POP    02H

0225 DAEC DJNZ R2,DELY

0227 22 COURT

END


Reference address:8031 Industrial Sequential Control Program

Previous article:82C55 Traffic Light Control Program
Next article:P1.0 Turning Light Program

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号