110 likes | 265 Views
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. Intro to Programming.
E N D
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.
Intro to Programming 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.
Intro to Programming 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 micro-controller.
Intro to Programming 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.
Intro to 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.
Intro to Programming 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.
Intro to Programming • Programs are written in numbered lines. • A system will do all instructions on line 1 before proceeding to line 2. • Lines are sequentially processed, unless a command like “if the sum of X + Y >45, jump to line 7.
Intro to Programming 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.”
Intro to Programming 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.
Intro to Programming 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.