Entrances and Exits

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 84

Project: Remote maintenance and remote management of robotic and/or automated

systems
Topic 4: INPUTS and OUTPUTS

INPUTS and EXITS

4.1 Robot inputs and outputs


The robot system has a digital input and output connector that is located in the robot controller
module, which in the case of the IR120 is the compact model. The “pinning” of the connector
corresponding to the inputs, outputs and voltage taps is as follows:
-XP7
DSQC-652
INPUT CH 1...8 21 INPUT 01
1 _ AA 22 INPUT 02
1 23 INPUT 03
1z! 24
to , 1
INPUT 04
25 INPUT 05
J.
1
26 INPUT 06
27 INPUT 07
28 INPUT 08
INPUT CH 9...16 31 INPUT 09
32 INPUT 10
33 INPUT 11
34 INPUT 12
35 INPUT 13
36 INPUT 14
37 INPUT 15
38 INPUT 16

OUTPUT CH 1...8
1 OUTPUT 01
2 OUTPUT 02
3 OUTPUT 03
4 OUTPUT 04
5 OUTPUT 05
6 OUTPUT 06
7 OUTPUT 07
8 OUTPUT 08
OUTPUT CH 9...16
11 OUTPUT 09
12 OUTPUT 10
13 OUTPUT 11
14 OUTPUT 12
15 OUTPUT 13
16 OUTPUT 14
17 OUTPUT 15
18 OUTPUT 16

-XS10
1 24V OUT
Topic 4: Entries and exits.

2 0V OUT
3 0V OUTPUT
4 24V OUTPUT
5 0V Input
6

1
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS

It consists of a 44-pole D-sub type connector that is internally connected to the I/O unit
(DSQC-652) and can connect up to 16 inputs and 16 digital outputs that are used to connect
part presence or activation detectors. of welding tong solenoid valves for example.

Configuring I/O signals

If the robot system does not have inputs/outputs configured, the following steps must be
followed:

1. Configuration of the input/output card: Configure the card that the controller module

2
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS

has installed. In the FlexPendant select ABB\ Control Panel\Settings\Unit

A nn G Manual
Protected stoppage

mpw 6J System 1 (EAS0-25D835B9EA)

8 Control panel 1 x
“X
Protected stoppage

Name Comment A » » II G I Manual FIDIDJU 65J0


Sistemal (EASO-2 5D835B9EA) Stopped (Speed 1009b)

9 Control Panel - Settings


m Appearance
Allows Persor

Param. of know Each theme has different types that configure the system.
8 Supervision Configure the s
Current topic: I/O

4 Fl exPendant Confi aura the


Select a topic and the type of instances you want to view.
5 F/S
1 to 11 of 11
6 Language Allows selection
Access Level Bus

S Programmable keys... Allows config |^ ) Cross Connection


Fieldbus Command Type
Fieldbus Command
Route
Date and time To establish
signal System Input
4 Diacnastic Diacnastic of
System Output
69 Trust
uration Configure par. unit,
Unit Type
bl Touch screen Allows caliber

Topic 4: Entries and exits.


aa
9 Panel 6 control
Archive Topics Show everything Close

Control ROB_1
panel

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
Once Unit is selected, in the new pop-up screen, select Add and fill in the requested information.

A IB II |[ G AN
Manual Protected stoppage

IDIDJ 6 System 1 (EASO-25D835B9EA) Stopped (Speed 1009b) v


ZN
Control Panel - Configuration - Unit
Manual Protected pore

T 12 । System (t ASO-25003589 A)

Control Panel - Settings - Unit - Add


Arrested (vekocity 1009.)

Current type: unit


When adding new instances, all required data must contain a value.
Add a new instance or select one of

PANEL Double-tap* on a parameter to be


DRV_2 able to modify it.
Parameter name Worth

DRV_4 Yam tl

V Type of Uhit d652_Lean


V Connected to Bus DeviceNet Lean

Unit Identification Label .


-m-mmmmP.
Unit Trustlevel Error when lost (1)

Unit Startup State activated

oka
y

4- In Name : identify the card with any name. For example t1 .


4- In Type of Unit : identify the card installed in the robot system. In the example d652 .
Otherwise, choose Virtual .
4- In Connected to Bus : identify the internal bus to which the card is connected in the
DeviceNet robot controller. Otherwise, choose Virtual .
4- The other fields are optional.

2. Configuration of input/output signals: On the FlexPendant select ABB\Control Panel \


Settings\Signal

II G 11 Manual Protected stoppage The || \Z |


PIDIDJ 2] System 1 (EASO-25D835B9E A) Stopped (Speed 100%) 11 / 1

8 Control panel
AII“8
Manual Protected stoppage He
System? (EASO-25D835B9EA) Stopped (Speed 1009 b)
bre Comment

9 Control Panel - Settings


Blac Supervision Param. of sup Each theme has different types that configure the system.
Fl exPendant Configure the! Current topic: I/O

k □ f IS Configure the Select a topic and the type of instances you want to view.

1 to 11 of 11
Language Allows select
Access Level Bus
Programmable keys... Allows confide Cross Connection Fieldbus command
Date and time To establish Fieldbus Command Type Route
DiarnctirA DiarnctirA signal System Input
Ale
System Output unit
Setting Configure pai
Unit Type
Touch screen Allows
calibration
Q anel
control Archive
aa
Topics Show everything Close
“c
R0B_l
e Window —
production
o Control
Panel

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS

To
pi
c
4:
En
tri
es
an
d
ex

5
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
Once Signal is selected, in the new pop-up screen, select Add and fill in the information
requested.

A »n|k i • If Manual Protected stoppage m


mvw 61 System? (EASO-25D835B9EA) Stopped (Speed 1000)

Control Panel - Settings - Signal If G lí Manual Protected stoppage 2


mp» 6) System? (EASO-25D835B9EA) Stopped (Speed 100%)

Control Panel - Settings - Signal - Add


Current type: signal
When adding new instances, all required data must contain a value.
Add a new instance or select one of 1
2 ESI Double tap on a parameter to be able to modify it.

AND Parameter name Worth 1 to 6 of 11

and EN2 Yam pain


AND • Type of Signal Digital Output
and AUT02 Assigned to Unit tl
AND Signal Identification Label
and MANFS1 • Unit Mapping 0
AND
Edit Delete

e Window —
9 Control panel
Add, Category 0
h II
V1
production
okay Cancel
ROB_1
R Window Panel 6 control
- production

+ In Name : identify the signal with a meaningful name. For example do1 (digital output
1).
4- In Type of Signal : identify the type of signal. In the example it is an output, therefore
Digital Output .
J- In Assigned to Unit : identify the card to which the signal belongs, configured in the
previous point t1 .
J- In Unit Mapping : assign the 16 output bits that the card has, with which of them it is
configured. As it is the first bit, it is assigned 0 .
4- In Category : assign 0 .
4- In Access Level : assign All (access from the FlexPendant and RobotStudio) or Default
(access only from the FlexPendant).
4- In Default value : assign the value of the signal at rest (0 or 1) in this case 0 .
4- The other fields are optional.

This process must be repeated until all the input and output signals are configured. Since upon
accepting each of them the program asks to restart the FlexPendant, No will be selected, except for
the last configured signal. When the FlexPendant restarts, all programmed signals are operational
Topic 4: Entries and exits.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
3. Configuration of input/output signal groups: On the FlexPendant select ABB\
Control Panel \Settings\Signal

The procedure is the same as if an input or output were configured, only that in the signal
type you must choose Group Input or Group Output .

To form a group of signals, it is necessary that they be previously defined. For example, if
you want to configure a group of digital inputs:

4- In Name : Identify the signal group with a meaningful name. For example
gi1 (group digital input 1).
4- In Type of Signal : identify that it is a group of input signals, therefore
GroupInput .
4- In Assigned to Unit : identify the card to which the signal belongs, configured in the
previous point t1 .
4- In Unit Mapping : assign the input bits that the group contains. If 0-3 is assigned, it
means that it is made up of bits 0, 1, 2 and 3. If 1,2 is assigned, it means that it is
made up of bits 1 and 2.
4- In Category : assign 0 .
4- In Access Level : assign All (access from the FlexPendant and RobotStudio) or Default
(access only from the FlexPendant).
4- The other fields are optional.

4. Configuration of analog input/output signal groups: The procedure is the same as if a


digital input or output were configured, only that in the signal type you must choose Analog
Input or Analog Output .

4.2 Viewing and forcing values of I/O signals


Topic 4: Entries and exits.

The value of the inputs and outputs can be viewed and simulated or forced from the
FlexPendant. To do this, select ABB\ Control Panel\Inputs and Outputs.

In the pop-up screen, if nothing is displayed, you must choose the type of signals that you want
to view or manipulate. In the example in the figure it corresponds to digital inputs, to do so
click on View and choose the aforementioned digital inputs .

7
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
Protected stoppage
Stopped (Speed 1009 b)

Entries and exits

Motion

Program data

E'd Production Manager

All digital inputs configured with the value will be displayed. If you want to vary the value of
input di1, for example, just select it and click on Simulate .
TO nn Manual Protected stoppage
»»» SystemZ (EASO-25D835B9EA) Stopped (Speed 100%)

# Inputs and outputs

