You are on page 1of 16

User Documentation

R&S International (Irena)


EPSON Scara Robot

A) Teach Pendant
B) Robot point definition
C) Program
D) User interface

WALTEC Robot --- Auto-Menu

A) Teach Pendant
In automatic mode small changes of robot positions, speed, timing can be done by using teach
pendant´s “Auto-Menu”.

For example: If height of P_pick_up must be changed while press is in automatic mode then
follow these steps:
- select “position setup” by pressing “0” and “Enter” on teach pendant

- then an additional menu will be shown where you can change x, y and z position +/- 0.2
mm.
- if you want to change z-position deeper than select “6” and press “Enter”
- now z-position of P_pick_up is 0.2mm deeper than before.
- if you press again “Enter” than again P_pick_up will be 0.2mm deeper and so on.
- to go back to main “auto-menu” press “CLR” then “0” then “Enter”.
In “teach-mode” all robot points can be teached by using “teach pendant”

To activate “teach-mode” switch key form “Auto” to “Teach” on teach pendant.

To teach “P_pick_up”-position select “J & T”-menu then select pick-up-point by using


up/down-arrows.

Move robot manually (robot motors are switched off) or electrically (motor is on) to
“P_pick_up”-position.

To move to position manually first switch off motors then move robot by hand to position. Do
mot use spindle to move robot because spindle could be bend slightly. To change z-position
and orientation of robot just press white “brake release”-button on top of robot housing.

To move to position electrically first switch on “motor” power. Press “safety switch” on back
of pendant and press button “Motor” then “OK” to activate motors. “Safety switch” must
always be kept half pressed when operating with teach pendant.

When motors are activated “LED” will flash and also orange light on top of
robot will flash.

Attention when robot is under power please always keep security distance !!!
Nobody is allowed to stay near to robot when under power!
Robot got 4 electrical axis or joints J1 to J4. These axis can be moved singulary -> Jog-mode
= “Joint” or can be moved in Cartesian coordinates -> Jog-mode =”World” must be selected.
When moving bigger distances switch “speed” to “high”. When getting close to end-position
change back “speed” to “low” for finer positioning.
Move to position by using J1..4 +/- keys.

-> or

When in position press “Teach”-Button.

And then “OK”.

When all positions are teached then finally “Save points”.

And then “OK”.

Now switched key back to “AUTO” and finish.


To be sure that all points are teached correctly check points by using “Motion”-menu.

Press “F7” to open “Motion”-menu.

Now you get several options for moving which can be selected by using the up/down-arrows.
Most useful are Motion command Jump and Go.
“Jump” will make and up-movement followed by a horizontal movement and finally a down-
movement. This behaviour will prevent collisions while moving.
“Go” will make a direct movement to selected target point. So watch for possible collisions.
After selecting “Jump” or “Go” press button “OK”.
Now select point you want to move to. For example: point 3 with label “P_throw_off”
Finally press “OK” button and keep on pressing. When motor power is on then robot will
move to selected point as long as you press “OK” and press safety switch on backside of teach
pendant.

Repeat this procedure for all points with numbers 0 to 3 to check if position is teached
correctly.
Monitoring and controlling inputs and outputs of robot controller

Press “F8” “I/O Cmd” to open menu for inputs and outputs of robot controller
Then press “F7” “Outputs”.

Output 13 of robot controller is connected with vacuum-valve for suction head of robot.
Actual status of output is “Off”. In other words valve is switch off and vacuum is off.
By pressing “F5” “On” output will change status to “On”. Now valve is actuated and vacuum
is on. Operator can adjust strength of vacuum by regulating pressure controller and can test
function of suction head for leakage.
By pressing “F6” “Off” output will change status back to “Off”.
All other outputs are not used.
B) Robot points

Totally 4 teach points are defined + 2 points which define position of press table in relation to
robot (see pictures below).

