Adaptive Reconfigurable Manufacturing System for...

83
Adaptive Reconfigurable Manufacturing System for Mars ARMS for Mars Sharathkumaar Mohanasundaram Space Engineering, master's level (120 credits) 2018 Luleå University of Technology Department of Computer Science, Electrical and Space Engineering

Transcript of Adaptive Reconfigurable Manufacturing System for...

Page 1: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

Adaptive Reconfigurable Manufacturing

System for MarsARMS for Mars

Sharathkumaar Mohanasundaram

Space Engineering, master's level (120 credits)

2018

Luleå University of Technology

Department of Computer Science, Electrical and Space Engineering

Page 2: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

i

Declaration of Authorship

I, Sharathkumaar Mohanasundaram, hereby declare that this thesis titled, " Adaptive

Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and the work

presented in it are my own. I hereby certify that this thesis has been composed by me and is

based on my own work, unless stated otherwise. No other person’s work has been used without

due acknowledgement in this thesis. All references and verbatim extracts have been quoted,

and all sources of information have been specifically acknowledged.

Signature :…………………………………

Name : Sharathkumaar Mohanasundaram

Date :20.06.2018

Page 3: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

ii

Adaptive Reconfigurable Manufacturing System for Mars

(ARMS for Mars)

Sharathkumaar Mohanasundaram , SpaceMaster Student ,LTU

Abstract

An Adaptive Reconfigurable Manufacturing System for maintenance of structural parts and

functionality of the autonomous vehicle with IEC61499 standard is proposed. Using the ABB

RobotStudio, the functionalities of the IRC5 is programmed with PC interface. nxtStudio from

nxt Control company is used as development and runtime function block control system which

is been deployed into EV3 Lego (Autonomous vehicle). This FB will generate the control

signal which in turn initiates the functionalities of the ABB IRC5. This control signal is

transferred through TCP /IP socket communication between Robotstudio and nxtStudio. This

also includes the hardware implementation of the assigned task.

Keywords:

Rapid programming, Function block, Adaptive control, TCP socket communication

Page 4: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

iii

Acknowledgements

I would like to thank my supervisor, Professor Valeriy Vyatkin, Lulea University of

Technology for accepting my master thesis proposal to undertake the research project with in

Dependable Communications and Computations research group, LTU and giving excellent

access to the AIC3Lab at LTU.

Also I would like to thank Arash Mousavi, Associate Senior Lecturer, Lulea University of

Technology who helped me in learning the ABB RobotStudio,ABB Robot Operational

techniques and introducing myself with nxtControl studio.

Finally, I would like to thank my family and friends who encouraged me and gave the moral

support which I need to follow my dream and embark in this journey.

Page 5: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

iv

Table of contents

Declaration of Authorship ……………………………………………………………….i

Abstract…………………………………………………………………………………...ii

Acknowledgements ……………………………………………………………………...iii

Table of Contents………………………………………………………………………...iv

List of Figures……………………………………………………………………………vii

List of Tables……………………………………………………………………………..ix

Abbreviations ……………………………………………………………………………x

Chapter 1: Introduction…………………………………………….……….……..……1

Chapter 2: Aims and Objective………............……………………….….…….…...…..2

Chapter 3: Literature Review…………………………………………….….……...….3

3.1. Robot-Terminology…………………………………………………….………..…...3

3.2. Timeline of Industrial robots………………………………………………..….….…3

3.2.1. Early Industrial Robotics in Manufacturing (1954 - 1979) ………..………3

3.2.2. Modern Industrial Robots (1980 - present day) ………………….……..…4

3.3. Industrial Robots in manufacturing process……………………………………….…4

3.4. Advantages of using Industrial robots……………………………………………..…5

3.5. Application of Industrial robots in Manufacturing sector ……………………..….…5

3.5.1. Material Handling……………………………………….………….6

3.5.2. Manipulation………………………………………..……………………6

3.5.3. Measurements…………………………………………..……….….6

3.6. Industrial robots with different types of movements…………………………..….….7

3.7. Industrial robot brands…………………………………………………….…….……8

3.8. ABB Hardware Concepts…………………………………………………….…….…9

3.8.1. IRB 120…………………………………………………………….….……9

3.8.1.1. IRB 120-Technical Information…………………………………10

3.8.2. Grippers…………………………………………………………...…...…..11

3.8.2.1. General Information related to Parallel grippers DHPS……...….12

3.8.2.2. Flexible range of applications…………………………...……….12

Page 6: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

v

3.8.3. IRC5………………………………………………………………….……..12

3.8.4. FlexPendant …………………………………………………………….….14

3.8.4.1. Complete computer and integral part of IRC5….…………..…….14

3.8.5. RAPID programming language…………………………….……………….16

3.8.6. Rapid Robot functionality…………………………………………………..18

3.8.6.1. MoveL instruction…………………………………..………....…..18

3.8.6.1.1. MoveL syntax…………………………………………….18

3.8.6.2. MoveJ instruction………………………………………….19

3.8.6.3. Base coordinate system……………………………..……19

3.8.6.4. WaitTime Instruction………………………………...……20

3.8.6.5. IF instruction……………………………….….…….……21

3.8.7. I/O signals…………………………………………………………………..21

3.8.7.1. Digital input………………………………………………………21

3.8.7.2. Digital output……………………………………………………..21

3.9. RobotStudio…………………………………………………………………………..23

3.10. Introduction to PC Interface………………………………………………..……….23

3.11. Introduction to Socket Messaging……………………………………..……………24

3.11.1. Purpose……………………………………………………………………24

3.11.2. Basic approach…………………………………………………………….24

3.12. EV3 Lego…………………………………………………………………...……….25

3.12.1. Learning powered by LEGO®MINDSTORMS® Education…………….26

3.12.2. EV3 LCD………………………………………………………..….……..26

3.12.3. Ports and Speakers of EV3 Lego brick…………………….….…………..27

3.12.3.1. Input Ports…………………………………….…………..……..27

3.12.3.2. PC Port……………………………………………….………….27

3.12.3.3. Output Ports…………………………………….……….………27

3.12.3.4. Speaker……………………………………………….…………27

3.12.3.5. USB Host Port………………………………..………………….27

3.12.3.6. SD Card Port……………………………………..……….……..27

3.12.4. EV3 Rechargeable Battery…………………………………………..……28

3.12.5. EV3 Large Motor………………………………………….………….…..29

3.12.6. Touch Sensor………………………………………………..…………….29

3.13. IEC 61499 Standard………………………………………………….……………..30

3.13.1. Function Block………………………………………………………........30

Page 7: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

vi

3.13.2. Function block types………………………………….……………..……31

3.13.2.1. Basic function block types……………………………..….……31

3.13.2.2. Composite function block types……………………….…….….31

3.13.2.3. Service Interface function block types………………….………32

3.13.3 Description of function Block…………………………………………….32

3.13.3.1. External interface declaration……………………………..……33

3.13.3.2. Execution Control Chart (ECC)…………………………….…..33

3.14. nxtControl Studio……………………………………………………………...……34

3.14.1. Socket Communication with nxtControl Studio…………………….……35

3.14.1.1. NETIO function block………………………………………….35

3.15 Adaptive reconfiguration……………………………………………………………36

3.15.1 Adaptable reconfigurable systems………………………………..……….37

Chapter 4: Problem Statement……………………………………………….………..38

Chapter 5: Implementation……………………………………………………….…....39

5.1. Maintenance system at AIC3 lab…………………………………………….39

5.2. Setting up the physical structures……………………………………..……..39

5.3. Designing the 3D components for connecting EV3 Lego with the wheel.….40

5.4. Connecting all devices in the system to a same network……………………42

5.4.1. Connecting PC into the Wi-fi network: DRAG………….………..43

5.4.2. ABB Controller-PC interface …………………………………..…44

5.4.3. Connecting Lego EV3 into the network………………………...…45

5.5. Programming with RobotStudio………………………………….……...…..46

5.5.1. Tasks assigned through ABB IRC5 ………………….……...…….46

5.6. Programming with nxtControl Studio………………………………....…….50

5.7. Socket Communication……………………………………………….……..51

5.7.1. Socket communication with ABB Robotstudio…………………...52

5.7.1. Socket communication with nxt studio…………………………….53

Chapter 6: Discussions and Conclusion……………………………………………….54

Chapter 7: Further works………………………………………………………………55

Chapter 8: References…………………………………………………………………..56

Chapter 9: Annexure…………………………………………………..………………..58

Page 8: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

vii

List of figures

Fig.3.1: Cartesian robots [5] ……………………………………….………………………7

Fig.3.2: Scara robots [5]……………………………………………..…………………..….7

Fig.3.3: 6-axis robots [5] …………………………………………..……………..……..….7

Fig.3.4: Redundant robots [5] ………………………………………..…………..……...….8

Fig.3.5: Dual-arm robots [6] ………………………………………..…………….…..…….8

Fig.3.6: IRC5 operating concept…………………………………….….………………..….9

Fig.3.7 IRB 120 at AIC3 Lab…………………………………………….……………..….10

Fig.3.8: Gripper Array at AIC3Lab…………………………………….……………….….11

Fig.3.9: Gripper 1 at AIC3lab………………………………………………….…….……..11

Fig.3.10: IRC5 Single Cabinet Controller at AIC3 Lab……………………..………..……13

Fig.3.11: FlexPendant at AIC3Lab………………………………………..………..…...….14

Fig.3.12: Main parts of FlexPendant [10] ……………………………………..………..…15

Fig 3.13: FlexPendant colour window…………………………………………..……..…..16

Fig.3.14: Add Instruction window in FlexPendant……………………………………..….17

Fig.3.15: Expected robot path[12]……………………………………………………..…..19

Fig.3.16: IR120 Coordinate System Axes………………………………………..…..……20

Fig 3.17: Add Instruction window in FlexPendant……………………………………..….20

Fig.3.18: Default I/O signal assignment in Flexpendant window……….……………..….22

Fig.3.19. Network Illustration [13]…………………………………………………..…….23

Fig.3.20. Illustration of Socket communication………………………….………….…….24

Fig.3.21. EV3 Lego [16]……………………………………………………….…….…….25

Fig.3.22. EV3 LCD……………………………………………….………………………..26

Fig.3.23. Ports and Speakers of EV3 Lego [16]…………………………..……………….27

Fig.3.24. EV3 Rechargeable Battery [16]…………………………………..……….……..28

Fig.3.25. EV3 Large Motor [16]…………………………………………….……………..29

Fig.3.26. Touch Sensor [16]………………………………………………………..…...…29

Fig.3.27: A Function Block type [17]…………………………………….……..…..……..30

Fig 3.29 Basic function block [22]…………………………………………………..…….31

Fig.3.30 Composite function block type [22]……………………………………...…...….32

Fig.3.31. Service Interface function block [22] ………………………….………….....….32

Fig.3.32 External interface declaration [22] ………………………………..……….…….33

Page 9: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

viii

Fig.3.33 NetIO Interface [24]………………………………………………………..……….35

Fig.5.1: Maintenance system at AIC3lab…………………………………………….……….39

Fig.5.2: EV3 Lego mounted on the worktable ………………………………….………40

Fig.5.3: EV3 Lego fixed and supported in four sides…………………………………………40

Fig.5.4: Available components of rover wheel……………………………………………….40

Fig.5.5: Top view of the wheel……………………………………………………………….40

