Industrial Automation Lab Manual
EXPERIMENT NO : 1
ADDITION
Aim:
Write a program to add two hexadecimal numbers stored in memory location 4200H and 4201H and store the final result in memory location 4300H.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | INC DPTR | |
4107 | MOVX A,@DPTR | |
4108 | ADD A,B | |
410A | MOV DPTR,#4300 | |
410D | MOVX @DPTR,A | |
410E | SJMP 410E |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4200 | 05 |
4201 | 03 |
OUTPUT
Location | Data |
4300 | 08 |
EXPERIMENT NO : 2
SUBSTRACTION
AIM:
Write a program to subtract two hexadecimal numbers stored in memory location 4300H and 4301H and store the final result in memory location 4400H.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4300 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | INC DPTR | |
4107 | MOVX A,@DPTR | |
4108 | SUBB A,B | |
410A | MOV DPTR,#4400 | |
410D | MOVX @DPTR,A | |
410E | SJMP 410E |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4300 | 06 |
4301 | 09 |
OUTPUT
Location | Data |
4400 | 03 |
EXPERIMENT NO : 3
DIVISION
AIM:
Write a program to divide a hexadecimal numbers stored in memory location 4200H by the value stored at memory location 4201H and store the final result in memory location 4300H.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4201 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | MOV DPTR,#4200 | |
4109 | MOVX A,@DPTR | |
410A | DIV AB | |
410B | MOV DPTR,#4300 | |
410E | MOVX @DPTR,A | |
410F | INC DPTR | |
4110 | MOV A,B | |
4112 | MOVX @DPTR,A | |
4113 | SJMP 4113 |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4200 | 08 |
4201 | 02 |
OUTPUT
Location | Data |
4300 | 04 |
4301 | 02 |
EXPERIMENT NO : 4
MULTIPLICATION
AIM:
Write a program to multiply two hexadecimal numbers stored at memory location 4300H and 4301H and stored at memory location 4300H onwards.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4300 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | INC DPTR | |
4107 | MOVX A,@DPTR | |
4108 | MUL AB | |
4109 | MOV DPTR,#4400 | |
410C | MOVX @DPTR,A | |
410D | INC DPTR | |
410E | MOV A,B | |
4110 | MOVX @DPTR,A | |
4111 | SJMP 4113 |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4300 | 04 |
4301 | 02 |
OUTPUT
Location | Data |
4400 | 08 |
4401 | 00 |
EXPERIMENT NO : 5
BLOCK TRANSFER OF DATA
AIM:
Write a program to transfer a block of data available in memory location starting from 4300H on wards to memory location 4400H Onwards.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4300 | |
4103 | MOVX A,@DPTR | |
4104 | MOV Ro,A | |
4105 | MOV DPTR,#4300 | |
4108 | loop 1 | MOVX A,@DPTR |
4109 | INC 83H | |
410B | MOVX @DPTR,A | |
410C | DEC 83H | |
410E | INC 82H | |
4110 | DJNZ Ro,loop1 | |
4112 | SJMP 4112 |
RESULT:
The given program is executed and output is verified.
COUNT
INPUT
Location | Data |
4300 | 05 |
4301 | 04 |
4302 | 03 |
4303 | 02 |
4304 | 01 |
OUTPUT
Location | Data |
4400 | 05 |
4401 | 04 |
4402 | 03 |
4403 | 02 |
4404 | 01 |
EXPERIMENT NO : 6
LARGEST AMONG TWO NUMBERS
AIM:
Write a program to find out the largest among the two numbers stored at the memory location 4200H and 4201H.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | INC DPTR | |
4107 | MOVX A,@DPTR | |
4108 | CJNE A,0F0,loop1 | |
410B | loop 1 | JC loop2 |
410D | loop 3 | INC DPTR |
410E | MOVX @DPTR,A | |
411F | SJMP 410F | |
4111 | loop 2 | MOV A,B |
411B | SJMPloop3 |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4200 | 09 |
4201 | 03 |
OUTPUT
Location | Data |
4202 | 09 |
EXPERIMENT NO : 7
LARGEST NUMBERS IN AN ARRAY
AIM:
Write a program to find out the largest number in an array.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV Ro,A | |
4105 | DEC Ro | |
4106 | MOV DPTR,#4300 | |
4109 | MOVX A,@DPTR | |
410A | MOV B,A | |
410C | loop 3 | INC DPTR |
410D | MOVX A,@DPTR | |
411E | CJNE A,0F0,loop1 | |
4111 | loop 1 | JC loop2 |
4113 | MOV B,A | |
4115 | loop 2 | DJNZ Ro,loop3 |
4117 | MOV A,B | |
4119 | MOV DPTR,#4400 | |
411C | MOVX @DPTR,A | |
411D | SJMP 411D |
RESULT:
The given program is executed and output is verified.
COUNT
Location | Data |
4200 | 05 |
INPUT
Location | Data |
4300 | 06 |
4301 | 07 |
4302 | 08 |
4303 | 09 |
4304 | 0A |
OUTPUT
Location | Data |
4400 | 0A |
EXPERIMENT NO : 8
SPLITTING OF A HEXADECIMAL NUMBER
AIM:
Write a program to read a hexadecimal number from the location 4200H and split the number into two separate digit and store the higher order digit in memory location 4300H and store the lower order digit in memory location 4301H.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV B,A | |
4106 | SWAP A | |
4107 | ANL A,#0F | |
4109 | MOV DPTR,#4300 | |
410C | MOVX @DPTR,A | |
410D | MOV A,B | |
410F | ANL A,#0F | |
4111 | INC DPTR | |
4112 | MOVX @DPTR,A | |
4113 | SJMP 4113 |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4200 | BC |
OUTPUT
Location | Data |
4300 | 0B |
4301 | 0C |
EXPERIMENT NO : 9
SORTING
AIM:
Write a program to sort the given number in a series in ascending order.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV Ro,A | |
4105 | MOV R1,A | |
4106 | loop 5 | MOV DPTR,#4300 |
4109 | MOV A,Ro | |
410A | MOV R2,A | |
410B | loop 4 | MOVX A,@DPTR |
410C | MOV B,A | |
411E | INC DPTR | |
410F | MOVX A,@DPTR | |
4110 | CJNE A,0F0,loop1 | |
4113 | loop 1 | DJNZ R2,loop2 |
4115 | SJMP loop6 | |
4117 | loop 2 | JC loop3 |
4119 | SJMP loop4 | |
411B | loop 3 | DEC 82H |
411D | MOVX @DPTR,A | |
411E | INC DPTR | |
411F | MOV A,B | |
41121 | MOVX @DPTR,A | |
4122 | SJMP loop4 | |
4124 | loop 3 | DJNZ Ro,loop5 |
4126 | SJMP 4126 |
RESULT:
The given program is executed and output is verified.
COUNT
Location | Data |
4200 | 05 |
INPUT
Location | Data |
4300 | 09 |
4301 | 05 |
4302 | 0A |
4303 | 0F |
4304 | 03 |
OUTPUT
Location | Data |
4300 | 03 |
4301 | 05 |
4302 | 09 |
4303 | 0A |
4304 | 0F |
EXPERIMENT NO : 10
HEXADECIMAL CONVERSION
AIM:
Write a program to convert a hexadecimal number to its corresponding ASCII Code.
Address | Label | Mnemonic |
4100 | MOV DPTR,#4200 | |
4103 | MOVX A,@DPTR | |
4104 | MOV Ro,A | |
4105 | ANL A,#0F | |
4107 | ACALL Loop1 | |
4109 | INC 83H | |
410B | MOVX @DPTR,A | |
410C | MOV A,Ro | |
410D | SWAP A | |
411E | ANL A,#0F | |
4110 | ACALL Loop1 | |
4112 | INC 82H | |
4114 | MOVX @DPTR,A | |
4115 | SJMP 4115 | |
4117 | loop 1 | CJNE A,#00A,loop2 |
411A | loop 2 | JNC loop3 |
411C | ADD A,#30H | |
411E | RET | |
411F | loop 3 | ADD A,#07 |
4121 | ADD A,#30H | |
4123 | RET |
RESULT:
The given program is executed and output is verified.
INPUT
Location | Data |
4200 | 1A |
OUTPUT
Location | Data |
4300 | 41 |
4301 | 31 |
EXPERIMENT NO : 11
SIMPLE TRAFFIC LIGHT SYSTEM
Aim
To study the simple traffic light system by using PLC.
APPARATUS REQUIRED:
- Vpat – 03 Trainer kit
- PLC Trainer kit
- PATCH chords
- RS 232 Cables
- PC
- PLC Programming software
PROCEDURE:
- First program the ladder logic for simple traffic light with required protection sequence..
- Connect the personal computer and PLC by RS 232 Communication cable.
- Clear the PLC content using clear command.
- Download the ladder logic program from PC to PLC..
- Make proper connection to PLC and simple traffic kit.
- By selecting the ring mode the PLC is ready for action
- Output of the PLC is given to simple traffic light system, to rung in DAY or NIGHT mock and then switch is selected.
RESULT:
A simple traffic light system using PLC have been designed and
EXPERIMENT NO : 12
CONVEYOR CONTROLLER SYSTEM
Aim
- To operate a stepper motor conveyor using logic PLC.
- Interfacing a proximatting sensor to the conveyor operation.
APPARATUS REQUIRED:
- LOGO PLC
- Conveyor trainer kit.
- Stepper motror, conveyors bult
- Proximatty sensor
PROCEDURE:
- First program the ladder logic for simple traffic light with required protection sequence..
- Connect the personal computer and PLC by ether net Communication cable.
- Clear the PLC content using clear command.
- Download the ladder logic program from PC to PLC..
- Make proper connection to PLC and simple conveyor control.
- By selecting the ring mode the PLC is ready for action.
- Output of the PLC is given to simple conveyor trainer kit with proximity sensor.
RESULT:
A stepper motor conveyor using PLC have been designed and operated.
Recent Comments