In Automatic mode robot will wait in “P_base_pos” for start-signal from press.
When start_impuls is detected then robot will move vertically down to “P_pickup”. While
moving down vacuum is switched on. When in position robot will wait pickup-time.

When timer ended then robot will make a Jump-movement to “P_place” or “P_throw_off”
depending if throw_off-condition is active.

Throw_off is active if fire polishing is in error state or switched off or manual-throw-off is


active.

With softkey “robot zrzucic” manual throw-off can be activated and deactivated.

If throw_off-condition is active LED will be active green.

After robot reached “P_place” or “P_throw_off” vacuum will be switched off, article will be
palced or thrown away. Robot will wait adjusted timing and finally move back with Jump-
movement to “P_base_pos”.

Jump-height can be adjusted with “Z_limit”-parameter.


Speed and acceleration of robot can be adjusted with “predkosc” and “przyspieszenie”-
parameter.

Adjust timing, speed and acceleration until robot total movment time is within allowed limits.
If robot is too slow timing-bar “pozostaly czas” will be in red colour and residual time will be
negative. Make robot movement faster until colour will change to green and residual time will
be positive. If you do not follow these steps robot will not be able to take all articles. Only
each second article will be taken!

Point-Nr. Point-Name Description

0 P_pick_up defines pick up position inside press mould (when article


is inside mould). After mould change or table position change
this point has to be teached again. Teaching procedure see
below.

1 P_base_pos defines base or initial position of robot suction head.


This position must be some centimetres higher than pick up
Position. In other words: only z-position is higher.

2 P_place defines place position over fire polishing plates. Before teaching
this point check if pick up postion of “take out fire polishing” is
correctly set. When pick up arm and plate of fire polishing
machine is aligned then teach place position of robot.

3 P_throw_off defines throw off position over chute. When robot can not put
articles on fire polishing machine (for example some fault is
active or fire polishing is switched off or robot has been told to
throw off all the time) then robot will move to this position.

4 P_slidingframe1 At first start up or if you shift robot or press from original


position then teach this point (only one time).
To do this align spindle of robot with
parallel object (press base plate) of sliding frame x-direction

5 P_slidingframe2 At start up or if you shift robot or press from original


position then teach this point (only one time).
To do this align spindle of robot with
parallel object (press base plate) of sliding frame x-direction
Choose distance between point 4 and 5 while teaching as far as possible to achieve high
tracking accuracy of point 0.
Teaching of points 4 and 5 is only necessary if press machine is moved from it is original
position. Changes of press position by sliding frame are allowed. In this case teaching of point
4 and 5 is not necessary.

Hint to point 0 (P_pick_up):


This point will change position when press is moving on its sliding frame -> Tracking.
Sliding frame x / y and z-position are send via Profibus to robot controller, which will
calculate new target position P_pick_up + delta_x + delta_y + delta_z.
This calculation is made shortly before moving to target position, not while robot is already
moving -> Tracking position will not be updated immediately.

Because point “P_pickup” and “P_base_pos” are not fixed and are dependent of position of
sliding frame a special procedure is necessary to teach that points!
Teaching of points press must be in manual mode.

You got two possibilities:

1) move press to position until delta position are zero.

Now you can teach points “P_pickup” and “P_base_pos” as usual.

Or

2) if delta position are not zero.


Teach points “P_pickup” and “P_base_pos” .
Activate “robot programm” by switching operating mode switch to “Auto” and back to
“Man”. Now actual positions of robot are transferred to PLC of press.
Finally press “nauczac”-button on operator panel. After pressing delta-positions are set
to zero.

Now actual position of robot will be transferred to “podniesc pozycje”.


Next move from actual “P_pickup” vertical up to new “P_base_pos” and teach this
point too. Finally“Save points”.
C) Program

See actual robot project “Irena Polen 18 7” for example and open this project for printing
program or see below for program description.
Program consists of several tasks which are running parallel (multitasking)
And functions:

1. main task
2. error and status handling task
3. communication task
4. user interface task (teach pendant)
5. coordinate transformation function