Fig.5.6: Plus-Shaped EV3 Lego shaft ……………………………………………………….41

Fig.5.7: Printed 3-D models………………………………………………………………….41

Fig.5.8: Symmetrical view of the 3D model assembly……………………………………….41

Fig.5.9: EV3 Lego Motor shaft replaced by 3d model-1 ……………….…….………..……41

Fig .5.10: Axle of the wheel replaced by 3d model-2……………………….….……………41

Fig.5.11: Wheel with modified axle placed over normal one …………….………….……42

Fig.5.12: Wheels placed in slots at work assembly…………………………….…….………42

Fig.5.13: Devices in common network…………………………………………..….……….43

Fig.5.14: Command prompt window showing PC’s IP address……………………..………43

Fig.5.15: Controller window from ABB RobotStudio in PC………………………..….……44

Fig.5.16: Command prompt window showing ping result for ABB IP……………...………45

Fig.5.17: Lego EV3 LCD showing its IP address……………………………………………45

Fig.5.18: Command prompt window showing ping result for EV3 Lego IP………...………46

Fig.5.19: Flexpendent the mechanical unit status………………………………..……….….47

Fig.5.20: Flexpendent showing properties of ROB_1 mechanical unit………….………..…47

Fig.5.21: Flexpendent showing properties of M7DM1 mechanical unit………………….…48

Fig 5.21: Modes of operation…………………………………………………………………48

Fig.5.22: ABB controller Run mode………………………………………………………….49

Fig.5.23: Rapid window in RobotStudio……………………………………..……………….49

Fig.5.24: nxtStudio Solution overview window………………………………………………50

Fig.5.25. MotorSetSpeed Function block and getTouch Button…………………..…………51

Fig.5.26: Socket communication between PC and RobotStudio………………………..……52

Fig.5.27: Visual studio TCP/IP client Output…………………………………………………52

Fig.5.27: Socket communication between PC and nxtStudio…………………………………53

Fig.5.28: TCPclient_HMI………………………………………………………………….....53

Fig.5.27: Socket communication between ABB RobotStudio and nxtStudio…………..……55

Page 10: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

ix

List of Tables

Table 3.1: IRB-120 Robot Specifications, Robot Motion Speed and

Robot motion range [7] ………………………………………………………..10

Table 3.2: IRC5-Technical Information [9] …………………………..…………………..13

Table 3.3: Main parts of FlexPendant [10]………………………………………………..15

Table 3.4. Event Interface [24]……………………………………………………………35

Table 3.5. Data Interface [24]………………………………………….………………….36

Page 11: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

x

Abbreviations

ARMS - Adaptive Reconfigurable Manufacturing System

IRB - Industrial Robot

IRC - Industrial Robot Controller

FB - Function Block

TCP - Transmission Control Protocol

IP - Internet Protocol

Page 12: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

1

Chapter 1

INTRODUCTION

The planet Mars has always held special interest for humans. As it resembles and revolving

close to Earth next to Moon around the Sun, the scientists are fascinated by the idea of existence

of life forms, water in our solar system other than earth. In the later part of 20th Century, with

the developments in Space science field and Robotics has opened new horizons which

conceptualized these ideas to reality. This made subsequent rise to increased space exploration

missions to Moon and Mars.

The financial costs for these interplanetary missions involves huge sum of money. Space

explorations involves lots of challenges starting from Conceptualizing ideas, Development of

the mission, Launching, Orbital positioning, Shifting to other planet’s orbit and safe landing.

Recent Mars exploration mission, Curiosity rover almost took one year to touch the Red

planet’s surface. The life span of this mission is expected for two years.

The idea of this project is to set up a maintenance and manufacturing unit in Mars to look after

the rover’s technical and structural issues. The prototypes for this concept is developed in the

newly built laboratory for “Advanced Industrial Computing, Communication and Control”-

AIC3 Lab, LTU-Sweden”. It is equipped with manufacturing machines models, robots and

autonomous vehicles.

This concept will enable us to increase the mission’s life span and more data can be obtained

from the rovers during that period. Having a manufacturing unit in place gives us flexibility to

do changes with the functionality of the existing models, if required.

Page 13: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

2

Chapter 2

AIMS AND OBJECTIVE

The main objective of this project is to implement and demonstrate flexible adaptive behavior

of the robot and autonomous vehicle models using distributed control. One of the task

considered in this project is to develop autonomous explorer vehicle substituting its broken

parts. The task assigned to the robot is to remove the damaged wheel, keep it in the slots in

assembly section, take a new wheel from another slot and fix the new wheel into the

autonomous vehicle within the maintenance system[Fig.5.1].

Page 14: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

3

Chapter 3

LITERATURE REVIEW

3.1. Robot-Terminology

A Robot is a machine—especially one programmable by a computer which can carry out a

complex series of actions automatically [1]. The industrial robot is a machine with significant

characteristics of versatility and flexibility [3].

3.2. Timeline of Industrial robots

Robots are an indispensable part of today's large manufacturing industries. These intelligent

machines have taken over many of the tasks requiring high precision, speed and endurance.

They are becoming increasingly smarter, more flexible and more autonomous, with the

capability to make decisions and work independently of humans [2]. The following is a brief

history of robotics in manufacturing:

3.2.1. Early Industrial Robotics in Manufacturing (1954 - 1979)

Early industrial robots had limited "intelligence", autonomy and operational degrees of

freedom. They were mostly designed to perform one or two sets of repetitive tasks in a highly

controlled environment. Some notable early robots were:

• The first industrial robot was designed by George Devol in 1954. This robot was

capable of transferring objects from one point to another within about a dozen feet.

Devon founded a company called Unimation in 1956 to manufacture the robot. He also

coined the term Universal Automation.

• Versatran, designed by Harry Johnson and Veljko Milenkovic, and manufactured and

marketed by AMF Corporation in 1960.

• UNIMATE, manufactured by Unimation, was the first industrial robot to be used by a

major manufacturer. It was installed by General Motors in its New Jersey plant in 1962.

• Famulus, developed by German robotics company KUKA in 1973, had six

electromechanically-driven axes.

• The Silver Arm, developed by Prof. Victor Scheinman in 1974, can perform small-parts

assembly jobs using feedback from touch and pressure sensors. Its industrial version,

manufactured by Vicarm Inc, founded by Scheinman, was controlled by a

minicomputer.

• ASEA IRB, built by a European company called ASEA in 1975, was the world's first

fully electrically driven robot. It was also the first microprocessor-controlled robot and

used Intel's first chipset.

• Motoman L10, the first robot developed by Yaskawa America Inc. in 1977, had five

axes and could move 10kg of weight with its gripper.

• PUMA, a robot arm designed by Prof. Victor Scheinman and developed by Vicarm,

Unimation with support from General Motors in 1978, was used in assembly lines and

is still used by researchers today.

• Nachi Robotics of Japan developed the first servo gun technology robot for spot

welding in 1979.

• OTC Japan introduced the first generation of dedicated arc welding robots in 1979 [2].

Page 15: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

4

3.2.2. Modern Industrial Robots (1980 - present day):

From 1980, industrial robots began to be made in large numbers, with a new robot being

introduced in the market at the rate of one a month. These robots are microprocessor-controlled

and are smarter and have a higher degree of operational freedom. Some notable developments

in this stage are:

• The first robotic arm with motors installed directly into the joints of its arm. It was built

by Takeo Kanade in 1981. This design made it faster and more accurate than previous

robotic arms.

• Yaskawa America Inc. introduced the Motoman ERC control system in 1988. It had

the ability to control up to 12 axes, the highest number of axes at the time.

• FANUC Robotics Corporation built a prototype of the first intelligent robot in 1992.

• Motoman ERC control system was upgraded in 1994 to give the ability to control up to

21 axes. It could synchronize the motions of two robots.

• The Motoman XRC controller introduced in 1998 had the ability to control up to 27

axes. This gave it the ability to synchronize the motions of three to four robots.

• In 1998, the Motoman UP series introduced a simpler robot arm that was more easily

accessible for repair and maintenance.

• The Almega AX series, introduced by OTC DAIHEN in 2003, is a line of arc welding

and handling robots.

Industrial robots are increasingly becoming more "intelligent" and versatile. In the future, they

are expected to work without human intervention and take over most of the manufacturing

processes [2].

3.3. Industrial Robots in manufacturing process

The term Automation denotes a technology aimed at replacing human beings with machines in

a manufacturing process, which involves not only the execution of physical operations but also

the intelligent processing of information on the status of the process. The three levels of

automation They are: Rigid Automation, Programmable Automation, and Flexible

Automation.

Rigid automation deals with a factory context oriented to the mass manufacturing of products

of the same type. The need to manufacture large numbers of parts with high productivity and

quality standards demands the use of fixed operational sequences to be executed on the

workpiece by special purpose machines.

Programmable Automation deals with a factory context oriented to the manufacturing of low-

to-medium batches of products of different types. A programmable automated system allows

easily changing the sequence of operations to be executed on the workpieces to vary the range

of products.

Flexible automation represents the evolution of programmable automation. Its goal is to allow

manufacturing of variable batches of different products by minimizing the time lost for

reprogramming the sequence of operations and the machines employed to pass from one batch

Page 16: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

5

to the next. The realization of a flexible manufacturing system demands a strong integration of

computer technology with industrial technology [3].

Based on its programmability, the industrial robot is a typical component of programmable

automated systems. Nonetheless, robots can be entrusted with tasks both in rigid automated

systems and in flexible automated systems. An industrial robot is constituted by:

• A mechanical structure or manipulator that consists of a sequence of rigid bodies (links)

connected by means of articulations (joints); a manipulator is characterized by an arm that

ensures mobility, a wrist that confers dexterity, and an end effector that performs the task

required of the robot.

• Actuators that set the manipulator in motion through actuation of the joints; the motors

employed are typically electric and hydraulic, and occasionally pneumatic.

• Sensors that measure the status of the manipulator and, if necessary, the status of the

environment.

• A control system (computer) that enables control and supervision of manipulator motion [3].

3.4. Advantages of using Industrial robots

Initial investments on the machines would be a tedious task. But incorporating Industrial robots

for production is having lots of advantages in it side.

• Decreased Production Costs: A quick return on investment (ROI) outweighs the initial

setup costs. With robots, throughput speeds increase, which directly impacts

production.

• Shorter Cycle Times: A lean manufacturing line is crucial for increasing efficiency. An

automated robot can work at a constant speed without pausing for breaks, sleep, or

vacations, and ultimately has the potential to produce more in a shorter time than a

human worker.

• Improved Quality and Reliability: Applications are performed with precision and high

repeatability every time. It ensures the product is manufactured with the same

specifications and process every time. Repairs are few and far between.

• Better Floor Space Utilization: By decreasing a footprint of a work area by automating

parts of your production line, you can utilize the floor space for other operations and

make the process flow more efficient.

• Reduced Waste: Robots are so accurate that the amount of raw material used can be

reduced, decreasing costs on waste.

• Attract More Customers: Reduction in schedule and cost attracts customers.

Automation helps provide the highest throughput with least amount of spending.

• Increased Safety: Robots increase workplace safety. Workers are moved to supervisory

roles and no need to perform dangerous applications in hazardous settings [4].

3.5. Application of Industrial robots in Manufacturing sector

The industrial robots provide three functionalities that make them useful for a manufacturing

process

1. Material handling.

Page 17: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

