23
Ministry of Higher Education and Scientific research University of Carthage National Institute of Applied Sciences et de Technology Required Internship Report Summer 2015 Field of study: Instrumentation and Industrial Maintenance Level: 4 th Year Subject : Realization of software in LABVIEW to control the filling level of a glass of water served by an industrial robot Realized by: Marwa HADDAD Company/University: Labor Robotik und Handhabungstechnik, Hochschule Merseburg, Germany 1

stage-allemagne

Embed Size (px)

Citation preview

Page 1: stage-allemagne

Ministry of Higher Education

and Scientific research

University of Carthage

National Institute of Applied

Sciences et de Technology

Required Internship Report Summer 2015

Field of study: Instrumentation and Industrial Maintenance

Level: 4th Year

Subject:

Realization of software in LABVIEW to control the

filling level of a glass of water served by an industrial

robot

Realized by: Marwa HADDAD

Company/University:

Labor Robotik und Handhabungstechnik, Hochschule Merseburg, Germany

2015/2016

1

Page 2: stage-allemagne

I. IntroductionIn March 2014, I participated in the competition of Tunirobots within the CIM Club. We’ve made a small robot with different cards and I was the one who were trying to find the right program for these cards. Since that period, I became passionate by robotic and programming and I was always looking for an internship in this sector.

This report describes a LABVIEW program made for an industrial robot to control the filling level of water served. You will find in it everything I did during this 2 months internship detailed; the obstacles encountered and the solutions used. You will find at the end of the report a CD containing this program and some videos of how it works.

The writing of this book gave me a great understanding of how LABVIEW is used to analyze, order and command today’s technology. The importance of researches concerning new technologies is great in our modern world.

I would like to thank both of my promoters Prof. Dr.-Ing. Achim Merklinger and Dipl.-Ing Michael Bluhm for giving me the opportunity to study at Hochschule Merseburg and for the support during this project.

The international office of Hochschule Merseburg has been a great help during my stay. Their support office for foreign internship students is very well organized and always gave me a welcoming feeling.

Last I would like to thank all the Erasmus and IAESTE student of Merseburg and my roommates to keep up the spirit and for all the good times we had together, and the friends I have made here. They gave me a different look on how different cultures also have their similarities.

2

Page 3: stage-allemagne

II. Description of the host Institution: My internship was elabored at the Labor Robotic laboratory und Handhabungstechnik in Hochschule Merseburg (HoMe) or University of Applied science Merseburg, Germany. The University was founded on April 1st 1992. The campus site is in use since 1954 and was formally known as the “Carl Schorlemmer” technical institution.

Figure 1 : presentation of the host institute

The University of Applied science Merseburg lectures 2895 students (AY 2014-15) in 4 departments:

Department of Computer science and Communication systems Department of Engineering and Natural sciences Department of Social work, media and culture Department of Business sciences

3

Main BuidlingLibraryHoMe Logo

Page 4: stage-allemagne

The department of computer sciences and communication systems focuses on core competence as a mix between electrical engineering, computer science, mathematics, and technical writing. The department of engineering and natural science is known for its mathematical and natural science courses. Creative, communicative skills and the knowledge of management are the fundamentals for the department of social work, media and culture. The department of Business science lecturers the managers and specialists of tomorrow. The university offers 13 bachelors and 10 masters programs. 208 employees take care of the daily routines of the school of which have 106 professors and faculty staff and 58 third-party funded employees.

I worked within the department of computer sciences and communication systems. My Labor is a Robotic Lab where students make workshops to be ready for the industrial experience.As showen in the picture, my laboratory contains different robots.

III. Objectives and specifications of the internship

In the previous projects

4

Figure 2: Representation of the Labor

Page 5: stage-allemagne

Computer gestewerter AusgussvorgangAnd

Testhilfsmittel zur fehlersuche und Optimierung des Computergesteuerten ausgussvorganges