C.1. Main task: contains main program and moving instructions for robot in automatic
mode
'---------- AUTOMATIK - PROGRAM --------------------------------------------------------------------------------------------------
' Project: Irena Polen Robot Linie 1
' robot with fieldbus interface Profibus Adr. 4
' Date: 10.01.2015
' Author: M. Stark
' Company: WALTEC Germany
'----------------------------------------------------------------------------------------------------------------------------------

Global Preserve Real PickUpTime Defines parameters which are valid all over the program
Global Preserve Real GiveOffTime (global) and are always stored inside SRAM memory of robot
Global Preserve Real GiveOffTime2 (preserve) and hence cannot be deleted (after power fail)
Global Preserve Integer Vel, LimZAxis, Acc, Dec
Global Preserve Real Z_up, Z_down, Z_down_lim
Global Preserve Real delta_X, delta_Y, delta_Z, delta_Xr, delta_Yr

Global Real CycleTime Defines parameters which are valid all over the program
(global) and are not stored inside SRAM memory (battery
buffered) of robot and hence will be deleted after power fail

'-- user defined error numbers (starts at number 8000) ----------------------------------------------------------------------------------------------


#define F_ParNotValid 8000 ' parameter not valid -> check parameter range of type
#define F_MonitoringWaterCooling 8001 ' water cooling of robot is not working -> check water flow or flow meter or cable
#define F_MonitoringAir 8002 ' air monitoring -> compressed air pressure too low or pressure switch not set correctly or cable fault -> turner will not work -> robot stop !!!
#define F_MonitoringVacuum 8003 ' vacuum monitoring -> indicates that article could not be taken by robot -> check vacuum or sucktion head or cable or pick_up position

Function main ' main function: start of automatic program which is selected by fieldbus inputs: SEL_PROG_1=SEL_PROG_2=SEL_PROG_4=false

Xqt main_UserInterface ' multitasking: starts user interface task Touch Pendant TP
Xqt main_Error_and_Status ' multitasking: starts error handling and status task
Xqt main_Communication ' multitasking: Sending and receiving data via Profibus

Integer u, errNum ' local variables


Real alpha ' rotation angle between coordinate systems of robot an sliding frame of press
Boolean In_Home_Pos ' flag indicating that robot is already in home position

Motor On ' Switch On motor power


Power High ' Power set to maximum
Arch 0, 30, 30 ' defines point to point movement (JUMP) with 30 mm
Arch 1, 30, 30 ' vertical up and 30mm vertical down movement
Weight 2, 400 ' defines weight and inertia settings for robot -> robot will
' choose appropriate maximum accelerations for each joint
Fine 50, 50, 50, 50 ' higher position error allowed -> faster positioning
Acc = 50 ' presetting of parameters
Dec = 50
Vel = 10
Z_up = 20
Z_down = 30
PickUpTime = 0.1
GiveOffTime = 0.1
GiveOffTime2 = 0.1
delta_X = 0
delta_Y = 0
delta_Z = 0
delta_Xr = 0
delta_Yr = 0
alpha = 0
LimZAxis = 0
In_Home_Pos = False
On Q_EnableTable ' enabling of table turning press machine
On Q_enable_table

TLSet 1, XY(234, 0, 0, 0)

' calculation of rotation shift of coordinate systems of robot and sliding frame
alpha = Atan(Abs(CX(P_slidingframe1) - CX(P_slidingframe2)) / Abs(CY(P_slidingframe1) - CY(P_slidingframe2)))
Print "alpha =", alpha ' angle in rad (alpha apporx. 20° according to construction plan)

' OnErr GoTo errHandler ' automatic error handling routine -> stops robot !!

Do ' endless do…loop


Halt main_UserInterface
Resume main_UserInterface

TmReset 0 ' timer reset for cycle time measurement