6

2. Manipulation.

3. Measurement.

3.5.1. Material Handling:

In a manufacturing process, each object should be transferred from one location in the factory

to another location to store, manufacture, assemble, and pack. During transfer, the physical

characteristics of the object do not undergo any alteration. The robot’s capability to pick up an

object, move it in space on predefined paths and release it makes the robot itself an ideal

candidate for material handling operations. Typical applications include:

• Palletizing

• Warehouse loading and unloading,

• Mill and machine tool tending,

• Part sorting,

• Packaging [3].

3.5.2. Manipulation:

Manufacturing consists of transforming objects from raw material into finished products;

during this process, the part either changes its own physical characteristics as a result of

machining, or loses its identity as a result of an assembly of more parts. The robot’s capability

to manipulate both objects and tools make it suitable to be employed in manufacturing. Typical

applications include:

• Arc and spot welding,

• Painting and coating,

• Gluing and sealing,

• Laser and water jet cutting,

• Milling and drilling,

• Casting and die spraying,

• Deburring and grinding

• Screwing, wiring and fastening,

• Assembly of mechanical and electrical objects,

• Assembly of electronic boards [3].

3.5.3. Measurements

Besides material handling and manipulation, in a manufacturing process it is necessary to

perform measurements to test product quality. The robot's capacity to explore the three-

dimensional space together with the availability of measurements on the manipulator's status

allow using a robot as a measuring device. Typical applications include:

• Object inspection,

• Contour finding,

• Detection of manufacturing imperfections.

Page 18: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

7

The listed applications describe the current employment of robots as components of industrial

automation systems [3].

3.6. Industrial robots with different types of movements

• Cartesian robots: It can do 3 translations using linear slides.

Fig.3.1: Cartesian robots [5]

• Scara robots: It can do 3 translations plus a rotation around a vertical axis.

Fig.3.2: Scara robots [5]

• 6-axis robots: These robots that can fully position their tool in a given position (3

translations) and orientation (3 orientations)

Fig.3.3: 6-axis robots [5]

Page 19: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

8

• Redundant robots: Redundant robots can also fully position their tool in a given

position. But while 6-axis robots can only have one posture for one given tool position,

redundant robots can accommodate a given tool position under different postures [5].

Fig.3.4: Redundant robots [5]

• Dual-arm robots: These robots are composed of two arms that can work together on a

given work piece [5].

Fig.3.5: Dual-arm robots [6]

3.7. Industrial robot brands

There are many industrial robot brands. The largest ones will have a complete range of robots

for different applications and at different sizes. The smallest companies usually target a specific

size or application range. Examples of industrial robot brands are:

• Fanuc,

• Motoman,

• ABB,

• Kuka,

• Denso,

Page 20: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

9

• Adept,

• Comau,

• Kawasaki,

• OTC Daihen [5].

3.8. ABB Hardware Concepts:

The Industrial robot available in Automation Industrial Computing Communication and

Control lab (AIC3 lab) in Lulea University of Technology, Lulea is IRC5 from ABB.IRC5

operating concept involves IRB 120, IRC5 Controller and a computer with Robot studio

installed.

Fig.3.6: IRC5 operating concept

3.8.1. IRB 120

The ABB IRB 120 is the smallest robot available in the ABB line-up. At just 25 kg, it manages

to outperform larger counterparts and offers features not found elsewhere. It can be mounted

virtually anywhere, including on top of other machines. The ABB IRB 120 robot is portable

and easily integrated.

This compact six-axis robot can handle payload of up to 3 kg. With the ability to be mounted

at any angle, the IRB 120 IRC5 is ideal for placement into tight spots. Cables are routed inside

the arm to eliminate interference and ensure integration flexibility.

A light aluminium body, in conjunction with powerful compact motors, gives this robot arm

the ability to move with speed and precision. The IRB 120 takes advantage of the power IRC

Compact controller for extreme accuracy and motion control in a smaller package [7].

Page 21: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

10

Fig.3.7 IRB 120 at AIC3 Lab

3.8.1.1. IRB 120-Technical Information:

Robot Specifications

Axes 6

Payload 3.00 Kg

H-Reach 580.00 mm

Repeatability ±0.0100 mm

Robot Mass 25.00 Kg

Structure Articulated

Mounting Floor, Inverted, Angle

Joint Robot Motion speed Robot Motion Range

J1 250º/S (4.36 rad/s) +165º-165º

J2 250º/S (4.36 rad/s) +110º-110º

J3 250º/S (4.36 rad/s) +70º-70º

J4 320º/S (5.59 rad/s) +160º-160º

J5 320º/S (5.59 rad/s) +120º-120º

J6 420º/S (7.33 rad/s) +400º-400º

Table 3.1: IRB-120 Robot Specifications, Robot Motion Speed and Robot motion range [7]

Page 22: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

11

3.8.2. Grippers

Fig.3.8: Gripper Array at AIC3Lab

Fig.3.9: Gripper 1 at AIC3lab

Application specific tools are required to carry out the targeted work. Here to carry out the

assigned operation, Parallel grippers DHPS from Festo have been used which is shown in fig

3.9. These grippers can be operated pneumatically with the signals assigned to it. It works based

on Boolean logic.

Page 23: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

12

3.8.2.1. General Information related to Parallel grippers DHPS

• Resilient and precise T-slot guide of the gripper jaws.

• Oval piston for high gripping forces.

• High gripping forces with compact dimensions.

• Gripper jaw centring options.

• Max. repetition accuracy.

• Gripping force retention.

• Internal fixed flow control.

• Wide range of options for mounting on drive units.

• Sensor technology:

– Adaptable position sensor for the small grippers.

– Integratable proximity sensors for the medium and large grippers.

3.8.2.2. Flexible range of applications:

• Can be used as a double-acting and single-acting gripper.

• Compression spring for supplementary or retaining gripping forces.

• Suitable for external and internal gripping [11].

3.8.3. IRC5

The ABB IRC5 is a fifth-generation robot controller that combines motion control, flexibility,

modularity, usability, application interfaces, and safety. Its outstanding quality ensures

unmatched up-time as well as offering incredible reliability. The earlier electro-mechanical

switches have been replaced by electric position switches for added safety. Productivity is

increased with advanced diagnostics, quick investigation of failures, and real-time monitoring

of the robot condition.

The IRC5 is a multi-robot controller with PC tool support that optimizes the robot performance

for short cycle times and precise movements. This controller is also practically maintenance

free and is available in multiple variants to deliver cost-effective performance customized for

need [8].

IRC5 Single Cabinet Controller

• Designed for high IP protection and full expandability.

• Provides a protected environment for axillary equipment in the robot system.

• Capable of control of up to four robots in a MultiMoveTM setup. Just add a compact

drive module to each additional robot [9].

Page 24: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

13

Fig.3.10: IRC5 Single Cabinet Controller at AIC3 Lab

Electrical Connections

Supply voltage 3 phase ,200-600V,50-60 Hz

Physical

Dimensions

Single cabinet 970*725*710 mm

MultiMove drive modules 720*725*710 mm

Weight

Single cabinet 150 kg

MultiMove drive modules 130kg

Tab 3.2: IRC5-Technical Information [9]

Page 25: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

14

3.8.4. FlexPendant

Fig.3.11: FlexPendant at AIC3Lab

The FlexPendant (occasionally called TPU or teach pendant unit) is a hand-held operator unit

used to perform many of the tasks involved when operating a robot system: running programs,

jogging the manipulator, modifying robot programs and so on.

The FlexPendant is designed for continuous operation in harsh industrial environment. Its touch

screen is easy to clean and resistant to water, oil and accidental welding splashes [10].

3.8.4.1. Complete computer and integral part of IRC5

The FlexPendant consists of both hardware and software and is a complete computer in itself.

It is an integral part of IRC5, connected to the controller by an integrated cable and connector.

The hot plug button option, however, makes it possible to disconnect the FlexPendant in

automatic mode and continue running without it [10].

Page 26: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

15

Fig.3.12: Main parts of FlexPendant [10]

A Connector

B Touch Screen

C Emergency Stop button

D Joystick

E USB port

F Enabling device

G Stylus pen

H Reset button

Tab.3.3 :Main parts of FlexPendant [10]

• Joystick: Use the joystick to move the manipulator. This is called jogging the robot.

There are several settings for how the joystick will move the manipulator.

• USB port: Connect a USB memory to the USB port to read or save files. The USB

memory is displayed as drive /USB:Removable in dialogs and FlexPendant Explorer.

• Stylus pen: The stylus pen included with the FlexPendant is located on the back. Pull

the small handle to release the pen.

• Reset button:The reset button resets the FlexPendant, not the system on the controller

[10].

Page 27: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

16

Fig 3.13: FlexPendant colour window

The FlexPendant is paired with the IRC5, that uses RAPID programming language and has a

colour touch screen and 3D joystick. The RAPID language is easy to use and is a universal

language that supports structured programs, advanced features, and allows highly sophisticated

solutions [8].

3.8.5. RAPID programming language:

The native language of computers consists of only zeros and ones. This is virtually impossible

for humans to understand. Therefore, computers are taught to understand a language that is

relatively easy to understand - a high level programming language. RAPID is a high-level

programming language, it uses some English words (like IF and FOR) to make it

understandable for humans [12].

The basic terminologies of RAPID structure concepts are explained below

• Data declaration: Used to create instances of variables or data types, like num or

tooldata.

• Instruction: The actual code commands that make something happen, for example,

setting data to a specific value or a robot motion. Instructions can only be created inside

a routine.

• Move instructions: Create the robot motions. They consist of a reference to a target

specified in a data declaration along with parameters that set motion and process

behavior. If inline targets are used, the position is declared in the move instructions.

• Action instruction: Instructions that perform other actions than moving the robot, such

as setting data or sync properties.

• Routine: Usually a set of data declarations followed by a set of instructions

implementing a task. Routines can be divided into three categories: procedures,

functions and trap routines.

• Procedure: A set of instructions that does not return a value.

Page 28: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

17

• Function: A set of instructions that returns a value.

• Trap: A set of instructions that is triggered by an interrupt.

• Module: A set of data declarations followed by a set of routines. Modules can be saved,

loaded and copied as files. Modules are divided into program modules and system

modules.

• Program module (.mod): Can be loaded and unloaded during execution.

• System module (.sys): Used mainly for common system-specific data and routines, for

example, an arcware system module that is common for all arc robots.

• Program files (.pgf):In IRC5 a RAPID program is a collection of module files (.mod)

and the program file (.pgf.) that references all the module files. When loading a program

file, all old program modules are replaced by those referenced in the. pgf file. System

modules are unaffected by program load [15].

The common instructions used in this project are

• MoveL

• MoveJ

• Reset

• Set

• WaitTime

• If

Fig.3.14: Add Instruction window in FlexPendant

Page 29: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

18

3.8.6. Rapid Robot functionality

The advantage with RAPID is that, except for having most functionality found in other high-

level programming languages, it is specially designed to control robots. Most importantly, there

are instructions for making the robot move [12].

3.8.6.1. MoveL instruction

A simple move instruction can look like this: MoveL p10, v1000, fine, tool0;

where:

• MoveL (Move linear) is an instruction that moves the robot linearly (in a straight line)

from its current position to the specified position.

• p10 specifies the position that the robot shall move to.

• v1000 specifies that the speed of the robot shall be 1000 mm/s.

