KULLIYYAH OF ENGINEERING

DEPARTMENT OF MECHATRONICS ENGINEERING

SEMESTER I 2011/2012 Laboratory Manual

MECHATRONICS ENGINEERING LAB III (MCT 4159)
(DSD-MicroprocessorsRobotics)

Mechatronics Engineering Lab III Manual

Rev 1.0 04/08/11

LABORATORY EXPERIMENTS All experiments except the laboratory project do not require a final laboratory report. Data Sheet (1) Original data sheet. This original data sheet should approved by instructor(s) during experiment day. If it is a printed from a system then the original print needs to be approved and signed by the instructor, else please use the format contain in Appendix B for data sheet. Make sure the data sheets are approved and signed BEFORE the end of the laboratory session, marks will be deducted if the data sheets is not approved and signed prior to end of the laboratory session. (2) Calibration curves of instruments which were used in the performance of the experiment. Include manufacturer of the instrument, model and serial numbers. Calibration curves will usually be supplied by the instructor. (3) Bibliography listing all references used. PROJECT REPORTS: AN OVERVIEW All experiments except the laboratory project do not require a final laboratory report. The reports MUST BE TYPED and COMPUTER PRINTED and in the following specification: Font Type: Times New Roman Font Size: 12 Any graphs need to be plotted using excel. Please make sure you use scatter graph when appropriate and add trend lines to those graph. Identify the R2 value for the graph to see the best fit line when using as such, discuss on the R 2 value during your discussion as well. You are only suppose to use a line graph, when you encounter adding a trend line to the scatter graph as deemed inappropriate for the discussion that you are suppose to make. The suitability of the graph used will be considered in marking as well. Plagiarism is a major offence. Please adhere to university’s policy for plagiarism. Any student found to commit an offence of plagiarism will be dealt with accordingly.

Page 2 of 63

Mechatronics Engineering Lab III Manual

Rev 1.0 04/08/11

Please refer to APA basic format in the LMS for citing and referencing guides. GUIDELINES FOR FINAL REPORT WRITING The report should be written in such a way that anyone can duplicate the project and find the same results as the originator. The reports should be simple and clearly written. The report should communicate several ideas to the reader. 1. The report should be neatly done. A poorly written report might instead lead the reader to think that just as little care went into performing the experiment. 2. The report should be well organized. The reader should be able to easily follow each step discussed in the text. 3. The report should contain accurate results. This will require checking and rechecking the calculations until accuracy can be guaranteed. 4. The report should be free of spelling and grammatical errors. 5. The report should show your analysis of results in your discussion, with all the relevant sample calculation. The analysis could be in the form of summary tables, graphs or other appropriate measure to show your good analysis of the results. Title page Specify the project title. Include names of all group members, matric numbers, group number, date of submission. At top of this page must bear the subtitle: "Final Laboratory Project Report". Refer to Appendix A for the example of this title page. Table of Contents List each major section and subsection and their page numbers. Objectives The objectives are a clear concise statement explaining the purpose of the project. The objectives serve as a guide to the results. This is one of the most important parts of the laboratory report because everything included in the report must somehow relate to the stated objectives. The objectives can be as short as one sentence and it is usually written in the past tense. Do not exceed one page. Abstract/Introduction Summarize the important results. The abstract must be selfcontained: do not refer to figures and tables located in other sections of the report. Do not include tables, figures, and equations, unless absolutely necessary. Do not assume that the reader will unambiguously identify undefined symbols. Be precise and succinct.

Page 3 of 63

• Data points are identified with a symbol: “o” on the Q ac line to denote data points obtained by theoretical. Procedure The procedure section should contain a schematic drawing of the experimental setup including all equipment used in a parts list with manufacturer serial numbers.g. • Nothing is drawn freehand.Mechatronics Engineering Lab III Manual Rev 1. head drop. If it cannot be duplicated. An acceptable graph has several features. the experiment shows nothing. • Axis labels defined with symbols and units. Results Include all tables and graphs that document your final results. if any. Include only final results that satisfy the objectives of the experiment.0 04/08/11 Do not exceed one page. Δh. • Data points are identified with a symbol: “x” on the Q ac line to denote data points obtained by experiment. Include all relevant information so that you can later refer to these figures in the discussion section to support your conclusions. (No scanning or drawing using pen and pencil) Assembly Codes / Screen Capture Page 4 of 63 . Show the function of each part when necessary for clarity. • Should have number and title. Fig. one of the methods to represent the results is graph. E1. The graph sometimes summarized the results. Do not discuss the significance of the results. • Each line is identified using a legend. Title is descriptive. The Abstract should be written with great care because it is a most important part of the Final Report and will have a very large impact on the grade assigned to the work. Some of the important features are as following. If possible. Each figure and table must have a unique number and a title or caption. e. Outline exactly step-by-step how the project was performed as there is someone desires to duplicate it. Q vs. rather than something like Q vs Δh All graphs must be generated using a computer.1 Volumetric flow rate. lengthier tables and intermediate figures should be included in the Appendix. present the results in the same order that you listed the objectives. Introduce the reader to each figure and table with a brief paragraph indicating what variables are plotted or tabulated. Graphs In engineering laboratory reports.

LED. Discussion and Conclusion Discussion and conclusion should be separate. This section should give an interpretation of the results explaining how the object of the project was accomplished. Take the difference between the empirical and theoretical results and divide by the theoretical result. Sample Calculations If any of the experiment requires that you come out with a calculation to get to the end results. Also recommend any changes necessary to better accomplish the objectives. an appropriate screen/camera capture showing your results would be necessary to show the output of your experiments. Please prints out a full table calculation using excel as part of your sample calculations. Multiplying by 100% gives the % error.0 04/08/11 Some parts of the project may require you to come out with a program to run certain features such as input from keyboard. Use the available theory to explain why the relevant variables behaved in the observed fashion. running a motor. All excel softcopies data MUST be submitted. LCD etc. calculate % error and account for the sources. All these laboratory session requires a certain coding from your side. Discuss this project with respect to its faults as well as its strong points. Page 5 of 63 . THE USE OF SUMMARY TABLES AND VARIOUS CHARTS AND PLOTS WILL HELP TO MAKE YOU YOUR DISCUSSION AND FINALLY CONCLUSION MUCH CLEARER TO THE AUDIENCE. but one method is introduced here for consistency. If any analytical expression is to be verified. IMPORTANT: IN DISCUSSION YOU MUST DISCUSS AND ANALYSE YOUR RESULTS. These calculations are samples only and must be annotated. (% error – An analysis expressing how favorably the empirical data approximate theoretical information. Suggest extensions of the project and improvements. you are required to supply your source codes in the report. If the coding is required from you before/during/after the project. You are required to give one example of each calculation that leads to a result reported in the document. The rest of the calculation should be done using excel. Introduce each calculation with a brief paragraph indicating to the reader which specific point in a figure or entry in a table is being calculated. AND LINK TO THEORY AS APPROPRIATE. output to display. The discussion questions act as a guide only for you to do your discussion. At the same time. There are many ways to find % error. You may compose your own error analysis as long as your method is clearly defined). not as part of a question and answer scheme.Mechatronics Engineering Lab III Manual Rev 1. Include one calculation for each figure or table reported in the Results section.