LimZ LimZAxis ' height limiting -400mm..0mm -> value can be changed also in automatic mode (JUMP movement)
Accel Acc, Dec ' acceleration 0..120% -> value can be changed also in automatic mode
Speed Vel ' velocity 0..100% -> value can be changed also in automatic mode

' robot is waiting in base_position (throw off pos.) and suction head is pointing upwards
If Sw(I_Preselection) = 0 And In_Home_Pos = 0 Then ' if robot is not selected or compressed air is missing then robot will move to base position
Speed 5
Go P_base_pos +X(delta_Xr) +Y(delta_Yr) +Z(delta_Z)
In_Home_Pos = InPos
On Q_enable_table
On Q_EnableTable
Off Q_vacuum
Wait 2
EndIf

If Sw(I_Preselection) = 0 Then
GoTo End
EndIf

If Sw(I_Home) = 0 Or In_Home_Pos Then GoTo Start ' if robot has to move to base_position and is not already there then he moves home
Speed 5 ' else it will wait for starting signal of press.
Go P_base_pos +X(delta_Xr) +Y(delta_Yr) +Z(delta_Z)
In_Home_Pos = InPos
On Q_enable_table
On Q_EnableTable
Wait 2
Off Q_vacuum
Wait 2
GoTo End

Start: If Sw(I_Start) = 0 Then GoTo End ' waiting for start impulse in automatic mode

LimZ LimZAxis ' height limiting -400mm..0mm -> value can be changed also in automatic mode (JUMP movement)
Accel Acc, Dec ' acceleration 0..120% -> value can be changed also in automatic mode
Speed Vel ' velocity 0..100% -> value can be changed also in automatic mode

' read differential position of sliding frame and convert it to robot coordinate system
Call main_Koord_Transformation(alpha)

‘ Till Sw(I_Start) = 0 ' stop-condition for next move of robot (already started move will be stopped if condition is not true -> prevention of collisions)
' Input I_Start has to be true until pick up is finished else robot will quit pick up and move to base position
' PTP movement up to tracked pick_up position - Z(Z_up) with suction head turned upwards .. while moving vacuum is switched on ....
In_Home_Pos = False
Go P_pick_up +X(delta_Xr) +Y(delta_Yr) +Z(delta_Z) -Z(Z_up) Till ! D20; D10; On Q_vacuum; D10; Off Q_enable_table !
Wait PickUpTime ' waiting PickUpTime -> value can be changed also in automatic mode
If Sw(I_Throw_Off) Then GoTo ThrowOff
' If input I_Throw_Off is true or I_Start is false then move to throw_off postion (base_position)

Jump P_place C0 LimZ ! D10; On Q_enable_table !


Off Q_vacuum ' vacuum switch off
On Q_blow_out, 0.1, 0
Wait GiveOffTime ' wait give_off time -> value can be changed also in automatic mode
Jump P_base_pos +X(delta_Xr) +Y(delta_Yr) +Z(delta_Z) C0 LimZ LimZAxis

GoTo End_2

ThrowOff:
On Q_EnableTableFPM ' enable table turning of fpm
' PTP movement to base position and throw off of article -> point can be changed also in automatic mode
Jump P_throw_off ! D10; On Q_enable_table !
On Q_blow_out, 0.1, 0
Off Q_vacuum ' switch off vacuum
Wait GiveOffTime2 ' wait give_off time 2 -> value can be changed also in automatic mode
Jump P_base_pos +X(delta_Xr) +Y(delta_Yr) +Z(delta_Z) C0 LimZ LimZAxis

End_2:
On Q_Acknowledge, 0.25 ' acknowledge signal for press for cycle time measurement
End:
CycleTime = Tmr(0) ' robot cycle time measurement
Print CycleTime
Resume main_Communication ' to avoid error 2200 (not tested)
Loop

Exit Function

