Jump to content

User:Robotics1/sandbox2

From Wikipedia, the free encyclopedia

DRAFT RoboForth

[edit]

RoboForth is a robot control language based on Forth and written by David Sands in 1982. It is a text based system and is non–graphical. As an imperative language Forth is ideal for the control of machinery as well as computers. Forth puts the programmer and user in intimate contact with the hardware. Forth is used by extending its dictionary and functions into the application area. As the name implies RoboForth is an extension of Forth specifically for use in the field of robotics.

History

[edit]

The first RoboForth coding was written in 1982 for the Cyber Robotics 310 robot arm. Inspirations for RoboForth came from earlier work with industrial automation, the Logo programming language in which a turtle robot may be controlled and programmed by children and "A LISP-based robot", a 3 part article in Robotics Age, November 1984 to January 1985 by Doug Snead and John Roach, Spatial Data Analysis Laboratory.

Versions were available for all the popular 1980s computers such as Apple (Apple II series), Acorn Electron, Atari , BBC Micro and the Commodore Pet

RoboForth was subsequently installed on the Armdroid robot and has since been adopted for some robotic instruments — for example the Activotec P11 peptide synthesizer.

Since 1982 RoboForth is been gradually developed and now has over 400 commands. Most of the commands can be used in the command window for an immediate action, for example GRIP or HOME MOVE. The robot may be positioned using motor steps or by entering X-Y-Z Cartesian coordinates.

Basic programming

[edit]

RoboForth expects the user to first teach the robot its spatial data and then write a program to use that data. This is really 3 phases, which can be used together. The robot may be moved right away with commands such as

TELL SHOULDER 9000 MOVE
CARTESIAN 0 500.0 -100.0 MOVETO
GRIP

Moving the robot and teaching the robot are not the same. Once you have the robot in a desired position you can LEARN that position using one of the data entities. The basic entities are:

  • PLACE – this is a single named position
  • ROUTE – a list of positions.
  • APPROACH – the approach position for each PLACE. This approach position is used as the WITHDRAW point

PLACE and APPROACH

[edit]

Each entry for an individual PLACE is self–learning and self–executing. To create a named position the user enters PLACE followed by a name. Subsequently just using the name sends the robot to the learned position. An approach position can also be set for each place. After learning the places the third phase is to define new commands (programs) to tell the robot which places to go to, when and what to do when there, adding in decision trees and commands for I/O as necessary.

Example of a pick-and-place program using PLACEs to pick a part from a belt and put it into a bin:

Teach the robot to the belt

PLACE BELT

Teach up to an approach position.

APPROACH BELT

The process is repeated for PLACE BIN and APPROACH BIN

Test right away with

BELT GRIP WITHDRAW BIN UNGRIP WITHDRAW (all one one line or separate lines one command at a time)

Or define a new command or ‘word’ e.g. to create a new process called PICK+PLACE:

: PICK+PLACE
BELT GRIP WITHDRAW
BIN UNGRIP WITHDRAW
;

ROUTE

[edit]

This is a list of positions which are learned one at a time. The user first creates the route program container I66 with a command such as

ROUTE I66
CARTESIAN ROUTE TRAY

The use then teaches the positions into the route by first moving the robot to the required position with commands or the teach pad then entering LEARN Finally RUN tells the robot to go through the list from one position to the next.

A route can also be used just as a list of positions, usually in Cartesian mode, for example for recording the positions in a matrix for accessing trays or palletizing. It is only necessary to teach the robot 3 corners of a matrix and the remaining positions are interpolated. A route can be used to create a linear row of positions. A close row is used for straight-line motion.

Along with RUN are a set of commands whose context is dependent on the route currently active for example

RUN
LEARN
2 DELETE
3 GOTO
4 INTO
5 REPLACE
6 INSERT

(and others)

Other commands

[edit]

Commands such as START-HERE and END-THERE permit the user to teach a route once then use it in many different parts of the workspace. For example

TRAYLIST 5 GOTO
TOTRAY START-HERE RUN

Many other commands can be incorporated such as I/O control, decisions based on I/O, analog input and output, timers, interrupts, strategies for safety and emergency stop. For example if the robot were carrying a paint gun or jet cutter then on pressing stop you would want these devices turned off as well.

RobWin graphical interface

[edit]

Although RoboForth is a text based language a graphical user interface called RobWin is provided to make the programming easier with single clicks, dialog boxes and so on. Finally RobWin saves the data onto disk as well as in the controller memory.

Supervisors

[edit]

Once basic commands have been taught these can be sent to the robot from some master supervisor that is also controlling or reading other equipment. Such supervisors are easily written in C, Java, Basic, VB, Python using RoboForth ActiveX modules. RoboForth also lends itself well to incorporation into LabView using ActiveX.

See also

[edit]

References

[edit]
[edit]