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
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
Previous article:82C55 Traffic Light Control Program
Next article:P1.0 Turning Light Program
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- Laboratory monitoring system based on Arduino and Gizwits
- EEWORLD University ---- Industrial Control PLC Series Courses
- [RISC-V MCU CH32V103 Review] ---Advanced Wiki---Brief Analysis of USB Disk Enumeration Code
- The Story of Fourier Transform
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board] Unboxing + lighting
- parallel computing
- Have you ever experienced an unmanned supermarket using RF technology?
- IC open drain output pin Hiz
- NODEMCU-32-S2 development board similar to ESP32-S2-Saola-1
- Scrapy crawler proxy connected to Selenium