Intro to Programming

To make a robot operate
without constant human
interaction, it must know
what to do, when to do it,
what order to follow, and
perhaps even what to do if
something is found to be
different than what is
expected.
Many robots are fixed
station robots, operating
like an arm. They need to
know positions to move
between. These are
generally 3 axis Cartesian
coordinates.
In addition to knowing their
locations, robotic arms
need to know in what order
to move between them,
and what functions to
perform at each location
once they arrive. All this
information can be given to
the robot through
programming the microcontroller.
This may be done via a
Teach Pendant, or through
a computer keyboard.
Positions, functions, and
order of operation are
compiled in an appropriate
language the arm can
understand. This is called
programming.
Writing a program, whether it
is for a computer game,
computer application, or robot
manipulation can be easy for
some, and challenging for
others. Different programs use
different terms and processes,
but all programming generally
follows a prescribed set of
rules.
Programs are written in
various languages. Many
are like mathematical
equations, and some are
constructed, and then
compiled into a machine
language the system can
understand. In all cases,
the flow of information and
control is very logical in
nature, following a step by
step procedure.
1. Programs are written in
numbered lines.
2. A system will do all
instructions on line 1
before proceeding to line
2.
3. Lines are sequentially
processed, unless a
command like “if the sum
of X + Y >45, jump to
line 7.
Lines of code may contain
comparators, such as “If A
= B, then go to this line of
code.” They may perform
a function “go to position
37”. Once this is
accomplished, then the
program will go to the next
line of code. There may
even be a line of code that
says, “Wait 10 seconds.”
Each line is sequentially
performed till you get to
the end of the program,
when usually ends with the
command “End”. Of
course, there may be a
counter which tells the
system to loop through a
routine (group of lines)
indefinitely until some
other signal is introduced.
Writing a program requires a
little knowledge of the
system, the programming
language, and a lot of
troubleshooting to resolve
unwanted actions.
Remember, a robotic or
computer system is not really
intelligent,….it only does
what a human tells it to do.