EACH group member will need to sign in what is their contribution to the reports and tick (“/”) that they have READ. The certificate of originality and authenticity MUST only be sign when reports have been completed. UNDERSTAND AND AGREE that it is shall be submitted for marking. If there is a proof that the report is being done only by an individual within the group. the marks for the reports will only be given to the sole individuals who does the reports.Mechatronics Engineering Lab III Manual Rev 1. The full certificate of originality and authenticity could be seen in Appendix C. REFERENCE: COMPULSARY READING MATERIAL FOR LAB 68000 Microprocessor Trainer User Manual 68000 Microprocessor Application Board Workbook / Lab Experiment Page 6 of 63 . All reports need to include the certification of originality and authenticity to be accepted. This certificate will act as a proof that the report have been done by all the group members and not only by an individual of the group.0 04/08/11 The marking scheme for the reports is as follows: Format 2 marks Procedure 4 marks Discussion 15 marks Graphs / Summary Table 10 marks Summary table – Calculation 5 marks Calculation Sample 10 marks Conclusion 2 marks Grammar 2 marks Total 50 marks CERTIFICATION OF ORIGINALITY AND AUTHENTICITY. understood and agreed upon by all members of the groups.

0 04/08/11 Page 7 of 63 .Mechatronics Engineering Lab III Manual Rev 1.

0 04/08/11 DSD EXPERIMENT 1: -INTRODUCTION TO BASIC LOGIC GATES- Page 8 of 63 .Mechatronics Engineering Lab III Manual Rev 1.

Components needed:  74LS08. Why is this? EXPLAIN! From the datasheet of the 74LS00: a. Operation of basic gates. OR. 74LS86. a. II. NAND. C. Define tPHL and tPLH. (D-B). Prepare truth tables for each of this experiment's logic diagrams. b. 74LS00. c. 3. 1. 2. 74LS02. A. Why must this be a positive number? Explain what a “noise margin” is and why it is important. The concept of a universal gate. B. e. Create a table that shows the TYPICAL delay values for t PHL and tPLH for each gate. Prelab You must have this information when you ENTER THE LAB. 74LS02. b.0 04/08/11 Digital System Design Experiment No. Locate the datasheets for the following parts: 74LS32. Procedure Page 9 of 63 . Compute the difference (C – A). d. NOR and Exclusive OR logic gates. What is the minimum input voltage for a logic ‘1’? What is the minimum input voltage for a logic ‘0’? What is the minimum output voltage for a logic ‘1’? What is the minimum output voltage for a logic ‘0’?.Mechatronics Engineering Lab III Manual Rev 1. 74LS08. You will learn about:    Electrical characteristics of logic circuits. 74LS32. 74LS86. Use the TTL Logic Data Book to locate the following information. 1: Introduction to Basic Logic Gates. I. There are more delay values for the 74LS86 than there are for the other gate types. Objective This experiment will introduce AND. Label each of the logic diagrams with pin assignments using the TTL Data Book. 74LS00.

2. 3. a b 1 2 7408 3 z a b 1 2 7400 3 z a b 1 2 7432 3 z Figure 1 AND a b 3 7402 1 Figure 2 NAND z a b 1 2 7486 3 Figure 3 OR z Figure 4 NOR Figure 5 XOR B. 1. Connect the circuit in Figure 7 and verify that it operates as an inverter. These two gates are the NAND and the NOR. Connect the circuit in Figure 6 and verify that it operates as an inverter. Assemble each of the circuits in Figure 9 through Figure 11 and determine the equivalent gate represented by each circuit. Verify that each circuit operates as expected. Compare your results with those in your truth tables. Connect the circuit in Figure 8 and verify that it operates as an OR gate. x Figure 6 y x z Figure 7 y a b Figure 8 z 4.0 04/08/11 A. a b Figure 9 a z b Figure 10 b Figure 11 a z z Page 10 of 63 . A universal gate is a logic gate that can be used to create all the basic logical functions. Assemble the circuits in Figure 1 through Figure 5.Mechatronics Engineering Lab III Manual Rev 1.

Notice that the output appears to always be a logic `1' regardless of the input setting. A 2-input AND gate 2. A 2-input XOR gate Part 2: NAND Circuit Page 11 of 63 . 1. x Figure 19 z 2. Adjust the CH2 vertical scale in order to clearly see the `glitch' caused by propagation delay. a b c d Figure 14 z a b z c d Figure 15 D. connect a circuit that produces the following: 1. Assemble the circuits in Figure 12 and Figure 13 and show that the (AND/OR) form is equivalent to the (NAND/NAND) form. This delay is known as propagation delay and it must be taken into account in many circuit designs. this may not be realizable due to limitations on fan-in (maximum number of inputs a gate may have). A 2-input NOR gate 4. All combinational logic functions can be represented in sum-of-products (AND/OR) form and product-of-sums (OR/AND) form. Monitor the input to the circuit on CH1 of the scope and monitor the output of the circuit on CH2. E. 1. In practice. a b z c d Figure 12 c d Figure 13 a b z 2. It should also be noted that AND/OR and OR/AND forms can be converted to forms that use only the universal gates. A 2-input OR gate 3. Assemble the circuits in Figure 14 and Figure 15 and show that the (OR/AND) form is equivalent to the (NOR/NOR) form. Connect the circuit in Figure 19. Record all waveforms.0 04/08/11 C. Design Problem Part 1: Universal NAND Gate Using a single 7400 IC. Connect the 1 Mhz digital clock output on the test box to the input of the circuit.Mechatronics Engineering Lab III Manual Rev 1. This implies that all functions can be implemented in two levels of logic provided that at each level gates have enough inputs. In logic circuits it is not always obvious that there is a time delay between the time an input changes and the time the output changes.