• fine specifies that the robot shall go exactly to the specified position and not cut any

corners on its way to the next position.

• tool0 specifies that it is the mounting flange at the tip of the robot that should move to

the specified position [12].

3.8.6.1.1. MoveL syntax

MoveL ToPoint Speed Zone Tool;

ToPoint : The destination point defined by a constant of data type robtarget. When

programming with the FlexPendant you can assign a robtarget value by pointing out a position

with the robot. When programming offline, it can be complicated to calculate the coordinates

for a position [12].

Speed : The speed of the movement defined by a constant of data type speeddata. There are

plenty of predefined values [12], such as:

Predefined Speeddata Value

v5 5 mm/s

v100 100 mm/s

v1000 1000 mm/s

vmax Maximum speed for the robot

Zone : Specifies a corner zone defined by a constant of data type zonedata. There are many

predefined values [12], such as:

Page 30: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

19

Predefined zonedata Value

Fine The robot will go to exactly the

specified position

z10 The robot path can cut corners

when it is less than 10 mm from

ToPoint

z50 The robot path can cut corners

when it is less than 50mm from

ToPoint

The following RAPID instructions will result in the robot path shown below

MoveL p10, v1000, z50, tool0;

MoveL p20, v1000, fine, tool0;

Fig.3.15: Expected robot path[12]

3.8.6.2. MoveJ instruction:

MoveJ is used to move the robot quickly from one point to another when that movement

does not have to be in a straight line. Use MoveJ to move the robot to a point in the air

close to where the robot will work. A MoveL instruction does not work if, for example, the

robot base is between the current position and the programmed position, or if the tool

reorientation is too large. MoveJ can always be used in these cases. The syntax of MoveJ

is analog with MoveL [12].

Example : MoveJ p10, v1000, fine, tPen;

3.8.6.3. Base coordinate system

The position that a move instruction moves to is specified as coordinates in a coordinate

system. If no coordinate system is specified, the position is given relative to the robot base

coordinate system (also called base frame). The base coordinate system has its origin in the

robot base [12].

Page 31: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

20

Fig.3.16: IR120 Coordinate System Axes

3.8.6.4. WaitTime Instruction:

WaitTime is used to wait a given amount of time. This instruction can also be used to wait

until the robot and external axes have come to a standstill [12].

Basic examples of the instruction WaitTime are illustrated below.

Example 1

WaitTime 0.5;

Program execution waits 0.5 seconds

Fig 3.17: Add Instruction window in FlexPendant

Page 32: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

21

3.8.6.5. IF instruction:

The IF instruction can be used when a set of statements only should be executed if a

specified condition is met.

If the logical condition in the IF statement is true, then the program code between the

keywords THEN and ENDIF is executed. If the condition is false, that code is not executed

and the execution continues after ENDIF.

Example

In this example the string string1 is written on the FlexPendant if it is not an empty string.

If string1 is an empty string, i.e. contains no characters, then no action is taken.

VAR string string1:= "Hello";

IF string1 <> "" THEN

TPWrite string1;

ENDIF

3.8.7. I/O signals

Signals are used for communication with external equipment that the robot cooperates with.

Input signals are set by the external equipment and can be used in the RAPID program to

initiate when to perform something with the robot. Output signals are set by the RAPID

program and signals to the external equipment that they should do something [12]. Here

the external equipment is the Parallel grippers DHPS from Festo.

Signals are configured in the system parameters for the robot system. It is possible to set

customized names for the signals. They should not be declared in the RAPID program [12].

3.8.7.1. Digital input

A digital input signal can have the values 0 or 1. The RAPID program can read its value

but cannot set its value.

Example

If the digital input signal di1 is 1 then the robot will move.

IF di1 = 1 THEN

MoveL p10, v1000, fine, tPen;

ENDIF

3.8.7.2. Digital output

A digital output signal can have the values 0 or 1. The RAPID program can set the value

for a digital output signal, and thus affect external equipment. The value of a digital

output signal is set with the instruction SetDO.

Page 33: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

22

Example

The robot has a grip tool that can be closed with the digital output signal do_grip. The

robot moves to the position where the pen is and closes the gripper. The robot then moves

to where it shall draw, now using the tool tPen.

MoveJ p0, vmax, fine, tGripper;

SetDO do_grip, 1; MoveL p10, v1000, fine, tPen;

Fig.3.18: Default I/O signal assignment in Flexpendant window

In this project four output signals have been used. Changing the set value logic will activate

the targeted signal which in turn performs the assigned task.

DO10_6_lockToolCh Lock the gripper with IRB120

DO10_7_openToolCh Unlock the gripper from IRB 120

DO10_8_airToolCh3 Open the gripper head

DO10_9_airToolCh4 Close the gripper head

In RAPID language the following instruction is used to assign value to a digital output signal

Syntax

To set its value to 1

SetDO signalName, 1;

To set its value to 0

SetDO signalName, 0;

Page 34: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

23

3.9. RobotStudio

In the PC-based, 3D, virtual world, every part of an operation or process can be run and

visualized without ever even ordering a real physical part or robot. Once the program is

completed in the virtual world it can simply be downloaded straight to the robot controller in

the real world, and if everything in the real world is set up exactly as it was in the virtual world,

the program will run exactly like it did on the PC. For companies that use robots, this sort of

flexible and easy power is a complete game-changer, and results in these compelling benefits:

• Programming can be done in the office without shutting down production on the factory

floor.

• Programs can be prepared in advance.

• Training and optimization can be done without disturbing production.

• Risk of damage or costly delays is reduced.

• Installation and commissioning of new systems is faster.

• Changeover between production runs is faster.

• Productivity is greatly increased [14].

3.10. Introduction to PC Interface

PC interface is used for communication between the controller and a PC. The option PC

interface is required when connecting to a controller over LAN with RobotStudio.

With PC interface, data can be sent to and from a PC. It ca be used for

• Backup.

• Production statistics logging.

• Operator information presented on a PC.

• Send command to the robot from a PC operator interface.

• RobotStudio add-in that performs operations on the controller [13].

Fig.3.19. Network Illustration [13]

Page 35: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

24

3.11. Introduction to Socket Messaging

3.11.1. Purpose:

The purpose of Socket Messaging is to allow a Rapid programmer to transmit application data

between computers, using TCP/IP network protocol. A socket represents a general

communication channel, independent of the network protocol being used [13].

The RobotWare option Socket Messaging gives you access to Rapid data types, instructions

and functions for functions for socket communication between computers [13].

3.11.2. Basic approach:

• Create a socket, both on client and server. A robot controller can be either client or

server.

• Use SocketBind and SocketListen on the server, to prepare it for a connection request.

• Order the server to accept incoming socket connection requests.

• Request socket connection from the client.

• Send and receive data between client and server.

Fig.3.20. Illustration of Socket communication

When using Rapid functionality Socket Messaging to communicate with a client or

server that is not a Rapid task, it can be useful to know how some of the implementation

is done [15].

Page 36: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

25

In this project Rapid program acts as a server. A socket messaging server use the

following instructions:

Instruction Description SocketCreate Create a new socket and assigns it to a socketdev variable SocketSend Sends data via a socket connection to a remote computer. The data

can be a string or rawbytes variable, or a byte array SocketReceive Receives data and stores it in a string or rawbytes variable, or

in a byte array SocketClose Closes a socket and release all resources SocketBind Binds the socket to a specified port number of the server. Used by

the server to define on which port (on server) to listen for

connection.

The IP address defines a physical computer and the port defines a

logical channel to a program on that computer. SocketListen Makes the computer act as a server and accept incoming

connections.It will listen for a connection on the port specified by SocketBind.

SocketAccept Accepts an incoming connection request. Used by the server to

accept the client’s request [15].

3.12. EV3 Lego:

Fig.3.21. EV3 Lego [16]

Page 37: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

26

3.12.1. Learning powered by LEGO®MINDSTORMS® Education

Since the beginning of this century, LEGO® MINDSTORMS® Education has led the way in

STEM (Science, Technology, Engineering, and Math) Education, inspiring users to engage in

fun, hands-on learning. The combination of LEGO building systems with the LEGO

MINDSTORMS Education EV3 technology is now offering even more ways to learn about

robotics and teach the principles of programming, physical science, and mathematics.

The heart of LEGO MINDSTORMS Education is the EV3 Brick, the programmable intelligent

brick that controls motors and sensors, as well as providing wireless communication. Choose

what motors and sensors you wish to use and build your robot just like you want it to be.

LEGO Education offers a growing number of EV3-based curriculum packages developed by

experienced educators. We are committed to responsive customer support, professional

development, and continuing education for teachers using MINDSTORMS robotics in their

classrooms [16].

In this project the EV3 Lego is considered as the Mars rover. The functionalities of the EV3

brick can be programmed based on the requirements.

3.12.2. EV3 LCD:

Fig.3.22. EV3 LCD

The Display shows you what is going on inside the EV3 Brick and enables you to use the

Brick Interface. It also allows you to add text and numerical or graphic responses into your

programming or experiments [16].

Page 38: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

27

3.12.3. Ports and Speakers of EV3 Lego brick

3.12.3.1. Input Ports

Input Ports 1, 2, 3, and 4 are used to connect sensors to the EV3 Brick.

3.12.3.2. PC Port

The Mini-USB PC Port, located next to the D port, is used to connect the EV3 Brick to

a computer.

Fig.3.23. Ports and Speakers of EV3 Lego [16]

3.12.3.3. Output Ports

Output Ports A, B, C, and D are used to connect motors to the EV3 Brick.

3.12.3.4. Speaker

All sounds from the EV3 Brick come through this speaker—including any sound effects used

in programming your robots. When the quality of the sound is important to you, try to leave

the speaker uncovered while designing.

3.12.3.5. USB Host Port

The USB Host Port can be used to add a USB Wi-Fi dongle for connecting to a wireless

network, or to connect up to four EV3 Bricks together (daisy chain).

3.12.3.6. SD Card Port

The SD Card Port increases the available memory for your EV3 Brick with an SD card

(maximum 32 GB—not included) [16].

Page 39: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

28

3.12.4. EV3 Rechargeable Battery

Fig.3.24. EV3 Rechargeable Battery [16]

With LEGO® MINDSTORMS® Education EV3, you have the choice of using normal AA

batteries or the EV3 Rechargeable Battery pack included in the LEGO MINDSTORMS

Education EV3 Core Set.

If the experiment is done with both, each option has characteristics to consider when

constructing your robots. For instance, six AA batteries weigh more than the Rechargeable

Battery, and the EV3 Brick with the Rechargeable Battery installed is slightly larger than the

EV3 Brick with six AA batteries.

The EV3 Rechargeable Battery is a convenient and economical alternative to using AA

batteries. It can be recharged while inbuilt in a model, saving you the trouble of disassembling

and reassembling a robot to replace batteries.

To install the Rechargeable Battery on the EV3 Brick, remove the battery cover on the back of

the EV3 Brick by pressing the two plastic tabs on the side. If there are batteries in the EV3

Brick, remove them. Insert the Rechargeable Battery in the slots that held the battery cover in

place and snap the battery in place [16].

Page 40: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

29

3.12.5. EV3 Large Motor

Fig.3.25. EV3 Large Motor [16]

The Large Motor is a powerful “smart” motor. It has a built-in Rotation Sensor with 1-degree

resolution for precise control. The Large Motor is optimized to be the driving base on your

