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.

AddressLabelMnemonic
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

LocationData
420005
420103

 OUTPUT

LocationData
430008

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.

AddressLabelMnemonic
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

LocationData
430006
430109

 OUTPUT

LocationData
440003

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.

AddressLabelMnemonic
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

LocationData
420008
420102

 OUTPUT

LocationData
430004
430102

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.

AddressLabelMnemonic
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

LocationData
430004
430102

 OUTPUT

LocationData
440008
440100

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.

AddressLabelMnemonic
4100 MOV DPTR,#4300
4103 MOVX  A,@DPTR
4104 MOV  Ro,A
4105 MOV  DPTR,#4300
4108  loop 1MOVX  A,@DPTR
4109 INC  83H
410BMOVX  @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

LocationData
430005
430104
430203
430302
430401

OUTPUT

LocationData
440005
440104
440203
440302
440401

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.

AddressLabelMnemonic
4100 MOV DPTR,#4200
4103 MOVX  A,@DPTR
4104 MOV  B,A
4106 INC   DPTR
4107 MOVX  A,@DPTR
4108 CJNE  A,0F0,loop1
410Bloop 1JC   loop2
410Dloop 3INC   DPTR
410E MOVX  @DPTR,A
411F SJMP  410F
4111loop 2MOV  A,B
411B SJMPloop3

RESULT:

         The given program is executed and output is verified.

INPUT

LocationData
420009
420103

OUTPUT

LocationData
420209

EXPERIMENT NO : 7

LARGEST NUMBERS IN AN ARRAY

AIM:           

         Write a program to find out the largest number in an array.

AddressLabelMnemonic
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
410Cloop 3INC   DPTR
410D MOVX  A,@DPTR
411E CJNE  A,0F0,loop1
4111loop 1JC   loop2
4113 MOV  B,A
4115loop 2DJNZ  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

LocationData
420005

INPUT

LocationData
430006
430107
430208
430309
43040A

OUTPUT

LocationData
44000A

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.

AddressLabelMnemonic
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

LocationData
4200BC

OUTPUT

LocationData
43000B
43010C

EXPERIMENT NO : 9

SORTING

AIM:           

         Write a program to sort the given number in a series in ascending order.

AddressLabelMnemonic
4100 MOV DPTR,#4200
4103 MOVX  A,@DPTR
4104 MOV  Ro,A
4105 MOV  R1,A
4106loop 5MOV DPTR,#4300
4109 MOV  A,Ro
410A MOV  R2,A
410Bloop 4MOVX  A,@DPTR
410C MOV  B,A
411E INC   DPTR
410FMOVX  A,@DPTR
4110 CJNE  A,0F0,loop1
4113loop 1DJNZ  R2,loop2
4115 SJMP  loop6
4117loop 2JC    loop3
4119 SJMP  loop4
411Bloop 3DEC  82H
411D MOVX  @DPTR,A
411E INC   DPTR
411F MOV  A,B
41121 MOVX  @DPTR,A
4122 SJMP  loop4
4124loop 3DJNZ  Ro,loop5
4126 SJMP  4126

 RESULT:

         The given program is executed and output is verified.

COUNT

LocationData
420005

INPUT

LocationData
430009
430105
43020A
43030F
430403

OUTPUT

LocationData
430003
430105
430209
43030A
43040F

EXPERIMENT NO : 10

HEXADECIMAL CONVERSION

AIM:           

         Write a program to convert a hexadecimal number to its corresponding ASCII Code.

AddressLabelMnemonic
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
4117loop 1CJNE  A,#00A,loop2
411Aloop 2JNC   loop3
411C ADD   A,#30H
411E RET
411Floop 3ADD   A,#07
4121 ADD   A,#30H
4123 RET

 RESULT:

         The given program is executed and output is verified.

INPUT

LocationData
42001A

OUTPUT

LocationData
430041
430131

EXPERIMENT NO : 11

SIMPLE TRAFFIC LIGHT SYSTEM

Aim

         To study the simple traffic light system by using PLC.

APPARATUS REQUIRED:

  1. Vpat  – 03 Trainer kit
  2. PLC Trainer kit
  3. PATCH chords
  4. RS 232 Cables
  5. PC
  6. PLC Programming software

PROCEDURE:

  1. First program the ladder logic for simple traffic light with required protection sequence..
  2. Connect the personal computer and PLC by RS 232 Communication cable.
  3. Clear the PLC content using clear command.
  4. Download the ladder logic program from PC to PLC..
  5. Make proper connection to PLC and simple traffic kit.
  6. By selecting the ring mode the PLC is ready for action
  7. 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

  1. To operate a stepper motor conveyor using logic PLC.
  2. Interfacing a proximatting sensor to the conveyor operation.

APPARATUS REQUIRED:

  1. LOGO PLC
  2. Conveyor trainer kit.
  3. Stepper motror, conveyors bult
  4. Proximatty sensor               

PROCEDURE:

  1. First program the ladder logic for simple traffic light with required protection sequence..
  2. Connect the personal computer and PLC by ether net Communication cable.
  3. Clear the PLC content using clear command.
  4. Download the ladder logic program from PC to PLC..
  5. Make proper connection to PLC and simple conveyor control.
  6. By selecting the ring mode the PLC is ready for action.
  7. 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.

You may also like...

error: Content is protected !!