Were realized that a glass was filled by an industrial robot. The filling level of the glass is watched by continuously measuring the weight of the bottle. To realize this, a force-torque-sensor is arranged between the arm and the gripper of the robot.The sensor is connected to a computer (windows pc) using the serial interface (RS232). With the help of a C# program the computer watches the weight of the bottle continuously.If the pre-set filling level is achieved, the computer stops the filling process by sending a signal to the robot controller.The connection between the computer and robot is realized by using the printer interface on the computer and digital input/output on the robot controller.

My task was to create a new program using LABVIEW that realizes the same function as the C# program (set a filling level, watch the filling process, stop the filling process is the level is achieved). Workflow:

1. Familiarize with the previous program with help of its documentations

2. Create the LABVIEW program3. Testing the program and removal errors4. Final PowerPoint presentation of the resolution.

5

Page 6: stage-allemagne

IV. Training Schedule

V. Work done :

A.Problematic:In the previous project done in this labor, they tried to fill a glass by an Industrial robot with C# Program.. But this program was not working correctly and it couldn’t stop filling the glass when the pre-set volume is achieved.My task was to make the same program with LABVIEW and to resolve the problems occurred.

6

Figure 3: Training Schedule

Page 7: stage-allemagne

B.The hardware:The System is composed of:

An Asea IRB6/2 with a sensor in its arm

An electrical cabinet A computer A bottle holder(which may include

3 bottle) A glass holder(which may include 9 glass)

a) The Asea Industrial Robot 6/2:

It consists of a cabinet with an integrated Power unit, a portable programming unit and an electrically driven mechanical unit. The handling capacity of the industrial robot is 6kg.The IRB 6/2 owns five axes of motion.The sensor used is situated between the arm and the clapet of the robot and it calculates the different forces: Fx, Fy, Fz.

b) The computer: The computer is used to control and display the measured values of the forces and moments of the sensor. In addition, the program code of the robot program can be output to the au PC. The sensor and the program code of the IR are communicated respectively via RS232 interfaces.

7

Figure 4: The hardware

Figure 5: Axes of the IR

Page 8: stage-allemagne

The communication between the robot and the PC is done via a parallel port (LPT1).

2-1. The parallel interface:The parallel port is an input-output interface with 8-bit data bus for transmitting the information. The data transmission is asynchronous, so at any time, and is not aligned with a clock signal. In addition to the eight data outputs (data register), 8 data inputs (status register) are installed to allow a response of the peripheral device to be controlled. The interface consists of 25 pins in D-SUB connectors, which are accessed from 3 tabs. It can read signals that their electric potential difference is 5VDC as output. Whereas for inputs, if the difference is from 0 to 0.4 V, it will be interpreted as LOW and if it is from 2.4 to 5 V it will be interpreted as HIGH. The data lines can be loaded with up to 32 mA to earth. Pins 18 to 25 are ground terminals (GND)

The I/O address range is from 0xEC00 to 0xEC07 (default: 0x0378- 0x037F). However, only the first two registers (0xEC00 and 0xEC01) will be used. The Data tab has the address 0xEC00, includes 8 bits and is used to binary output, these individual pins can be directly switched on and off (5 or 0 V). The binary input is realized via the status register. Only the pins S3 (15), S4 (13), S5 (12) and S6 (10) are used because the rest is not available as a Pin. There are characterized 8 digital Outputs and 4 digital inputs provided.

8

Figure 6: Parallel port

Page 9: stage-allemagne

To access to the parallel Port, we use the software-side functions situated in a Dynamic Link Library (DLL). This dynamic Library is located in the "inpout32.dll" file and is used by Logix4 provided at leisure. With the function "Out32" and the indication of Register address, the pins of the Data Register on HIGH or LOW are switched. The function "Inp32" allows the reading of a register address, in this case the Status register.

3- Connections

The aim of this connection is to establish a communication between the computer, and by that we mean the program, and the robot controller. This robot controller provides free inputs and outputs, as well as various interrupt inputs are available, which are based on 24 VDC level. The PC provides a free parallel port available to the 5VDC outputs and inputssignals. To adjust this altitude, a level converter is necessary. This fits from the PC to the robot controller 8 digital inputs and 4 digital outputs of the robot controller to the 4 inputs of the PC to the 8 digital outputs. Figure 4 shows the existing system with black arrows and frames.