robots. By using the Move Steering or Move Tank programming block in the EV3 Software,

the Large Motors will coordinate the action simultaneously [16]. It is the only actuator used in

this project.

3.12.6. Touch Sensor

Fig.3.26. Touch Sensor [16]

The Touch Sensor is an analog sensor that can detect when the sensor’s red button has been

pressed and when it is released. That means the Touch Sensor can be programmed to action

using three conditions—pressed, released, or bumped (both pressed and released) [16].

Page 41: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

30

3.13. IEC 61499 Standard

The IEC 61499 Standard [18] for the development, reuse and deployment of Function Blocks

in distributed and embedded industrial control and automation systems was first published in

2000­2002 by the International Electrotechnical Commission (IEC) as a series of Publicly

Available Specifications (PAS) for trial use and a Technical Report (TR) containing tutorial

information. Since then, it has undergone continuous improvement and development because

of extensive testing in both academic and industrial laboratories and applications. As a result

of these developments, IEC 61499 was published in 2005 as an IEC Standard in three Parts:

(1) Architecture, (2) Software tool requirements, and (4) Rules for compliance profiles

(IEC/TR 61499­3,containing tutorial information, was withdrawn as obsolete in 2007) [17].

IEC 61499 [18] is an international standard that defines a component-oriented approach, based

on function blocks, for modelling and implementing distributed industrial process

measurement and control systems. A function block abstracts a functional unit of software by

encapsulating local data, state transitions, and algorithmic behaviour within a well-defined

event-data interface. Fully executable systems can be described through a network of function

blocks at a high level of abstraction, independent of the implementation platform. The standard

thus paves the way for sophisticated software methodologies to be applied in the development

of industrial control systems, which has hitherto been done using low-level techniques for

programmable logic controllers (PLCs) [20].

In fact, the IEC 61499 standard has emerged in response to the technological limitations

encountered in the currently dominating standard IEC 61131 [19].

3.13.1. Function Block

IEC 61499­1 defines the function block type as the basic unit for encapsulating and reusing

Intellectual Property (IP="know­how"). In object-oriented terms, this is a class defining the

behaviour of (possibly) multiple instances. As shown in Figure 3.27, it includes event inputs

and outputs as well as the more traditional data inputs and outputs, to provide for

synchronization between data transfer and program execution in distributed systems [17].

Fig.3.27: A Function Block type [17]

Page 42: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

31

As its name implies, the basic FB type is the "atom" out of which higher­level "molecules" are

constructed. With IEC 61499­2 compliant software tools, software developers can encapsulate

IP in the form of algorithms written in one of the IEC 61131­3 programming languages or other

languages such as Java or C++.

3.13.2. Function block types

An important concept in IEC 61499 is the ability to define a function block type that defines

the behaviour and interfaces of function block instances that can be created from the type. This

is synonymous with the way in object oriented (OO) software that the behaviour of object

instances is defined by the associated object’s class definition [22].

A function block type is defined by a type name, formal definitions for the block’s input and

output events, and definitions for the input and output variables. The type definition also

includes the internal behaviour of the block but this is defined in different ways for different

forms of block [22].

3.13.2.1. Basic function block types

The behaviour of a basic function block is defined in terms of algorithms that are invoked in

response to input events. As algorithms execute they trigger output events to signal that certain

state changes have occurred within the block. The mapping of events on to algorithms is

expressed using a special state transition notation called an Execution Control Chart (ECC)

[22].

Fig 3.29 Basic function block [22]

3.13.2.2. Composite function block types

The internal behaviour of composite function block and sub application types is defined by a

network of function block instances. The definition therefore includes data and event

connections that need to exist between the internal function block instances [22].

Page 43: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

32

Fig.3.30 Composite function block type [22]

3.13.2.3. Service Interface function block types

Fig.3.31. Service Interface function block [22]

Service Interface (SI) function blocks provide an interface between the function block domain

and external services, for example to communicate with function blocks in a remote device or

to read the value of a hardware real-time clock. Because an SI function block type is primarily

concerned with data transactions, it is defined using time sequence diagrams [22].

3.13.3 Description of function Block

Basic function blocks can be described either textually using the IEC 61499 textual syntax or

graphically.

There are two graphical representations that together depict the properties and behaviour of a

basic function block: (i) the external interface declaration and (ii) the execution control chart

(ECC) that defines the relationships between events, states and algorithm execution [22].

Page 44: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

33

3.13.3.1. External interface declaration

The external interface declaration as shown in Figure 3.32 has the following features:

Fig.3.32 External interface declaration [22]

• The function block type name should be positioned in the centre of the main block as shown

by ‘Ramp’ in Figure 3.32. Inputs to the block are always shown on the left of the block; outputs

are shown coming from the right side of the block.

• Input events are depicted entering the left side of the upper part of the block, output events

are shown coming from the right.

• The names of input and output variables are shown inside the block next to their associated

graphical connectors.

• The data types of inputs and outputs are shown at the left hand and right-hand ends of the

graphical connectors respectively [22].

The graphical representation provides sufficient information to be used as a formal type

declaration. In fact, a primary objective of IEC 61499 is that graphical representations always

have a precise textual representation. It is envisioned that graphical modelling tools will always

be able to convert graphical forms into textual representations and vice-versa [22].

3.13.3.2. Execution Control Chart (ECC)

An important aspect of the behaviour of a basic function block concerns modelling the

relationship between events and algorithm execution. This is achieved using a concept called

the Execution Control Chart (ECC). Like other features of the block, the ECC can either be

defined graphically or textually. Each basic function block requires an ECC to define the

following:

• The main internal states of the block

• How the block will respond to each type of input event

• Which algorithms are activated in response to input events

• Which output events are fired when algorithms are executed [22].

Page 45: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

34

3.14. nxtControl Studio

The engineering tool nxtSTUDIO offers the most efficient engineering of distributed systems.

It seamlessly integrates all automation tasks in one single tool, offers pre-fabricated software

libraries, enables hardware-independent engineering and uses IEC 61499 as well as IEC 61131

as their control paradigm [23].

With the nxtSTUDIO engineers can build their applications quickly and with consistent quality.

Additional cost savings are created by separating the lifecycles of hardware and software [23].

Following automation tasks can be fulfilled with the nxtSTUDIO:

• Control [IEC 61499 and/or IEC 61131]: The control logic of a machine, equipment,

process or building can be programmed, loaded on a controller or even distributed to

several controllers.

• Visualisation [HMI and/or SCADA]: The corresponding visualisation for operation and

management is integrated.

• Field Connection: The software application is connected to the real world I/O

environment.

• Simulation: The application can be tested and simulated without real installation.

• Documentation: The documentation for the whole project is built automatically.

• Communication Paths: The communication paths between controllers as well as

between controllers and visualisation clients are built automatically by the nxtSTUDIO

[23].

Extract of function list / highlights:

• Programming of control engineering, HMI/SCADA, field connection, documentation,

simulation, test in one single tool.

• Automatically build communication paths between controllers in a distributed network.

• Automatically build communication paths between controllers and HMI.

• Multi-client / multi-server visualisation without additional servers.

• Multi-user engineering.

• Automatically built documentation, including diagrams, with cross-referencing.

• Direct data exchange between controllers and SQL databases [23].

Page 46: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

35

3.14.1. Socket communication with nxtControl Studio:

3.14.1.1. NETIO function block:

This function block is used to access a TCP or UDP connection.

It is equipped with a 16k buffer to cache data (i.e. if the receiving client is not as fast as the

sender). If data cannot be received fast enough, so that the buffer gets overcharged, some parts

of the datastream will get lost. There is no warning if that happens, but the discarding of

received datablocks is minuted in the cyclic log [24].

Fig.3.33 NetIO Interface [24]

Name With Description

Event Inputs

INIT QI;ENDPOINT;

STARTCHAR; ENDCHAR

Initialization request event

REQ QI; SD; SD_LEN Write data request event

ACK QI Input data processed

acknowledge event

Event Outputs

INITO QO; STATUS Initialization confirmation

event

CNF QO; STATUS Write data request

confirmation event

IND QO;STATUS; PEERADDR;

RD; RD_LEN

Data read indication event

ERRIND QO; STATUS Error indication event

Table.3.4. Event Interface [24]

Page 47: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

36

Name Type Init Value Description

Inputs

QI BOOL Input event qualifier

ENDPOINT STRING Communication port

([UDP:|TCP:][[dotAddr:]portNo]

[;dotAddr:portNo])

STARTCHAR USINT Record start character (optional)

ENDCHAR USINT Record end character (optional)

SD <STRING,

BYTE

[1.65535]>

Data to be sent with every REQ

event

SD_LEN UINT Number of data bytes to be sent

(not used for data

of type STRING)

Outputs

QO BOOL Output event qualifier

STATUS STRING Error reason in human readable

format

PEERADDR STRING Address of the peer which has

sent the current input

data packet

RD <STRING,

BYTE

[1.65535]>

Data read with every IND event

RD_LEN UINT Number of data bytes read with

every IND event

Table.3.5. Data Interface [24]

3.15 Adaptive reconfiguration

Systems are more and more expected to work in dynamic environment, to deal with fluctuation

of their characteristics and to guaranty functional and non-functional requirements. Systems

should also keep compliant with the contracted quality of service. Moreover, when necessary,

services and aspects should be added or removed on line [25].

Various adaptation techniques were proposed for the respect of the constraints of the system

while giving a better quality of service. These techniques can intervene on three different

levels: on the application level, operating system level or on the hardware level.

Page 48: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

37

3.15.1 Adaptable reconfigurable systems

To avoid recompilation and code modification, recent works proposed systems unifying these

two techniques, showing the first steps towards a transparent reconfiguration process. As a

result, design effort would be diminished and standard tool flows would not pass through

radical changes [26].

Adaptive languages need precise grammar, which includes adaptation operations, verification

and resolution tools and should be based on a control model. feedback control systems present

advantages to control dynamic adaptive and reconfigurable systems. Feedback control systems

are based on the assumption that it is easier to correct the errors of a system during its

operational phase rather than designing the system to be ideal at the creation time. Controlling

the quality of software processes and products have many obvious advantages, such as

improved client satisfaction, complexity reduction [25].

Page 49: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

38

Chapter 4

PROBLEM STATEMENT

Step by step procedure in execution of the project involves

• Setting up the physical structures to fix the stable position for the EV3 Lego in the work

desk and modifying shaft and wheel axle.

• Connecting all devices in the system to a single network.

• Programming ABB Robot with RobotStudio and Flexpendent.

• Programming EV3 Lego with nxt Studio.

• Socket communication between ABB Server IP and nxtControl Client IP.

Page 50: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

39

Chapter 5

IMPLEMENTATION

5.1. Maintenance system at AIC3 lab:

Fig.5.1: Maintenance system at AIC3lab

The figure 5.1 shows the Maintenance system available in AIC3lab at LTU. This manufacturing

system consists of the ABB industrial robot unit (IRB120, IRC5 controller and driver,

flexpendent), Safety relay, Factory workplace assembly, Gripper array which consists of

application specific grippers, Lego EV3 (considered as the rover) mounted on the work table

and finally the network cable from ABB controller connected to a router.

5.2. Setting up the physical structures:

The first step in implementation is to fix the EV3 Lego in the worktable. Fixing the position of

EV3 Lego to a permanent spot in the worktable is very much essential for further procedures.