Mechatronics Engineering Lab III Manual Is it possible to design the following equation? F = AB’ + C’D using a single 7400 IC? Rev 1. Discussion should be based on the results that you have obtained from the experiments. 2. Accurate drawings of the waveforms. At the same time. Results and Discussion Results of the experiment shall be noted down in the students’ report. Explain those results. Explain why a logic `1' can be used as one input to a NAND gate in order to use the gate as an inverter. students are to demo to the demonstrator that they have completed the experiment. Page 12 of 63 . III. 1.0 04/08/11 Implement the equation using a minimum number of 7400 IC’s and consider alternatives to the suggested IC. Below are some of the questions that supposed to be discussed in your discussion and analysis.

Combinational Logic Circuit and Basic ALU- Page 13 of 63 .Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 DSD EXPERIMENT 2: .

For the circuit in part 2. Download and print out all the datasheets which will be used in this experiment. Objective This experiment will help you get familiar with Combinational circuit design using logic gates. Prelab You must have this information when you ENTER THE LAB. I. 74LS86. 1. Part 1: Basic combinational circuit . 74LS00. Figure 2 Page 14 of 63 .3 input 1 output logic circuit. Figure 1. design the circuit using only basic logic gates (AND. You will learn about: • Building a combinational circuit using several logic gates • Commonly used combinational circuits • Basic of ALU .Mechatronics Engineering Lab III Manual Rev 1. 74LS32. Prepare truth tables for all the combinational logic circuits shown below (Part 1 and 2) and derive their expression.0 04/08/11 Digital System Design Experiment No.4-to-1 multiplexer. 74LS02. OR and NOT). 2.Adder and Subtractor Components needed:  74LS08. 2: Combinational Logic Circuit and Basic ALU. Multiplexer .

Verify that each circuit operates as expected.2 to 4 decoder Figure 3 Part 2: Design Problem Design an Adder-Subtractor circuit as shown below: Figure 4 .Adder-subtractor combination: (a) operation table. (c) circuit (using XOR). Compare your results with those in your truth tables.0 04/08/11 *A sum-of-products implementation of the 4-to-1 multiplexer appears in figure above. It realizes the multiplexer function: Decoder . Page 15 of 63 . and 2. (d) logic symbol II. (b) truth table for yi and c0.Mechatronics Engineering Lab III Manual Rev 1. Procedure Assemble all the circuits in Part 1.

students are to demo to the demonstrator that they have completed the experiment.Mechatronics Engineering Lab III Manual Rev 1. Discussion should be based on the results that you have obtained from the experiments. Results and Discussion Results of the experiment shall be noted down in the students’ report. At the same time.0 04/08/11 III. Page 16 of 63 .

Flip Flop and Sequential Logic Circuit- Page 17 of 63 .0 04/08/11 DSD EXPERIMENT 3: .Mechatronics Engineering Lab III Manual Rev 1.

Figure 1 2) Using the 74LS74 dual D flip flop. Prelab You must have this information when you ENTER THE LAB.Mechatronics Engineering Lab III Manual Rev 1. 2. Solve all the design problems in Part 2. 3: Flip Flop and Sequential Logic Circuit. Download and print out all the datasheets which will be used in this experiment. Then use clock pulse as an input at E. 1-74LS00 TTL IC 1-74LS74 TTL IC 1-74LS76 TTL IC I.0 04/08/11 Digital System Design Experiment No. Page 18 of 63 . Prepare truth tables for and familiarize yourself with all the circuits shown below (Part 1 and 2). Components needed: 1. Draw a complete truth table for the circuit. investigate the operation of the D flip-flop in Figure 2. Pay attention to the change in state of the device as the clock signal is rising or falling. Use pulse switch as your clock source. variable resistance and capacitors. Explain how the circuit behaves. Draw the complete truth table for the circuit. Part 1: 1) Construct the clocked RS flip flop of Figure 1.555 IC. 1. Objective -To become familiar with the input/output characteristics of several types of standard flip-flop devices and the conversion among them.

9. Page 19 of 63 . 12. the counter must transfer the circuit to one of the defined states to continue the output in the aforementioned sequence. determine its logical operation. undefined) states.0 04/08/11 Figure 2 3) Using the 74LS76 dual JK flip flop. implement and verify a counter that displays the following sequence of numbers: 0.Mechatronics Engineering Lab III Manual Rev 1. Draw the complete truth table for the circuit. Figure 3 Part 2: Design Problem 1) Designing a Counter Using JK flip-flops and any other applicable gates design. The circuit diagram is shown in Figure 3. and the next-state / implementation table of a car security system are as shown in Figure 4 below. that is if the circuit starts from any of the unused (i. The counter must be self-starting. 14 and back to 0 to repeat the sequence. Finally construct the logic circuit and test the output to verify the answer experimentally. explain how the car security works. Use the 74LS47 (BCD to seven segment display decoder) to drive the display.e. Pay attention to the change in state of the device as the clock signal is rising or falling. From the state diagram. 6. 2) Designing a Car Security System The State diagram. 3. In the design you must include a function bit controlling whether you are counting up or down. Please complete the task by using K-map and identify the excitation equation. Note that there will be memory states that are not used.

Mechatronics Engineering Lab III Manual Rev 1. III. Discussion should be based on the results that you have obtained from the experiments. Verify that each circuit operates as expected. At the same time.0 04/08/11 Figure 4 II. Procedure Assemble all the circuits in Part 1 and 2. students are to demo to the demonstrator that they have completed the experiment. Compare your experimental results with the PreLab. Page 20 of 63 . Results and Discussion Results of the experiment shall be noted down in the students’ report.

INPUT SWTICHES AND OUTPUT LEDS- (WARNING NOTICE: PLEASE MAKE SURE YOU HAVE READ THE 68000 MICROPROCESSOR TRAINERS MANUAL AND THE APPLICATION BOARD MANUAL BEFORE STARTING THE EXPERIMENT. THE MANUAL IS AVAILABLE IN THE DIGITAL/MICROPROCESSOR LAB.Mechatronics Engineering Lab III Manual Rev 1.) Page 21 of 63 .0 04/08/11 MICROPROCESSOR EXPERIMENT 4: -INTRODUCTION TO MC68230 PI/T.

In this experiment. in the Digital 1.2 OBJECTIVES The objectives of the experiment are: 1. which is to read input data from 8-bit DIP Switch (SW1) and Output the results to 8 LEDs (L1 – L8) 4. To introduce students to the world of microprocessor and its interfacing 2. Please make sure as well you have read the 68000 Microprocessor Trainer Manual Model: GOTT-MP-68K and Page 1 to 15 of Application Board Manual EXP-AP Model: GOTT-MP68K-APPS These manuals are available Systems/Microprocessor Labs. 1. In order to control the environment various input and output devices such as switch. INPUT SWITCHES AND OUTPUT LEDS 1.2 BACKGROUND PI/T is one of the fundamentals understanding required in microprocessor M68000 as this is the basic communication between requirement between M68000 and the external peripherals. cylinders and solenoids are being used. To demonstrate basic i/o operation and applications.0 04/08/11 EXPERIMENT # 4 1.1 PRE-REQUISITE READING Please make sure you have completed a MCT3235 as a prerequisite or read on your own on the M68000 interfacing from the recommended book in MCT3235. 1. INTRODUCTION TO MC68230 PI/T 2. 2 basic input output are use to simulate an actual sensor/actuators which are DIP switch and LEDS. actuators. To introduce students on how to program an assembler and transfer the program into the microprocessor and memory.Mechatronics Engineering Lab III Manual Rev 1. 3. sensors.4 EQUIPMENT: Personal Computer Main Trainer Board Serial connector (Between Main Trainer Board and PC) Page 22 of 63 .

Make sure that you have read Part 3 (Getting Started) of 68000 Microprocessor Trainer manual. Open Easy68K assembly. Download the machines codes to the M68000.0 04/08/11 Application Board 1. $100007 #$00. 2.B MOVE. $10000F #$FF.B MOVE. FOR PART C: Change the above program to configure Port A as output and Port B as output PROCEDURES (2) 1. If you have any question in getting started please make sure you ask the demonstrator/instructor NOW.B END $080C00 #$80. The same assembler should help you to ensure consistency in your programming. Open to page 12-13 for testing communication link. since the same assembler is being used for your assignment given in module MCT3235 (Microprocessor Based Design). BEGIN ORG MOVE. FOR PART A: Type in the following instruction into your assembler. 8. 3. FOR PART B: Change the above program to configure Port A as output and Port B as input. Make sure that you have read Part 3 (Getting Started) of 68000 Microprocessor Trainer manual.5 PROCEDURE (1): 1.Mechatronics Engineering Lab III Manual Rev 1. $100013 BEGIN Configure port Configure port Configure port Configure port clear all o/p A A B B ctrl dir input ctrl dir output 5. Please read page 14 – 16 of the Part 3 (Getting Started) Section on how you are to download the machine codes. Check that your communication between Main Trainer board and PC is now available. 4. 2. If you have any question in getting started please make sure you ask the demonstrator/instructor NOW. 9. Page 23 of 63 . You are supposed to be familiar with the assembly already by now. Check that your communication between Main Trainer board and PC is now available.B MOVE. 7. $100005 #$80. Open to page 12-13 for testing communication link. Compile the following codes 6. $10000D #$00.B MOVE.

FOR PART D: BASIC INPUT AND OUTPUT Type in the following instruction into your assembler. $100007 #$00. 10. 7.Mechatronics Engineering Lab III Manual Rev 1. $10000D #$00. d0 d0.B MOVE. Download the machines codes to the M68000. FOR PART F: RUNNING LIGHTS Modify the codes in PART D. FOR PART E: INVERTED INPUT / OUTPUT Modify the codes in Part D to invert the input data.B MOVE. Compile the following codes 6. Open Easy68K assembly. and if the switch is set to low then the LED will be on. $100005 #$80.B MOVE. 11.B MOVE. since the same assembler is being used for your assignment given in module MCT3235 (Microprocessor Based Design). then the LED will be off. You are supposed to be familiar with the assembly already by now. 4. The same assembler should help you to ensure consistency in your programming. BEGIN ORG MOVE. Adjust on the setting for the 8 bit DIP switch and monitor the change pattern on the 8 LEDs. Refer to Part 2 (Setting Up) on Application Board Manual for the module selector list. 8.0 04/08/11 3. Please read page 14 – 16 of the Part 3 (Getting Started) Section on how you are to download the machine codes. For example if the switch as set to high. 9. (running light)  For example: After switch is on the LED will be LED1 LED2 LED3 LED4 LED5 LED6 LED7 LED8 1 0 0 0 0 0 0 0 next 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 Page 24 of 63 . Please confirm that you have set the JUMPER for the I/O Module Selector According to this experiment. Execute the program.B BRA END $080C00 #$80. $10000F #$FF. to do the following:  the LED light will move from left to right as below when a left switch is on.B MOVE. $100013 READ BEGIN Configure port A Configure port A Configure port B Configure port B clear all o/p Read dip switch output to LEDs ctrl dir input ctrl dir output READ 5. $100013 $100011.B MOVE.

1. to do the following:  Having the light to move a bit slower. to do the following:  Include delays when the running light moves from left to right. 13. Ensure that you have enough delays and correct sequence for the traffic light.Mechatronics Engineering Lab III Manual Rev 1. students are to demo to the demonstrator that they have completed the experiment. At the same time.5 RESULTS: Results of the experiment shall be given in assembly codes for the report. FOR PART I: TRAFFIC LIGHT SIMULATION Modifying the codes in PART D-H. 12. No accident can occur in your intersection. CODES CODES CODES CODES CODES CODES CODES CODES CODES PART PART PART PART PART PART PART PART PART A B C D E F G H I Page 25 of 63 . design a traffic light sequence experiment. FOR PART H: RUNNING LIGHTS WITH DELAY AND SKIP Modify the codes in PART G. FOR PART G: RUNNING LIGHTS WITH DELAY Modify the codes in PART F.0 04/08/11 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 And repeat from left to right until switch is off. not skip each LED as follows: LED1 LED2 LED3 LED4 LED5 LED6 LED7 LED8 1 0 0 0 0 0 0 0 next 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 14.

1.6 DISCUSSION: Discussion should be based on the results that you have obtained from the experiments.0 04/08/11 Please get signature from the instructor/demonstrator that you have complete both lab part.  Identify what you have done line by line  Explain what is happening to the codes Page 26 of 63 . below are some of the questions that supposed to be discussed in your discussion and analysis.Mechatronics Engineering Lab III Manual Rev 1.

0 04/08/11 MICROPROCESSOR EXPERIMENT 5: -7 SEGMENTS DISPLAY- Page 27 of 63 .Mechatronics Engineering Lab III Manual Rev 1.

B MOVE. 2.B $080C00 #$80. Check that your communication between Main Trainer board and PC is now available.B MOVE. Open Easy68K assembly.4 PROCEDURE: 1. To demonstrate the flexibility and HMI interactive feature within the microprocessors. Open to page 12-13 for testing communication link. 2.0 04/08/11 EXPERIMENT # 5 7-SEGMENTS DISPLAY 1. You are supposed to be familiar with the assembly already by now. $100005 #$80. A Human-Machine-Interface (HMI) is also vital in ensuring that programs done are base on real scenario and human interactions.2 OBJECTIVES The objectives of the experiment are: 1. $100007 Configure Configure Configure Configure port port port port A A B B ctrl dir input ctrl dir output Page 28 of 63 . FOR PART A: ONE DIGIT DECIMAL COUNTER Type in the following instruction into your assembler. since the same assembler is being used for your assignment given in module MCT3235 (Microprocessor Based Design). Make sure that you have read Part 3 (Getting Started) of 68000 Microprocessor Trainer manual. 1.3 EQUIPMENT: Personal Computer Main Trainer Board Serial connector (Between Main Trainer Board and PC) Application Board 1.B MOVE. $10000F #$FF.Mechatronics Engineering Lab III Manual Rev 1.1 BACKGROUND One of the important aspects in microprocessor is its flexibility in change data based on the requirement of the end user. 4. 3. 1. BEGIN ORG MOVE. $10000D #$00. To demonstrate microprocessor controller 7-segment display interface. The same assembler should help you to ensure consistency in your programming. If you have any question in getting started please make sure you ask the demonstrator/instructor NOW.

12.d5 REPEAT #$03ff.d1 d1. Refer to Part 2 (Setting Up) on Application Board Manual for the module selector list.$100011 d0.Mechatronics Engineering Lab III Manual Rev 1.L BNE RTS MOVE.L BNE RTS END #$FF. Please read page 14 – 16 of the Part 3 (Getting Started) Section on how you are to download the machine codes. Compile the following codes 6. 9.d5 #$fe. 13.L MOVE. 7.0 04/08/11 MOVE. Please confirm that you have set the JUMPER for the I/O Module Selector According to this experiment.d1 DDD #$01.L CMPI BEQ ADDI MOVE.d0 EEE #$01ff. FOR PART E: LAST 4 DIGIT MATRIC NUMBER Page 29 of 63 . 11. FOR PART B: DECIMAL COUNTER FROM 00-99 Modify the codes in Part A to form a decimal counter from 00-99. Download the machines codes to the M68000.d6 #1.$100013 DELAY #$1.B DDD EEE CLR BSR MOVE. d6 DEL1 BEGIN Clear 1st digit 7-seg Branch to display sub Copy content Compare max value Increment counter Copy content Store as temp counter Activate LSB digit Display d0 to port B Decrement counter Loop if d5<>0 DISPLAY REPEAT DELAY DEL1 5. FOR PART D: DECIMAL COUNTER FROM 0000-9999 Modify the codes in Part A to form a decimal counter from 00-99.B BSR SUBQ. FOR PART C: DECIMAL COUNTER FROM 000-999 Modify the codes in Part A to form a decimal counter from 00-99. Observed what happent o the 7-Segment Display 10. $100011 d0 DISPLAY d0.L BRA MOVE. Execute the program. 8.L SUBQ.d1 #$09.B MOVE.

Put a 5 second delay by having a counter to show on the 7-Segment 0-5 iii.  Identify what you have done line by line  Explain what is happening to the codes Page 30 of 63 . below are some of the questions that supposed to be discussed in your discussion and analysis.5 RESULTS: Results of the experiment shall be given in assembly codes for the report. 14. 1. Put a 10 second delay by having a counter to show on the 7-segment 0-10 v. FOR PART F: ROTATING LAST 4 DIGIT MATRIC NUMBER WITH 5/10 SECOND COUNTER. Display the last 4 digit of your matric number ii. 1. Continue steps 1 until all your team members last 4 digit numbers are displayed.  Modify the codes in part D above and do the following: i. CODES CODES CODES CODES CODES CODES PART PART PART PART PART PART A B C D E F Please get signature from the instructor/demonstrator that you have complete both lab part. Display the last 4 digit of your next friends matric number iv. At the same time.6 DISCUSSION: Discussion should be based on the results that you have obtained from the experiments.0 04/08/11 Modify the codes in Part D to form a decimal display of your last 4 digit matric number.Mechatronics Engineering Lab III Manual Rev 1. students are to demo to the demonstrator that they have completed the experiment.

0 04/08/11 MICROPROCESSOR EXPERIMENT 6: -MOTOR CONTROL- Page 31 of 63 .Mechatronics Engineering Lab III Manual Rev 1.

2 OBJECTIVES The objectives of the experiment are: 1. Make sure that you have read Part 3 (Getting Started) of 68000 Microprocessor Trainer manual. since the same assembler is being used for your assignment given in module MCT3235 (Microprocessor Based Design). A DC motor operation is controlled by simply turning it on or off. 2. 1.Mechatronics Engineering Lab III Manual Rev 1.1 BACKGROUND There are many types of application that microprocessor have been used both in the industry as well as service sectors. To demonstrate HMI control in microprocessor. whereby it will either stop or run. Open Easy68K assembly. The motor moves forward (clockwise) when the bit pattern if 01 (bit 0 = 1. Among others were motors to control movement of certain parameters within the environment. You are supposed to be familiar with the assembly already by now. The same assembler should help you to ensure consistency in your programming. bit 1 = 1).3 EQUIPMENT: Personal Computer Main Trainer Board Serial connector (Between Main Trainer Board and PC) Application Board 1. If you have any question in getting started please make sure you ask the demonstrator/instructor NOW. The motor moves Page 32 of 63 . The motor stops when both bits are 11 or 00. Open to page 12-13 for testing communication link. 3. 2. 3. This experiment will help to demonstrate the use of microprocessors and its interfacing with a motor. To demonstrate microprocessor interfacing and control of a stepper motor.0 04/08/11 EXPERIMENT # 6 MOTOR CONTROL 1.4 PROCEDURE: 1. FOR PART A: DC motor controlled MOTOR CONTROL 1. To demonstrate microprocessor interfacing and control of a DC motor. 1. Check that your communication between Main Trainer board and PC is now available. The DC motor is controlled by bits 0 & 1 of port B.

FOR PART B: FWD.B BSR BSR BRA MOVE. then reverse.Mechatronics Engineering Lab III Manual Rev 1. 9. Output the result to PC screen.B MOVE. $100007 #$01. d6 #1. Please read page 14 – 16 of the Part 3 (Getting Started) Section on how you are to download the machine codes. Compile the following codes 5.L SUBQ.B MOVE. Please confirm that you have set the JUMPER for the I/O Module Selector According to this experiment.B BSR MOVE. $100013 DELAY DELAY ON #551800. to develop a counting program to count the number of motor rotation using the pair of infra-red sensor (detector and transmitter) located on the board. $100005 #$80. $10000F #$FF. REV & STOP FOR A WHILE Modify the codes in Part A to drive the motor forward. 6. Download the machines codes to the M68000.B MOVE. Refer to Part 2 (Setting Up) on Application Board Manual for the module selector list. d6 DEL1 BEGIN Configure Configure Configure Configure Forward Delay Stop Reverse Repeat Delay counter port port port port A A B B ctrl dir input ctrl dir output ON DELAY DEL1 4.B MOVE. and then motor stop for a short period 10. 8.L BNE RTS END $080C00 #$80. BEGIN ORG MOVE. $100013 DELAY DELAY #$00.0 04/08/11 in reverse direction (anti clockwise) when the bit pattern is 10 (bit 0 = 0 and bit 1 = 1) 2. Type in the following instruction into your assembler. Execute the program. $100013 DELAY #$02. 7. Observed what happen on the motor movement.B BSR BSR MOVE. FOR PART C: COUNTING PROGRAM Modify the codes in Part A. Page 33 of 63 . $10000D #$00.

5 RESULTS: Results of the experiment shall be given in assembly codes for the report. Please confirm that you have set the JUMPER for the I/O Module Selector According to this experiment. Observed what happen on the motor movement. 6. Type in the following instruction into your assembler. Refer to Part 2 (Setting Up) on Application Board Manual for the module selector list. Download the machines codes to the M68000. d6 DEL1 BEGIN Configure Configure Configure Configure port port port port A A B B ctrl dir input ctrl dir output S_ON Motor in CW Dir Delay Single Step CW Dir Repeat Delay counter DELAY DEL1 2. $100007 #$10. 5. $100013 DELAY S_ON #551800.B MOVE.B BSR MOVE. At the same time. BEGIN ORG MOVE. $10000D #$00. Execute the program.B MOVE. Compile the following codes 3. FOR PART F: CW and CCW Modify the codes in Part D. and drive the stepper motor step in full circle on clockwise (CW) and then step in full circle to counter clockwise direction (CCW).Mechatronics Engineering Lab III Manual Rev 1.B MOVE. $10000F #$FF. 7.0 04/08/11 FOR PART D: DRIVING A STEPPER MOTOR 1. d6 #1. 4. Page 34 of 63 . Please read page 14 – 16 of the Part 3 (Getting Started) Section on how you are to download the machine codes.L BNE RTS END $080C00 #$80. Repeat the cycle 20 times and increase the delay in every cycle. and single step the stepper motor to counter clockwise (CCW) 8.B MOVE.L SUBQ. students are to demo to the demonstrator that they have completed the experiment. $100005 #$80. FOR PART E: CCW Modify the codes in Part D.B BSR BRA MOVE. $100013 DELAY #$40. 1.

below are some of the questions that supposed to be discussed in your discussion and analysis.6 DISCUSSION: Discussion should be based on the results that you have obtained from the experiments.  Identify what you have done line by line  Explain what is happening to the codes Page 35 of 63 .0 04/08/11 CODES CODES CODES CODES CODES CODES PART PART PART PART PART PART A B C D E F Please get signature from the instructor/demonstrator that you have complete both lab part.Mechatronics Engineering Lab III Manual Rev 1. 1.

Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 ROBOTICS EXPERIMENT 7: -UNDERSTANDING MANUAL AND AUTOMATIC OPERATIONS OF INDUSTRIAL ROBOTS- Page 36 of 63 .

there are nine robots equipped for this course. To manually operate YASKAWA MOTOMAN Robot for certain task teaching pendant. there are three types of operation modes available: a) Joint Mode: used to specify movement of each individual joint of the robots b) X-Y Mode: the joint of the robot moves simultaneously as to create a motion along the 3 major axis X. The operation was done in different modes which are. c) Tool Mode: is which specifying movement of the robot’s hand relative to a frame attached to the hand PROCEDURE The "Manual Operation" and "Valve Operation" was used to transfer three balls from left to right with DENSO Robot. Y and Z-axis. Page 37 of 63 .Mechatronics Engineering Lab III Manual Rev 1. Students have to practice the movement of various robot based on different modes. The modes available are Joint mode and X-Y mode. In the robotics lab. To manually operate DENSO Robot for certain task using teaching pendant. Then. To manually operate FANUC Robot for certain task using teaching pendant. the differences in movement are noted in the data sheet. INTRODUCTION Manual operation refers to direct operation of the robot from operating panel or teaching pendent. Joint Mode and X-Y Mode.0 04/08/11 EXPERIMENT #7 UNDESTANDING MANUAL AND AUTOMATIC OPERATIONS OF INDUSTRIAL ROBOTS OBJECTIVES • • • • To be familiar with the robot component. In manual operation mode.

In this experiment. Before proceeding with the lab task. They are Cartesian. SCARA robots are very common assembly operations.1: Components of robots Upon switching ‘ON’ the controller. Articulated and SCARA. Then.Mechatronics Engineering Lab III Manual Rev 1. This is to prevent inaccuracy in the input coordinate given before operating the robot. plus an additional prismatic joint that moves vertically. and thus have selective compliance. Another configuration available is the articulated configuration. To switch ‘ON’ the machine.0 04/08/11 Figure 7. the calibration is normally done before using the robot just after the switch of the robot is turned on. we need to switch ‘ON’ the machine. Calibration is needed in order to reformat the position to default positioning. Articulated robot's joints are all able to revolute. Page 38 of 63 . we are focusing on SCARA configuration. They are most common configuration used for industrial robots. Spherical. similar to a human's arm. we have to follow steps as mentioned in figure 2 below. the robot moves to all axes in small amount to confirm their current positions. After the motor was switched ‘ON’. Cylindrical. Their specific characteristic is that they are more compliant in the x-y-plane. press the ‘CAL’ button and then ‘START’ button for calibration. but are very stiff along the z-axis. SCARA robot has two revolute joints that are parallel and allows the robot to move in a horizontal plane. There are five different robot configurations in general.

0 04/08/11 Figure 7.1: Differences between Joint mode and X-Y mode OPERATION OF FANUC ROBOT OBJECTIVES • • • To familiarize different kind of teaching pendant due to different robot given a set manual for the students to read. the differences are as stated in the table 1 below. While. (OJT). Interference are impossible Table 7. (The main reasons here are to identify similarity/differences between DENSO and Fanuc) Page 39 of 63 . To manually operate Fanuc robot for certain task in Joint or X-Y mode using teaching pendant and to get familiarize with the robot components. To move the robot end effectors/gripper from one end in manual mode. in industry this is also called On Job Training.2: Sequence to operate machine Two modes are available for manual operation in the machine. Joint Mode The movement is constrained to each joint in a single operation The motion is not linear (circular or curve) Interference between two axis will cause damage to the motor X-Y Mode The movement is simultaneously for all joints in single operation The motion is always on a straight line.Mechatronics Engineering Lab III Manual Rev 1.

36 J6 = -0. 2.161 J3 = 176.239 J2 = -3.682 J5 = 1. and then in Rectangular.322 J2 = -2. RESULTS Coordinates Identified From Different Positions:Current Position J1 = -57.607 J3 = 0. We searched from the "Fanuc Manual" in appendix C on how to identify the coordinate of the current position that we are in. robot mechanical unit.3 J4 = 178. The "Manual Operation" is used to move the robot gripper/welder and effectors from right to left.682 J5 = 1.Mechatronics Engineering Lab III Manual Rev 1.360 J6 = -0.973 Figure 7.082 J5 = 1. and hand (tool). The position is then written down.3 : Robot System The handling robot (basic stand-alone system) usually consists of a robot control unit. The robot was moved again in about L and inverted L shape and the coordinate of the new position is noted.973 Inverted L Shape J1 = -55.974 DISCUSSION & CONCLUSION L Shape J1 = -55.202 J4 = 178. Page 40 of 63 .791 J4 = 178.523 J3 = 93. and then left to right.36 J6 = -0.0 04/08/11 PROCEDURE 1.239 J2 = -2. First in Joint Axis.

calibration is done by machine by moving its entire axis in small amount to confirm their current positions. Fanuc robot also needs calibration every time it starts operating.Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 Figure 7. This unit starts the robot control unit by calling a program. This unit moves the robot arm according to a move statement. Page 41 of 63 . The hand picks up and places objects as commanded. As we know. Moves the torch to a specified position according to a move statement. Executes the called program.4 : The Configuration of the Handling Robot System Each part performs different functions as follows:Parts Remote Control Unit Robot Control Unit Robot Mechanical Unit Hand Functions Controls the line. The Fanuc robot used is of Articulated type of configuration coordinate frame because all the joints revolute without any prismatic motion. This unit opens or closes the hand according to a hand statement. It is performed right after turning ON the controller before using the robot.

5 : Robot Workspaces Upon operating the Fanuc Robot. 2. Set the robot speed. 1. Page 42 of 63 . the sequences of key operations are as follows:Operation Power-on Procedure Tasks 1. Create a program on the program directory screen. Select a jog mode (which is X-Y Mode). The robot stops jogging when either the SHIFT key or jog key is released. Teaching Move Statements 2.Mechatronics Engineering Lab III Manual Rev 1. Jogging 2. Turn on the circuit breaker of the control unit. The joint axis mode directs the robot axes (joint axes) by manipulating corresponding keys on the teach pendant. Hold the teach pendant. then press the ENTER key. Teach a program on the program edit screen. Select a target program. or press the select key to display the program directory screen. Press a jog key while holding down the SHIFT key.0 04/08/11 Figure 7. Select EDIT from the screen menu or press the EDIT key to display the program edit screen. 2. Set the teach pendant enable switch ON. Start the robot by Jogging. 2. Press the COORD key to Setting the Jog Mode and Robot Speed switch the jog mode. The lamp on the power-on button goes on. and press the deadman's switch. Press the power-on button on the operator's panel. While the rectangular mode moves the robot rectilinearly along the axes of a Cartesian coordinate system. we have also seen both Joint-axis and Rectangular mode for Fanuc. 3. Press F1 "POINT" to display the standard move statement list in a submenu. then press the enter key. In this experiment. 1. 4. Select a move statement with the arrow keys. Set an appropriate cursor speed override sing the override keys. The motions of both configurations are of similar to the Denso robot. 1. 1. Select "SELECT" Selecting a Program from the screen menu. Jog the robot to a position to be recorded.

the safety joints breaks and the robot stops. a safety joint between the robot joints forming a tool so that if an abnormal external force is applied to the robot. Before operating. While for the system design. For installation and layout's safety precautions.4 : Different Jogging Modes for Fanuc Robot Safety configurations are installed for the Fanuc robot during the manual mode session. signals such as warning lamps are used to indicate that the robot is in operation. One should also place a partner as a guard to observe the situation and act quick in case on any accident occurs. Safety fence installed with a safety door which will stop the robot when it is opened by a worker coming in.0 04/08/11 Figure 5. Page 43 of 63 . the robot should be checked first whether or not it is working properly and no dangerous conditions are present. A lock is also installed so that only authorized workers can turn on the power. Emergency button is also installed in places that allow the operator to press it immediately.Mechatronics Engineering Lab III Manual Rev 1. etc from happening while operating the robot. The most important safety precautions to be observed are during the operation. All Fanuc robot system users should be trained to acquire sufficient knowledge especially on the safety precautions and robot functions. This is in order to prevent unwanted cases such as injury.

Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 ROBOTICS EXPERIMENT 8: -OFF-LINE AND ON-LINE PROGRAMMING OF INDUSTRIAL ROBOT- Page 44 of 63 .

To edit a pre-created program in DENSO To change the end effectors movement coordinates and operations speeds Edit the written program with off-line programming using computer. an online programming is used to program the robot using the unoperational and operational command to move the ball from location A to B: FOR PICK AND PLACE ROBOT Page 45 of 63 .Mechatronics Engineering Lab III Manual Rev 1. It’s possible to create a maximum of 100 programs and name them PROGRAM 1 to 100. OBJECTIVES • • • • To operate the DENSO robot for certain task with on-line programming using teaching pendant. There are two types of programming to operate DENSO robot: a) Online programming : Using teach pendent b) Offline programming : Using WINCAPS software PROCEDURE As shown in the figure. INTRODUCTION Programming aims to express the operation procedure with language (command). A program is defined as a chain of flow between beginning of operation and the end of operation.0 04/08/11 EXPERIMENT #8 OFF-LINE AND ON-LINE PROGRAMMING OF INDUSTRIAL ROBOT. Program is created through teaching pendent and it is saved in robot controller.

Mechatronics Engineering Lab III Manual Rev 1. Any subroutine in the controller memory location 1 and 2 is deleted if there is any.0 04/08/11 Figure 2. Manual mode is set. The teaching pendant is then used to start the motors. Page 46 of 63 .1: Location of the ball FOR DRILLING ROBOT Figure 2. 2. The robot is calibrated. The robot controller is turned ON. The speed is set to 30% and the working mode is chosen (either Joint mode or X-Y mode).2: Location of the Drill Manual Mode 1.

6. or the available subroutine is used if any. The differences are noticed. The observation is written down in the data sheet. Auto Mode 3. 5.Mechatronics Engineering Lab III Manual 3. Subroutine 2 for chuck open (refer to supplementary manual). The un-operational and operational command is used to drive the desired motion (refer to supplementary manual) The mode is changed to TEACH CHECK mode and the movement of Program 1 is checked. The datum for the object to be pick and place are made sure to be the same for this observation. All three types of check is then checked. 7. 6. then in cycle mode. 4. A note of the differences between the two modes is made. BACK CHECK and CYCLE CHECK.0 04/08/11 Subroutine 1 is created for chuck close. The speed is set to 20% during this check. the desired speed is determined. The program which has been created: Program 1 is Re-Called. The Auto mode is set. the motor is started. SAMPLE PROGRAM Page 47 of 63 . the robot is calibrated and finally. those are FWD CHECK. The program is run first in step mode. 4. The main Program 1 is then created. Rev 1. Any program in the controller memory location 1 is deleted if there is any. The robot's speed is increased to a safe speed and the pick is repeated and placed for 20 times. 5.

Mechatronics Engineering Lab III Manual

Rev 1.0 04/08/11

The robot repeatability problem can be solved while programming by putting small amount on the internal speed and make the time for the robot motion become longer. The difference between the step and the cycle mode are explained in the diagram below.

VS

Page 48 of 63

Mechatronics Engineering Lab III Manual

Rev 1.0 04/08/11

EDITING THE PROGRAM
INTRODUCTION In a manufacturing environment, the manufacturing processing time or cycle time is very important. As such, the robots sequences operating in the production line can be easily modified to perform any new assigned process or optimization. This could be done by editing the existing program instead of rewriting the whole program. It is only possible to edit commands in a program, which has been already created. A program can not be edited while we are creating the program. After writing the “END” command and completing creating mode, we can edit any command such as inserting, deleting, copying and changing commands.

Page 49 of 63

Mechatronics Engineering Lab III Manual

Rev 1.0 04/08/11

Editing Operation: 1. Create a new program 2. Insert: Insert a command to create program [INSERT] 3. Deletion: Delete a command from created program [DEL] 4. Display: Display the command of created program [FWD, BACK] Display the current coordinate of robot [DISP] 5. Copying: Copying the program to another program [COPY] 6. Changing: Changing the numerical value of a command [CHG] Change the position of a motion command. PROCEDURE

7. 8. 9.

The created PROGRAM 1 (from Experiment 2) is selected by using manual mode. The step is displayed so that the previous command can be edited using forward or backward check. The given manual given manual is referred. The point B is changed to point C. The subroutine will not be included because it is a drilling robot. The needed position is set and the desired location is edited for drilling.

10. The speed is set to 1000rpm before drilling, and then reset to 500rpm. 11. After the command is changed, the movement is checked by using teach mode and auto mode. 12. The speed is set to 500rpm after moving to another location. 13. The entire program is copied into PROGRAM 2. The manual is referred on how this step could be achieved. 14. The programs 1 and 2 are edited so that it could run in loops. 15. 20 loops of both program 1 and 2 are run. The difference in timing is noted. All results are recorded in data sheet.

Page 50 of 63

a few things need to be considered under these circumstances. Because when the speed is higher.0 04/08/11 This experiment shows the significance of understanding on how to edit and change the program sequence upon different cases according to variety of situations. At the same time. we do not want to waste more money and time to change the machines when different parts are on the production line after a period of time. This is important because different type of product's design requires different type of motions for the machine to perform their operation. Besides. But still. Therefore. Below is the process flow of the edited program:ISP 100 : Set ISP to 100 APR E 50 : Move the chuck above the point A MV E 50 : Move to point A DEP P 50 : 50mm up The changed location MV P : Move from above point A to above point C APR E 50 : Move above the point C MV E : Move to the point C ISP 50 : Set ISP to 50 DEP E 50 : 50mm up ISP 100 : Set ISP to 100 END : End the program Changing the speed in term of cycle time will allow the process to avoid unnecessary time consumption and waste more money for the waste of time while we know that the quality is not affected due to the increase of speed. The positions of parts might not be precise at the point indicated inside the programming. it might lead to unwanted movement by the robots because of the extra momentum which is the result for the increase of speed.Mechatronics Engineering Lab III Manual RESULTS DISCUSSION & CONCLUSION Rev 1. it might lead to hazardous Page 51 of 63 . the program should always be flexible and easily edited in order to suite the variety of products and increase the efficiency of the process executed by the program.

Therefore. at different times. the experiment went well and we have basically achieved the main objectives.Mechatronics Engineering Lab III Manual Rev 1. This process of editing is very crucial in the industry. Those different parts require different type of motions path for them to be fastened or inserted to the right position. while performing assembly of parts. As a conclusion. We have understood on how to do editing on the programming as required and how does this application come in handy in the industry itself. the machine needs to be informed by editing the program with a slight different path command in order to handle the process effectively. Page 52 of 63 .0 04/08/11 situations if it get in contact with any human because of the extra speed differing to low safety risk when the speed is slower. in the manufacturing industry. For example.

Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 ROBOTICS EXPERIMENT 9: -DEVELOPING AN AUTOMATION SYSTEM AND TESTING THE SYSTEM- Page 53 of 63 .

but the close gripper sensor did not detect. This could be observed using a teach check mode and moving forward through the programs. The program should run in a loop when the sensor is not triggered. RESULTS Program 11 0010 LABL 7 0020 APR E 50 0030 JI 1-10 Page 54 of 63 . PROCEDURE 16. 18. typical cross check mechanism is created.0 04/08/11 EXPERIMENT #9 DEVELOPING AN AUTOMATION SYSTEM AND TESTING THE SYSTEM OBJECTIVES • To branch the program run order to optional step depending on the interfaced signal with the robot controller input slow using branch instruction JUMP. assuming that the gripper is closed. In next sequence. A program is created to move the parts as follows using online programming to program the robot so that the ball is moved from location A to B as shown in the figure below: 19. Each sensor is used to identify an individual condition of closed and open. Through the process that has been programmed earlier. The program is inserted/edited to include in such a way that the robot would in sequence: a) open the gripper b) check the open gripper status c) move up d) move down e) close the gripper f) check the close gripper status g) move the part to another position and so forth 21. 20. Include a JI / JZ command in the program to make sure that when a gripper is open. Checking the looping issues within the programs. The robot has been fixed with a sensor on its gripper. Upon identification of the ports for open or close.Mechatronics Engineering Lab III Manual Rev 1. The ports being used by the sensor are input port number 1 and input port number 2. the close gripper sensor status is checked before it is move to the next sequence. Short program identifies is used in order to detect whether port 1 or port 2 is for open or close condition. The gripper will be detected by the sensor whether it is in closed condition or in open condition. 17. an open gripper sensor status is checked before it is moved to the next sequence and when a gripper is closed. The codes are written in the data sheet.

When 2 sensors detect an object in the close range it will send the signal to the close sensor to open the gripper. because when the close sensor detects an object. and time complexity in terms of the speed of the robot's action decisions. That means close sensor cannot be used to detect other signal. one more sensor should be put to detect the place where to put the thing. It is observed that the robot in the lab has been equipped with optical proximity sensor. Without all these systems.0 04/08/11 This experiment shows the significance of JUMP command instruction while operating a robot. MANDATORY QUESTIONS 1. The sensor or input should be identified by the program because the robot will only operates when there are interactions between hardware and software. The proximity sensors are the input device used to ensure the availability of the pen. While the output accessories are the solenoids. photoelectric. it will close within the certain time according to programming. and find for changes in the field or the return signal. the close sensor will detect the thing that it is holding until the thing being released.is rather important to the system. There are 3 sensor going to be use to construct the line: a) Infrared Sensor – this sensor react to the intensity of light projected on them by changing their electrical resistance. for instance). the robot will automatically activated and pick up the pear which is place between the transmitter and receiver. The process is vice-verse.Mechatronics Engineering Lab III Manual 0040 SUB 5 0050 LABL 8 0060 MV E JI=5. space complexity in terms of the memory limitations of the robot's controller. Therefore. The port for this sensor is on the conveyor. or a beam of electromagnetic radiation (infrared. They are able to detect the presence of nearby objects without any physical contact. When the infrared sensor detects the pear on the conveyor. Input Voltage: 20 to 132 Vac. This robot can detect the existence of the part/product to-be-pick during pick and place programming when its receiver receives the signal from the transmitter. relays and indicator lamps.38 0070 SUB 10 0080 DEP E 50 0090 APR P 0100 MV E JI=19. Then. pressure. the robot cannot operate accurately. The two sensors -one for open and one for close. the inputs are from the switches. proximity. It can detect the presence of nearby objects without any physical contact. The receiver and transmitter are usually placed at the hand of the robot arm or at the end effectors.48 0110 SUB 5 0120 DEP E 50 0130 JMP 5 0140 END DISCUSSION & CONCLUSION Rev 1. For the robot system. A proximity sensor often emits an electromagnetic or electrostatic field. Page 55 of 63 .

it will be put into the YELLOW basket. Then the pear will be put into the reject basket meanwhile if the pear meets the hardness specification it will go to further inspection. This sensor will be put at the gripper of the robot.0 04/08/11 b) Tactile Sensor – This is a touch sensor device that sends a signal when physical contact has been made. the gripper will give a small pressure during picking process. c) Camera sensor – This sensor will detect the color of the pear. The sensor also being put nearer to the gripper. if the pear does not follow the specification hardness which has been set it will consider as old or spoil. If the color is green it will be put into the GREEN basket and if the pear is yellow in color. The sensor will detect the hardness of the pear. Page 56 of 63 .Mechatronics Engineering Lab III Manual Rev 1.

Rev 1.0 04/08/11 Start Cube on conveyor Y=0 Upper conveyor N=24 The point of chucking the cube Close chuck Acceptable? Tactile sensor Hardness test N=24 Reject Y=0 N=24 Differentiate Page 57 of 63 .Mechatronics Engineering Lab III Manual 2.

relays and indicator lamps. Types of signal from the PLC:  Input signals are typically generated by binary sensors. motors. They will collect information about the internal state of the robot or to communicate with outside environment. They will do the process that has been process in the robot system and follow the command from the input. valves.  Output signals are generated by the controller to operate the process in response to the input signals.0 04/08/11 5. and other binary actuators related to the process. Page 58 of 63 . such as limit switches or photo sensors that are interfaced with the process. c) Output of the robot is solenoids. The important of input and output in the robotic system are: a) Easy for human to communicate with the robot. Program 0010 LABL 10 End 0020 JZ 24-10 (wait for workpiece-infrared sensor) 0030 APR E50 (upper conveyor) 0040 MV E (moving to chucking point) 0050 SUB 1 (close chuck) 0060 JI 24-11 (Detect OK or NG signal-tactile sensor) 0070 MV E (moving to camera sensor ) 0080 JZ 24-12 (detect color yellow or green-camera sensor) 0090 MV E (moving to GREEN basket) 0100 SUB 21 (Discharging) 0110 JMP 13 0120 LABL 11 0130 MV E (moving to REJECT basket) 0140 SUB 20 (Discharging) 0150 JMP 13 0160 LABL 12 0170 MV E (moving to YELLOW basket) 0180 SUB 20 (Discharging) 0190 LABL 13 0200 END 4. Rev 1. b) Input of the robot is sensor and switches.  These output signals turn on and off switches.(Camera) Y=0 Mechatronics Engineering Lab III Manual BLACK basket 3.

One/Zero Interpretation Contact/no contact On/off On/off On/off Contact/no contact Contact/no contact One/Zero Interpretation On/off Contact/no contact On/off Closed/open Engaged/not engaged Energized/not energized Sensor Limit switch Photo-detector Push-button switch Timer Control relay Circuit breaker Process Control Actuator Motor Control relay Light Valve Clutch Solenoid Table 8. such as transferring parts into the workholder. completed its task such as drilling. range finder. touch and tactile sensor. along with the interpretation of their 0 and 1 values are shown in Table 8. identifying bad units or welding by using the sensor which is located at certain check point in the PLC line system. 6. proximity sensor.Mechatronics Engineering Lab III Manual Rev 1. There are a lot of sensor being used in PLC system such as light and infrared sensor. vision system and many more. and Sequencing. feeding the machining workhead.  The purpose of the controller is to coordinate the various actions of the physical system. Page 59 of 63 .0 04/08/11  A list of binary sensors and actuators. which is concerned with event-driven changes in the system. The robot knows when a jig is at its place. which is concerned with time-driven changes in the system?  Both are referred to as switching systems. and so on.1. sniff sensor.1: Binary Sensors and Actuators Used in Discrete Control  Discrete process control can be divided into two categories:   logic control.

WAN MUHAMMAD IMRAN 4.Mechatronics Engineering Lab III Manual Rev 1. 7th May 2012 MATRIC 4080484 4271276 4120678 4090974 Page 60 of 63 . MUHAMMAD FAHMI ISMAIL 3. RAHISHAM ABD RAHMAN. FAZRI IDRIS DATE OF SUBMISSION Tuesday.0 04/08/11 Appendix A: FINAL LABORATORY PROJECT REPORT Reports Title Page ROBOTICS CONTROL USING MC68230 GROUP NUMBER : 1A GROUP MEMBERS: NO: 1. 2.

Mechatronics Engineering Lab III Manual Rev 1.0 04/08/11 Appendix B: Data sheet report forms DATA SHEET FOR EXPERIMENT#: LIST THE CODES USED: PART B PART C (Note Please add the 'PART' accordingly) DEMO PART A COMPLETE DEMO PART B COMPLETE DEMO PART C COMPLETE … … Data approved and verified by : Signature and date : Page 61 of 63 .

The length of contribution to the reports by each individual is noted within this certificate. and that the original work contained herein have not been untaken or done by unspecified sources or person. agreed unanimously that this report shall be submitted for marking and this final printed report have been verified by us. Signature: Name: Matric Number: Contribution: Signature: Name: Matric Number: Contribution: Signature: Name: Matric Number: Contribution: Read Understand Agree Introduction and calculation Read Understand Agree Graphs and procedures Read Understand Agree Conclusion and discussion part A Page 62 of 62 . We hereby certify that this report has not been done by only one individual and all of us have contributed to the report . We also hereby certify that we have read and understand the content of the total report and no further improvement on the reports is needed from any of the individual’s contributor to the report.0 04/08/11 Appendix C: Certificate of Originality and Authenticity This is to certify that we are responsible for the work submitted in this report.Mechatronics Engineering Lab III Manual Rev 1. that the original work is our own except as specified in the references and acknowledgement. We therefore.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.