9 Figure 7: connections between the IR and the PC

Page 10: stage-allemagne

A.The software:

The main program starts after checking the willingness of the robot (a digital output number 27 will be set HIGH to signal it), the existence of the bottle and glass respectively in their magazine.When the digital input number 27 is set HIGH signaling the willingness of the PC, the bottle can be removed from the magazine.When the robot reaches the first position, the weighing process starts. The sensor will send the forces values which will be evaluated in the computer.Is there enough water in the bottle? If yes the program continues untill the tipping point will be approached. Then we start filling in the glass. The filling process can be interrupted by the pc program when the pre-set filling volume is achieved. If it’s the case, the bottle is turned off again and the robot moves t the home position.

To summarize the steps of the program are: Check the existence of the bottle and the glass Remove the bottle Start weighing process Reach tipping point position Start filling Interrupt filling when the pre-set volume is reached Move to home position

10

Page 11: stage-allemagne

1- LABVIEW Program:

The program is composed of 2 parts: A first part that calculates the initial volume of the bottle A second part that calculates the current volume of the bottle

the explanation will only include one part because both parts are have the same function. The second part just repeats the function in real time till achieving the stop volume.

1-1. The serial port

First of all, we start by choosing the port where the sensor is connected. In this case, it’s the serial port COM5. The parameters set for the sensor are:- Baud rate= 9600- Data bit= 8

11

Figure 8: The main program

Page 12: stage-allemagne

- Parity= none- Time out= 10second- Stop bit = 1bitWe also have to configure the density of the liquid inside the bottle, the weight of the bottle and the volume that we want to fill in the glass.

1-1-1.weighing process:

This window is used to display the measured values of the forces and the moments by the sensor.First, we have to send these commands to the sensor so we can read the forces and the moments as shown in “buffer de lecture9”;

- SU: Start continuous data output - SA4: averaging over 4 measurements values- TF1: select the tool coordinate system- QS: start the constant data output

The data from the sensor are transmitted in ASCII format. The row is a

record (consisting of 45 bytes) in the “buffer de lecture9” appears.The character string is divided into the individual components, inverted, converted and displayed. First, the separation of the components takes place in substrings based on the comma. Subsequently, the components of the "string" format are

12

Figure 9: serial port

Figure 10

Figure 11

Page 13: stage-allemagne

converted in the Number Format "double". Now the translation is performing in the corresponding SI units. The values of the force components are multiplied by the factor 1/10 to obtain values in unit N.To have stable forces, we take an average of 10 values of Fx, Fy and Fz. Then, these values are multiplied by the factor 1/100

The resulting force is given by the expression:

F res=√F x2+F y2+F z2

The resulting force is calculated because the force components are all perpendicular to each other.If the display is completed, the "stop" button can be pressed or the window on [x] getting closed. In both cases, the sensor is a carriage return command (/ r, ASCII13) sent to stop the data output. Subsequently, the serial interface closed.

The volume of the bottle is calculated by this expression:

13

Figure 12: conversion part of the program

Page 14: stage-allemagne

V bottle=F res−memptybottle∗9.81−Fclapet

9.81∗ρ

After calculating the initial volume of the bottle, the second part of the program start running when the robot reaches the tipping point position (which is the point when we will start to fill the liquid in the glass)

1-1-2.Filling process:

In this part of the program, we will calculate the current volume of the bottle in real time using the same expression as given. We will stop filling when the current volume of the bottle become lower than the stop volume.

The stop volume is given by this expression :V stop=V bottle−V ¿ fill

The program work following this condition: if V iniatial−V current>V stop then the program continue filling. If not the robot brings back the bottle to the magazine and moves to home position.

1-2. The parallel port :

As said previously, to command the robot we use the parallel port as shown in the pictures.

14

Page 15: stage-allemagne

To set the output, I’m actually calling a function of the C# program which is called out32.

• 888 is the conversion of the hexadecimal address 0x378 of output

• 1 is the number of digital output that you want to set on