The structure of the EV3 Lego has been modified with a flat base which gives the stability to

the robot when it is placed in top of the work table. The body of EV3 Lego is also altered in

such a way to get the support around the sides

Page 51: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

40

Fig.5.2: EV3 Lego mounted on the worktable Fig.5.3: EV3 Lego fixed and supported in

f four sides

Figures 5.2 and 5.3 shows that the EV3 Lego has been properly fixed and supported on the

worktable in all four sides. During maintenance this arrangement secures the position of the

EV3 Lego.

5.3. Designing the 3D component for connecting EV3 Lego with the wheel:

The main aim of the project is to replace the damage wheel in the EV3 Lego with a new one.

Fig.5.4: Available components of rover wheel Fig.5.5: Top view of the wheel

The above figures 5.4 and 5.5 shows the components and top view of the available wheel . The

available wheel in AIC3 lab consists of an axle, spring, body and the closing lid. There is a

limitation with the current wheel and the EV3 Lego shaft. The ABB robot manipulation is bit

critical, as the axle of the available wheel and the shaft of the Lego prototype vehicle doesn’t

match each other because of its shape as shown in Fig.5.5 and Fig.5.6.

Page 52: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

41

Fig.5.6: Plus-Shaped EV3 Lego shaft

Hence, two new components are needed to be printed to connect the existing wheel with the

shaft of the Lego vehicle. One will replace the axle of the wheel and the other will modify the

shape of shaft of the EV3 Lego motor.

Fig.5.7: Printed 3-D models Fig.5.8: Symmetrical view of the 3D model

assembly assembly

Fig.5.9: EV3 Lego Motor shaft replaced by 3d model-1 Fig .5.10: Axle of the wheel replaced by 3d model-2

Page 53: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

42

Fig.5.11: Wheel with modified axle placed over normal one

Fig.5.12: Wheels placed in slots at work assembly

Two components have been designed and developed with the help of 3D printer which is shown

in Figure 5.7. These components are designed in such a manner to fit each other. Figure 5.11

shows the wheel with modified axle placed over the available wheel. The gives a fixed position

for the wheel throughout the process. The cylindrical shape of the wheel enables the parallel

gripper tool head [Fig.3.9] to easily grab and place it from one place to another.

Figure 5.12 shows the position of the wheels in slot at work assembly. The wheel in silver

colour is considered as the new wheel and the one in red is considered as damaged wheel. The

damaged wheel is placed in slot 1 and the new wheel is placed in slot 2.

5.4. Connecting all devices in the system to a same network

The next step to approach the project is to connect all the devices included in the operation

within a common network. It will facilitate the devices to communicate with each other to the

network. The devices included in this project are Computer, ABB Unit and Lego EV3.

Page 54: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

43

Fig.5.13: Devices in common network

Figure 5.13 illustrates how the devices in the system has been connected to a common network.

By connecting the ABB network cable available for the PC interface with a Wi-Fi router, the

network will be shared. Connecting devices into the common network has been made easy with

this procedure. The Wi-Fi network has been named as DRAG.

5.4.1. Connecting PC into the Wi-fi network:DRAG

Fig.5.14: Command prompt window showing PC’s IP address

Page 55: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

44

Now, PC can search for the available wireless networks. Connect to the network with name

DRAG. The IP address allocated for the local PC can be identified by using the ipconfig

command in the command prompt window. Figure 5.14 shows the command prompt window

showing the allocated IP address. The IP address of PC is noted as 192.168.125.5.

5.4.2. ABB Controller-PC interface

ABB RobotStudio must be preinstalled into the PC which is sharing the network DRAG. By

clicking the add controller option in RobotStudio, PC will be connected to the service port of

ABB -IRC5 controller. This enables us to read and write the Rapid programs in IRC5 controller

from PC itself. These modifications can be done only with permissions from flexpendent

simultaneously.

Fig.5.15: Controller window from ABB RobotStudio in PC

Figure 5.15 shows the controller window of RobotStudio. The IP address of the service is

port is 192.186.125.1.

Page 56: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

45

Fig.4.16: Command prompt window showing ping result for ABB IP

Now ABB- IRC5 IP address is pinged from PC to check whether the communication is

happening or not. Figure 5.16 shows the command prompt window in which ABB-IRC5 IP

has pinged from PC. The sent packets are received without any data loss, which infers that the

communication is active.

5.4.3. Connecting Lego EV3 into the network

Fig.5.17: Lego EV3 LCD showing its IP address

Page 57: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

46

To connect EV3 Lego into the network, a preconfigured Wi-Fi adapter is plugged into the USB

port of EV3 Lego. As Wi-Fi adapter is preconfigured to connect wireless network DRAG,

plugging this Wi-Fi adapter to EV3 Lego enables it to connect with DRAG.

Fig.5.18: Command prompt window showing ping result for EV3 Lego IP

Figure 5.17 shows Lego-EV3 LCD display showing its allocated IP address:192.168.125.109.

Now to check the communication between PC and EV3 Lego, the IP address shown in EV3

Lego is pinged from PC. Figure 5.18 shows the command prompt window showing the ping

result. Data is sent and received without any losses, which concludes the communication is

active between EV3 Lego and the PC.

Hence, all the devices in the system are interconnected between themselves. Next step is to

program ABB controller with RobotStudio and Lego EV3 with nxtControl Studio.

5.5. Programming with RobotStudio

It is necessary to program the ABB controller to perform the required task. Real time Rapid

Programming involves utilization of both ABB RobotStudio and the flexpendent. For this ABB

unit has to be set in Manual mode.

5.5.1. Tasks assigned through ABB IRC5

1. ABB IRB 120 picks Gripper1 [Fig.3.9] from the gripper array [Fig.3.8].

2. Move to standard position.

3. Move to the rover and find the position of the damaged wheel.

4. Pick up the damaged wheel and returning to the standard position.

5. Move to the assembly unit [Fig.5.12]. Find the position to drop the damaged wheel.

6. Drop the damaged wheel in slot 1.

7. Finds the slot 2 position and pick up the new wheel.

8. Move back to the standard position near the rover.

9. Fix the new wheel into the rover.

10. Move back to standard position.

Page 58: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

47

11. Release the Gripper1 in the array.

12. Back to standard position.

In general ABB-IRB 120 will have 6 degrees of freedom. The base of ABB-IRB 120 in AIC3lab

[Figure 5.1] is fixed with the conveyor controlled by DC stepper motor. The motor inputs are

controlled by the IRC5.This installation of IRB 120 above the conveyor provides us with

additional linear motion. So, we can move the IRB 120 section across the conveyor. With this

facility the IRC5 can instruct IRB 120 to do operations with 7 degrees of freedom.

Fig.5.19: Flexpendent the mechanical unit status

Figure 5.19 shows the flexpendent indicating the active mechanical units.M7DM1 is the

mechanical linked with the conveyor and ROB_1 is associated with IRB 120.In this project

ROB_1 is used when it performs wheel pickup and drop operation.M7DM1 is used when the

total IRB 120 structure needs to move from one position to another.

Page 59: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

48

Fig.4.20: Flexpendent showing properties of ROB_1 mechanical unit

Fig.5.21: Flexpendent showing properties of M7DM1 mechanical unit

Figure 5.20 and Figure 5.21 depicts the properties of both active mechanical units.ROB_1

shows the changes in position of 6 coordinates with base coordinate system and M7DM1 with

changes in position in one coordinate.

Fig.5.21: Modes of operation

There are two different modes of motions in which the controller operates. They are Linear and

Reorient modes. In linear mode the tool movements can be controlled in linear direction and

with Reorient mode it is possible to perform tasks around a point.

Page 60: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

49

Fig.5.22: ABB controller Run mode

The operation can be made for single cycle and continuous cycle. This preference is based on

our requirement. In this project the controller is limited to perform for only one cycle.

By using the functionalities of mechanical units and different modes available for operation

the initial position of IRB 120, position of damaged wheel, position of slot 1 and slot 2 having

new wheel are calibrated. Also by activating and deactivating the output signals the gripper 1

tool’s operations to open and close are controlled.

Fig.5.23: Rapid window in RobotStudio

Page 61: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

50

All this programming and calibration procedures are performed with FlexPendent’s assistance.

With the help of ABB-PC interface, further modifications can be done within RobotStudio and

modified program can be deployed into the controller with the Apply [Figure 5.23] option

found in Rapid window.

To run the programs from ABB IRC5, it must be set in Automatic mode. The Rapid

programming codes done for this project is available in the appendix section of this thesis.

5.6. Programming with nxtControl Studio

In this project nxt Studio version 2.1, Runtime Base version:2.0.0.1, nxtControl.Lego EV3

library: version 2.0.0.0 have been installed and used.

Fig.5.24: nxtStudio Solution overview window

Page 62: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

51

Fig.5.25. MotorSetSpeed Function block and getTouch Button

The nxt-LegoEV3 libraries provides the functional blocks to control the physical hardware,

motor [Figure 3.25] and touch sensor [Figure 3.26]. Figure 5.25 shows the control action of the

motors when the touch sensor is pressed and released. The above connection is configured to

supply the power when pressed and cut off the supply to motors when released. Corresponding

slots of input and outputs are properly selected. In this project input sensor slot 1 and output

slot A is selected. Speed and direction of corresponding motors are also selected

After the development functional blocks are built, it should be deployed into the LegoEV3

Controller via nxtStudio without errors. It is made possible because the EV3 Lego and the PC

are in same network. Also, the hardware functionality of the LegoEV3 is checked.

5.7. Socket Communication

Next procedure is establishing socket communication between the two hardware devices, EV3

Lego and the ABB IRC5.To enable proper communication between the devices TCP

connection is preferred in this project. Here ABB IRC5 is considered as TCP/IP server and the

EV3 Lego is the TCP/IP client.

Page 63: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

52

5.7.1. Socket communication with ABB Robotstudio

Inside ABB RobotStudio , a separate module and a procedure for socket program is developed.

This program is developed as a TCP/IP server. A separate TCP/IP client program is developed

in visual studio to check the RobotStudio’s TCP/IP server.

Fig.5.26: Socket communication between PC and RobotStudio

Fig.5.27: Visual studio TCP/IP client Output

Figure 5.26 illustrates the socket communication between TCP/IP server ABB RobotStudio

and the TCP/IP client Visual studio platforms. The string which is sent from client to server is

“Hello Server”. Figure 2.27 shows the output window in visual studio in which a string “Hello

Server” is sent and it received back the string “Hello Client! ” from the server TCP/IP address

:192.168.125.1 and the port:55000 running in RobotStudio. This indicates that a socket

connection is made between the ABB server and Visual studio TCP client IP address

:192.168.125.5 with port 9879.

Page 64: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

53

5.7.1. Socket communication with nxt studio

In general, NETIO function blocks are used to create the socket connection in the nxtStudio

environment. But this version of nxtStudio doesn’t have the NETIO function block in its library

in this application settings. So, a separate CAT function block for TCP client is created

manually (Figure 5.28).

Fig.5.27: Socket communication between PC and nxtStudio

Fig.5.28: TCPclient_HMI

The new CAT function block, TCPClient_HMI is added into the application and again

deployed into the EV3Lego.But because of the recent windows update of windows in the PC

the nxtstudio files are read as the visual studioprogram. The source code used for this CAT

function block is shared in the annexure part.Due to this error the socket connection is not made