errHandler: ' error handling -> each error will stop robot !!! (deactivate if necessary)
Select Err
Case F_ParNotValid
Print "Error: Parameter not valid ! "
EResume Next
Case F_MonitoringWaterCooling
Print "Error: Monitoring water cooling ! "
EResume Next
Case F_MonitoringAir
Print "Error: Monitoring compressed air ! "
EResume Next
Case F_MonitoringVacuum
Print "Error: Monitoring vacuum ! "
EResume Next
Send

Fend
C.2. error and status task
Function main_Error_and_Status ' multitasking: starts error handling and status task
Do
If Oport(Q_Error) = 1 Or Oport(Q_SError) = 1 Then ' error active
Off Q_enable_table
' when robot is in fault state switch off enabling of both tables (press and fpm)
Off Q_EnableTableFPM '
Off Q_vacuum
' switch off vacuum

' ---> add additional functions if necessary


Else
EndIf

If Not (Oport(Q_Ready) = 1 Or Oport(Q_Running) = 1) Then ' if none of these bits is active then controller is switched off
EndIf

' input state of watercooling


If Sw(I_Cooling_OK) Then ' state of input send to plc
On Q_CoolingWater
Else
Off Q_CoolingWater
' Error F_MonitoringWaterCooling ' when water cooling is of
robot can be stopped !!!
EndIf
' input state of climatisation
If Sw(I_Climate_OK) Then ' state of input send to plc
On Q_Climatisation
Else
Off Q_Climatisation
' Error F_MonitoringWaterCooling ' when water cooling is of
robot can be stopped !!!
EndIf

' output state of pneumatic valves blow out


If Oport(Q_blow_out) Then
On Q_BlowOutOn
' state of output send to plc
Else
Off Q_BlowOutOn
EndIf
' output state of pneumatic valves vacuum
If Oport(Q_vacuum) Then
On Q_VacuumOn
' state of output send to plc
Else
Off Q_VacuumOn
EndIf

' output state enabling of table


If Oport(Q_enable_table) Then ' state of output send to plc
On Q_EnableTable
Else
Off Q_EnableTable
EndIf
Loop
Fend
C.3. communication task
Function main_Communication ' communication via fieldbus interface (Profibus)
' add check for limits if necessary (but is already done in panel of plc side)
‘ this task will be executed only in automatic mode of robot -> teaching of whole points is in automatic mode not possible
Do
' fieldbus inputs
Vel = InW(I_v) ' read speed 0...100% (integer)
Acc = InW(I_a) ' read acceleration 0...120% (integer)
Dec = InW(I_a) ' read deceleration 0...120% (integer)
PickUpTime = InW(I_t_pick_up) / 100 ' read pick_up time and make conversion to x.xx Sek (integer)
GiveOffTime = InW(I_t_place) / 100 ' read give_off time and make conversion to x.xx Sek (integer)
GiveOffTime2 = InW(I_t_throw_off) / 100 ' read give_off 2 time and make conversion to x.xx Sek (integer)
Z_up = InW(I_z_lift_up) / 10 ' read z_lift_up in mm and make conversion (integer)
Z_down = InW(I_z_lift_down) / 10 ' read z_lift_up in mm and make conversion (integer)

' multiplexed fieldbus inputs


If Sw(I_LoadPar) Then ' if PLC sends data
Select InW(I_Par_Nr) ' !!! reads parameter number

Case 11 ' reads parameter P1.x coordinate


CX(P_pick_up) = InReal(I_Par_Data)

Case 12 ' reads parameter P1.y coordinate

CY(P_pick_up) = InReal(I_Par_Data)

Case 13 ' reads parameter P1.z coordinate

CZ(P_pick_up) = InReal(I_Par_Data)

Case 14 ' reads parameter P1.u coordinate

CU(P_pick_up) = InReal(I_Par_Data)

Case 21 ' reads parameter P2.x coordinate

CX(P_place) = InReal(I_Par_Data)

Case 22 ' reads parameter P2.y coordinate

CY(P_place) = InReal(I_Par_Data)

Case 23 ' reads parameter P2.z coordinate

CZ(P_place) = InReal(I_Par_Data)

