0% found this document useful (0 votes)
10 views

Lab 4 Robotics

Uploaded by

Akshit Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lab 4 Robotics

Uploaded by

Akshit Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Robot Station 3

Programming Digital Inputs and

conditional IF-ELSE statement

November 21, 2024

Thursday 12-3 PM

Akshit Kumar

Prof. Srinivas Ganapathyraju, Ph.D., P.Eng.


Table of Contents
Equipment List.................................................................................................3
Layout Diagram...............................................................................................3
System Setup...................................................................................................4
Control Program...............................................................................................5
Task Description
The workcell was set up and programmed to demonstrate the use of digital
inputs and conditional IF-ELSE statements in guiding a robotic arm to trace
different geometric patterns. The ABB IRB 120 robot was equipped with a
pneumatic gripper holding a drill chuck and a metal rod as the tool center
point. Metal posts were arranged in specific patterns to serve as reference
points for the robot’s paths.

The robotic arm begins by moving to an initial position using the MoveJ
command. Based on input signals provided by the digital push buttons, the
robot selects and executes a programmed geometric path by calling the
specific subroutine. Each path employs a combination of MoveJ, MoveL, or
MoveC commands to achieve the desired shape with precise transitions.

Equipment List

Equipment Description
ABB – IRB 120 Robot Robot used for the task
Touch Pendant Used to communicate and program the robot
Pneumatic Gripper Used to hold the drill chuck
Drill Chuck Used to hold the metal rod
Metal Rod Acted as the end of the tool center point
Metal Posts Acted as a square or box that was traced around

Layout Diagram
Label no. Equipment Description
1 Metal Rod
2 Drill Chuck
3 Pneumatic Gripper
4 ABB – IRB 120 Robot
5 Metal Posts

System Setup
Steps to startup were as follows:

1) Ensured that air supply was on and supplying air

2) Switch for the controller was switched to the on position

3) Posts were setup in a circular pattern to trace around

4) Testing of the robot through simple jog commands that ensured that
the robot was operating as expected
Control Program
MODULE MainModule

CONST robtarget p10:=[[284.06,-47.12,552.21],


[0.69484,0.0389705,0.713714,-0.0793131],[-1,0,-1,1],
[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget p20:=[[561.39,-64.58,283.46],


[0.694831,0.0389664,0.71372,-0.0793439],[-1,0,-1,1],
[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget p30:=[[456.82,32.69,283.44],


[0.694812,0.0389774,0.713735,-0.0793656],[0,0,-1,1],
[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget p40:=[[352.66,-60.96,283.44],


[0.694812,0.0389568,0.713739,-0.079344],[-1,-1,-1,1],
[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget p50:=[[457.19,-160.92,283.44],


[0.694788,0.0389809,0.71376,-0.0793513],[-1,-1,0,1],
[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

PROC main()

MoveJ p10, v1000, z50, tool0;

IF diPB1=1 THEN

square;

ELSEIF dipb2=1 THEN

circle;

ELSEIF diss3=1 THEN

Triangle;

ENDIF

ENDPROC

PROC square()

MoveJ p10, v1000, z50, tool0;


MoveJ p20, v1000, z50, tool0;

MoveL p30, v1000, z0, tool0;

MoveL p40, v1000, z0, tool0;

MoveL p50, v1000, z0, tool0;

MoveL p20, v1000, z0, tool0;

MoveJ p10, v1000, z0, tool0;

RETURN;

ENDPROC

PROC Circle()

MoveJ p10, v1000, z50, tool0;

MoveJ p20, v1000, z50, tool0;

MoveC p30, p40, v1000, z10, tool0;

MoveC p50, p20, v1000, z10, tool0;

MoveJ p10, v1000, z50, tool0;

RETURN;

ENDPROC

PROC Triangle()

MoveJ p10, v1000, z50, tool0;

MoveJ p20, v1000, z50, tool0;

MoveL p30, v1000, z0, tool0;

MoveL p40, v1000, z0, tool0;

MoveL p20, v1000, z0, tool0;

MoveJ p10, v1000, z50, tool0;

RETURN;

ENDPROC

ENDMODULE
Observations
During the experiment, it was observed that when the pushbutton diPB1 was
pressed before initiating the program, the robot executed the Square
subroutine, tracing the square path accurately. The robot transitioned to the
starting point using the MoveJ command, taking an optimized yet
unpredictable path. Subsequently, the robot used a combination of MoveL
commands to navigate the corners and edges of the square, ensuring
precise straight-line motion between points.

Similarly, pressing pushbutton diPB2 triggered the Circle subroutine. The


robot utilized the MoveC command for curved motions, smoothly
transitioning along the circular path. For the triangle path, initiated by
pushbutton diSS3, the robot relied on MoveL commands to create sharp and
linear movements between each vertex of the triangle.

It was also noted that the robot returned to its home position using MoveJ
after completing each subroutine. Adjustments to the zone value impacted
the sharpness of corner transitions, with a lower zone value resulting in more
precise and angular paths for the square and triangle shapes. The
experiment demonstrated the robot’s ability to execute predefined paths
accurately in response to specific input signals, validating the effectiveness
of the IF-ELSE conditional logic.

Safety
Safety was a critical consideration throughout the experiment to ensure both
operator and equipment protection. Before starting, the instructor reviewed
safety guidelines, emphasizing the importance of maintaining a safe distance
from the robot while it was in motion. Additionally, the robotic workcell was
inspected to confirm that all components, including the pneumatic gripper
and drill chuck, were securely attached and operational.

The teach pendant used for programming and monitoring was equipped with
a dead man’s switch, ensuring the robot would stop immediately if released.
Moreover, all programmed code was debugged and tested prior to execution
to prevent unexpected movements or errors. Operators were also instructed
to remain vigilant and avoid the robot’s operational area during execution,
as there were no physical barriers separating the robot from its
surroundings.
Discussion
This lab effectively demonstrated the integration of digital inputs and
conditional IF-ELSE statements in robotic programming, showcasing how
such logic enhances the adaptability and versatility of automated systems.
The use of IF-ELSE logic allowed the robotic arm to dynamically select a
specific geometric path, square, circle, or triangle, respectively, based on
input signals, providing insight into how digital signals can be utilized to
control robotic behavior.

The experiment highlighted the strengths and trade-offs of the motion


commands used. The MoveJ command proved efficient for rapid movement
between key points but offered less control over the precise path taken. On
the other hand, the MoveL and MoveC commands ensured linear and curved
paths, respectively, providing higher precision at the cost of slower
execution. These differences underline the importance of selecting the
appropriate command based on task requirements, such as speed, accuracy,
or smoothness.

During execution, careful observation revealed how variations in parameters,


such as the zone value, influenced movement precision. Adjusting these
settings allowed for sharper transitions or smoother blending in the
geometric shapes, emphasizing the importance of parameter tuning in
achieving the desired performance. Overall, the lab demonstrated a clear
practical application of conditional programming in robotics, preparing
operators to handle more complex scenarios in automation.

You might also like