To read the input, I’m calling another function which is called inp32• 889 is the conversion of the hexadecimal adress 0x379 of

Input

B.Obstacles occurred:

After finishing the programming, and testing it. We noticed that the resulting force F reschanges when we turn the position of the robot arm of

5N which is completely wrong because F res has to be constant.

This variation of F resdistort totally the volume of the bottle. As a consequence, all the results obtained are false and the robot doesn’t stop filling the water in the glass.

We conclude then that the sensor is not calibrated.

C.Solutions:

To calibrate the sensor we used different masses. The aim is to compare the correct forces applicated with the forces read by the program.

F correct=m∗9.81

1000

First, we try set constant X and Z axis and vary the mass on the Y axis. We got the following table:

15

Figure 13

Figure 14

Page 16: stage-allemagne

Tableau 1: Y Axis

Masses[g] F x correct [N] F x read[N] F y read[N] F z read[N] F res[N]

0 0 -23.71 4,18 -1,65 24,13212

200 1.962 -23.72 5,72 -1,68 24,4577

250 2.4525 -23.74 6,32 -1,65 24,6222

400 3.924 -23.78 7,63 -1,71 25,03257

500 4.905 -23.75 8,4 -1,76 25,25312

700 6.867 -23.7 10,19 -1,7 25,85374

800 7.848 -23.72 11,1 -1,71 26,24448

1000 9.81 -23.69 12,71 -1,7 26,9379

1200 11.772 -23.68 14,39 -1,67 27,75974

1400 13.734 -23.7 16,12 -1,71 28,71356

1500 14.715 -23.73 17,26 -1,75 29,39529

Second, we fixed Y and Z axis and vary the mass on the X axis

Tableau 2: X Axis

Masses[g] F x correct [N] F x read[N] F y read[N] F z read[N] F res[N]

0 0 3,44 25,7 -1,99 26,00546

200 1,962 5,3 25,72 -2,02 26,33797

250 2,4525 5,82 25,69 -2,04 26,41988

400 3,924 7,18 25,67 -2,02 26,73166

500 4,905 8,21 25,72 -2,02 27,07403

700 6,867 10,12 25,68 -2,02 27,67593

800 7,848 11,03 25,65 -2,04 27,99545

1000 9,81 13,1 25,7 -2,02 28,91678

1200 11,772 14,78 25,69 -2,05 29,70904

1400 13,734 16,48 25,68 -2,07 30,58329

1500 14,715 17,99 25,69 -2,06 31,43024

Finally we draw the curves F correctin function with F read and we got these expressions: Y=1.0273x-2 for X Y=1.1519x-2.91 for Y

16

Page 17: stage-allemagne

To have the correctF res then;

We have to multiply the F x readby 1.0273 and to less 2.

We have to multiply the F y readby 1.1519 and to less 2.91.

VI. Consolidation of achievementsTABLE OF CONTENTS

INFORMATIQUE FOR INSTRUMENTATION

TECHNICAL CALIBRATION

SENSORS

PROJECT MANAGEMENT

COMMUNICATION

VII. ConclusionDuring this internship, we were able to create a LABVIEW program which commands an industrial robot doing the same function as the C# program.

The mission was to set an exact pre-set volume of the liquid inside the bottle in the glass.The problem occurred in the C# was actually the sensor which is not calibrated and was making an error of 6N, almost 5000ml of volume.

Thanks to the LABVIEW program, we calibrated the sensor by adjusting the values. As a consequence, the resulting force is almost constant now and is varying of 0.15 N that cause a difference of 10 or 15ml less than the exact volume that we want to fill in the glass.

To make it exact, we just have to make the calibration of the sensor more precise.

17

Page 18: stage-allemagne

Knowing that during their practical hours, my mentor's students will use my program to control that robot makes me feel happy and honored too… because my hours spent in research and work have finally led to a very good result.

VIII. Bibliographies• Computer gesteuerter ausguss vorgang

• Testhilfsmittelzurfehlersuche und Optimierung des Computergesteuert en

Ausguss vorganges mit ein em Industriel roboter

18