between the TCP client IP and the TCP/IP server running on the nxtStudio,at the time of project

submission.

Page 65: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

54

Chapter 6

Results and Discussion

This project reveals the step by step implementation of adaptive reconfigurable manufacturing

system from software development to a hardware model. Visual studio,ABB RobotStudio and

nxtStudio software platforms are used to achieve the proposed idea.

Section 5.2 explains the necessity of fixing the EV3 Lego into the worktable. The main idea of

this procedure is to constantly fix the position of the rover throughout the process. Because the

hardware implantation of RobotStudio works based on catching the spots for various

movements in the environment.

Section 5.3 revolves around 3D model development of components which helps to fix the

wheels of the rover to proper position. This arrangement helps grippers to properly hold the

wheels while the IRB 1220 moves.

Section 5.4 explains the necessity of connecting all the devices in the system to a single wireless

network, DRAG. Connecting all the devices (EV3 Lego,ABB IRC5 and PC) into the same

network enabling the devices to communicate between themselves.

Section 5.5 and 5.6 describes programming of ABB IRC5 and EV3Lego hardware done in the

RobotStudio and nxtStudio software environment.Section 5.7 explains how the socket

communication programming within the software environment is done. TCP communication

is preferred based on the necessity of the project. In TCP communication, the chances of data

loss between client and server are very minimal and very efficient. This socket communication

is validated by interacting the devices with the C# TCP Socket Server and Client programs in

Visual studio.

Section 5.7.1 describes the necessity of creating a new TCP Client CAT function

block.Unfortunately the socket communication between nxtStudio and visual studio is not

made at the time of submission because of time restrictions.

Page 66: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

55

Chapter 7

Further Works

Fig.5.27: Socket communication between ABB RobotStudio and nxtStudio

The errors raised during the deployment of program from nxtStudio to EV3 Lego should be

sorted out. Then the communication between the ABB Robotstudio and nxtStudio should be

established. No physical monitoring system is included into the current model. A custom-made

monitoring system which can detect the damages in the structure of the rover should be

installed with the plant. The only Mars exploration project which has been under active

condition is the Curiosity rover. Scientific problem related to the rover is not yet well defined

under Mars environment. The project data from the curiosity rover also has to be considered in

further developments. Implementation of this idea into a real functioning project helps in

increasing the life span of the instruments used in the space exploration mission. This ideology

can be utilized for other interplanetary missions too.

Page 67: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

56

Chapter 8

References

[1] Definition of `robot`. Oxford English Dictionary. Accessed on May 20, 2018.

[2] http://cerasis.com/2014/10/06/robotics-in-manufacturing/. Accessed on 20th May 2018.

[3] Sciavicco, Lorenzo & Siciliano, Bruno. (2000). Modelling and Control of Robot

Manipulators. Measurement Science and Technology. 11. 1828. 10.1088/0957-

0233/11/12/709.

[4]https://www.robots.com/blogs/advantages-and-disadvantages-of-automating-with-

industrial-robots. Accessed on 20th May,2018.

[5]https://blog.robotiq.com/bid/63528/what-are-the-different-types-of-industrial-robots.

Accessed on 20th May,2018.

[6] http://www.chinadaily.com.cn/business/2015-11/19/content_22483256_10.htm#Contentp

Accessed on 20th May,2018.

[7] https://www.robots.com/robots/abb-irb-120 . Accessed on 20th May,2018.

[8] https://www.robots.com/controllers/abb-irc5-controller .Accessed on 20th May,2018.

[9] IRC5_ROB0295EN-Rev.A, ABB library.

[10]http://developercenter.robotstudio.com/BlobProxy/manuals/IRC5FlexPendantOpManual/

doc27.html Accessed on 20th May 2018.

[11] Parallel grippers DHPS,Festo Manual.

[12] Operating Manual, Introduction to Rapid Programming-Controller software IRC5,

RobotWare 5.0.

[13] ABB-Application Manual-Controller software IRC5.

[14] https://www.abb-conversations.com/2013/04/what-is-robotstudio-something-to-do-with-

robots/ Accessed on 20th May,2018.

Page 68: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

57

[15]http://developercenter.robotstudio.com/BlobProxy/manuals/RobotStudioOpManual/doc7.

html . Accessed on 20th May,2018

[16] EV3 Lego-User Guide.

[17] The IEC 61499 Function Block Standard: Overview of the Second Edition: James H.

Christensen-Holobloc Inc, Cleveland Heights, Thomas Strasser -AIT Austrian Institute of

Technology, Antonio Valentini- O3neida Europe, Valeriy Vyatkin-University of Auckland,

Alois Zoitl-Technical University of Vienna.

[18] Int’l Standard IEC 61499-1: Function Blocks—Part 1: Architecture, first ed., Int’l

Electrotechnical Commission, Jan. 2005.

[19] Int’l Standard IEC 61131-3: Programmable Controllers—Part 3: Programming

Languages, second ed., Int’l Electrotechnical Commission,2003.

[20] A Synchronous Approach for IEC 61499 Function Block Implementation -Li Hsien

Yoong, Partha S. Roop, Valeriy Vyatkin, and Zoran Salcic, Senior Member, IEEE.IEEE

Transactions on Computers, vol. 58, no. 12, December 2009.

[21] http://en.wikipedia.org/wiki/Statechart#Harel_statechart .Accessed on 20th May,2018.

[22] Modelling Control Systems Using IEC 61499: Applying Function Blocks to Distributed

Systems (IEE Control Series, 59) - R. W. Lewis.

[23] https://www.nxtcontrol.com/en/engineering/ .Accessed on 20th May,2018.

[24] nxtcontrol Studio, Service library: Runtime Base.

[25] Dynamic, Adaptive and Reconfigurable Systems Overview and Prospective

Vision,Mehmet Aksit-University of Twente,Zièd Choukair-ENST Bretagne,Proceedings of the

23rd International Conference on Distributed Computing Systems Workshops (ICDCSW’03).

[26] Self adaptive reconfigurable system based on middleware cross layer adaptation model

Kaïs Loukil, Nader Ben Amor, Mohamed Abid,6th International Multi-Conference on

system,signals and Device

Page 69: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

58

Chapter 9

Annexure

Visual Studio C# -TCP Client Program

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; using System.Net.Sockets; namespace Client { class Program { static void Main(string[] args) { string clientIP = "192.168.125.5"; int clientPort = 9879; IPAddress localIPAddress = IPAddress.Parse(clientIP); IPEndPoint localEndPoint = new IPEndPoint(localIPAddress, clientPort); Socket sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sck.Bind(localEndPoint); string abbIP = "192.168.125.1"; int abbPort = 55008; IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse(abbIP), abbPort); sck.Connect(endPoint); Console.Write("Enter Message: "); string msg =Console.ReadLine(); byte[] msgBuffer = Encoding.Default.GetBytes(msg); sck.Send(msgBuffer, 0, msgBuffer.Length, 0); byte[] buffer = new byte[255]; int rec = sck.Receive(buffer, 0, buffer.Length, 0); Array.Resize(ref buffer, rec); Console.WriteLine("Received :{0}", Encoding.Default.GetString((buffer))); Console.WriteLine("ABB IP:port is " + abbIP + ":" + abbPort); //sck.Close(); Console.Read(); } } }

Page 70: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

59

Visual Studio C# TCP -Server Program

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; using System.Net.Sockets; namespace Server { class Program { static void Main(string[] args) { string serverIP = "192.168.125.1"; int serverPort = 55008; Console.WriteLine("Trying to listen: " + serverIP + ":" + serverPort); Socket sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sck.Bind(new IPEndPoint(IPAddress.Parse(serverIP) , serverPort)); sck.Listen(0); Socket acc = sck.Accept(); byte[] buffer = Encoding.Default.GetBytes("Hello Client!"); acc.Send(buffer, 0, buffer.Length, 0); buffer = new byte[255]; int rec = acc.Receive(buffer, 0, buffer.Length, 0); Array.Resize(ref buffer, rec); Console.WriteLine("Received:{0}", Encoding.Default.GetString(buffer)); Console.Read(); sck.Close(); acc.Close(); Console.Read(); ; } } }

Page 71: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

60

ABB RobotStudio Main Module Author: Sharath ! ! Version: 1.0

MODULE MainModule PROC main() sct; ENDPROC ENDMODULE

ABB RobotStudio Socket Module

MODULE Socket !Declaration Variables VAR socketdev server; VAR socketdev client; VAR string message ; VAR rawbytes data ; VAR string startMsg := "start"; VAR string clientMsg := "none"; VAR bool trigger := false; VAR string clientIP := "192.168.125.109"; VAR intnum clientPort := 61497; PROC sct() ! Create and Initiate communication SocketClose server; SocketClose client; SocketCreate server; SocketBind server,"192.168.125.1",55008; Socketlisten server; SocketAccept server, client; !Send a message to the client SocketSend client,\Str:=" Hi Client-Starting"; !SocketReceiveFrom client, \Str:=clientMsg, clientIP, clientPort; SocketReceive client, \Str:=clientMsg; IF startMsg = clientMsg THEN TEST1; trigger := TRUE; ENDIF ! Receive a message from the client UnpackRawBytes data,1,message,\ASCII:=15; !Close communication SocketClose server; SocketClose client; ENDPROC ENDMODULE

Page 72: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

61

ABB RobotStudio Task Module

MODULE Sharath_Module !------------------------------------ Move to Pick Tool Entry ---------------------- ! Move_Tool_Fetch_Release_Entry; !WaitTime 1; !-------------------------------------- Fetch Tool1 -------------------------------- ! tool_Fetch rFetchTool1; ! MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; ! WaitTime 2; !------------------------------------- lock Grip Tool1 ---------------------------- ! Set DO10_9_airToolCh4; ! WaitTime 2; !-------------------------------------Release Tool1 ------------------------------- ! Reset DO10_9_airToolCh4; ! WaitTime 1; ! Set DO10_8_airToolCh3; ! WaitTime 1; ! Reset DO10_8_airToolCh3; ! WaitTime 1; !------------------------------------- Tool release ------------------------------- ! tool_Release rLeaveTool1; !-------------------------------------- Standard Position ------------------------ ! MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]],v200,z50,toolChanger; ! WaitTime 1; !--------------------Position Capture,Point 1 (Pickup) ---------------------------- ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL [[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]], v10, z50, toolChanger; ! WaitTime 2; ! Set DO10_9_airToolCh4;

Page 73: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

62