Case 24 ' reads parameter P2.u coordinate

CU(P_place) = InReal(I_Par_Data)

Case 31 ' reads parameter P3.x coordinate

CX(P_base_pos) = InReal(I_Par_Data)

Case 32 ' reads parameter P3.y coordinate

CY(P_base_pos) = InReal(I_Par_Data)

Case 33 ' reads parameter P3.z coordinate

CZ(P_base_pos) = InReal(I_Par_Data)

Case 34 ' reads parameter P3.u coordinate

CU(P_base_pos) = InReal(I_Par_Data)

Default

On Q_ReadReady, 0.1 ' robot is ready to plc


Send

EndIf

' fieldbus output


OutReal Q_x, CX(Here) ' sends actual x-value (real) (is only updated by robot controller when in target position)
OutReal Q_y, CY(Here) ' sends actual y-value (real)
OutReal Q_z, CZ(Here) ' sends actual z-value (real)
OutReal Q_u, CU(Here) ‘ sends actual u-value (real)
OutW Q_v_ist, Vel ' sends actual speed (int)
OutW Q_a_ist, Acc ' sends actual acceleration (int)
Wait 0.5 ' do every 0.5 s (delay had to be added otherwise EPSON controller error)

Loop
Fend
C.4. User interface task: contains program for interacting with user and display text
and values on teach pendant

Only an excerpt of the whole code of this task is shown and commented because the rest
of the code is very similar.
To display information and to read keys on the teach pendant there are two commands
available in SPEL programming language.
Print #24,”….” will write information on the display of teach pendant and
Input #24,a$ will wait for user interaction (pressing of keys and entering this information).

Function main_UserInterface ' User interface task


String a$ ‘ parameter is used to store string being typed by user on TP

Do
Cls #24 ‘ clear screen of teach pendant
Print #24, "- WALTEC Robot -- Auto-Menu -----" 'port-number #24 defines printing to Touch Pendant display
Print #24, "1= position setup"
Print #24, "2= speed setup"
Print #24, "3= timing setup"
Print #24, "4= display actual values"
Print #24, "5= save positions"
Print #24, "”
Print #24, "-------- actual values ----------- "
Print #24, "t_cycle=", CycleTime, " s" ‘ now menu is printed and …
…….
C.5. coordinate transformation
Function main_Koord_Transformation(Winkel As Real)

' reads relativ positions of sliding frame, checks for limits and transforms coordinates system of frame to robot
' if press is moving on sliding frame robot will track pick_up position

If InW(I_dx) >= 0 And InW(I_dx) <= 32767 Then


delta_X = InW(I_dx) / 10 ' I_dx in 1/10mm
Else
delta_X = -(65536 - InW(I_dx)) / 10
EndIf
If delta_X > 100.0 Or delta_X < -100.0 Then ' limits
Error F_ParNotValid
EndIf

If InW(I_dy) >= 0 And InW(I_dy) <= 32767 Then


delta_Y = InW(I_dy) / 10 ' I_dy wird in 1/10mm
Else
delta_Y = -(65536 - InW(I_dy)) / 10
EndIf
If delta_Y > 100.0 Or delta_Y < -100.0 Then ' limits
Error F_ParNotValid
EndIf

If InW(I_dz) >= 0 And InW(I_dz) <= 32767 Then


delta_Z = InW(I_dz) / 10 ' I_dz wird in 1/10mm
Else
delta_Z = -(65536 - InW(I_dz)) / 10
EndIf
If delta_Z > 100.0 Or delta_Z < -100.0 Then ' limits
Error F_ParNotValid
EndIf

' coordinate transformation (rotation)


delta_Xr = delta_X * Cos(Winkel) - delta_Y * Sin(Winkel)
delta_Yr = delta_X * Sin(Winkel) + delta_Y * Cos(Winkel)
Print "dXr=", delta_Xr
Print "dYr=", delta_Yr
Fend

You might also like