AI•D[G
•X
Manual Protected stoppage
Digital tickets
IDIDJ &
System2 (EASO-25D835B9EA) Stopped (Speed 100%)
Select an I/O signal from the list.
Entries and exits
Select design
Digital tickets

0
dil ,
Select an I/O signal from the list. Default finished
Name / I Value Guy Simulated

dil 1, GAVE Yeah


d2 0 GAVE No
dl3 0 GAVE No
dl4 0 GAVE No
d5 0 GAVE No
d6 0 GAVE No
d7 0 GAVE No
di8 0 GAVE No

Delete "V to to
simulation Virtual See

Using the digits 0 and 1 that become visible, their value can be forced and the inputs are
configured as Simulated .
Topic 4: Entries and exits.

If you intend to act with the physical input, it must not be selected as simulated, so you
must select the corresponding input and click on Delete simulation , otherwise the system
will not respond to changes in the wired input.

8
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
Viewing a group of I/O signals

The value of the configured groups of inputs and outputs can also be viewed and simulated or
forced from the FlexPendant. To do this, select ABB\ Control Panel\Inputs and Outputs,
click on View and choose Group Input .

A »» ñii Manual Protected stoppage The A


System? (EASO-25D835B9EA) Stopped (Velocidac I/O aliases
I/O buses I/O units All
Select
signals
predi
ct Digital inputs Digital
Worth Tipc
outputs Analog inputs
Analog outputs Group
input Group output '
• More common

Safety signs
Simulated signals
TO
Virtual See
ROB 1

and

All digital input groups configured with the current value expressed in decimal will be
displayed. If you want to vary the value of the group of inputs, just select it and click
Simulate .

Topic 4: Entries and exits.

9
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS
By clicking on 123… a numerical keyboard becomes visible with which to assign the value to
the group. As seen in the figure, the maximum and minimum values that said group can have,
expressed in decimal, are also available.

In the example, a value of 9 has been assigned and since the input group is made up of inputs
4-7, its value will be selected as follows.

gi0 di4 di5 di6 di7


Entry Group Input 4 Input 5 Input 6 Input 7
Binary value 1 0 0 1
decimal value 9

4.3 Instructions and data


The most used instructions related to inputs and outputs are:

J- IF…THEN : Conditional instruction that executes a series of instructions if the condition


is met. For example IF di1=1 THEN……..
4- Set : Instruction that activates a digital output signal. For example Set do1.
J- Reset : Instruction that deactivates a digital output signal. For example Reset do1.
4- WaitDI : Wait until an input digital signal is activated. For example WaitDI
di1.

There are other interesting instructions that will be explained as they need to be used in the
activities linked to this topic. For more information, consult the RAPID manual.

Numerical data

Although they are not necessarily linked to input and output instructions, they are used, for
example, to program counters. The value type can be:

4- Integer : For example -3 .


4- Decimal : For example 4.28 .
3
4- Expressed in exponential form : For example 2E3 (2.10 ) or 2.5E-2 (0.025).

The most used instructions related to numerical data are:

4- := : Assignment, a value is assigned to the data. Obviously both sides of the


assignment
They have to have the same data format since it is not only used with numerical data.
For example reg1 := 5 ; (reg1 is defined as numeric data).
4- Incr : Increases the numerical variable by one. For example Incr cont1; which is
equivalent to (cont1 := cont1+1)
4- Decr : Decrements the numerical variable by one. For example Decr cont1; which is
equivalent
Topic 4: Entries and exits.

a (cont1 := cont1-1)
4- Add : Adds a value to the numeric variable. For example Add cont1 25; Which is
equivalent to
(cont1 := cont1+25)
4- Clear: Clears the value of the numeric variable. For example Clear cont1; Which is
equivalent to
(cont1 := 0)

1
0
Project: Remote maintenance and remote management of robotic and/or automated
systems
Topic 4: INPUTS and OUTPUTS

PROJECT FINANCED BY:


Topic 4: Entries and exits.

■ EUROPEAN UNION

European Social Fund

The European Social Fund


invest in your future

1
1
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY INPUTS and EXITS


4.1 SIGNAL MANAGEMENT

Activity 01.- Program the code necessary to recognize the digital inputs.
objectives: 02.- Program the code necessary to activate the digital outputs.
03.- Understand the structure of instructions with inputs and outputs.

Previous 01.- Digital inputs and outputs of the robot. Connection of the same.
knowledge: 02.- Digital inputs and outputs of the robot. Configuration and
verification
Related
knowledge: 01.- Management of inputs and outputs in the FlexPendant Manual
FlexPendant Chapter 8
02.- Instruction Set Instruction Manual, functions and RAPID data types.
03.- Instruction Reset Instruction Manual, functions and data types
RAPID.
04.- WaitTime Instruction Instruction Manual, functions and RAPID data
types.
05.- WaitDI Instruction Instruction Manual, functions and RAPID data
types.
04.- WaitUntil Instruction RAPID Instruction Manual, functions and data
types.
05.- Instruction PulseDO Instruction Manual, functions and data types
RAPID.

Necessary 01.- IRB120 Robot System or another higher range.


resources
01.- Ticketsandoutputs1Realization conditioned of a pyramidto
Related image
the
files
waiting for an input signal. Green and red light activation.
02.- Ticketsandoutputs2Realization conditioned of a pyramidto
the
waiting for an input signal. Green and red light activation. WaitTime 03.-
Ticketsandoutputs3Realization conditioned of a pyramidto
the
waiting for a “bimanual” input signal. Intermittence.
Related 01.- Inputs and outputs Conditioned realization of a pyramid waiting for
Program Files an input signal. Green and red light activation.

Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
Activity 4.1: Entries and exits. Signal management

programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

EUROPEAN
UNION
European Social Fund
The European
Social Fund invests
in your future

1
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY INPUTS and EXITS


4.1 SIGNAL MANAGEMENT

Goals:

1 .- Create a program so that the tip of the tool draws or follows the edges of a pyramid, when
an input signal ( di1 ) is activated.

2 .- Two digital output signals will be activated, to each of which a lamp will be connected:

4- While the tool is in the rest position, the output signal ( do1 ) will be activated, turning
on the green lamp.
4- When the cycle start signal is activated, the output signal ( do2 ) will be activated,
turning on the red lamp and the green lamp will turn off.

3.- The program will have a starting point far from the pyramid.

Procedure:

1 .- Create a program following the steps described in topic T3. ABB\ Program Editor\
Tasks and Programs\File\New Program.

2 .- Create the “ pyramid ” routine following the steps described in topic T3, taking into
Activity 4.1: Entries and exits. Signal management

account that the selected tool is the so-called pointer that is previously calibrated. ABB\
Program editor Routines tab\File\New routine.

PROC pyramid()
MoveJ p10, v1000,fine,pointer;
MoveL p20, v1000,fine,pointer;
MoveL p50, v1000,fine,pointer;
MoveL p40, v1000,fine,pointer;
MoveL p30, v1000,fine,pointer;
MoveL p50, v1000,fine,pointer;
MoveL p30, v1000,fine,pointer;
MoveL p20, v1000,fine,pointer;
MoveL offs (p20,0,0,150), v1000,fine, pointer;
ENDPROC

2
Project: Remote maintenance and remote management of robotic and/or automated
systems
3 .- Insert the instructions corresponding to the activation of the output signals and the waiting
for the input signal:

1- For the program to execute the “pyramid” routine when the input signal is activated,
insert the WaitDI instruction from the Common group (by pressing next). On the next
screen choose di1 to replace <EXP> . If the routine had to be activated with the input
with a value of 0, the instruction would have to be edited ( Edit\ABC… ) to change its
value:

WaitDI di1 , 1 ; → WaitDI di1 , 0 ;

4- For the program to deactivate the outputs, insert the Reset instruction from the same
Common group.

To EBI Manual Protected stoppage


System? (EASO-25D835B9EA) Stopped (Speed 100%0)
TNewProgramName in T_ROBl/MainModule/main

Tasks and programs Routine


s
5 PROC main()
Common
6 Set dol;

Wai
WaitDO
8
WaitUntil
9 tA
WHILE
10

ENDMODUL
E

Add
instruction

Reset dol;
Set do2 ;
pyramid
MoveAbsJ JposlO\NoEO Reset do2;
ENDPROC

Syntax of the main procedure:

PROC main ()

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Set do1 ; “active the output1 either lamp green"
WaitDI di1 , 1 ; "wait to that entry1 is activate (set to
1)”
Reset do1 ; “deactivates output1 or lamp green"
Set do2 ; “active the output2 either lamp red”
pyramid ; “execute thepyramid routine
MoveAbsJ jpos10 \ NoEOffs , v1000 , z50 , MyTool ; “starting position”
Reset do2 ; “deactivates output2 or red lamp”

ENDPROC

Activity 4.1: Entries and exits. Signal management

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
Observation:

As soon as the MoveAbsJ instruction that takes the robot to the starting position begins to be
executed, the pointer moves to the next instruction that turns off the red light ( Reset do2 )
and even goes on to execute the next one that turns on the green light ( Set do1 ). without the
robot's arms having yet reached said initial position because the robot's movements take much
longer to execute than the movement of the pointer.

This situation is reflected in the FlexPendant by observing that the robot symbol is in the
MoveAbsJ instruction while the program pointer is in the WaitDI instruction having executed
the two aforementioned instructions.

One solution is to introduce a wait instruction in which the program pointer will be stopped for
the time it takes for the robot arms to reach the starting position. The instruction to use is
WaitTime :

PROC main ()

Set do1 ; “active the output1 either lamp green"


WaitDI di1 , 1 ; "wait because input1 is activate (set to 1)”
Reset do1 ; “deactivates output1 or lamp green" Activity 4.1: Entries and exits. Signal management
Set do2 ; “active the output2 either lamp red”
pyramid ; “execute the pyramid routine”
MoveAbsJ jpos10 \ NoEOffs , v1000 , z50 , MyTool ; “starting position”
WaitTime 2 ; “wait 2s”
Reset do2 ; “deactivates output2 or red lamp”

ENDPROC

4 .- Run the program by placing the cursor on main (Debug\ PP to main) and press the
Play button to begin the robot movements. In order to execute the conditions, the input and
the two outputs will be conveniently wired to the robot controller following the general scheme
expressed in Topic 4.

5
Project: Remote maintenance and remote management of robotic and/or automated
systems

The attached diagram takes advantage of the internal power supply of the robot controller.

Bimanual safety. PulseDO instruction

5 .- With the same procedure, “pyramid” routine, it is intended that it does not start until the
two buttons have been pressed at the same time (two-handed safety) and that while the robot
arm is withdrawn to the starting position, the red light performs a flashing using the PulseDO
instruction.

The syntax of the program will be:

PROC main ()
Activity 4.1: Entries and exits. Signal management
Set do1 ;
WaitUntil di1 = 1 AND di2 = 1 ; ”Bimanual safety”
Reset do1 ;
Set do2 ;
pyramid ;
MoveAbsJ jpos10 \ NoEOffs , v1000 , z50 , MyTool ;
Reset do2 ; “deactivates output2”
WaitTime 0.4 ; “waits for a period of 0.4s.”
PulseDO \ PLength := 0.4 , do2 ; “activates output2 for a period of 0.4s.”
WaitTime 0.4 ;
PulseDO \ PLength := 0.4 , do2 ;
WaitTime 0.4 ;

ENDPROC

The PulseDO instruction generates a pulse at the specified output, in this case do2, for the
time assigned to the argument \ PLength := 0.4 , in this case 0.4 seconds.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems

The following figures show how this instruction is executed when the previous signal
level corresponds to “0” or “1”.
Duration of the pulse

1
Signal level
0

Executing the PulseDo statement

The program could also have been made with Set instructions; Reset and WaitTime

Ac
tiv
ity
4.
1:
En
tri
es
an
d
ex
its
.
Si
gn
al
m
an

7
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY INPUTS and EXITS


4.2 CONDITIONAL PROGRAMMING

Activity
01.- Program the code necessary for the robot to perform a task based on
objectives:
the status of an input.
02.- Understand the structure of conditional instructions.
03.- Program the robot using the FlexPendant.
01.- Digital inputs and outputs of the robot. Configuration and
Previous
verification.
knowledge:
02.- Jump to routines .
Related
01.- Management of inputs and outputs in the FlexPendant Manual
knowledge:
FlexPendant Chapter 8
02.- IF Instruction RAPID Instruction Manual, functions and data types.
03.- Compact IF Instruction Instruction Manual, functions and RAPID data
types.

Necessary 01.- IRB120 Robot System or another higher range.


resources
01.- Conditional1 Conditional realization of a hexagon and a plate with the
Related image
IF….THEN or CompactIF instruction.
files
02.- Conditional2_hex Realization conditioned of the hexagon
with the
IF… THEN statement ELSE, when the digital input is = 1.
03.- Conditional2_ple Realization conditioned of the plate with the
IF… THEN statement ELSE when digital input is = 0.
Note: Input activation cannot be observed in the simulation.

Related Program 01.- Conditional Programming of the hexagon and plate with the IF… THEN
Files instruction ELSE.
02.- Conditional1 Programming the hexagon and plate with the IF… THEN
or CompactIF instruction.

Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

1
Project: Remote maintenance and remote management of robotic and/or automated
systems

adhg e8e EUROPEAN UNION


• EEF * European Social Fund
MINISTRY AND-
TrJLk* OF EDUCATION
The F
, European ,
" I ífH CULTURE AND SPORTS 9th Social m 13 m invest in your future

Ac
tiv
ity
4.
2:
En
tri
es
an
d
ex
its
.
Co
nd
iti
on
al
2
pr
og
Project: Remote maintenance and remote management of robotic and/or automated
systems
ACTIVITY INPUTS and EXITS
4.2 CONDITIONAL PROGRAMMING

Goals:

1 .- Create a program so that the tip of the tool draws or follows the two geometric shapes
expressed in the figure, hexagon and “plate”.

2 .- Each figure will be programmed in a different routine. All of them will be called from the main
routine and depending on two digital inputs the robot will execute the figures:

J- Yeah is activated the digital input 1 ( di1 ), he robot will run


the hexagon.
4- Yeah is activated the digital input 2 ( di2 ), he robot will
execute the “deck.
J- If no digital input is activated, the robot will remain in the start position without executing any
figure.

3.- The program will have a starting point away from the geometric shapes.

Procedure:

1 .- Create a program following the steps described in topic T3. ABB\ Program Editor\Tasks and
Programs\File\New Program.

2 .- Create the routines following the steps described in topic T3, taking into account that the
Activity 4.2: Entries and exits. Conditional programming.
selected tool is the so-called pointer that is previously calibrated. ABB\ Program editor Routines
tab\File\New routine.

PROC hexagon()
MoveJ p20, v1000,fine,pointer;
MoveL p30, v1000,fine,pointer;
MoveL p40, v1000,fine,pointer;
MoveL p50, v1000,fine,pointer;
MoveL p60, v1000,fine,pointer;
MoveL p70, v1000,fine,pointer;
MoveL p20, v1000,fine,pointer;
MoveL offs (p20,0,0,50), v1000,fine, pointer;
ENDPROC

PROC deck()
MoveJ p80, v1000,fine,pointer;
MoveL p90, v1000,fine,pointer;
MoveL p100, v1000,fine, pointer;
MoveC p110, 120, v1000,fine, pointer;
MoveL p80, v1000,fine,pointer;
ENDPROC

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
3 .- Insert the instructions corresponding to the conditional call of the routines using the IF
instruction. To do this, place the cursor on the start point instruction ( MoveAbsJ jpos10 ) in the
main routine and Add\IF instruction .

I( |í Manual Protected stoppage He ||


x
II System? (EAS0-?5D835B9EA) Stopped (Speed 100%)

CONST robtarget p110:=IF450

TNewProgramName in T ROBl/MainModule/main

Tasks
15 and programs Modules Routines

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
PROC main) /\
4 .- To insert the condition (activate digital input 1, di1 ) click twice on <EXP> and if the expressions
that appear are not valid as is the case, search for the data type by clicking on Change data type .
Choose the signaldi data type and press OK . Choose the desired entry in the pop-up window, in this
case di1 .

H IG
A nAsset: Manual
bool Protected stoppage
Result: bool
SystemZ (EAS0-25D835B9EA) Stopped (Speed 100%)
Active filter: Suggestion:any type

<EXP> Common

MoveAbsJ jposlO\NoEOffs, Compact IF


Data Features
hexagon;
FOR I.F 1 to 10 of 1:
18 ENDPROC .
19 PROC hexagon()
20 Move J p20, vlOOO, p30, finePF To lili ii Manual Protected stoppage

MoveL vlOOO, p40, finé, F NewProgramName in T_ROBl/MainModule/main


22 MoveL vlOOO, p50, fine, F fine,
Tasks and programs Modules Routines
MoveL vlOOO, p60, F fine__
CONST robtarget p110:=[F45
24 MoveL vlOOO, p70, Common
25 MoveL vlOOO, p20, fink//F
15 PROC main)
26 MoveL vlOOO, finei t: MoveAbsJ jposi0\NoEOffs ,
Add V
Edit

Debug 18 •IF <EX P> THEN| FOR
instruction <SMT>•s
19 MoveAbsJ
R Window $ n T_ROB1 END: F
production F MainMod...
20 h hexagon; Mnue i

V Insert expression

New FALSE
TRUE bEvMaskSysMutex

Activity 4.2: Entries and exits. Conditional programming.


bEvMasküsrMutex eventmaskinit
eventmaskmutex gapAccessI oExDef
gapAccessIolnDef gapAccessTrDef

Change data
Edit Cancel
type..
n Production T_ROB1
window MainMod... AIPIGManual Protected stoppage

mp» 6 System? (EAS0-25D835B9EA)


V Insert expression
Stopped (Speed 100%)

rmqslot robjoint
shapedata sign it! Asset: signaldi Result: bool
Active filter: Suggestion: signaldi
signaldi signaldo

signalgo singdata
socketstatus speeddata Data Features
1 to 9 of 9
See
New
dil
di2 di3

5
Project: Remote maintenance and remote management of robotic and/or automated
systems

A »II Manual Protected stoppage


mvw System? (EASO-25D835B9EA) Stopped (Speed 100%)

F NewProgramName in T_ROBl/MainModule/main

Tasks and programs Modules Routine


s
14 CONST robtarget pl VAR 10 := IF450
Cut | go to the beginning
15 num reg6:=0;
Copy |
go to the end
16 PROC main(
17 MoveAbsJ jposi0\NoEOffs, Paste | Paste on top
18 IF EEi THEN Eliminate
<SMT> Change select... |
19
20 ENDIF abc.u Mirror...

21 hexagon TO* _ ..1


Manual Protected stoppage
22 ENDPROC
System? (EASO-25D835B9EA) Stopped (Speed 10096)
23 PROC hexacone0
24 MoveJ . fine Entrance panel
p20, vlOOO
25 ________
e,/1
Mobile p30, vlOOC , fit
26 Havel d40. vlOOO, fine! t
to V
instruction Edit Debug

y Production T_ROB1
window F MainMod... |
e
CHA
An» Manual
System? (EASO-25D835B9EA)
P

N NewProgramName in T_ROBl/MainModule/ma shift home

Tasks and programs Modules

CONST robtarget pllO: AI End

VAR num reg6:=0;


PROC main okay Cancel
MoveAbsJ jposlO\ IF dil=lNoEOffs
Production ROBL
THEN window
T_ROB1
MainMod...

<SMT>
ENDIF MoveJ MoveL
ENDPROC
ProcCall Reset
PROC hexagon()
MoveJ p20, vlOOO RETURN Set
MoveL p30, vlOOO
MoveL p40, vlOOO
MoveL d50, vlOOO fi
end<
/P Former Following

Add „ To Modify Hide


Edit Debug
instruction statements
position
R Window 5 T_ROB1 ROB_1
production MainMod.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems

5 .- Once the input has been inserted, to complete the condition (activate digital input 1,
di1=1 ) click on Edit and choose ABC… to edit the condition. Using the keyboard popup, add
di1 to =1 to complete the condition.
Complete the instruction by calling the hexagon routine by selecting the <SMT> statement and
calling the routine with the ProcCall instruction. The main procedure once the conditional calls
to the “hexagon” and “platen” routines have been inserted is as follows:
PROC main()
MoveAbsJ p10, v1000,fine, pointer; "Point of start"
IF di1=1 THEN ”conditional call to routine hexagon"
hexagon;
ENDIF
IF di2=1 THEN ”conditional call to deck routine” deck;
ENDIF
ENDPROC

Activity 4.2: Entries and exits. Conditional programming.

7
Project: Remote maintenance and remote management of robotic and/or automated
systems

6 .- Run the program by placing the cursor on main (Debug\ PP to main) and press the
Play button to begin the robot movements. In order to execute the conditions, the two inputs
will be conveniently wired to the robot controller following the general scheme expressed in
Topic 4. The attached diagram takes advantage of the internal power supply of the robot
controller.

When executing the program, the robot will create the hexagon, the plate, both geometric
figures or neither depending on the state of the two inputs.

Use of the IF…THEN statement; ELSE

Activity 4.2: Entries and exits. Conditional programming.


The IF statement is usually paired with the ELSE option in popular high-level programming
languages. In the case of the RAPID instruction, it is optional to use it. A variant of the previous
example is proposed in which:

4- If input di1 is on, the hexagon will be executed.


4- If input di1 is disabled, the deck will be executed.

The syntax of the program will be:

PROC main()
IF di1=1 THEN hexagon; ”conditional call to hexagon routine”
ELSE
platen; ”conditional call to board routine” ENDIF
ENDPROC

7.- Place the cursor on the start point instruction ( MoveAbsJ jpos10 ) in the main routine
and insert the IF instruction as expressed in section 3 of this activity.

8
Project: Remote maintenance and remote management of robotic and/or automated
systems

8.- Having selected all the IF instructions (the three lines that compose it), click twice on the
selection and in the window that appears, select Add ELSE . When you accept with OK , the
program lines of the IF statement contain the ELSE condition.

An» Manual
System? (EASO-25D835B9EA)
Protected stoppage
Stopped (Speed 1009 b)

FNewProgramName in T
ROB1/MainModule/main
Tasks and programs Modules Routines

PROC main() MoveAbsJ Common


jposl -
Compact IF
18 IF <EXP> THEN
19 <SMT
20 ENDIm
ENDPROC
22 PROC hexagon()
MoveJ p20 vlOO
24 MoveL p30 v100
25 MoveL p40 vlOO
Add
Edit Def
instruction
n Window TO T_ROB1 — production
* MainMod...

A »n Manual
mvw System? (EASO-25D835B9EA)

B NewProgramName in T ROB 1/ Ma inModule /1

Tasks and programs mode

PROC main()
MoveAbsJ jposl
IF <EXP> THEN
<SMT>
M
ELSE O
M v
<SMT> o e
v A
P
END IF e
r]b
o s
ENDPROC R
cE J
C
PROC hexagon () \ / eJ p20, T
a
U

Activity 4.2: Entries and exits. Conditional programming.


-- F
lR
MoyeJ p2 :
vlOQo/ lN
For o
Add „ To Modify me Hidell
Edit Debug r o
instruction statements
w
position i
R Window e T_ROB1
- production ♦ MainMod... n
g

9.- It is enough to adapt the program to the exposed syntax, following sections 4 and 5,
replacing:

+ <EXP> for the expression di1=1


4- <SMT> after THEN, for the statement expressed with the hexagon routine
4- <SMT> behind ELSE, by the statement expressed with the routine plate

PROC main()
IF di1=1 THEN hexagon; ”conditional call to
hexagon routine” ELSE board; ”conditional call to
board routine” ENDIF
ENDPROC

9
Project: Remote maintenance and remote management of robotic and/or automated
systems

As can be seen in the image corresponding to Add ELSE , there is the possibility of
programming a more complex condition with Add ELSEIF .

Using the CompactIF instruction

When the condition does not require the ELSE alternative, there is a compact IF statement,
that is, without ELSE, which is called CompactIF .

This instruction would be enough to program the first of the examples presented, to create the
hexagon or the plate based on the two inputs, to do this, steps similar to those presented in
said example will be followed. The syntax of the program will be:

PROC main()
IF di1=1 THEN hexagon; ”conditional call to hexagon routine”
IF di2=1 THEN plate; ”conditional call to board routine”
ENDPROC

As will be verified later, this instruction lacks ENDIF

10 .- Place the cursor on the start point instruction ( MoveAbsJ jpos10 ) in the main routine
and insert the CompactIF instruction.

Activity 4.2: Entries and exits. Conditional programming.

11 .- It is enough to adapt the program to the exposed syntax, following sections 4 and 5,
replacing:

1- <EXP> by the expression di1=1 or di2=1


J- <SMT> after THEN, for the statement expressed with the hexagon or plate routine

PROC main()
IF di1=1 hexagon; ”conditional call to hexagon routine”
IF di2=1 plate; ”conditional call to board routine”
ENDPROC

1
0
Project: Remote maintenance and remote management of robotic and/or automated
systems

12.- As seen in the image, this instruction is expressed in a single line and lacks ENDIF. Of
course the ELSE condition cannot be programmed.

Ac
tiv
ity
4.
2:
En
tri
es
an
d
ex
its
.
Co
nd
iti
on
al
pr
og
ra

1
1
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY INPUTS and EXITS


4.3 START AND STOP USING PUSH BUTTONS

Activity 01.- Program the digital inputs so that starting, stopping or other
objectives: operations can be performed without the help of the FlexPendant.
01.- Digital inputs and outputs of the robot. Connection of the same.
Previous
02.- Digital inputs and outputs of the robot. Configuration and
knowledge:
verification.
Related 01.- Execution in production FlexPendant Manual Chapter 7
knowledge: 02.- Management of inputs and outputs in the FlexPendant Manual
FlexPendant Chapter 8

Necessary 01.- IRB120 Robot System or another higher range.


resources

01.- Start and stop using pushbuttons Creation of a pyramid with Start
Related image
and stop using external buttons. Functioning
files
automatic.

Note: Input activation cannot be observed in the simulation.

Related Program 01.- Inputs and outputs2 Creation of a pyramid with start and stop using
Files external buttons. Automatic operation.

Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

1
Project: Remote maintenance and remote management of robotic and/or automated
systems

adhg e8e EUROPEAN UNION


• EEF * European Social Fund
MINISTRY AND-
TrJLk* OF EDUCATION
The F
, European ,
" I ífH CULTURE AND SPORTS 9th Social m 13 m invest in your future

Ac
tiv
ity
4.
3:
En
tri
es
an
d
ex
its
.
St
ar
t
an
d
st
op
us
in2
g
pu
Project: Remote maintenance and remote management of robotic and/or automated
systems
ACTIVITY INPUTS and EXITS
4.3 START AND STOP USING PUSH BUTTONS

Goals:

IMPORTANT! This activity can only be carried out in automatic mode, so you must ensure that the
safety measures are adequate since the robot will not operate at reduced speed. If the strict security
measures required by automatic operation cannot be ensured, do not carry out the activity .

1 .- Taking advantage of the “pyramid” routine of activity 4.1, start and stop the robot using external
buttons, that is, without using the PP options for main, play and stop of the FlexPendant.

2 .- Using the following digital input signals they will be activated:

4- Motors ON ( MotorON ) through input di1 .


J- Program pointer and start ( PP to main and Play ) through input di2 .
4- Stop ( Stop ) through input di3 .

Procedure:

Activity 4.3: Entries and exits. Start and stop using push buttons.
1 .- Call or create the “ pyramid ” routine of activity 4.1, taking into account that the selected tool
is the so-called pointer that is previously calibrated. ABB\ Program editor Routines tab\File\
New routine.

PROC pyramid()
MoveJ p10, v1000,fine, pointer;
MoveL p20, v1000,fine, pointer;
MoveL p50, v1000,fine, pointer;
MoveL p40, v1000,fine, pointer;
MoveL p30, v1000,fine, pointer;
MoveL p50, v1000,fine, pointer;
MoveL p30, v1000,fine, pointer;
MoveL p20, v1000,fine, pointer;
MoveL offs (p20,0,0,150), v1000,fine, pointer
ENDPROC

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
3.- Program the digital inputs to execute the actions mentioned above (MotorsON, start and stop). Go
to ABB\ Configuration and on the next screen click on System Input.

A558 EX
Í Manual Protected stoppage
1 System? (EASO-25D835B9EA) Stopped (Speed 100%)

• Control Panel

Name Comment 1 to 10 out of 10

Iff- 1 Appearance Allowspersonal---------:--------—-------- 1 to 11 of 11

S , , Access Level
Param, from superv
Bus
Supervision Cross Connection Fieldbus Command
Configure the
system Fieldbus Command Type Route
Configure the ser
signal System I rut
Allows selection h
System Output unit
8th Programmable keys... Allows you to set Unit Type I Q

Date and time To set I.

Diagnosis of sisu
G Configuration Configure system parameters Allows you to calibrate the touch screen.
n Window 3 Panel — production - control

4.- If there is no scheduled entry, click on Add, or if there are already tickets
programmed, click on Edit . On the next screen assign:

4- Signal Name: the input digital signal to which you want to assign the task. In the
shows digital input 1 ( di1 ).
4- Action: the action or task itself, in accordance with the conditions, put
motors ON ( Motors On ).

Parameter name Worth 1 to 2 of 2 |

Signal Name dil


action ABC...

Activity 4.3: Entries and exits. Start and stop using push buttons.
dil
,
ga
ve:
di4
ga
ve
die

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
In this way, input di1 is assigned to perform the Motors ON task. By confirming the assignment with
OK , the controller requests that it be restarted. As there are more signals to program, press No.

5.- To assign the second entry, click again on Add , or if there are already scheduled entries, click on
Edit . On the next screen assign:

4- Signal Name: The corresponding digital input ( di2 ).


4- Action: the action or task itself, in accordance with the conditions to place the
pointer and start ( Start a Main ).
4- Argument1: On this occasion, the action or task requires an argument exclusive to the task,
such as whether it only performs a single cycle or, on the contrary, continues running until
the stop button ( Cycle or Continuous ) is pressed.

Activity 4.3: Entries and exits. Start and stop using push buttons.

5
Project: Remote maintenance and remote management of robotic and/or automated
systems
6 .- Assign the last entry to the stop action ( Stop ) following the steps in the previous sections. To
finish, confirm the initialization of the FlexPendant.
Parameter name Worth Ia2de2 >

Signal Name d3

7 .- Insert the instructions corresponding to the main routine:

Syntax of the main procedure:

PROC main ()

Reset do1 ; “deactivates output 1 or green lamp”


Set do2 ; “activates output 2 or red lamp” pyramid ; “execute the pyramid routine”
MoveAbsJ jpos10 \ NoEOffs , v1000 , z50 , MyTool ; “starting position”
Reset do2 ; “deactivates output2 or red lamp”
Set do1 ; “activates output1 or green lamp” ENDPROC

8 .- Run the program by changing the key from manual to automatic because, as mentioned
previously, these operations can only be carried out in this operating mode. Strictly respect safety
regulations.
Once the operating mode has been switched, the FlexPendant warns that automatic mode has been
selected.

Activity 4.3: Entries and exits. Start and stop using push buttons.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems
Comment:

Once the selection of automatic mode is confirmed, when input di1 is pressed, it is observed that the
motors are turned ON without the need to operate anything else.

When input di2 is pressed, the program is executed by placing the pointer on the first instruction of
the main routine ( PP to main and Play ). To stop program execution, simply press input di3 (
Stop ).

In the program, there are no instructions related to these inputs because none of them intervene in
it, they only intervene in the actions associated with the programs.

The wiring of these inputs is as shown in the following figure:

Activity 4.3: Entries and exits. Start and stop using push buttons.

Y
o

7
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY
COUNTING NUMERICAL DATA
4.4

1
Project: Remote maintenance and remote management of robotic and/or automated
systems

Objectives of the 01.- Program the code necessary for the robot to perform a count
activity: of pieces or repetitions.
02.- Understand the structure of numerical data.
03.- Show useful messages on the FlexPendant.

Knowledge 01.- Program data of type num . Create numerical data.


previous:

Knowledge 01.- Programming and testing. Data Types in the FlexPendant


Related: FlexPendant Manual Chapter 6
02.- Instruction Incr, Decr Instruction Manual, functions and RAPID data
types.
03.- Instruction Clear Instruction Manual, functions and data types
RAPID.
04.- Instruction Assignment:= RAPID Instruction Manual, functions and
data types.
05.- TPWrite Instruction Instruction Manual, functions and RAPID data
types.
06.- TPErase Instruction Instruction Manual, RAPID functions and data
types.

Resources 01.- IRB120 Robot System or another higher range.


necessary

Files of 01.- Counter Conditional realization of a piece and counting of the number
of
image repetitions.
related
Note1: Input activation cannot be observed in the simulation.
Note2: The count value cannot be observed on the FlexPendant.

Files of 01.- Counter Programming the part and counting the number of
program repetitions.
related
Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

aeg ede EUROPEAN UNION


• E.E. * B3RHEuropean Social Fund
MINISTRY •

6F62 EDUCATION, c, - . - ,
" 2 CULTURE AND SPORTS The European Social Fund
m—m invest in your future

2
Project: Remote maintenance and remote management of robotic and/or automated
systems

Ac
tiv
ity
4.
4:
N
u
m
eri
cal
da
ta.
Co
un

3
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY NUMERICAL DATA


4.4 COUNTING
Goals:
1.- Create a program so that when activating an input, the tip of the tool follows the
geometric shape expressed in the figure.

2 .- As long as the input is activated, the operation will be repeated over and over again until
it is deactivated.
3 .- A counter will count the number of repetitions and show them on the FlexPendant screen.
4 .-The program will have a starting point away from the geometric shapes.

Procedure:

1 .- Create a program following the steps described in topic T3. ABB\ Program Editor\
Tasks and Programs\File\New Program.

2 .- Create the numerical data that will be used to count the number of repetitions that the
robot called “ CONT1 ” will perform, to do this click on ABB\ Program data. On the pop-up
screen, choose the data type by clicking twice on num.

To me iiD Protected stoppage


Stopped (Speed 100%)

Backup/Restore
Calibration

control Panel

- Production window
Event log
Activity 4.4: Numerical data. Counting

FlexPendant Explorer

System information

■ j'r Production Manager


Change ambit
' ' TO
dock ee_event gap_partdata

jointtarget loaddata number


robtarget string tool data

wobjdata

4
Project: Remote maintenance and remote management of robotic and/or automated
systems

3 .- Clicking on New , declare the data “ CONT1 ”, of type Variable to be able to change its
value and declare it in the MainModule module.

AII“8
E New data declaration
Manual
System? (EASO-25D835B9EA)
Protected stoppage
Stopped (Speed 100%)
EX
Data type: num

Name:

Ambit:

Storage type:

Task:

Module:

Routine
:
Dimensions:

4.- Once the data has been declared, accept it by clicking OK . If the program editor is opened,
the main module contains the data “ CONT1 ” as can be seen in the image .

II G II Manual Protected stoppage 2 li'


PIDIDJ 6] System? (EASO-25D835B9EA) Stopped (Speed 100%) /
N NewProgramName in T_ROBl/MainModule/main
Tasks and programs ▼ Modules ▼ Routines ▼
MODULE MainModule
2 CONST jointtarget jposlO : = [ [31 . 4547 , -7 . 7 080 13189,0,0,0] ,
VAR num CONT1:

4
-5
6 PROC main()

8 MoveAbsJ jposlO\NoEOffs ,v1000 , z50,MyTool;


9 ENDPROC
10 ENDMODULE

Add Modify Hide


instruction position statements
Activity 4.4: Numerical data. Counting

5.- Create the “figure” routine following the steps described in topic T3, taking into account
that the selected tool is the so-called pointer that is previously calibrated. ABB\ Program
editor Routines tab\File\New routine.

PROC
MoveJ
figure() v1000,fine, pointer
p10,
MoveL v1000,fine, pointer
MoveJ v1000,fine, pointer
MoveL v1000,fine, pointer
p40,
MoveL v1000,fine, pointer
p50,

5
Project: Remote maintenance and remote management of robotic and/or automated
systems

MoveJ p60, v1000,fine, pointer;


MoveL p70, v1000,fine, pointer;
MoveL p80, v1000,fine, pointer;
MoveJ p90, v1000,fine, pointer;
MoveL p100 v1000,fine pointer
ENDPROC

6 .- In the main routine, write the program according to the conditions expressed in the
statement. The TPWrite and TPErase instructions are used to display or delete data and/or
text respectively on the FlexPendant screen.

PROC main()
MoveAbsJ p10, v1000,fine, pointer; ”starting point”
IF di1=1 THEN ”conditional call to figure routine”
figure;
Incr CONT1 ”increment counter”
TPWrite “Repetitions performed:”\Num:=CONT1; ”write the text in quotes
on the screen as is and the numerical value of the counter”
ELSE
Clear CONT1; ”reset the counter”
TPErase; ”Delete messages from the FlexPendant screen”
ENDIF
ENDPROC

7 .- When executing the program by placing the cursor on main (Debug\ PP to main) and
pressing the Play button, it is observed that, while the digital input is activated, the movements
are repeated, increasing the value of the counter whose value is reflected on the screen of the
FlexPendant.

Activity 4.4: Numerical data. Counting

8 .- In order to program the Incr C0NT1 instruction, which serves to increase the value of the
counter each time the program pointer passes through its programming line, therefore it will
count the number of repetitions that the robot performs, insert the aforementioned instruction
found in the Mathematics group.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems

Once the instruction is selected, in the screen that appears below, you determine which
expression you want to increment, replacing in this case the generic <EXP> with the data
CONT1 .

AI » Manual
System2 (EASO-25D835B9EA)
Protected stoppage
Stopped (Speed 100°)

FNewProgramName in
T_RDBl/MainModule/main Modules Routines
Tasks and programs

7 PROC main()
Mathematics
8 MoveAbsJ jpos1O\NoEOffs,v
9 IF dil
10 foot
11 ENDIF
12 ENDPROC

Add
instruction

9 .- In order to express information on the screen, the TPWrite instruction is used, which
serves both to express a text (the text that is enclosed in quotes) and to be able to write the
values of some program data using the optional arguments that said instruction has.

To begin, the aforementioned instruction found in the Communicate group is inserted. Once
inserted, just click on it to complete the instruction.

Activity 4.4: Numerical data. Counting

7
Project: Remote maintenance and remote management of robotic and/or automated
systems

In the new screen, click on String “”, and edit the text in the successive screens as done in
previous activities ( Edit\ABC... ).

Once the text has been edited, in the example “Repetitions performed:”, click on Optional argument
in the bottom bar and on the next screen choose num . Click Use to enable the numeric value
argument to which the counter value will be assigned, replacing <EXP> with C0NT1 .
h ]f Manual Protected stoppage ।
FIDIDJ 2] Shtema2(EASO-25DM3SBSEA) Stopped (Speed !«!"<■)

T Change selected

Current I PWrite
instruction:
Select the file you want to
change.
Argumen
t

Activity 4.4: Numerical data. Counting

8
Project: Remote maintenance and remote management of robotic and/or automated
systems

Clicking on <EXP> a new screen will appear where all the numerical data that is available and
can be assigned to the \Num argument is displayed. Just click on CONT1 .

To lili Protected stoppage


ñññDiD
T Change selected

Current plot:
Select the value of the argument.

Features

HEOF BIN
To
eventmask
AGAP SERVICE TYPE

EHDIF

Once the previous operations have been carried out, you can see what the complete instruction
looks like, distinguishing on the one hand the text that will appear on the screen and on the
other the value of the data that will be written next.

10 .- Complete the programming of the MainModule by inserting the ELSE option to the IF
instruction as explained in activity A4.2, to be able to clear the screen using the TPErase
instruction and reset the counter using the Clear CONT1 instruction.

Activity 4.4: Numerical data. Counting

9
Project: Remote maintenance and remote management of robotic and/or automated
systems

In order to program the Clear CONT1 instruction, the instruction found in the Mathematics
group is inserted. It is then programmed in a similar way to the aforementioned Incr
instruction.

In order to program the TPErase instruction, the instruction found in the Communicate group
is inserted. Since it does not require any arguments or text, just insert it.

Activity 4.4: Numerical data. Counting

11 .- The Incr CONT1 and Clear C0NT1 instructions can be replaced by assignment
instructions ( := ):

+ You can replace Incr C0NT1 with C0NT1:= C0NT1+1


J- Clear C0NT1 can be replaced by C0NT1:=0

1
0
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY
NUMERICAL DATA REPETITIONS
4.5
Activity 01.- Program the code necessary for the robot to perform a series of
objectives: repetitions.
02.- Understand the structure of repetition instructions.
03.- Insert useful data from the FlexPendant.

Previous 01.- Program data of type num . Create numerical data.


knowledge:

Related
knowledge: 01.- Programming and testing. Data Types in the FlexPendant Manual
FlexPendant Chapter 6
02.- While Instruction Instruction Manual, functions and RAPID data types.
03.- Instruction TPReadNum Instruction Manual, functions and RAPID data
types.

Necessary
01.- IRB120 Robot System or another higher range.
resources

Related image 01.- Repetitions Making a piece repeatedly based on the data entered from
files the FlexPendant.
Note1: Input activation cannot be observed in the simulation.
Note2: The count value cannot be observed on the FlexPendant.

Related Program Repetitions Making a piece repeatedly based on the data entered from the
Files FlexPendant.

Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

1
Project: Remote maintenance and remote management of robotic and/or automated
systems

aeg ede EUROPEAN UNION


• EE * B3RH European Social Fund
MINISTRY •

6F62 EDUCATION, c, - . - ,
" 2 CULTURE AND SPORTS The European Social Fund
m—m invest in your future

Ac
tiv
ity
4.
5:
N
u
m
eri
cal
da
ta.
2
Re
pe
titi
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY NUMERICAL DATA


4.5 REPEATS

Goals:

1 .- Create a program so that when activating an input, the tip of the tool follows the geometric
shape expressed in the figure as many times as selected by the FlexPendant.

2 .- A counter will count the number of repetitions and show them on the FlexPendant screen.
3 .- The circular arrows in the figure indicate a change in the rotation of the tool necessary because
the points p10 to p50 are close to the origin of the base coordinates (See simulation).
4 .- The program will have a starting point away from the geometric shapes.

Procedure:

1 .- Create a program following the steps described in topic T3. ABB\ Program Editor\Tasks and
Programs\File\New Program.

2 .- Create the numerical data called “ CONT1 ”, or take advantage of the data from the previous
activity, which will be used to count the number of repetitions that the robot will perform. Follow the
steps of activity 4.4 Counting:

4- Click on ABB\ Program data. On the pop-up screen, choose the data type by clicking on
num.

4- Clicking Add , declare the data “ CONT1 ”, of type Variable to be able to change its value and
declare it in the program module, MainModule.

4- Once the data has been declared, accept it by clicking OK .


Activity 4.5: Numerical data. Repetitions

3 .- Create the “figure” routine following the steps described in topic T3, taking into account that
the selected tool is the so-called pointer that is previously calibrated. ABB\ Program editor
Routines tab\File\New routine.

PROC figure()
MoveJ p10, v1000,fine, pointer
MoveL p20, v1000,fine, pointer
MoveL p30, v1000,fine, pointer
MoveL p40, v1000,fine, pointer
MoveL p50, v1000,fine, pointer
MoveJ p60, v1000,fine, pointer

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
MoveL p70, v1000,fine, pointer;
MoveL p80, v1000,fine, pointer;
MoveL p90, v1000,fine, pointer;
MoveL p100 v1000,fine pointer
MoveJ p110 , v1000,fine pointer
MoveL p10, ,
v1000,fine, pointer;
ENDPROC

4 .- In addition to using the TPWrite and TPErase instructions, which as explained in the previous
activity serve to display or delete data and/or text respectively on the FlexPendant screen, the
TPReadnum instruction will be used to read a number of the FlexPendant and assign it to a numeric
data. Thus the instruction:

TPReadNum reg1, "How many repetitions do you want to do?";

It results in what is seen in the following figure, it presents a numerical keyboard and if you select,
for example, 3, this value is assigned to the numerical data reg1 , which the system has already
defined in the user module and therefore does not have to be defined. previously.

5 .- In the main routine, write the program according to the conditions expressed in the statement.
The start of execution is conditional on the activation of an input.
PROC main()

MoveAbsJ p10, v1000,fine, pointer; ”starting point”


Activity 4.5: Numerical data. Repetitions

Clear CONT1; ”reset the counter”


Clear reg1; ”reset register 1”
TPErase; ”Delete messages from the FlexPendant screen”

IF di1=1 THEN ”conditional call”


TPReadNum reg1, "How many repetitions do you want to do?";
WHILE CONT1<reg1 DO ”while CONT1 is less than reg1, execute:” figure;
Incr CONT1; ”increment counter”
TPWrite “number of repetitions: ”\Num:=CONT1; ”write the text in quotes
on the screen as is and the numerical value of the counter”
ENDWHILE
ENDIF
ENDPROC

4
Project: Remote maintenance and remote management of robotic and/or automated
systems

The program responds to the following organizational chart:

ORGANIZATION INSTRUCTIONS
CHART ASSOCIATES

START CONDITIONS: MovAbsJ


Move to home position

START CONDITIONS: Clear CONT1 or


Set the CONT1 counter to 0 CONT1:= 0

START CONDITIONS: Set Clear reg1 or reg1:=


register reg1 to 0 0

CLEAR SCREEN: TPErase

IF di1=1 THEN or
WaitDI di1,1

ASK: TPReadNum reg1 “ ”


How many repetitions do you want
to do?
Reg1

WHILE CONT1<reg1 DO

EXECUTE ROUTINE: ProCall “part”


Part routine call
Activity 4.5: Numerical data. Repetitions

INCREASE repetition counter Incr CONT1 or


CONT1 CONT1:= CONT1+1

SHOW ON SCREEN: TPWrite “Number of


Number of repetitions performed repetitions”
CONT1

5
Project: Remote maintenance and remote management of robotic and/or automated
systems

6 .- When executing the program by placing the cursor on main (Debug\ PP to main) and
pressing the Play button, it is observed that, when pressing the digital input, the FlexPendant
displays the previous screen waiting to enter a number. Once this is entered, it also shows the
number of repetitions performed.

7 .- To be able to repeat the same operation several times, the WHILE <EXP> DO instruction
can be used in which the expression <EXP> indicates the condition so that what is
programmed after DO is executed “as long as” said condition is met.

In order to program the WHILE…DO instruction, it is inserted by selecting it in the


Common group.

Activity 4.5: Numerical data. Repetitions

Once inserted, click on <EXP> to define the conditions for the repetition and on the next
screen choose Change data type to later choose the type of data num where both the data
CONT1 and the other data that is needed reg1 are found. .

6
Project: Remote maintenance and remote management of robotic and/or automated
systems

Ac
tiv
ity
4.
5:
N
u
m
eri
cal
da
ta.
Re
pe
titi
on

7
Project: Remote maintenance and remote management of robotic and/or automated
systems

Although it is not the only way to complete the repetition condition, the simplest method is to
write these conditions using the text editing screen: CONT1<reg1. Accept with OK.

To finish, just program the statement lines of programs necessary to carry out the
after DO .

7 .- The TPReadNum instruction serves both to express a text (the text that is enclosed in
quotes), and to assign to a numerical data, the value entered through a keyboard that is
displayed on the FlexPendant screen.

To begin, insert the aforementioned instruction found in the Communicate group and click on
it once inserted.

Activity 4.5: Numerical data. Repetitions

8
Project: Remote maintenance and remote management of robotic and/or automated
systems

By clicking on the instruction line, choose the num type data that you want to associate with
the value entered on the screen. Taking into account the program, reg1 will be chosen from all
of them.
Current plot: TPAnswer
Select the value of the argument. Active filter:

Data Features

nGapPartCycTime nGapPartCyc
nGapP artTime AnMAX AnMAX GAP STN
GAP TASK
in nProdLoopIndex e
regi reg2 e reg4

Once the numerical data reg1 has been accepted, the text that you want to appear on the
screen remains to be completed. To edit this text, click on the quotes ( “ ” ) that appear in the
instruction line.

A»» Manual Protected stoppage


ññiDiD SystemZ (EASO-25D835B9EA) Stopped (Speed 1 00%)
TNewProgramName in T ROBl/MainModule/main

Tasks and programs Routines

TPErase ; WaitDI dil,


Communicate
1=> 1;
IF dil 1 THEN SocketAccept SocketBind
Registry TPReadNum
Socketclose SocketConnect
1.5 WHILE CONT1<regl
16 part; SocketCreate SocketListen
Incr CONT1; SocketReceive SocketSend
18 TPWrite TTnumbe
19 END WHILE r
Active filter:
ENDIF
ENDPROC

Add
Edit 1 to 10 of 32
instruction
■ New e diskhome
2 disktemp
• T_ROB1

an
* MainMod...

Change data type...


Activity 4.5: Numerical data. Repetitions

gnaw Optional arguments...

ABC
123.. Expression... M
Edit oka Cancel
y

On the next screen, click on Edit , with the quotes ( “ ” ) selected and call
text editor using ABC... to be able to write the desired text between the two quotes.

The text editor does not provide accents or question marks at the beginning. The result can be
seen in the following figure where the complete instruction line is observed.

9
Project: Remote maintenance and remote management of robotic and/or automated
systems

8 .- The IF start condition that waits for the activation of the digital input to execute the
instructions between IF…THEN and ENDIF can be replaced by the WaitDI instruction used in
activity 4.1

Ac
tiv
ity
4.
5:
N
u
m
eri
cal
da
ta.
Re
pe
titi
on

1
0
Project: Remote maintenance and remote management of robotic and/or automated
systems

Ac
tiv
ity
4.
5:
N
u
m
eri
cal
da
ta.
Re
pe
titi
on
1
1
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY NUMERICAL DATA


4.6 DRILLED PIECE

Activity 01.- Program the code necessary for the robot to perform a repetitive
objectives: operation that requires a tool change.
02.- Understand the structure of repetition instructions.
03.- Insert useful data from the FlexPendant.

Previous 01.- Program data of type num . Create numerical data.


knowledge:
01.- Programming and testing. Data Types in the FlexPendant Manual
Related
FlexPendant Chapter 6
knowledge:
02.- TPReadFK Instruction Instruction Manual, functions and RAPID data
types.
03.- Instruction FOR…DO Instruction Manual, functions and data types
RAPID.
04.- TEST Instruction RAPID Instruction Manual, functions and data types.
05.- Instruction GOTO Manual Instructions, functions and
guys of
RAPID data.
06.- Instruction Label Manual Instructions, functions and
guys of
RAPID data.

Necessary 01.- IRB120 Robot System or another higher range.


resources

Related 01.- Drilled piece Repetitive production of a piece.


image files
Note1: Input activation cannot be observed in the simulation.
Note2: The count value cannot be observed on the FlexPendant.
Note3: The operation of the gripper is indicated by the red beacon.
Note4: The operation of the drill is indicated by the orange beacon.

Related 01.- Drilled piece Programming the sequence and counting the number of
Program repetitions. Screen presentation with TPReadNum.
Files 02.- Part drilled1
Programming sequence and counting of the
number of repetitions. Screen presentation with TEST.

Pack and GO made with RobotStudio 5.14.02.01 and


RobotWare 5.14.02_2039. For
view programs, File\Share\Unpack and Work
Activity 4.6: Numerical data. Drilled piece

PROJECT FINANCED BY:

■ EUROPEAN UNION

European Social Fund

1
Project: Remote maintenance and remote management of robotic and/or automated
systems
The European Social Fund
invest in your future

2
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY NUMERICAL DATA


DRILLED PART
4.6
Goals:

1.- Create a program that drills 4 holes in a piece. The number of pieces to be drilled
will be selected through the FlexPendant.

2 .- The pieces are fed by gravity to a position.


Once the go order is given and if the part
presence detector is activated, the robot arm will
move it to the drilling position using pneumatic
clamps operated by a monostable solenoid valve.

3 .- Once in position, the clamp will pick up the


electric drill and grab it to be able to make the
four drills.

4 .- After making the drills, the robot will leave


the drill in its support and return to the drilled
piece to pick it up and deposit it on the exit ramp.
Once the number of pieces ordered has been
Activity 4.6: Numerical data. Drilled piece

made, the arm will go to a rest position away


from the pieces.

5 .- A counter will count the number of


repetitions and show them on the flexPendant
screen.

6 .- The routines will be created in a module


other than MainModule , for example Module1 .

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Procedure:

1.- Create a program following the known steps. ABB\ Program Editor\Tasks and
Programs\File\New Program.

2.- Create a module different from MainModule , for example Module1 . ABB\ Program
Editor\Modules\File\New Module. Accept the loss of the pointer and on the last screen,
write the module name.
Manual Protected stoppage

A »» Manual
System? (EASO-25D835B9EA) Stopped (Speed 1009 b)

mvw System? (EASO-25D835B9EA) 1 NewProgramName in T ROB1/MainModule


T T_ROB1
Tasks and programs Q Modules Routines

Modules i MODULE MainModule


Name / Guy
ENDMODULE
BASE Yes module

CalibData Program module


GAP_USER System module
New module... Program module
Long module. System module
Save module as... New module

Change statement...

Delete module...
Name:
Archive Update
Modulel ABC...

• T-ROBI e Window —
Guy:
F MainMod. production program

3.- Create the subroutines Pick (piece), Drill (piece) and Deposit (piece) in Module1 . To do
this, choose the desired module or Module1 from the Modules tab. Once highlighted, click on
Show module. Once you have accessed the module, click on the Routines tab.

A»» Manual Protected stoppage


ñnibiD System? (EA5O-25D835B9EA) Stopped (Speed 1009 b)

TT_ROB1

Modules A»» Manual Protected stoppage


ññii System? (EASO-25D835B9EA) Stopped (Speed 1009 b)
Name / Guy
NewProgramName in T_ROB1/Modulel
BASE Module
Tasks and programs Modul Routines
CalibData Module es
2 MODULE Modulel
Activity 4.6: Numerical data. Drilled piece

GAP_USER Module 4 ENDMODULE


MainModule Module

Modulel Program module

user System module

Show
File Update Back
module.
ROB_1
• T-ROB1
F MainMod... 6 Window
—r production

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
Once located in Routines , click on File\New routine , edit the name of the routine using
ABC. and make sure it is declared in the module Module1 . Proceed in the same way until
programming the three routines mentioned.

JI » » lí II Manual Protected stoppage

PIDIDJ 6 II 5system2 (EA50-25D835B9EA)


N New routine - NewProgramName in T ROB1/Module 1

Routine statement
Name:

Guy:

Parameters:

Datatype:

Module:

Local declaration:

Bug manager:
Manager ex. hac.
back:

Result... okay Cancel


Routines Active filter:
• T_ROB1 R Window
F Module 1 *2 production Name / Module Guy 1 to 3 of 3 1

Take() Module 1 Procedure


h
k5
To deposit Module 1 Procedure

Drill( Module 1 Procedure


4.- Create and calibrate the two tools to be used in this activity, following the steps explained in
activity 2. The tools will be called:

+ Gripper. For the gripper that picks up and deposits the pieces.
+ Drill. For the drill that takes the clamp.

Note : In the images captured with the RobotStudio program to document this
activity, the MyTool tool is always shown due to the complexity involved in designing the
aforementioned tools. Regardless of the images, the tool changes must be observed in the
instructions contained in the routines.

5 .- In the Pick routine, define the program so that the robot picks up the part with the gripper
in the part feeding position and deposits it in the drilling position. The part presence detector
di2 needs to be activated.
Activity 4.6: Numerical data. Drilled piece

PROC Grab()

WaitDI di2,1; “ Presence of piece in the position “ take ””


MoveJ p10, v1000,fine, clamp; “ position yourself to pick up a piece from the
feeder”
Set do1; “ activate the solenoid valve to close clamp”
Set do3; “ closed clamp pilot ignition”
MoveL offs (p10,0,0,20), v1000,fine, clamp; “ Upload piece vertically”
MoveJ offs (p20,0,0,20),v1000,fine, clamp; “ position yourself to release the piece
in the drilling 20mm above the position”
MoveJ p20, v1000,fine, gripper; “ position to release piece in drilling”
Reset do1; “ clamp opening”
Reset do3; “ off pilot clamp closed”

ENDPROC

5
Project: Remote maintenance and remote management of robotic and/or automated
systems
6 .- In the Drill routine define the program so that the robot does the following operations:

4- Position yourself at the point where the drill is, grab the drill with the pliers.
5- Position yourself at first
drilling point, changing the tool in the
instructions and making a downward vertical movement and rise. He drill
It will work continuously while drilling the four holes as long as the part presence
detector di3 is activated.
6- Place the drill in its support, releasing the clamp and stopping the drill motor.

PROC Drill()

WaitDI di3,1; “ Presence of piece in the “ drill ” position”


MoveJ p30, v1000,fine, clamp; “ position yourself to pick up the drill from your
storage”
Set do1; “ activate the solenoid valve to close the clamp to pick up a drill” Set
do2; “ operate the drill”
Set do3; " switched on of pilot clamp closed”
Set do4; " switched on of pilot drill working”
MoveJ p40, v1000,fine, drill ; " positionvertical hole1, tool drill"
MoveL p50, v100 ,fine, drill ; " drill hole1 at low speed”
MoveL p40, v100 ,fine, drill ;“ withdrawal drill hole 1 at low speed”
MoveJ p60, v1000,fine, drill ; " positionvertical hole2, tool drill"
MoveL p70, v100 ,fine, drill ; " drill hole2 at low speed”
MoveL p60, v100 ,fine, drill ;“ withdrawal hole2 drill at low speed”
MoveJ p80, v1000,fine, drill ; " positionvertical hole3, tool drill"
MoveL p90, v100 ,fine, drill ; " drill hole3 at low speed”
MoveL p80, v100 ,fine, drill ;“ withdrawal hole3 drill at low speed”
MoveJ p100, v1000,fine, drill ; “ hole4 vertical position, drill tool”
MoveL p110,v100 ,fine, drill ; “ drill hole 4 at low speed”
MoveL p100,v100 ,fine, drill ; “ hole 4 drill removal at low speed”
MoveJ p30,v1000,fine, drill ; “ position yourself to leave the drill in its
storage”
Reset do2; “ drill shutdown”
Reset do1; “ clamp opening, to leave a hole”
Reset do3; " off of pilot clamp closed”
Reset do4; " off of pilot drill working”

ENDPROC

7 .- In the Deposit routine define the program for the robot do the following
operations:

4- Position yourself vertically on the drilled piece, changing the tool to a clamp.
to be able to pick up the piece.
5- Go down vertically to later close the clamp to pick up the piece.
6- Raise and deposit the drilled piece on the exit ramp, releasing the clamp.
Activity 4.6: Numerical data. Drilled piece

PROC Drill()

MoveJ p120, v1000,fine, clamp; “ position yourself to pick up the drilled piece”
MoveL p130, v1000,fine, clamp; “ go down to pick up the drilled piece”
Set do1; “ activate the solenoid valve to close the clamp to pick up the piece”
Set do3; “ closed clamp pilot ignition”
MoveL p120, v1000,fine,gripper; “ lift the drilled piece so as not to drag it”
MoveL p140, v1000,fine,gripper; “ position yourself and release the drilled piece”
MoveL p150, v1000,fine,gripper; “ deposit the drilled piece”
Reset do1; “ clamp opening, to leave a drilled piece”
Reset do3; “ closed clamp pilot switch off”
MoveL p140, v1000,fine, clamp; “ position yourself vertically to go to positions
initials”

6
Project: Remote maintenance and remote management of robotic and/or automated
systems
ENDPROC

7
Project: Remote maintenance and remote management of robotic and/or automated
systems
7 .- In the Main routine define the program so that the robot does the following operations:

4- Position yourself at a starting point.


5- Start with the marching order.
6- Ask how many pieces you want to make.
7- Repeat the routines in order as many times as pieces requested using the FOR
statement.

PROCMain()

MoveAbsJ jpos10 , v1000 , z100 , clamp; " position Of start"


TPErase; ”delete messages from the screen of the FlexPendant”
WaitDI di1 , 1 ; “ wait for the marching order”
TPReadNum reg1 , "Number of pieces to be made: " ; “ No. of parts saved in “ reg1 ””

FOR i FROM 1 TO reg1 DO “ repeat the loop as many times as the variable “ reg1 ” is
valid”

catch ; “ jump to the “ catch ” routine with the ProcCall instruction”


Drill ; " hop to the “ drill ” routine with the ProcCall instruction
To deposit ; “ jump to the “ deposit ” routine with the ProcCall instruction”

ENDFOR

ENDPROC

8 .- Remember that the TPErase and TPReadNum instructions are used to, through the
FlexPendant screen, delete data and/or texts and read a number from the FlexPendant,
assigning it to a numerical data respectively. The following figure shows that with the robot in
the starting position, the FlexPendant screen requires a number of pieces to be made, which in
the image is 6:

Activity 4.6: Numerical data. Drilled piece

8
Project: Remote maintenance and remote management of robotic and/or automated
systems
9 .- In order to repeat the same operation several times, the FOR <EXP1> FROM <EXP2>
TO <EXP3> DO instruction will be used in this activity in which:

4- The expression <EXP1> indicates the name of the data that will contain the value of the
current loop counter. This information is declared automatically.
4- The expression <EXP2> indicates the desired initial value for the loop counter.
4- The expression <EXP3> indicates the desired final value for the loop counter.
In order to program the FOR…DO instruction, it is inserted by selecting it in the
Common group.

Once inserted, click on <ID> to define the loop counter and write the data i with the text
editor, which is how the program will identify said counter.

Next, click on the first <EXP> linked to the FROM expression to be able to define the initial
value of the loop counter and on the next screen choose Only selected to later write data 1 or
the start value of counting with the text editor. :
Activity 4.6: Numerical data. Drilled piece

New Optional Arguments

EOF BIN Add Record component

eventmask
GAP SERVI
All
GAP STATE
Selected only
Change 1 14
Edit
of data... 15

Delete Record component index from array

9
Project: Remote maintenance and remote management of robotic and/or automated
systems
Finally, click on the second <EXP> linked to the TO expression to be able to define the final
value of the loop counter and on the next screen choose the desired data or reg1 , which does
not need to be defined previously because it is already defined by default as data numeric:

nMAX GAP STNS


nProdLoopI index

To complete the instruction, simply program the necessary lines to carry out the statements
after DO . As they are calls to routines, remember that you must use the ProcCall instruction
for the call, the complete instruction would look like this:
11 to
1 WaitDI dil, 1;
TPReadNum regl, ''Number of/piece
TO Common
e EFOR i F
IlII
:= Compact IF
> catch

YEAH
13 Drill FOR I.F.
14 Deposit
15 ENDFORB MoveAbs] MoveC

16 ENDPROC
MoveJ MoveL
17
18 ENDMODULE Reset
ProcCall A
19
RETURN Set

Choosing routines using the TEST instruction:

10 .- You can complete this activity by carrying out a small menu using the TEST instruction
that you choose if you want to carry out the complete program or, on the contrary, you only
want to carry out a specific routine. Along with the aforementioned instruction, TPReadFK will
be used, similar to the one used in TPReadNum, to be able to assign a numerical value but
with a different presentation on the FlexPendant screen. The main program will look like this:

PROCMain()
MAIN: “label called “ MAIN” so you can jump to it with GOTO”
TPReadFK reg2 , "What do you want to do: ",stEmpty,stEmpty,stEmpty,"ALL","DRILL";
“Choice by screen in 5 different areas”
TEST reg2 “choice of case according to the value of the variable “ reg2 ””
CASE 4: “if the value “ reg2 ” is worth 4:
TPErase; “clear screen”
GOT EVERYTHING; “jump to the “ ALL ” label or complete program”
CASE 5: “if the value of “ reg2 ” is 5:”
TPErase; “clear screen”
Drill; “jump to “ Drill ” routine”
Activity 4.6: Numerical data. Drilled piece

GOTO MAIN; “jump to tag “ MAIN ” or program start”


ENDTEST
TODO: “tag called “ TODO” so you can jump to it with GOTO”
MoveAbsJ jpos10 , v1000 , z100 , clamp; " position Of start"
TPErase; ”delete messages from the screen of the FlexPendant”
WaitDI di1 , 1 ; “ wait for the marching order”
TPReadNum reg1 , "Number of pieces to be made: " ; “ No. of parts saved in “ reg1 ””
FOR i FROM 1 TO reg1 DO “ repeat the loop as many times as “ reg1 ” is valid
catch ; “ jump to the “ catch ” routine with the ProcCall instruction”
Drill ; “ jump to the “ drill ” routine with the ProcCall instruction”
To deposit ; “ jump to the “ deposit ” routine with the ProcCall instruction”
ENDFOR
ENDPROC

1
0
Project: Remote maintenance and remote management of robotic and/or automated
systems
11 .- To insert the MAIN and TODO labels that can be jumped to with the GOTO instruction,
insert the Label instruction, click on <ID> and with the text editor on the following screen, edit
the label, in this case MAIN , as seen in the figure:

Tasks and programs ▼ Modules

4
PROC main
5

6
EMA:
TPErase X:
; E

To insert calls to the MAIN and TODO labels, add the GOTO instruction where appropriate,
click on <ID> and choose the label, which must have previously been defined, to which you
want to jump on the next screen, in this case MAIN , as seen in the figure:

12 .- Insert the TPReadFK instruction, and in the screen that appears, choose the numerical
data associated with it, in this case reg2 , as seen in the figure:

Current plot: TP Answer


Select the value of the argument. Active filter:

TPReadFK reg2 stEmpty , stEmpty

Data Features

nMAX GAP STNS enMAX GAP TAS


nProdLoopIndex regi
Activity 4.6: Numerical data. Drilled piece
reg3

The format of the TPReadFK instruction is as follows:

TPReadFK reg2 , "What do you want to do: ",stEmpty,stEmpty,stEmpty,"ALL","DRILL";

With this format, the text "What you want to do: " on the screen
FlexPendant and function keys 4 and 5 are activated using the text strings “ALL” and “DRILL”
respectively (see figure below).

1
1
Project: Remote maintenance and remote management of robotic and/or automated
systems
The execution of program wait until one of the keys is pressed of function, key 4
or 5. In others words, maps to reg2 the value 4 or 5 depending on which
Of the keys
press.

To edit the text that appears on the screen, click on the quotes and in the new
one
screen that emerges, choose Edit\Selected Only or All if we want to edit the instruction
complete. With the editor of texts that appear with any of the options
We will edit the corresponding text.

To be able to edit the text of the function keys, click on the stEmpty text corresponding to the
place where you want them to appear and in the new screen that appears, choose Edit \
ABC... In this case also, with the text editor that appears, We will edit the corresponding text.
Activity 4.6: Numerical data. Drilled piece

1
2
Project: Remote maintenance and remote management of robotic and/or automated
systems
13 .- Using the TEST instruction, different instructions will be executed depending on the
value of an expression or data. In the case of the written program:

TEST reg2 “choice of case according to the value of the variable “ reg2 ””
CASE 4: “if the value “ reg2 ” is worth 4:
TPErase; “clear screen”
GOT EVERYTHING; “jump to the “ ALL ” label or complete program”
CASE 5: “if the value of “ reg2 ” is 5:”
TPErase; “clear screen”
Drill; “jump to “ Drill ” routine”
GOTO MAIN; “jump to the “ MAIN ” label or program start” ENDTEST

Different instructions are executed depending on the reg2 value that was assigned using the
TPReadFK instruction:

4- If the value is 4 (ALL) the following are executed:


■ TPErase or erase the FlexPendant screen.
■ GOTO ALL or jump to the TODO label or complete program.

1- If the value is 5 (DRILL) the following are executed:


■ TPErase or erase the FlexPendant screen.
■ Drill only drilling routine.
■ GOTO MAIN or jump to the MAIN label or start of the program.

1- You can add DEFAULT and execute:


■ TPWrite “Wrong choice” .
■ Stop or stopping the program.

Select the TEST instruction from the Prog.Flow group and when inserting it you see that only
one CASE can be edited.

To insert more cases or CASE , click on the previous instruction and add all the
necessary ones or you can also add DEFAULT
Activity 4.6: Numerical data. Drilled piece

1
3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Using the editing tools that have been used previously, edit all <EXP> expressions and
<SMT> statements until the statement is complete as illustrated in the figure:

The program will present 2 screens: one to choose which operation you want to perform and
another the number of pieces to be performed only if you choose ALL .

Activity 4.6: Numerical data. Drilled piece

1
4
Project: Remote maintenance and remote management of robotic and/or automated
systems

ACTIVITY COORDINATE BASES


4.7 WORK OBJECT

Objectives of the 01.- Program the code necessary to make a change in the
activity: work object coordinates.
02.- Understand the structure of wobjdata data.

Previous 01.- Program data of type wobjdata . Create work objects.


knowledge:

Knowledge 01.- Programming and testing. Data Types in the FlexPendant


Related: FlexPendant Manual Chapter 6
02.- Data wobjdata Instruction Manual, functions and RAPID data types.

Necessary
01.- IRB120 Robot System or another higher range.
resources

Files of 01.- Work object 1 Realization of the piece with the table in the
image original position.
related 02.- Work object2 Making the same piece with the table rotated.
Note1: Input activation cannot be observed in the simulation.

Files of 01.- Work object 1 Realization of the piece with the table in the
program original position.
related 02.- Work object2 Making the same piece with the table rotated.

Pack and GO made with RobotStudio 5.14.02.01 and RobotWare 5.14.02_2039. To view the
programs, File\Share\Unpack and Work

PROJECT FINANCED BY:

abe EF of EUROPEAN UNION


* MINISTRY "
•NR•• European Social Fund
«Cüí» OF FDUC ATION

1
Project: Remote maintenance and remote management of robotic and/or automated
systems
T CULTURE AND SPORTS The deep European üooal
* UI3m invest in your future

Ac
tiv
ity
4.
7:
W
or
k2
ob
je
ct.
Project: Remote maintenance and remote management of robotic and/or automated
systems
ACTIVITY COORDINATE BASES
4.7 OBJECT OF WORK

Clarification: It is about understanding and correctly programming work object coordinates, an


activity that is more typical of topic 2. As it has been assessed that a certain skill and ability is
required that is acquired with the execution of the activities developed so far, it is included in this
collection of activities.

Goals:

1 .- Create a program so that the tip of the tool draws or follows a pentagon that is located on a
table.

2 .- Without modifying the robtarjet data corresponding to the points that define the piece, when
rotating the table, the robot must continue making the same piece on the displaced table.

3 .- Use work object coordinates or wobjdata type data.


Activity 4.7: Work object.

3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Procedure:

Step 1.- Create the data corresponding to the work object (table in original position)

1 .- Click on ABB\Program data, on the next screen click on wobjdata and finally click on New

2 .- Declare the work object to be defined.

Activity 4.7: Work object.

J- He object name: wobj1


J- He storage type: Persistent
+ He Module: MainModule
Select the module from which you want to declare the tool.

4
Project: Remote maintenance and remote management of robotic and/or automated
systems
Step 2.- Define the coordinate base of the work object.

3 .- Once the work object wobj1 has been declared, its characteristics must be defined. To do this,
click on Edit and then click on Define .

4 .- On the pop-up screen, select Method. User\3 points .


Select a method for each frame, modify the positions, and tap

User Met.: 3 points Object method No changes |

Spot
Without changes I State 1 to 3 of 3

User point 3 points h

5 .- With the help of the joystick, move the robot to point X1 located at any point on the edge parallel
to the x axis. Once the robot is located, click on Modify position to record the first point.
6 .- Move the robot to point X2 located at any point on the edge parallel to the X axis further away

Activity 4.7: Work object.

than X1. Once the robot is located, click on Modify position to record the second point or user
point X2.

5
Project: Remote maintenance and remote management of robotic and/or automated
systems
7 .- Move the robot to point Y1 located at any point on the edge parallel to the Y axis. Once the robot
is located, click on Modify position to record the third point or user point Y1.

Once the three points have been recorded, accept the points of the new work object with OK .

User method: 3 points 1 Object method Without changes


|
Spot 1 to 3 of 3
| State
User point X 1 Modified

User Point X 2 Modified


User point Y 1 Modified

r-, . . TO Modify fv
Positions ... Cancel
okay

8 .- Before starting to program the part, pentagon in the example, it is very important that the work
object is referenced to wobj1 or defined work object whose coordinates and rotation are far from
wobj0 or default work object. Choose said object in Work Object of the movement screen.

Activity 4.7: Work object.

6
Project: Remote maintenance and remote management of robotic and/or automated
systems
9 .- In the Main or other routine, define the program:

PROCMain()

MoveAbsJ jpos10 , v1000 , z100 , clamp; “ start position”


Pentagon “ jump to the “ pentagon ” routine with the ProcCall instruction”

ENDPROC

PROC Pentagon ()

MovJP10 , v1000 , z100 ,clamp\WObj:=wobj1;


MovLP20 , v1000 , z100 ,clamp\WObj:=wobj1;
MovLP30 , v1000 , z100 ,clamp\WObj:=wobj1;
MovLP40 , v1000 , z100 ,clamp\WObj:=wobj1;
MovLP50 , v1000 , z100 ,clamp\WObj:=wobj1;
MovLP10 , v1000 , z100 ,clamp\WObj:=wobj1;

ENDPROC

As can be seen in the programming lines, since you are not working with the work object that the
program offers by default, the new work object appears specified as:
\WObj:= wobj1;
This has been thanks to the fact that in the movement option, it has been specified like this,
therefore all the points of the piece are referenced to this work object or wobj1 . Check that the
program runs correctly.

Step 3.- Define other work object coordinate bases.

10 .- Following the previous steps, declare two new work objects, wobj2 and common . The
common job object, leave it as is however define the characteristics of the wobj2 job object.

The work sketch common , will be used as a “wild card” and through a
assignment, we will choose between wobj1 or wobj2 like this:

common:= wobj1;
common:= wobj2;

Since it is an assignment, the type of data on both sides of the assignment must be of the same type,
which is why the common data has been defined as data of type wobjdata.
Activity 4.7: Work object.

Scope: RAPID/T_ROB1 Change, scope


Move the work table and Name Worth Module
once the work object,
common [FALSE, TRUE, "",[[0... MainModule Task
wobj2 , is defined, define
it. Remember that you wobj0 [FALSE,TRUE,"",[[0... BASE Global
have to click on Edit and wobjl [FALSE,TRUE,"",[[3... MainModule Task
then click on Define .
wobj2 [FALSE,TRUE,"",[[3... MainModule Task ---------------

7
Project: Remote maintenance and remote management of robotic and/or automated
systems
11 .- Place the three points from the vertex used to define wobj1 . Proceed in the same way,
remembering that the distance between points does not have to be the same but that the important
thing is the orientation.

If the points are not in the proper order, it would result in an inverted coordinate system on the Z
axis as seen in the figure. To understand this phenomenon, apply the right hand rule explained in
topic 2.

Activity 4.7: Work object.

8
Project: Remote maintenance and remote management of robotic and/or automated
systems
12 .- Modify the program so that the robot makes the part regardless of whether the table is in one
position or another:

PROCMain()

MoveAbsJ jpos10 , v1000 , z100 , clamp; “starting position”

IF di1=1 THEN

common:= wobj1; “If input 1 is activated, work with “ wobj1 ” or table in original
position”
ELSE

common:= wobj2; “If input 1 is not activated, work with “ wobj2 ” or rotated
table” ENDIF

Pentagon “ jump to the “ pentagon ” routine with the ProcCall instruction”

ENDPROC

PROC Pentagon ()

MovJP10 , v1000 , z100 , clamp\WObj:= common ;


MovLP20 , v1000 , z100 , clamp\WObj:= common ;
MovLP30 , v1000 , z100 , clamp\WObj:= common ;
MovLP40 , v1000 , z100 , clamp\WObj:= common ;
MovLP50 , v1000 , z100 , clamp\WObj:= common ;
MovLP10 , v1000 , z100 , clamp\WObj:= common ;

ENDPROC

Note that the “ pentagon ” routine has as its work object the so-called “ common ” so that in the
assignment carried out in the IF condition, it adopts the work object of the table in its original
position or wobj1 or the work object of the rotated table. or wobj2.

Activity 4.7: Work object.

9
Project: Remote maintenance and remote management of robotic and/or automated
systems

PROGRAMMING ACTIVITY
4.8 PROPOSED EXERCISES
1 .- Repetition exercise with displacement

The program must be made for a robot to draw the same part on the same sheet of paper with
a displacement between parts of 100 mm in the X axis and 200 mm in the Y axis. So that the
final result is similar to what can be seen in the figure

recommendations

It is about carrying out the program without having to program the 12 pieces, but rather the
piece in the first position must be programmed once, 1, and move this programming to the new
piece by applying the displacement indicated in the statement. There are several alternatives,
including:

2 .- The instructions can be used to move a part of a program: PdispOn, PdispOff.


3 .- The values of the position coordinates can be modified.
4 .- Moving the work object (WorkObject)

2 .- Drawing exercise of a figure on a paper that is not always in the same


position

A robot program must be created to draw a figure on a small blackboard, with the particularity
that said blackboard is not always in the same position, so before making the drawing, the
robot must look for where the blackboard and move the program accordingly.

See as an example the following figures:


Activity 4.8: Programming. Suggested exercises.

1
Project: Remote maintenance and remote management of robotic and/or automated
systems
Procedure

A program must be created to draw the figure on the blackboard or other surface with a given
workobject.

Carry out a routine for the automatic definition of the workobject of the new position of the
board, performing a search of the 3 corners, P1, P2 and P3 for the definition of the new
workobject, and once done, the drawing routine can be executed on the board. board in the
new position.

The search must be done with a sensor connected to a digital input to search for the desired
corner. This sensor can be a limit switch or a photoelectric sensor.

3 .- Palletizing exercise

The program for a robot for a palletizing installation must be carried out with a robot equipped
with a gripper to pick up pieces as seen in the following layout:

TICKETS:

P_Enpos Part in pickup position


Indicatesthat thegripper this closed
Closed_Clamp
Indicatesthat thegripper this open
Open_Clamp
Indicatesthat he pallet this in the
Pallet_Enpos positionadequate Activity 4.8: Programming. Suggested exercises.

DEPARTURES:

Open clamp
Close clamp
A_Clamp C_Clip
Sign indicating that the pallet has been completed and must be
End_Pallet changed

Process description

We have an installation like the one in the figure, which we will simulate by defining the I/Os
indicated above and which works as follows:

2
Project: Remote maintenance and remote management of robotic and/or automated
systems
1. The piece arrives on a conveyor belt to the pick-up position, at this time the input signal
P_Enpos .

2. The robot is going to pick up the part, when it is in the picking position, it activates the
C_Clamp signal and waits for the Clamp_Closed input to be activated.

3. The robot goes to the pallet, checks the Pallet_Enpos signal and leaves the part in the
corresponding calculated position, activates the A_Clamp output and waits for the
Clamp_Open signal before leaving to look for another part.

4 .- Palletizing exercise with repetition

Palletizing must be program for a robot of a piece-picking


carried out, where robot with a gripper 1 facility and the type of
palletizing them on the or 2 depending piece being
pallet
collect, as seen in the following layout:

Pieces entry belt

Pallet pieces (3 x 2
Pallet pieces (2 x 2
x 4 format)
x 3 format)

TICKETS

P_Enpos Part in pickup position


Clamp_Closed Closed clamp
Open_Clip open clamp
Pallet_Enpos_1 Pallet_1 is in the correct position
Activity 4.8: Programming. Suggested exercises.

Pallet_Enpos_2 Pallet_2 is in the right position


Piece_1 The piece to be picked up is for
pallet 1
Piece_2 The piece to be picked up is for
pallet 2

DEPARTU
RES

A_Clip Open clamp


C_Clamp Close clamp
End_Pallet_1 Sign indicating that pallet 1 has been completed and must be
changed
End_Pallet_2 Sign indicating that pallet 2 has been completed and must be
changed 3
Project: Remote maintenance and remote management of robotic and/or automated
systems
Process description

We have an installation like the one in the figure, which we will simulate by defining the I/Os
indicated above and which works as follows:

1. The piece arrives on a conveyor belt to the pick-up position, at this time the input signal
P_Enpos_1 or P_Enpos_2 will be activated depending on whether it is a piece for
pallet 1 or for pallet 2.

2. The robot is going to pick up the part, when it is in the picking position, it activates the
C_Clamp signal and waits for the Clamp_Closed input to be activated.

3. The robot goes to the corresponding pallet, verifies the Pallet_Enpos_1 signal that
tells us that the pallet is in the correct position and leaves the part in the corresponding
calculated position, activates the A_Clamp output and waits for the Clamp_Open signal
before leaving to look for another part.

4. When the pallet is complete, the robot activates the corresponding signal so that the
pallet change occurs.

PROJECT FINANCED BY:

EUROPEAN UNION
European Social Fund

European Ac
Social in tiv
your future
ity
4.
8:
Pr
og
ra
m
mi
ng
.
Su
gg
es
te
d
ex

You might also like