! WaitTime 2; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; !------------- Position Capture,Point-2 (Drop) ----------------------------------- ! MoveL RelTool ( ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ( ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL , v10, z50, toolChanger; ! WaitTime 2; ! Reset DO10_9_airToolCh4; ! WaitTime 1; ! Set DO10_8_airToolCh3; ! WaitTime 1; ! Reset DO10_8_airToolCh3; ! WaitTime 1; ! MoveL RelTool ( ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ( ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; ------------------ Position Capture,Point 3 (Pick Up) ------------------------------ ! MoveL RelTool ( ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ( ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL , v10, z50, toolChanger; ! WaitTime 2; ! Set DO10_9_airToolCh4; ! WaitTime 1; ! MoveL RelTool ( ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ( ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; !-------------------Position Capture,Point 1 (Drop) ------------------------------ ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL [[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]], v10, z50, toolChanger; ! WaitTime 2; ! Reset DO10_9_airToolCh4; ! WaitTime 1; ! Set DO10_8_airToolCh3;

Page 74: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

63

! WaitTime 1; ! Reset DO10_8_airToolCh3; ! WaitTime 1; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; ! WaitTime 2; ! MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; ! WaitTime 2; !----------------------------------------------------------------------------------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------------------------------------------------------------------------------- !PROC STDPOSITION() !MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; !WaitTime 1; !ENDPROC PROC TEST1() !------------------------------ ABB Getting Ready -------------------------------------------------- Move_Tool_Fetch_Release_Entry; WaitTime 1; !-------------------------------- Fetch Tool1 ---------------------------------------------- tool_Fetch rFetchTool1; MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 2; MoveL [[354.49,-368.82,525.04],[0.0105267,-0.896045,-0.443385,-0.0200519],[-1,0,0,0],[209.682,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 1; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v50, z50, toolChanger; WaitTime 2;

Page 75: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

64

MoveL [[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]], v20, z50, toolChanger; WaitTime 2; !--- Pickup Damaged Wheel ---- Set DO10_9_airToolCh4; WaitTime 2; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; WaitTime 2; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v50, z50, toolChanger; WaitTime 2; MoveL [[374.93,225.26,408.62],[0.0191212,-0.861854,-0.50665,0.0121124],[0,0,1,0],[209.694,9E+09,9E+09,9E+09,9E+09,9E+09]], v100, z50, toolChanger; WaitTime 1; MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v100, z50, toolChanger; WaitTime 3; MoveL [[354.50,-368.83,525.04],[0.0104895,-0.896046,-0.443384,-0.0200625],[-1,0,0,0],[209.69,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 1; !-------------------------Moving to assembly section---------------- MoveL [[1811.46,-1825.79,525.02],[0.010526,-0.896052,-0.443371,-0.020043],[-1,0,0,0],[2270.13,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 1; !------Position 2 drop--------------- MoveL RelTool ([[1988.42,-1535.36,347.21],[0.010536,-0.896045,-0.443386,-0.0200361],[0,0,1,0],[2263.17,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; MoveL RelTool ([[1988.42,-1535.36,347.21],[0.010536,-0.896045,-0.443386,-0.0200361],[0,0,1,0],[2263.17,9E+09,9E+09,9E+09,9E+09,9E+09]],0,0,-20), v20, z50, toolChanger; WaitTime 2; MoveL [[1988.42,-1535.36,347.21],[0.010536,-0.896045,-0.443386,-0.0200361],[0,0,1,0],[2263.17,9E+09,9E+09,9E+09,9E+09,9E+09]], v20, z50, toolChanger; WaitTime 2; !------Drop damaged Wheel ------------- Reset DO10_9_airToolCh4; WaitTime 1; Set DO10_8_airToolCh3; WaitTime 1; Reset DO10_8_airToolCh3; WaitTime 1; MoveL RelTool ([[1988.42,-1535.36,347.21],[0.010536,-0.896045,-0.443386,-0.0200361],[0,0,1,0],[2263.17,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; WaitTime 2; MoveL RelTool ([[1988.42,-1535.36,347.21],[0.010536,-0.896045,-0.443386,-0.0200361],[0,0,1,0],[2263.17,9E+09,9E+09,9E+09,9E+09,9E+09]],0,0,-100), v100, z50, toolChanger; WaitTime 3;

Page 76: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

65

!-----------------------------Position 3 pickup----------------- MoveL RelTool ([[1907.09,-1455.08,348.40],[0.0105332,-0.896036,-0.443406,-0.0200032],[0,0,1,0],[2225.99,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; MoveL RelTool ([[1907.09,-1455.08,348.40],[0.0105332,-0.896036,-0.443406,-0.0200032],[0,0,1,0],[2225.99,9E+09,9E+09,9E+09,9E+09,9E+09]],0,0,-20), v50, z50, toolChanger; WaitTime 2; MoveL [[1907.09,-1455.08,348.40],[0.0105332,-0.896036,-0.443406,-0.0200032],[0,0,1,0],[2225.99,9E+09,9E+09,9E+09,9E+09,9E+09]], v20, z50, toolChanger; WaitTime 2; !--------------------------Pickup New wheel --------- Set DO10_9_airToolCh4; WaitTime 1; MoveL RelTool ([[1907.09,-1455.08,348.40],[0.0105332,-0.896036,-0.443406,-0.0200032],[0,0,1,0],[2225.99,9E+09,9E+09,9E+09,9E+09,9E+09]],0,0,-20), v20, z50, toolChanger; WaitTime 2; MoveL RelTool ([[1907.09,-1455.08,348.40],[0.0105332,-0.896036,-0.443406,-0.0200032],[0,0,1,0],[2225.99,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; !-------------Assembly position------------------------ MoveL [[1811.46,-1825.79,525.02],[0.010526,-0.896052,-0.443371,-0.020043],[-1,0,0,0],[2270.13,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 1; !----------------------------------Rover Re Entry Drop back------------------------- MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 3; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v100, z50, toolChanger; WaitTime 2; MoveL [[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]], v20, z50, toolChanger; WaitTime 2; !-----------------Drop new wheel ---------------------- Reset DO10_9_airToolCh4; WaitTime 1; Set DO10_8_airToolCh3; WaitTime 1; Reset DO10_8_airToolCh3; WaitTime 1; MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-20), v20, z50, toolChanger; WaitTime 2;

Page 77: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

66

MoveL RelTool ([[370.91,227.33,308.73],[0.0191329,-0.861864,-0.506634,0.0120982],[0,0,1,0],[209.692,9E+09,9E+09,9E+09,9E+09,9E+09]] ,0,0,-100), v100, z50, toolChanger; WaitTime 2; MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v100, z50, toolChanger; WaitTime 3; !------------------------------------------- Tool release ----------------------- tool_Release rLeaveTool1; !------------------------------------------ Standard Position ---------------------- MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]],v200,z50,toolChanger; WaitTime 1; ENDPROC PROC TEST2() !------------------------------------------------------- ABB Getting Ready -------------------------------------------------- MoveL [[354.49,-368.82,525.05],[0.0104966,-0.896044,-0.443388,-0.0200634],[-1,0,0,0],[209.678,9E+09,9E+09,9E+09,9E+09,9E+09]], v200, z50, toolChanger; WaitTime 2; !------------------------------------------------------- Fetch Tool1 ---------------------------------------------- ENDPROC !------------------------------------------------------------------------------------------------------------------------- Author: Arash ! ! Version: 1.0 MODULE Arash PROC tool_Fetch(PERS robtarget rFetchTool) set DO10_7_openToolCh; reSet DO10_6_lockToolCh; WaitTime 1; MoveAbsJ jBeforeTC,v200,z30,toolChanger; WaitTime 1; MoveJ RelTool(rFetchTool,0,0,-100),v100,z20,toolChanger; WaitTime 1; MoveJ RelTool(rFetchTool,0,0,-20),v20,fine,toolChanger; WaitTime 1; MoveL rFetchTool,v10,fine,toolChanger; WaitTime 1; !attach Reset DO10_7_openToolCh;

Page 78: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

67

Set DO10_6_lockToolCh; WaitTime 1; MoveL reltool(rFetchTool,10,0,0),v10,z0,toolChanger; WaitTime 1; MoveL reltool(rFetchTool,120,0,-80),v20,z5,toolChanger; WaitTime 1; ENDPROC PROC tool_Release(PERS robtarget rLeaveTool) ! Release Tool1 MoveAbsJ jBeforeTC,v100,z30,toolChanger; WaitTime 1; MoveJ RelTool(rLeaveTool,80,0,-70\Ry:=20),v100,z0,toolChanger; WaitTime 1; MoveL RelTool(rLeaveTool,10,0,0),v20,fine,toolChanger; WaitTime 1; MoveL rLeaveTool,v10,fine,toolChanger; WaitTime 1; !!!!!!!!! !release Reset DO10_6_lockToolCh; Set DO10_7_openToolCh; WaitTime 1; MoveL reltool(rLeaveTool,0,0,-20),v10,fine,toolChanger; WaitTime 1; MoveJ RelTool(rLeaveTool,0,0,-80),v30,z20,toolChanger; WaitTime 1; ENDPROC ENDMODULE

Page 79: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

68

Source code for TCP Client for nxtStudio /*

* Created by nxtSTUDIO.

* User: Arash

* Date: 1/31/2018

* Time: 4:05 PM

*

*/

using System;

using System.Drawing;

using NxtControl.GuiFramework;

using NxtStudio.Symbols;

using System.Text;

using System.Windows.Forms;

using System.Threading;

using System.Net;

using System.Net.Sockets;

using System.Timers;

namespace HMI.Main.Symbols.TCPClient

{

/// <summary>

/// Description of sDefault.

/// </summary>

public partial class sDefault :

NxtControl.GuiFramework.HMISymbol

{

string message = "0";

int sent = 0;

int packetsToSend = 1000;

public sDefault()

{

//

// The InitializeComponent() call is required for

Windows Forms designer support.

//

InitializeComponent();

this.Start_Fired += new EventHandler

<TCPClient.StartEventArgs>(Start);

}

public void Start(object sender,

TCPClient.StartEventArgs se){

this.FireEvent_isStarted();

DateTime timeOut = DateTime.UtcNow.AddMilliseconds(5);

try

{

Int32 port = 20206;

TcpClient client = new TcpClient("10.135.109.51", port);

//encode and send message -> data

Page 80: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

69

Byte[] data =

System.Text.Encoding.ASCII.GetBytes(message);

// Get a client stream for reading and writing.

// Stream stream = client.GetStream();

NetworkStream stream = client.GetStream();

if (message == "0")

{

Byte[] firstData =

System.Text.Encoding.ASCII.GetBytes(message);

stream.Write(firstData, 0, firstData.Length);

sent = sent + 1;

}

else { }

while (true){

// if (sent >= packetsToSend){

if (DateTime.UtcNow >= timeOut){

sent = 0;

stream.Close();

client.Close();

break;

}else { }

sent = sent + 1;

//Do not use, if using Ping pong! only if send only

//Byte[] firstData =

System.Text.Encoding.ASCII.GetBytes(message);

//stream.Write(firstData, 0, firstData.Length);

//Clean our former data

data = new Byte[1024];

// Read the first batch of the TcpServer response

bytes.

Int32 bytes = stream.Read(data, 0, data.Length);

String responseData =

System.Text.Encoding.ASCII.GetString(data, 0, bytes);

// Sends back the value we got from server, to ping

pong it.

Byte[] sendReturnData =

System.Text.Encoding.ASCII.GetBytes(responseData);

stream.Write(sendReturnData, 0,

sendReturnData.Length);

// Close everything.

//stream.Close();

// client.Close();

}

}

catch (ArgumentNullException e)

{

Console.WriteLine("ArgumentNullException: {0}", e);

}

catch (SocketException e)

{

Page 81: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

70

Console.WriteLine("SocketException: {0}", e);

}

}

void FreeText1Click(object sender, EventArgs e)

{

}

}

}

3D Models used in this project

Page 82: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

71

Page 83: Adaptive Reconfigurable Manufacturing System for Marsltu.diva-portal.org/smash/get/diva2:1222235/FULLTEXT01.pdf · Reconfigurable Manufacturing System for Mars (ARMS for Mars)" and

72

Video Description Link:

https://www.youtube.com/watch?v=0kyfoe2iGjo