You are on page 1of 562

COSIMIR® Page 1 of 562

COSIMIR®
COSIMIR®
Cell Oriented Simulation of Industrial Robots

Use COSIMIR® to plan robot-based workcells, to check the reachability of all positions, to develop programs for robots and
controllers, and to optimize the workcell layout. All movements and handling operations can be simulated to avoid collisions and to
optimize cycle times. The direct download of tested programs and positions into the robot controller is completely supported.

The modeling extensions for COSIMIR® support the composition of robot-based workcells. Efficient modeling is provided by using
component libraries containing machinery, robots, tools, conveyor belts, part feeders, etc. Free 3D modeling and import from CAD
systems (e. g. AutoCAD™) are also possible. Additionally, COSIMIR® supports user defined libraries and project documentation.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Operating
 

Operating
Contents
First steps with COSIMIR
Elements of the COSIMIR user interface
Commands
Dialog boxes
Mouse
Keyboard
Glossary

   The following links are only valid if the optional components have been installed:

Mitsubishi Robot Interface for COSIMIR


COSIROP Extensions for COSIMIR
Collision Detection
Trajectory Generation
Process Simulation
Import and Display of Parametric Surfaces
Sensor Simulation
Camera Cruise
Texture Mapping

Programming Languages:
Movemaster Command (MRL) (Mitsubishi)
MELFA Basic (Mitsubishi)
V+ (Stäubli, Adept)
IRL (DIN 66312)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 2 of 562

Choosing a topic:

Mouse: Move the mousepointer to the underlined topic to get further information on it. The appearance of the mousepointer will
change to a hand . Then use the left mouse button.

Keyboard: Press the TAB key to move the selection onto the selected topic to get further information on it. Then press the return
key.

To exit COSIMIR help:

Mouse: On the File menu, click  Exit.

Keyboard: Keep the ALT-Key pressed and press F4.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How To ...
1. .. write your first program in COSIMIR
2. .. move the robot in COSIMIR
3. .. control the robot-controller’s simulated inputs and outputs
4. .. create an MRL position list
5. .. create and simulate an Movemaster Command (MRL) robot program
6. .. place objects in the workcell

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to write your first robot program in COSIMIR

IIn this section you learn how to write your first robot program in COSIMIR. By means of a simple robot application the generation of
an Movemaster Command (MRL) robot program and an MRL position list is shown step by step. The section closes with a table that
summarizes the single steps.

Loading the sample workcell

At first the workcell is loaded. It contains the robot as well as the workpieces that are to be manipulated.

Mouse: Select the command Open from the menu File.

or:

Toolbar:

Keyboard: Hold down the ALT-key and press the keys F and O.
    or:
    Press CTRL and the function key F12.

These commands open the dialog box Open File. In this dialog box you select the desired workcell. For the further steps in this
section the sample model "SIMPLE.MOD" is used. It can be found in the subdirectory "TUTORIAL" which is located below the COSIMIR

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 3 of 562

directory. The figure below depicts the related selection in the dialog box.

The workcell contains a MITSUBISHI Movemaster RV-E2, a large cuboid as deposit and a small cube. In this example the cube shall be
picked by the robot and placed at another position. The positions are stored in an MRL position list. The program’s flow control is
realized with an Movemaster Command (MRL) program.

Opening a new MRL position list

After opening the workcell, a new MRL position list is created. It is needed to store the robot’s positions.

Mouse: Select the command New from the menu File.

or:

Toolbar:

Keyboard: Hold down the ALT-key and press the keys F and N.
    or:
    CTRL + N

You enter the dialog box file new that is shown in the figure below. In this dialog you select the desired type MRL position list.

When you confirm your selection with "OK", a new and empty MRL position list window is created. You can modify its position and
size on the screen.

Opening a new Movemaster Command (MRL) program

The robot’s movements and gripper actions which are needed to perform the task are stored in an Movemaster Command (MRL)
program. Therefore a new Movemaster Command (MRL) program is created. The Movemaster Command (MRL) program takes the
flow control by means of MRL commands.

Mouse: Select the command New in the menu File.


    or:

Toolbar:

Keyboard: Hold down the ALT-key and press the keys F and N.
    or:
    CTRL + N

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 4 of 562

You enter the dialog box File New that is shown in the figure below. In this dialog you select the desired type Movemaster Command
(MRL) program.

When you confirm your selection with "OK", a new and empty Movemaster Command (MRL) program window is created. You can
modify its position and size on the screen.

Moving the robot and building the position list

The next step is the positioning of the robot at the desired positions. At first, the robot is moved to the position for picking the
object “cube“.

This position is:

x = 300 mm, y = -150 mm, z = 320 mm.

These values are given in the world coordinate system, which is located in the center of the robot’s base. In addition to the desired
position of the robot TCP, its orientation is necessary, too. The orientation describes the rotation of the TCP relative to the world
coordinate system.

The orientation of the cube’s grip point is given by the following angles:

Roll = 0.0°, pitch = 0.0°, yaw = 180.0°.

These values have to be commanded as the desired pose for the robot. Therefore the robot’s TCP is moved to this pose. When
arrived, the current TCP pose is stored in the position list. The configuration Right, Above, No-Flip is selected.

To enter a pose in world coordinates numerically use the dialog box Set World Coordinates.

Mouse: Select the command Set World Coordinates from the menu Extras / Robot Position.

Keyboard: Hold down the ALT-key and press the keys X, P and D.

Insert the values mentioned above into this dialog box. The correct input is shown in the figure below.

When you confirm with "OK", the robot will move to the given pose if it is reachable. The following view of the workcell results:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 5 of 562

The current position now is passed to the open MRL position list, which still is empty. Therefore its window has to be activated by a
mouse-click at the window title.

Now the current position, i.e. the position you have entered in the preceding step, can be taken over.

Mouse: Select the command Insert Position from the menu Edit.
   

or:

Toolbar:

Keyboard: Hold down the ALT-key and press the keys E and I.
    or:
    Shift + function key F2

After the take over of the pose into the position list, it looks like this:

Now the position for picking the cube is contained in the position list. Next, the position for placing the cube has to be inserted. This
position shall be:

x = 300 mm, y = 150 mm, z = 320 mm, roll = 0.0°, pitch = 0.0°, yaw = 180.0°.

For take over into the position list you again open the dialog box Set World Coordinates as explained above. Then you enter the
given values. The correct input is shown in the figure below.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 6 of 562

The new pose is inserted into the position list, too. As explained above, first the window of the position list has to be activated,
then the command Insert Position is issued. The correct position list with pick and place pose is shown below.

Concluding this step, the MRL position list is stored by choosing the command Save As from the File menu, while the position list
window is the active window. This will open the dialog box Save Position List. The name of the position list is arbitrary. It is chosen
to be "SIMPLE.POS" for clarity here, i.e. equal to the name of the workcell but with the "pos"-extension which is the common choice
for position lists.

Mouse: Select the command Save As from the menu File.

Keyboard: Hold down the ALT-key and press the keys F and A.
    or:
    Function key F12

In the dialog box you select the file extension for an MRL position list (*.POS) and the desired filename. The correct input is shown in
the figure below.

The correct result is available in the file "SIMPLEOK.POS".

Generation of the Movemaster Command (MRL) program

The MRL position list contains the positions no. 1 and 2. Pose no. 1 is for picking the cube and pose no. 2 is for placing.

Now the following program flow is formulated in the Movemaster Command (MRL) program:

1. Move to an approach position a few centimeters above pose 1


2. Move to pose 1
3. Close the gripper
4. Move back to the approach position above pose 1
5. Move to an approach position a few centimeters above pose 2
6. Move to pose 2
7. Open gripper

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 7 of 562

8. Move back to the approach position above pose 2

The generation of the Movemaster Command (MRL) program is done in the Movemaster Command (MRL) program window that you
have opened at the beginning. Into this window you enter the program code as MRL commands.

The first four steps of the program flow are formulated with the commands shown in the figure below.

After gripping the object, the pose for placing the object onto the deposit is approached. Then the object is released. These steps,
i.e. steps no. 5 through 8, are shown in the figure below together with the first four steps. The end of the Movemaster Command
(MRL) program is marked with the command ED.

Concluding this step, the Movemaster Command (MRL) program is saved. Therefore with activated program window and the
command Save As from the menu File the dialog box Save MRL Program is opened. The name of the program is chosen to be
"SIMPLE.MRL".

Mouse: Select the command Save As from the menu File.

Keyboard: Hold down the ALT-key and press the keys F and A.
    or:
    Function key F12

In the dialog box you select the file extension for an Movemaster Command (MRL) program (*.MRL) and the desired filename. The
correct input is shown in the figure below.

The correct result is available in the file "SIMPLEOK.MRL".

Compile

For simulation in COSIMIR the Movemaster Command (MRL) program has to be compiled and linked. Therefore you activate the
Movemaster Command (MRL) program window and start the compiler.

Mouse: Select the command Compile+Link from the menu Execute.

  or:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 8 of 562

Toolbar:

Keyboard: Hold down the ALT-key and press the keys X and C.
    or:
    CTRL + function key F9

After the compiler has translated the program, a message window is opened or it is activated if it has been opened before. It either
contains a success message or a list of errors and warnings. The figure below shows the message after successful compilation.

After successful compilation the program is automatically loaded into the robot controller of the simulation system. It can be tested
now.

Test of the Movemaster Command (MRL) program

There are several possibilities to start program execution:

Mouse: Select the command Start from the menu Execute.


    or:
    Click with the right mouse button into the leftmost field of the status bar.
    or:

Toolbar:

Keyboard: Hold down the ALT-key and press the keys X and S.
    or:
    CTRL + Q

The robot controller simulates the complete run once and then terminates at the end of the program. Prior to a restart you have to
reset the workcell, i.e. place the cube back to its initial position. The reset of the workcell can be done with the following
command:

Mouse: Select the command Reset Workcell from the menu Edit.

Keyboard: Hold down the ALT-key and press the keys E and R.

Now you can restart the program. Furthermore, you can modify or enhance the program.

Table of the single steps

Command Invocation   Related Help


description method
Open a Workcell Menu: File/Open Command File
Open
  Toolbar:  

  Keyboard: ALT+F+O  
  Shortcut: CTRL+O  
Create a new MRL Menu: File/New Command File New
position list
  Toolbar: Position list

  Keyboard: ALT+F+N Position entry


  Shortcut: CTRL+N  

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 9 of 562

Create a new Menu: File/New Command File New


Movemaster
Command (MRL)
program
  Toolbar: Program

  Keyboard: ALT+F+N  
  Shortcut: CTRL+N  
Enter a robot Menu: Extras/ Command Extras
position Robot Position/Set Robot Position Set
World Coordinates World Coordinates
  Toolbar:   Window World
Coordinates
  Keyboard: ALT+X+P+D Positioning the
robot
  Shortcut:    
Take over a Menu: Edit / Insert Command Edit
position into a Position Insert Position
position list
  Toolbar: Position list

  Keyboard: ALT+E+I Position entry


  Shortcut: SHIFT+F2  
Save new Menu: File/Save As Command Save As
MRL-position list /
Movemaster
Command (MRL)
program
  Toolbar:    
  Keyboard: ALT+F+A  
  Shortcut: F12  
Compile Menu: Execute/ Command
Movemaster Compile+Link Compile+Link
Command (MRL)
Program
  Toolbar:  

  Keyboard: ALT+X+C  
  Shortcut: CTRL+F9  
Start Movemaster Menu: Execute/Start Command Start
Command (MRL)
Program
  Toolbar:  

  Keyboard: ALT+X+S  
  Shortcut: CTRL+Q  

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to move and position the robot in COSIMIR

COSIMIR offers several methods to move and position the robot in the simulated workcell. The teach-in method is most commonly
used with industrial robot controllers. In this mode of operation the user moves the robot by means of a teach pendant. In COSIMIR
you can also enter the desired pose numerically.

Open the robot workcell

To work with COSIMIR a window with a view of the robot workcell is opened.

   

Mouse: Select the command Open from the menu File.

    or:

Toolbar:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 10 of 562

   

Keyboard: Hold down the ALT-key and press the keys F and O.
    or:
    CTRL + F12.

With one of these commands the standard dialog box for opening a file is opened. In this dialog box you select the desired workcell.
In the further steps of this section the model "LABRVM1.MOD" is used. It can be found in the subdirectory "TUTORIAL" which is
located below the COSIMIR directory. The figure shows the related selection in the dialog box.

This workcell contains a MITSUBISHI RV-M1 robot, and some other objects for manipulation. The figure below shows the whole
workcell.

The robot can be moved now.

Moving the robot by Teach-In

At first you have to open the Teach-In window.

   

Mouse: Select the command Teach-In from the menu Extras.

   

Keyboard: Hold down the ALT-key and press the keys X and I.
    or:
    Function key F8.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 11 of 562

The Teach-In window is opened, or it is activated if it has been opened before.

In the right part of the window you can select the coordinate system that you intend to use for moving the robot. You have the
choice between world coordinates, joint coordinates and tool coordinates.

The selection of the coordinate system leads to a change of the teach-in window type into the window Teach-In World Coordinates,
window Teach-In Joint Coordinates or window Teach-In Tool Coordinates, respectively.

In this window you can move the robot by clicking the small arrow buttons. The velocity can be configured with the scrollbar at the
bottom of the window.

The movement is terminated by release of the arrow button, or if an error occurs. The following errors are possible:

A joint limit, i.e. an end of the positioning range, is reached. Strictly speaking, this depends on the current velocity and on the
available deceleration for stopping before the joint limit is reached:

A further movement into the desired direction is not possible because the bounds of the work-space are reached:

The robot has been moved in world or tool coordinates near to a kinematic singularity:

Numerical input of position in joint coordinates

Besides Teach-In COSIMIR allows numerical input of the robot position in world coordinates or in joint coordinates.

The numerical input in joint coordinates is done in the dialog box Set Joint Coordinates.

   

Mouse: Select the command Set Joint Coordinates from the menu Extras / Robot Position.
    or:
    Context menu of the window Joint Coordinates or of the window Teach-In Joint Coordinates.
    or:
    Double-click in the window Joint Coordinates or in the window Teach-In Joint Coordinates.

   

Keboard: Hold down the ALT-key and press the keys X, P and O.

This part of the menu is depicted in the figure below.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 12 of 562

With this command the dialog box is opened. It is depicted in the figure below. It contains an edit control for each joint. The
current joint values are available as defaults.

Into the edit controls you can enter the desired position, and you confirm your input with the OK button. If reachable, the robot
takes this position.

Numerical input of position in world coordinates

The numerical input in world coordinates is done in the dialog box Set World Coordinates.

   

Mouse: Select the command Set World Coordinates from the menu Extras / Robot Position.
    or:
    Context menu of the window World Coordinates or of the window Teach-In World Coordinates.
    or:
    Double-click in the window World Coordinates or in the window Teach-In World Coordinates.

Keyboard: Hold down the ALT-key and press the keys X, P and D.

This part of the menu is depicted in the figure below.

With this command the dialog box is opened. It is depicted in the figure below. It contains an edit control for each coordinate. The
current position is available as default.

Into the edit controls you can enter the desired position, and you confirm your input with the OK button. If reachable, the robot
takes this position. In addition to the values for position and orientation the desired kinematic configuration is selected if the robot

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 13 of 562

allows for this.

Interactive positioning with the mouse

In the window Robot Workcell View you can position the robot interactively:

   

Mouse: Double-click with the left mouse button.

The Tool Center Point moves to the position that is indicated by the mouse pointer, provided the position is reachable. The
orientation remains unchanged.

Since a workcell view is a two-dimensional projection you need more than one view to specify positions three-dimensionally. To
avoid complicated relations you choose two orthogonal views. A simple choice is the top view (command Top View) combined with a
side view (command Left Side View or command Right Side View). In the top view you determine the x- and y-coordinates by single
mouse click. This position is marked. Now, with a double-click in the side view, you determine the x- and z- or the y- and z-
coordinates, respectively.

Positioning from position list

Furthermore, you can position the robot by means of an opened position list or MRL position list.

   

Mouse: Double-click with the left mouse button to the desired position list entry.

The Tool Center Point moves to the pose given by the position list entry, provided it is reachable. Unlike interactive positioning, the
orientation is taken over, too.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to control simulated input and output signals

Open the robot workcell

For the further steps in this section a robot workcell view window of the workcell "LAB.MOD" saved in the "TUTORIAL" directory is
used.
The opened workcell contains a Mitsubishi RV-E2 robot and some handling objects. The following figure shows the whole workcell.

Displaying the actual input and output values

The actual values of the simulated inputs and outputs can be displayed in the corresponding windows Inputs and Outputs.

Mouse: Select the command Show Inputs or Show Outputs from the Extras / Inputs/Outputs menu.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 14 of 562

Keyboard: Hold down the ALT key and press keys O, O and I for the input window and O, O and O for the output window.
    or:
    Function key F9 for inputs, SHIFT+ function key F9 for outputs

The following figure shows an input window.

Only inputs with a name different from "[inactive]" are displayed. Behind the input name its actual value and connection state are
displayed. The value is represented by the number 1 (digital value 1) or 0 (digital value 0). The connection state is displayed by
different bracket types enclosing the value. The "[]" brackets mean an input connected to an output. "<>" brackets mean a forced
input value. Missing brackets mean an interactive user input for the value.

In the previously shown figure the following values and states are shown:

MixerOn <1>: the input "MixerOn" is forced to value 1;


PH_Ready <0>: the input "PH_Ready" is forced to value 0;
Wait[1]: the input "Wait" is connected to an output and has an actual value of 1;
Next 0: the input "Next" is interactive, each time the input is used, the user is asked for the value by the Polling Input window; the
actual value is 0;
PipetteOK [0]: the input "PipetteOK" is connected to an output and has the actual value 0;

The value of inputs with the name "[inactive]" is always 0.

The following figure shows an Output window.

Only outputs with a name different from "[inactive]" are displayed. Behind the output name its actual value is displayed.

Rename inputs and outputs

In COSIMIR inputs and outputs must have a name different from "[inactive]" to be shown or used. All inputs and outputs named
"[inactive]" are not shown in the corresponding windows and their values are always 0.

To rename inputs or outputs open the Model Explorer e.g. by clicking the symbol in the toolbar. Select the desired object and its
Folder Inputs or Outputs.

Mouse: Select the desired input or output and right click on its name. Then select Rename from the displayed context menu .

or:

Slowly double-click on the input or output name. Then enter the new name.

Keyboard: Press the F2 key an enter the new name for the input or output.

The following figure shows the selected Output in the Model Explorer of COSIMIR.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 15 of 562

First, select the object which owns the input/output channel. In the folder Input/Output all input or output channels owned by this
object are shown and can be edited.

Connecting inputs and outputs

The possibility to connect input and output channels from different objects in a workcell is the main functionality of inputs and
outputs in COSIMIR. It enables the control of objects in the workcell by the robot-controller. If an output is set to a certain value, all
inputs connected to this output are set to the same value. This can be used for example to turn a conveyor belt on or off.

Open the Model Explorer to connect inputs to outputs.

The input to be connected should be visible in the right frame of the Model Explorer´s window as well as the output of the robot in
the left frame.

Mouse: Select the input and leave the left mouse button pressed while moving the Input to the robot´s output. Then release the
mouse button. The input and output will be connected.

The following figure shows the Model Explorer for the previously shown example.

The information about connections of inputs and outputs is shown in the Model Explorer.

To change the connection act like this:

Mouse: Select the output with the right mouse button and choose Remove Connection(s) from the context menu to remove all
connections to the selected output.

Direct output setting

Mouse: Select the output with the right mouse button and choose Set Value and the 1 or 0 to set the value of the selected output.

Setting outputs from a SRPL program

You can change an output value with a SRPL program. In each program step only one output can be set. The dialog box Set Output is
opened to select the output channel and value. The selection is only enabled, if a SRPL program window is the active window.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 16 of 562

Mouse: Select the command Set Output from the Edit / Step Functions menu.
    or:
    Context menu in the SRPL program window.

Keyboard: Hold down the ALT key and press keys E, S and I.

Reading inputs from a SRPL program

ou can read an input value from a SRPL program to control program flow. In each program step only one output can be read. The
dialog box Poll Input is opened to select the input channel and value. The selection is only enabled, if a SRPL program window is the
active window.

Mouse: Select the command Poll Input from the Edit / Step Functions menu.
    or:
    Context menu in a SRPL program window.

Keyboard: Hold down the ALT key and press keys E, S and I.

The following SRPL program sets the output "PH_Measure" (3) to the value 1 after the first move statement. After the second move
statement the program waits until input "Next" is set to Value 1 before executing the third move statement.

The input "Next" is not connected to an output. To set the value for a unconnected input by the user the dialog box Input Polling is
opened.

The dialog box will be opened until the user sets the input channel to 1 (left field) or forces the value to 1 (right field).

The shown SRPL program is saved as "IO.PGM" in the "TUTORIAL" directory.

Setting outputs from a Movemaster Command (MRL) program

In a Movemaster Command (MRL/Mitsubishi Robot Language) program an output can be set by a command. The output number is
used to refer to a specific output. In the previously shown example the output "PH_Measure" has the logical number 3. The
assignment is shown for example in the Rename Inputs/Outputs dialog box.

The MRL command is OB.

The following Movemaster Command (MRL) program sets the output "PH_Measure" (3) to value 1.

The shown Movemaster Command (MRL) program is saved as "OPLUS3.MRL" in the "TUTORIAL" directory.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 17 of 562

Reading inputs from a Movemaster Command (MRL) program

Digital input channels can be used to control the program flow in Movemaster Command (MRL) programs. All inputs are read and
their values are saved in an internal register. This register can be used to compare values or for bit test.

The MRL command is ID.

The following Movemaster Command (MRL) program reads the input values and moves to position 1 or position 2 depending on the
value of the logical input Next.

The shown Movemaster Command (MRL) program is saved as "POS12.MRL" in the "TUTORIAL" directory.

Setting outputs from a IRL program

As Movemaster Command (MRL) programs also IRL (Industrial Robot Language) programs use the logical output number to set an
output. The output is declared as a variable which can be set by the program.

The following IRL program sets the output "PH_Measure" (3) to the value 1.

The shown IRL program is saved as "PHPLUS3.IRL" in the "TUTORIAL" directory.

Reading inputs from a IRL Program

In contrast to Movemaster Command (MRL) programs in IRL programs each input is read individually.

The following IRL program reads the input "MixerOn" (logical Number 0) and displays its value.

The shown IRL program is saved as "INPMIX.IRL" in the "TUTORIAL" directory.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to generate a MRL position list

In COSIMIR you can use position lists. This is a useful tool for developing and correcting programs. A position list contains positions

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 18 of 562

which can be used by one or by several programs simultaneously. The positions from a position list can easily be adapted to changes
in the workcell by using coordinates relative to an object.
For the further steps in this section the workcell model "LABRVM1.MOD" from directory "COSIMIR\TUTORIAL" is used. The following
figure shows this workcell model, containing a robot and three objects. The three objects are cups. The robot is supposed to grip
and to move them.

For a correct handling the cups must be gripped at their grip points. Before creating a program, a position list containing the grip
points should be created.
First open a position list window and choose the COSIMIR format, which will be converted to the MRL format later. The advantage of
the COSIMIR formats is the possibility to use object-relative coordinates. The MRL format can be included in Movemaster Command
(MRL) programs.

While working with position lists you should use the COSIMIR format. When all positions are tested the position list can be converted
to the MRL format.

Mouse: Select the command New from the File menu.


    or:

    Toolbar:

Keyboard: Hold down the ALT key an press keys F and N.


    or:
    CTRL+N

The following shown dialog box File New will be opened.

Choose Position List to open a new position list window.

Now the actual robot position is inserted to the position list:

Mouse: Select the Insert Position command from the Edit menu.
    or:
    Context menu in the position list window
    or:

Toolbar:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 19 of 562

Keyboard: Hold down the ALT key and press keys E and I.
    or:

SHIFT and function key F2.

The actual position is inserted in the position list with the name "POS1", like shown in the following figure.

A double click on an inserted position sets the actual robot position. The position "POS1" has world coordinates, it is not relative to
an object in the workcell. The shown position list is saved as "POS1.PSL" in the "TUTORIAL" directory.

The cup grip points must be inserted into the position list to be used by a robot program for handling the cups. In this case a position
relative to an object should be used. Insert a new position "POS2" in the position list. The actual robot position doesn't matter
because now the relation between the position and the red cup (object "BecherRot") must be created.

Select the "POS2" entry in the position list and open a dialog box to edit the position list entry.

Mouse: Select the command Properties in the Edit menu.


    or:
    Context menu in the position list window

Keyboard: Hold down the ALT key and press keys E and R.

The following dialog box is opened:

Choose the object "CupRed" from the list in the "Relative to Object" field. This creates the relation between the position and the
object. The relative coordinates from position "POS2" to the grip point of the object "CupRed" are calculated and inserted below the
object name, but the position has not changed. Now the aspired values are inserted in the input fields for the relative object
position. Enter 0.0 for X, Y, Z, Roll, Pitch and Yaw. Position and orientation of the TCP and the grip point are identical. Now this
position must be calculated in world coordinates according to the object's position and the relative coordinates. Select the "Object -
> World Coordinates" button for this calculation.

After closing the dialog box the new world coordinates and the "Rel. to Object" entry are set in the position list. A double click on
the "POS2" entry moves the robot to this position, and you can check its correctness. The shown position list is saved as "POS12.PSL"
in the "TUTORIAL" directory.

To complete the position list, do the previously shown steps for the position "POS3" with the relative object "CupYellow" and for

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 20 of 562

"POS4" with the relative object "CupBlue". The result is the following position list:

The shown position list is saved as "POS1234.PSL" in the "TUTORIAL" directory.

This created position list has the COSIMIR format, it must be converted before using it in a Movemaster Command (MRL) program.

For this conversation open the dialog box "Save as" and save the position list with a new name and the extension "*.POS" for the MRL
position list type.

Mouse: Select the command Save As from the File menu.

Keyboard: Hold down the ALT key and press keys F and A.
    or:
    Function key F12

The following figure shows the dialog box where you can enter the new file name and select the MRL Position List (*.POS) file type.

The values used in this example can be converted without problems. The COSIMIR position list has been converted to a MRL position
list. In the position list window the column "Name" is renamed to "Nr." and the names have changed to consecutive numbers.

The shown position list is saved as "POS1234.POS" in the "TUTORIAL" directory. Now it can be used in a Movemaster Command (MRL)
program.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to generate and simulate a Movemaster Command (MRL) robot program

The integrated program development tool is an important feature of COSIMIR. It allows the development and simulation of robot
programs using different robot programming languages. After creation of the program the syntactic correctness is checked. From the
COSIMIR user interface the program is compiled into IRDATA code, which is used for simulation within COSIMIR. The developed and
checked robot program can be downloaded into a real robot-controller where it can be used to control a real robot. In the following
a Movemaster Command (MRL) robot program will be developed and tested using a modeled workcell.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 21 of 562

In the chapter How to generate a MRL position list a position list was created, which will be used for the new Movemaster Command
(MRL) program. The task of this program is to exchange the red and the yellow cup.
The further steps of this section are done using the model "LABRVM1.MOD" located in the subdirectory "TUTORIAL" below the
directory of COSIMIR. The following figure shows the known workcell containing the robot and the three cups. After that the already
created position list is listed.

To control a gripper from a Movemaster Command (MRL) program the output with the logical number -1 has to be named, for
example "GrpClose". It is important to use the logical number -1 because the MRL commands GO and GC control this output. Then
this output must be connected to a gripper. How to do this is described clearly in the chapter How to control the simulated inputs
and outputs of the robot-controller. These are the related settings with the Model Explorer of COSIMIR.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 22 of 562

Now you can start to create a program solving the given task. First you have to open a Movemaster Command (MRL) program
window.

Mouse: Select the command New from the File menu.


    or:

Toolbar:

Keyboard: Hold down the ALT key and press keys F and N.
    or:
    CTRL+N

You will get the dialog box File New shown in the following figure.

You have to choose the type MRL Program. A new program window will appear, in which you can type in the desired program text
using MRL syntax. The following figure shows the first part of the program; the robot moves to the start pose.

The subdirectory "TUTORIAL“ below the directory of COSIMIR contains the shown Movemaster Command (MRL) program under the
name "PROG1.MRL".

Before being simulated with COSIMIR the Movemaster Command (MRL) program must be compiled into IRDATA code.

To save the Movemaster Command (MRL) program under the desired name open the dialog box "Save Movemaster Command (MRL)
program".

Mouse: Select the command Save as from the File menu.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 23 of 562

Keyboard: Hold down the ALT key and press keys F and A.
    or:
    Function key F12

A dialog box appears where you can choose the file format Movemaster Command (MRL) program (*.MRL) as well as the name for the
program. The following figure shows a possible input.

The target position used in the program is not defined within the program but in the position list shown above. You have to make
this list known to the MRL compiler.

Mouse: Select the command Settings / Compiler in the Option menu.

Keyboard: Hold down the ALT key and press keys X, S and P.

This way you open the dialog box Compiler Settings.

In this dialog box the name of the position list is entered in the field Position Lists, see following figure.

Now the successfully saved program can be compiled.

Mouse: Select the command Compile+Link in the Execute menu.


    or:

    Toolbar:

Keyboard: Hold the ALT key and press keys C and C.


    or:
    CTRL+function key F9

After compilation a message window is opened showing the results of the compilation: success or the type of error. The following
figure shows a message window in the case of successful compilation.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 24 of 562

The translated program is automatically loaded into the robot control of the simulation system and can be executed. To start the
program interpretation choose one of the following actions:

Mouse: Select the command Start in the Execute menu.


    or:
    Click with the right mouse button in the field Running State in the status bar.
    or:

    Toolbar:

Keyboard: Hold down the ALT key and press keys C and S.
    or:
    CTRL+Q

One complete execution of the program will be simulated and the program will be terminated at the end. Using the command
Extras / Settings / IRDATA Interpreter you can activate source code tracing. The currently interpreted program line is highlighted.
Using this tracing facility you can easily locate errors in the robot program. In this example program the robot moves toward the
pose marked 1 in the position list.

As the next step you will program gripping of the red cup. The created program is listed within the next figure and stored under the
name "PROG2ERR.MRL" in the subdirectory "TUTORIAL" below the directory of COSIMIR.

After compilation of this new program a message window appears which contains an error message.

The error is described in the second line of the window: After the name of the compiled program the number of the line containing
the error is printed between the two colons, here line 13. Afterwards the error description follows, in this case the compiler has
discovered an unknown command.

If you double-click the line with the error message the cursor automatically jumps to the line of MRL code containing the bad MRL
command.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 25 of 562

The error is created by a space between the letters "GC". After you have deleted the misplaced space the program can successfully
be compiled.

The final version of the resulting Movemaster Command (MRL) program to exchange the cups is listed below.

1 'Change red and yellow cup


10 'Start pose, pos. no. 1
20 'with opened gripper
30 MO 1, O

40 '50 mm above the red cup (pos. 2)


50 MT 2,-50
60 'move directly to pos. 2
70 MS 2, 10, O
80 'close gripper
90 GC
100 'lift and leave
110 MT 2, -50, C

200 'Define an intermediate pose


PD 9,350.6,150.1,70,-90,-12.04
210 'Move to inter. pose and place cup
220 MT 9, -50, C
230 MT 9, 0, C
240 GO
250 MT 9, -50

300 'Now place yellow cup at old pose of


310 'red cup
320 '50 mm above yellow cup (pos. 3)
330 MT 3,-50
340 'move directly to pos. 3
350 MS 3, 10, O
360 'close gripper
370 GC
380 'lift and leave
390 MT 3, -50, C

400 'move to old pose of red


410 'cup and place yellow cup
420 '50 mm above red cup (pos. 2)
430 MT 2,-50, C
440 'move directly to pos. 2
450 MS 2, 10, C
460 'close gripper
470 GO
480 'lift and leave
490 MT 2, -50

500 'pick the red cup


510 'move to inter. pose and place
520 MT 9, -50
530 MT 9, 0
540 GC
550 MT 9, -100, C

600 'back to the old pose of yellow cup


610 '100 mm above yellow cup (pos. 3)
620 MT 3,-100, C
630 'move directly to pos. 3
640 MS 3, 10, C
650 'open gripper
660 GO
670 'lift and leave
680 MT 3, -100

999 'READY!
1000 ED

This program solves the given task. It is stored under the name "PROGALL.MRL" in the subdirectory "TUTORIAL" below the directory
of COSIMIR.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 26 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
How to modify objects within the workcell

In COSIMIR a loaded workcell can be modified by the user. Objects of the cell can be moved, rotated or colored. Problems of
reachability, e.g. when gripping, can be solved by moving or rotating individual objects.
After modelling a workcell COSIMIR will be used to create and simulate the robot programs. During the simulation you can detect
errors in your programs due to algorithmic or reachability problems.
To cope with the second class of errors the robots or the objects that are handled by the robot can be moved.

The further steps of this section refer to the model "MOVERVM1.MOD", which is located in the subdirectory "TUTORIAL" below the
directory of COSIMIR. The following figure shows the workcell including one robot and three cups, which shall be positioned by the
robot.

For use in this workcell you have created the shown position list "MOVEPSL1.PSL", which is located in the subdirectory "TUTORIAL"
below the directory of COSIMIR.

In this list all grip points are defined relative to the object that is gripped by the robot. The dialog box to create the entry "POS2",
which is defined relative to the position of the red cup is shown here.

For every pose you have to check whether the robot can reach this pose. To do this you can move the robot TCP to the checked pose
by a double click with the left mouse button at the pose entry in the list.
A double click at pose "POS2" will result in the following error message:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 27 of 562

The robot can not reach this position with the desired orientation because the pose is not within its workspace.
Besides this you can check the reachability of all poses of the list with the command Extras / Position List / Check Reachability. This
command is part of the menu Extras and of the context menu of the position list. Positions that are out of reachability are displayed
in gray.
To allow gripping of the cups you must place them within the workspace of the robot.

To change the position of the cups select the command Execute Model Explorer or select the button in the tool bar. This will
open the Model Explorer, which is the central window for operations on objects. It is handeled in a similar way like the Windows
Explorer.

You can open the modeling hierarchy by clicking on the "+" in front of the entries. Select the objects (in this case one of the cups)
you want to modify by clicking left with the mouse. Click right on the selected entry. A context menu will open. Select Properties.
The opened dialog box will show different property sheets like General, Position or Extended. Select Position.

Here you can enter the coordinates and orientation of the object. You can alter the position directly by entering the value in each
text field or using the spin controls. Increment means the step by which the actual position is altered when using the spin controls.
Coordinate system is the base coordinate system which is used to calculate the shown values of the position.

Move the cups one after the other with the operator accept to the x-position 375.6 mm by entering this value in the X text field.
After moving all cups you can close the dialog boxes.

You can save the modified workcell. It is stored with the name "NEWRVM1.MOD" in the subdirectory "TUTORIAL" below the directory
of COSIMIR.

In the next step the positions in the position list will be updated to reflect the object movements. Select the Command Extras /
Position List / Object->World coordinates, which computes all listed positions from the current object positions.
You can find the position list after the update in the file "MOVEPSL2.PSL" in the subdirectory "TUTORIAL" below the directory of
COSIMIR.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 28 of 562

You can now check the new positions for reachability as described before. If there should still be any reachability problems repeat
the selection and move commands until all position will be within the workspace.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Elements of the COSIMIR user interface
Choose the topic you want to know more about

Window Workcell View


Window SRPL robot program
Window IRL/MRL/BAPS/V+ program
Window position list
Window outputs
Window inputs
Window joint coordinates
Window world coordinates
Window joint coordinates (Teach-In)
Window world coordinates (Teach-In)
Window tool coordinates (Teach-In)
Window recorder
Window toolbar
Status bar

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Workcell View

The open workcell is shown graphically in the workcell view window. You can open further windows with different workcell views by
means of the command New from the View menu.
The viewpoint and the reference point can be adjusted numerically or the view can be moved, rotated, zoomed in or out by means
of the mouse. The command view rendering allows you to select the kind of representation.

A click on the right mouse button activates a context menu with the commands:

Default Setting
Front View
Rear View
Top View
Left Side View
Right Side View
Full Format
Move
Rotate
Zoom
Rendering
Look at
Floor

This context menu makes the most important commands to manipulate the workcell windows available immediately.

See also

Command Rotate

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 29 of 562

Command Move
Befehl Zoom
Command Look at
Command Rendering
Elements of the COSIMIR user interface

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window SRPL Robot Program

A SRPL (Simple Robot Programming Language) window offers a menu oriented method to create and modify robot programs. The
necessary commands are located in the menu Edit/Step Functions.
A SRPL program consists of multiple steps, each one consisting of the following elements:

a robot position in joint coordinates,


the motion type to move to the position,
several step functions like velocity override, suspension, call of subroutines, etc..

SRPL programs are simulated in COSIMIR without having to be translated into an intermediate code (IRDATA).
The next figure shows an SRPL program in a window:

Pressing the right mouse button opens a context menu, which contains the following commands:

Insert
Insert Position
Accept Position
Speed Override
Acceleration Override
Continous Motion
Waiting Time
Set Output
Poll Input
Subroutine

See also

Command Insert Position


Command Accept Position
Command Delete Step Functions
Elements of the COSIMIR user interface

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Robot Program

This window contains an IRL-, MRL-, BAPS-, V+ or another robot program. To simulate a high level program in COSIMIR these
programs have to be translated into IRDATA code before. To trace program execution select the control Source Code Sequence Trace
in the dialog box IRDATA Interpreter.
The next figure shows an IRL program in a window:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 30 of 562

The robot program window can be used like a text editor.

  Notice: Because of restrictions in Windows 3.1x, 95/98/ME the editable size of programs is limited to 64 kBytes. This limitation
does not exist in Windows NT/2000.

By clicking the left mouse button you place the cursor at the location where you want to insert text by keyboard or by pasting from
the clipboard. Keep the left mouse button pressed to mark program text to be copied into the clipboard.
Pressing the right mouse button opens a context menu, which contains a set of the most important statements of the robot
programming language, which may be inserted directly into the program text.

See also

Command Edit Copy


Command Edit Paste
Elements of the COSIMIR user interface
Compile+Link
Compile
Link
Command IRDATA Interpreter

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window IRDATA Program

The window IRDATAprogram shows the actually loaded IRDATA program.


High level robot programs like IRL or MRL programs have to be translated into IRDATA code before simulating them in COSIMIR.

See also

Command Settings IRDATA Interpreter

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Position List

A position list consists of several entries, each one having the following properties:

1. In COSIMIR position lists each entry is referenced by a name, while MRL position lists use numbers to distinguish between
different entries.
2. Each entry has a position using world coordinates, joint coordinates or in MRL-5-joint coordinates. World coordinate positions
are build of a position (X-, Y- and Z-coordinates), an orientation and an optional configuration. Positions in joint coordinates
use the value of each single joint to describe the robot position. They are display in ”(” and ”)” signs and can’t be relative to
an object.
3. An optional name of an object the position is relative to. The relation is described with X-, Y- and Z-coordinates and an
orientation based on the object coordinate system. MRL position lists don’t support relative positions.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 31 of 562

New entries in a position list may be created in the following ways:

I.Entries using world coordinates for position and orientation and an optional configuration:

1. Activate or open a window showing the robot position in world coordinates and copy the position using the command Edit Copy
(CTRL+C).
2. Insert the copied value into the position list using Edit Paste (CTRL+V). The new position is inserted above the selected entry.
or:
    Choose the menu command Edit Insert Position (SHIFT+F2).
or:
    Use Insert Position from the context menu of a position list window.

II.Entries using world coordinates for position and orientation and being relative to an object:

1. Open the Model Explorer and select the desired object.


2. Activate or open a window showing the robot position in world coordinates and copy the position using the command Edit Copy
(CTRL+C).
3. Insert the copied value into the position list using Edit Paste (CTRL+V).

or:

1. Open the Model Explorer and select the desired object.


2. Choose the menu command Edit Insert Position (SHIFT+F2).

or:

1. Open the Model Explorer and select the desired object.


2. Use Insert Position from the context menu of a position list window.

III.Entries using joint coordinates:

1. Activate or open a window showing the robot position in joint coordinates and copy the position using the command Edit Copy
(CTRL+C)
2. Choose the menu command Edit Insert Position (SHIFT+F2).

IV.Copy entries of the position list:

1. Select the entry to be copied.


2. Copy the entry using the command Edit Copy (CTRL+C).
3. Select the entry the new copy is to be inserted above.
4. Insert the copy into the position list using Edit Paste (CTRL+V).

How to change entries in a position list:

I.Change the position of an entry to the actual robot position:

1. Select the entry to be changed.


2. Replace the position by the actual position using the command Edit Accept Position (CTRL+F2) or the context menu. The type
of the position, e.g. world or joint coordinates is kept constant.

II.Edit an entry:

1. Select the entry to be edited.


2. Use the command Edit Properties (ALT+Enter) to open the dialog box Position List Entry to edit the value.

You set the actual robot position to a position in a position list by double clicking the entry containing the desired position with the
left mouse button.

Move the rows of a position list window:

Place the mouse cursor onto the line separating the two rows in the title of the table and press the left mouse button. Keep the left
button pressed, move the line to the desired position and release the button when you have reached the desired position.

Pressing the right mouse button opens a context menu, which contains the following commands:

Cut
Copy
Paste
Properties
Insert Position
Accept Position
World->Object coordinates
Object->World coordinates
Check Reachability
Show

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 32 of 562

Dialog box Position List Entry


How to move and position the robot
How to place objects in the workcell

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Outputs

he window outputs shows the states of the simulated robot-controller’s outputs. The actual states of the outputs are displayed next
to their names. 0
-signals are displayed in red, 1-signals are displayed in green.

  A double click into this window opens the dialog box Set Outputs.

See also

Command Show Outputs


Window Inputs
Elements of the COSIMIR user interface
How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Inputs

The window inputs shows the states of the simulated robot-controller’s inputs. The actual states of the inputs are displayed next to
their names. 0
-signals are displayed in red color, 1-signals are displayed in green color. The value of the input is displayed between brackets, e.g.
[1], if the input is connected to an output. If the signal of the input is forced, the value of the input is displayed in angle brackets,
e.g. <1>.

   A double click into this window opens the dialog box Force Input Value.

See also

Command Show Inputs


Window Outputs
Elements of the COSIMIR user interface
How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window User Input/Output

The User Input/Output window opens automatically, if the robot program contains commands for reading and writing of data via the
serial interface to and from the robot control.
Because of the simulation of a robot control, the data is not sent physically via the serial interface, but it is sent to the User
Input/Output window, where the data is displayed.
If an input is expected, the cursor is located in the edit control at the bottom part of the window. If no input is expected, then the
bottom part of the window is grayed and the cursor is located in the top part (output window) of the window.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Joint Coordinates

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 33 of 562

The window joint coordinates shows the positions of the single robot joints. The display unit for revolute joints is degree, for prismatic joints it is
millimeter.

  A double click into this window opens the dialog box Set Joint Coordinates.

A click on the right mouse button activates a context menu with the commands:

Copy
Set Joint Coordinates

See also

Command Teach-In
Command Show Joint Coordinates
Window World Coordinates
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window World Coordinates

The window world coordinates displays the position and orientation of the Tool Center Points in world coordinates. The values and
axes are presented in color. If you want to change the colors, use the command Coordinate Systems.../Settings in the Extras menu.
In addition the position, the orientation and the configuration of the robot is displayed in the lowest line of the window. This line is
missing, if the robot doesn’t support configurations.

  A double-click on this window opens the dialog box Set World Coordinates.

If you click the right mouse button, a context menu is opened, which provides the following commands:

Copy
Set World Coordinates

See Also

Command Teach-In, World Coordinates


Command Teach-In, Tool Coordinates
Command Show World Coordinates
Window Joint Coordinates
Configuration Right/Left
Configuration Above/Below
Configuration Flip/No-Flip
How to move the robot and set the position
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Joint Coordinates (Teach-In)

The window Joint Coordinates (Teach-In) contains the names of the robot joints and two small buttons to move the individual joints
of the robot. Thereby the reaction of a real robot is simulated. If you keep pushing the button, the robot accelerates up to the
adjusted speed, keeps the speed steadily and then continuously decelerates to a speed of 0 after releasing the button.

  A double-click on this window opens the dialog box Set Joint Coordinates.

To move a joint into the positive direction:

Push the right button of the corresponding joint and keep it pressed. The joint then starts to move slowly, until you release the right
mouse button.

To move a joint into the negative direction:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 34 of 562

Push the left button of the corresponding joint and keep it pressed. The joint then starts to move slowly, until you release the left
mouse button.

Robot speed and acceleration

To adjust the amount of permitted acceleration and the maximum speed, use the scrollbar located at the bottom of the window:

=   minimal speed and acceleration

= maximum speed and acceleration

If you click the right mouse button, a context menu is opened which provides the following commands:

Set Joint Coordinates


Set World Coordinates
Grip

See also

Window Tool Coordinates (Teach-In)


Window World Coordinates (Teach-In)
How to move the robot and set the position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window World Coordinates (Teach-In)

The Window World Coordinates (Teach-In) shows a coordinate system. At the end of each axis there are located two pairs of buttons which let you change
the position and orientation of the Tool Center Point. The related coordinate system is the base coordinate system.

Attention: To move or to turn around an axis is only possible, if the robot has the necessary degree of freedom. As the reaction of a real robot is
simulated, you may experience its workspace limitations by different error messages or warnings during the movement. If you keep pushing the button,
the robot accelerates up to the adjusted speed, keeps the speed steadily and then decelerates down to a speed of 0 after releasing the button.

Robot speed and acceleration

To adjust the amount of the acceleration and the maximum speed, use the scrollbar visible at bottom of the window:

= minimal speed and acceleration

= maximum speed and acceleration

If you click the right mouse button, a context menu is opened, which provides the following commands:

Set Joint Coordinates


Set World Coordinates
Grip

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 35 of 562

Window Tool Coordinates (Teach-In)


Window Joint Coordinates (Teach-In)
How to move the robot and set the position

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Tool Coordinates (Teach-In)

The Window Tool Coordinates (Teach-In) displays a coordinate system. At the end of each axis there are located two pairs of
buttons, with which you can change the position and orientation of the Tool Center Point. The related coordinate system is the tool
coordinate system.

Attention: To move or to turn around an axis is only possible, if the robot has the necessary degree of freedom. As the reaction of a
real robot is simulated, you may experience its workspace limitations by different error messages or warnings during the movement.
If you keep pushing the button, the robot accelerates up to the adjusted speed, keeps the speed steadily and then decelerates down
to a speed of 0 after releasing the button.

Robot speed and acceleration

To adjust the amount of the acceleration and the maximum speed, use the scrollbar visible at the bottom of the window:

= minimal speed and acceleration

= maximum speed and acceleration

If you click the right mouse button, a context menu is opened, which provides the following commands:

Set Joint Coordinates


Set World Coordinates
Grip

See also

Window Joint Coordinates (Teach-In)


Window World Coordinates (Teach-In)
How to move the robot and set the position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Window Recorder

This window is an optional component of COSIMIR. It is not available in all versions.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 36 of 562

COSIMIR® · Operating
 
Toolbar

In the toolbar there are buttons for frequently used commands in COSIMIR. The individual buttons are activated or deactivated
depending on the current situation. Deactivated buttons are grayed. Pressing a deactivated button doesn’t lead to a reaction.

To get help for a button:

Mouse: Move the mouse cursor over a button in the toolbar below. The shape of the mouse-cursor will change into a hand .
Press the left mouse button to get information about this button.

See also

Command File New


Command File Open
Command File Save
Command File Save All
Command File File Properties
Command Edit Cut
Command Edit Copy
Command Edit Paste
Command Edit Renumber
Command Insert Position
Command Accept Position
Command File Print
Command View Rendering
Command View Move
Command View Rotate
Command View Zoom
Command Execute Compile
Command Execute Compile+Link
Command Execute Start
Command Execute Stop
Command Execute Approach Step
Command Execute Previous Step
Context Help

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Statusbar

The statusbar is located at the bottom of the COSIMIR frame window and contains the following items:

See also

Statusbar Run Mode


Statusbar Simulation Time
Statusbar Clock
Statusbar Copyright

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 37 of 562

Commands
Choose the topic you want to know more about.

Menu File Menu Edit


New Undo
Open Reset Workcell
Close Cut
Save Copy
Save As Paste
Save All Delete
Import Properties
Export Select All
File Properties Find
Page Setup Find again
Print Replace
Printer Setup Insert Position
Exit Accept Position
1,2,3,4 Path Step Functions, Speed Override
Step Functions, Acceleration Override
Step Functions, Continuous Motion
Step Functions, Wait Time
Step Functions, Set Output
Step Functions, Poll Input
Step Functions, Subroutine
Step Functions Delete
Programming Wizard
Select Controller
   

Menu View Menu Execute

New Restart
Close Reset Program
Standard, Default Setting Waiting Position
Standard, Front View Start
Standard, Rear View Stop
Standard, Top View Start Cycle
Standard, Left Side View Approach Step
Standard, Right Side View Next Step
Standard, Full Format Previous Step
Look At Compile+Link
Move Compile
Rotate Link
Zoom Simulation
Zoom-In
Zoom-Out
Rendering
Show Workspace
Show Kinematic skeleton
   

Menu Extras Menu Window

Robot Position, Show Joint Coordinates Cascade


Robot Position, Show World Coordinates Tile Vertical
Robot Position, Set Joint Coordinates Tile Horizontal
Robot Position, Set World Coordinates Arrange Icons
In-/Outputs, Show Inputs Close All
In-/Outputs, Show Outputs 1,2,3,4 Path
Teach-In
TCP-Tracking
Coordinate Systems
Settings, Coordinate Systems
Settings, Object Selection
Settings, Grip
Settings, Floor
Settings, IRDATA-Interpreter
Settings, Compiler
Settings, Change View
Settings, TCP Offset
Settings, Simulation
Settings, Model Statistics
Disable DDE
Position List, Show
Position List, Check Reachability
Position List, Object->World Coordinates
Position List, World->Object Coordinates
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 38 of 562

Menu Help

Index
Search For Help On
Keyboard
Mouse
Commands
How To Use Help
About COSIMIR
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File New

This command lets you create different types of robot programs and position lists. You can choose between a new SRPL robot
program a new IRL robot program, a new MRL robot program and a new IRDATA program. Valid position lists are a position list and a
MRL-position list. First you have to open a workcell. A workcell is stored in a file with the extension *.MOD.

SRPL robot program (*.PGM):

After you created a SRPL robot program you get an empty window. Guided by a menu system you can then create the SRPL robot
program. The necessary commands are provided by the menu Edit or the context menu of the window. You can only load one SRPL
robot program at the same time.

IRL robot program (*.IRL):

This command creates an empty IRL programming window. You can load an IRL program into this window or create your own IRL
program. The IRL program is compiled to an IRDATA program which can be run by COSIMIR. Several IRL programming windows can be
open at the same time.

MRL robot program (*.MRL):

This command creates an empty MRL programming window. You can load an MRL program into this window or create your own MRL
program. The MRL program is compiled to a IRDATA program which can be run by COSIMIR. In addition the MRL program can be
downloaded to a Mitsubishi robot controller. Several MRL programming windows can be open at the same time.

Position list (*.PSL):

After creating a new position list an empty window is created. Positions are added to the position list by moving the robot to the
desired location. A position list contains positions in a COSIMIR specific format. Positions can be absolute or relative to other
objects.

MRL position list (*.POS):

After creating a new position list an empty window is created. Positions are added to the position list by moving the robot at the
desired location. A MRL position list contains positions in a MRL specific format.

MELFA Basic Program (*.MBA):

This command opens a empty MELFA Basic programm window. Here you can load or write a MELFA Basic program. This program is
compiled into an IRDATA program, which can be executed and simulated in COSIMIR. It is additionally possible to download the
MELFA Basic program into a Mitsubishi robot controller (series RV-EN). Multiple MELFA Basic windows are allowed to be open.

BAPS-Program (*.BAP):

This command opens a new BAPS program window.

V+-Program (*.V2):

This command opens a new V+ program window.

Rapid-Program (*.PRG):

This command opens a new Rapid program window.

KRL-Programm (*.SRC):

This command opens a new KRL program window.

IRDATA-robot program (*.IRD):

After creation of a new IRDATA robot program an empty IRDATA program window is opened. A IRDATA program can be loaded into
this window, which will be automatically transfered to the robot control. This program can be executed in COSIMIR. It is only
possible to have one open IRDATA window at a time.

   This command shows the dialog box File/New.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 39 of 562

Option

You can also launch the command File/New by clicking the following symbol in the toolbar:

See also

Command Open
Command Save
Command Save As
Command Save All
Window SRPL robot program
Window robot program
Window position list

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Open

This command opens an existing file that is, the file is loaded into memory and its contents is shown in a window. After being
opened a file can for example be edited or printed. By choosing the file’s extension you choose the type of the file you are going to
load which can be the following:

Workcell (*. MOD):

You can only load one workcell at the same time which however can be viewed in several windows.

Robot program:

SRPL robot program (*.PGM): This kind of program can be created with COSIMIR using a menu system. Only one SRPL robot program
can be loaded at the same time.

MRL robot program (*.MRL): High-level program to be used with Mitsubishi Movemaster robots. This kind of program can be created
by COSIMIR, COSIPROG or your favorite text editor. You can open as many MRL programming windows as you like. Any previously
loaded SRPL window is closed automatically.

IRL robot program (*.IRL). This kind of program can be created by COSIMIR, COSIPROG or your favorite text editor. You can open as
many IRL programming windows as you like. Any previously loaded SRPL window is closed automatically.

MELFA Basic robot programm (*.MBA). This kind of program can be created by COSIMIR or your favorite text editor. Programs of this
type are compiled to IRDATA program code, which can be simulated in COSIMIR. It is additionally possible to download the MELFA
Basic program into a Mitsubishi robot controller (series RV-EN). Multiple MELFA Basic windows are allowed to be open.

V+ robot program (*.V2). This kind of program can be created by COSIMIR, COSIPROG or your favorite text editor. You can open as
many V+ programming windows as you like. Any previously loaded SRPL window is closed automatically.

BAPS robot program (*.BAP): This kind of program can be created by COSIMIR, COSIPROG or your favorite text editor. You can open
as many BAPS programming windows as you like. Any previously loaded SRPL window is closed automatically.

IRDATA program (*.IRD): By launching the command Execute/Compile+Link programs written in IRL, MRL, V+, BAPS or another high-
level language are compiled into IRDATA code. COSIMIR does not interpret the source code of the high-level language but the IRDATA
code. Only one IRDATA program can be open at the same time.

Robot position list:

Position list (*.PSL): Positions are added to the position list by moving the robot to the desired location. A position list contains
positions in a COSIMIR specific format. Positions can be absolute or relative to other objects.
MRL position list (*.POS): Positions are added to the position list by moving the robot at the desired location. A MRL position list
contains positions in a MRL specific format.

  This command shows the dialog box File/Open.

Option

You can also launch the command File/Open by clicking the following symbol in the toolbar:

Keyboard: CTRL+O.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 40 of 562

See also

Command New
Command Save
Command Save As
Command Save All
SRPL program window
IRDATA program window
IRL/MRL/BAPS/V+ programming window
Window position list

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Close

This command closes the window corresponding to the currently active file. If this file has been altered a dialog box is shown which
lets you save it.

How to close a window:

Mouse:  Click at the window and activate the command Close in the File menu.
    or
      Click at the system menu box and launch the command Close.
    or
        Double-click at the window’s title bar.

Keyboard: Press the ALT+D then the key L (for Close).


    or
    Press CTRL+F4.

If you close the last window containing a workcell by the command File/Close all corresponding windows are closed as well and the
workcell is unloaded.

See also

Command New
Command Open
Command Save
Command Save As
Command Save All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Save

Stores the data belonging to the active window. This command is only available if the currently active window contains a robot
program, a position list or shows a workcell.

This command lets you save modifications to a file which already exists.

If the file does not yet exist the dialog box Save As as is shown.

Together with a workcell the current window configuration, the I/O names, the I/O channel connections and some other values are
stored.

Option

You can also launch the command File/Save by clicking the following symbol in the toolbar:

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 41 of 562

Command New
Command Open
Command Save As
Command Save All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Save As

Stores the file corresponding to the active window with a new name. This menu item is only available if the active window contains
a robot program (*.PGM, *.IRL, *.MRL, *.V2, *.BAP), a position list (*.PSL), a MRL position list (*.POS) or shows a workcell(*.MOD).

  This command launches the dialog box File Save As.

When saving a workcell the current window configuration the I/O names and connections some other values are stored as well.

See also

Command New
Command Open
Command Save
Command Save All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Save All

Stores all files corresponding any open window. This menu item is only available if at least one window contains a robot program
(*.PGM, *.IRL, *.MRL, *.V2, *.BAP), a position list (*.PSL), a MRL position list (*.POS) or shows a workcell(*.MOD).

Option

You can also launch the command File Save All by clicking the following symbol in the toolbar:

See also

Command Save
Command Save As
Command Save All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Import

  Use this command to import CAD data from a file into the currently loaded workcell. This command opens the dialog box File Open, which will
enable you to select a file for import. Different CAD formats (e.g. STL, VDAFS, IGES, ...) as well as the workcell format (*.MOD) will be available.

  This command is only available in certain versions of COSIMIR. The available file formats depend upon the installed import filters.

See also

Command Export
Command File Open

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 42 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Export

  Use this command to export the currently selected objects into a file. This command opens the dialog box File Save As. You
can save the selected objects in the workcell format (*.MOD) as well as in different CAD formats.

  This command command is only available in certain versions of COSIMIR. The available file formats depend upon the installed
export filters.

See also

Command Import

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Properties

Use this command to get further information on the active window.


This menu item is only available if the active window contains a robot program (*.PGM, *.IRL, *.MRL, *.V2, *.BAP), a position list
(*.PSL), a MRL position list (*.POS) or shows a workcell(*.MOD).

  This command command is only available in certain versions of COSIMIR.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Page setup

This command lets you define the margins of the current print layout.

  This command launches the dialog box Page Setup

See also

Command Printer Setup


Command Print

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Print

This command lets you print the contents of the current window. It is available only if the active window contains a robot program
or a position list or shows a workcell.

  This command launches the dialog box Print.

If the active window shows a workcell-window, the active view of the workcell is printed. When using a non-color printer colors are
replaced by gray levels. Note that different colors may be substituted by the same gray level (e.g., a dark green and a medium red).

If the active window contains a position list the complete position list will be printed. With every entry in the list the following

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 43 of 562

items will be printed:

the position’s name,


the absolute position and orientation values with respect to the world coordinate system,
the joint angle values,
the relative position and orientation values with respect to another object (optional),
the object which acts as the base coordinate system for the relative position and orientation values (optional).

If the active window contains a robot program the entire program will be printed.

The command Page Setup lets you define the page margins. If the top margin equals at least three lines the file name is printed in
the header section.

Option

You can also launch the command File/Print by clicking the following symbol in the toolbar:

See also

Command Printer Setup


Command Page Setup

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Print setup

Lets you choose a printer from the set of printers you installed with windows and lets you choose some print options.

  This command launches the dialog box Printer Setup.

See also

Command Page Setup


Command Print

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File Exit

This command closes all windows and shuts down the program. Current settings are stored to the configuration file "COSIMIR.INI" in the windows directory.
This command has the same effect as the command Close in the system menu.
If a workcell is loaded (i.e. if a workcell window exists) the cell’s settings (e.g., I/O names and connections) are stored to a file named <cell>.INI in that
directory which also contains the workcell’s file <cell>.MOD. To prevent this choose the command Close All from the Window menu before you exit
COSIMIR.

How to shut down the program with the command Exit:

Double click to the system menu symbol or once in the upper right edge of the program window

or:

Click to the system menu symbol and launch the command Close.

or:

Press ALT+SPACE followed by the key L.

See also

Command New
Command Open
Command Save
Command Save As
Command Save All

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 44 of 562

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command File 1, 2, 3, 4

This list shows the names of the four most recently loaded files. The files can contain workcells, SRPL robot programs or position
lists. The listed file’
s types always correspond to the type of the active window. By clicking a file name the desired file is loaded.

See also

Command New
Command Open
Command Save
Command Save As
Command Save All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Undo

This command lets you undo the last edit operation if that is possible. You can undo:

functions which change the workcell,


edit operations on high-level robot programs (IRL., *.MRL, *.V2, *.BAP)

The menu’s caption is adapted to the operation which can be redone (e.g. undo Move/Rotate).

Keyboard: CTRL+Z.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Reset Workcell

This command is useful if you have changed the position of objects (either by a robot or by edit operations on the workcell) and you
want to restore the original state of the workcell. The workcell’s state is reset to that state it had immediately after being loaded
from a file. All outputs signals are reset. The instruction pointer of any loaded SRPL or IRDATA program is set to the first line. The
simulation time is set to zero.
If you changed the workcell’s layout by moving or rotating any objects or by changing any object’s colors a dialog box is displayed
asking whether the current state of the cell should be stored.

See also

Command Open
Command Reset Program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Cut

This command lets you cut selected text from a window and paste it to the  clipboard. This command is only available if the active
window contains a position list or a robot program and if some text is selected.
Cutting new text erases the previous contents of the clipboard.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 45 of 562

Option

You can also launch the command Edit/Cut by clicking the following symbol in the toolbar:

Keyboard: Ctrl+X.

See also

Command Edit Copy


Command Edit Paste
Command Edit Delete

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Copy

This command lets you copy the entire contents or selected parts (e.g. parts of IRL programs) of the active window to the clipboard.
Copying new items erases the previous contents of the clipboard. The clipboard format used depends on the currently active
window’s type.

Windows displaying workcells are copied to the clipboard in bitmap format as well as in metafile (not in the 32-bit-versions of
COSIMIR) format:

Metafiles are smaller and freely sizable. If a color palette is used (i.e. if your graphics board has 256 colors only) this palette is
copied to the clipboard as well so that any other application can display the picture with identical colors. Note that some
applications don’t support color palettes thus resulting in wrong colors being displayed. In this case temporarily use a display driver
with supports more than 256 colors.

The contents of the following window types are copied to the clipboard in text format:

With IRL programming windows the selected text is copied to the clipboard in text format.
With windows displaying world coordinate values or joint values those values are copied to the clipboard in a text format which allows them to be
pasted into an IRL program e.g., into the "MAIN_JOINT(...)" statement. Thus while teaching a robot you can directly move it to a specific location,
copy the joint values and paste them into an IRL program. In addition DDE link parameters (topic and item) are copied to the clipboard so that a DDE
hot link can be established with any applications capable of managing DDE links. The DDE link is established by choosing the command Edit/Connect.
With position lists the active list entry is copied to the clipboard in a text format containing position and orientation values.
With SRPL-Programmen the currently active program statement is copied to the clipboard in text format.
In addition COSIMIR makes use of some internal clipboard formats as is COSIMIR-Joint for joint value, COSIMIR-PosOri for positions and orientations
and COSIMIR-Poslist for position list entries which contain an object’s position as well as the object this position is relative to.

Option

You can also launch the command Edit/Copy by clicking the following symbol in the toolbar: 

Keyboard: Ctrl+C.

See also

Command Edit Paste


Command Edit Cut
Command Edit Delete
Command Edit Select All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Paste

This command is enabled only if the active window contains a robot program or a position list.

If the active window contains a SRPL robot program,

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 46 of 562

this command lets you add an empty line to the program.

If the active window contains a high-level robot program (IRL, *.MRL,*.V2,*.BAP),

this command lets you insert the contents of the clipboard at the cursor’s position. This command is enabled only if the clipboard is
not empty.

If the active window contains a position list,

this command lets you paste coordinate values from the clipboard to the position list. The type of the position contained in the
clipboard (world coordinates or joint values) is taken into account.

If the active window contains a robot’s position window,

this command lets you define the robot’s position. If the position contained in the clipboard is physically reachable the robot will be
moved there.

Option

You can also launch the command Edit/Paste by clicking the following symbol in the toolbar:

Keyboard: CTRL+V.

See also

Command Edit Copy


Command Edit Cut
Command Edit Delete
Command Edit Select All
Command Edit Accept Position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Delete

This command lets you delete selected text from a robot program or a position list.

This command is only available if the active window contains a robot program or a position list.

See also

Command Edit Copy


Command Edit Cut
Command Edit Paste
Command Edit Select All

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Properties

This command lets you edit any selected item in the position list. This command is available only if the active window contains a
position list.

  This command shows the dialog box Position List.

Keyboard: ALT+RETURN.

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 47 of 562

Command Edit Copy


Command Edit Cut
Command Edit Paste
Command Edit Accept Position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Select all

This command lets you select everything in a program window or a position list (not in all COSIMIR-versions). This command is
available only, if the active window is a program or a position list.

Keyboard: CTRL+A.

See also

Command Edit/Copy
Command Edit/Cut
Command Edit/Paste

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Find

This command lets you search for a string in a program.

  This command opens the dialog box Find.

Keyboard: CTRL+F.

See also

Command Edit/Copy
Command Edit/Cut
Command Edit/Paste
Command Edit/Find again
Command Edit/Replace

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Find again

Use this command to repeat the search for a string that has been entered previously in one of the dialog boxes Find or Replace

Keyboard: F3.

See also

Command Edit Copy


Command Edit Cut
Command Edit Paste
Command Edit Find
Command Edit Replace

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 48 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Replace

This command lets you replace one string with another one.

This command opens the dialog box Replace.

Keyboard: CTRL+H.

See also

Command Edit/Copy
Command Edit/Cut
Command Edit/Paste
Command Edit/Find
Command Edit/Find again

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Insert Position

This command is only available if the active window contains a robot program or a position list.

If the active window contains a SRPL robot program,

this command lets you insert a new program line before the currently selected one using the joint values of the robot’s current
location. First you have to decide whether the new position is to be approached at in PTP or in linear or in circular modus. The
robot’s current joint values define the required position values. The inserted program line is made the current line.

  This command shows the dialog box Movement Type.

If the active window contains a position list,

this command lets you insert the robot’s current position in the position list. If an object is selected in the workcell-window in
addition the position relative the selected object is computed and inserted in the position list together with the object’s name.

If the active window contains a MRL position list,

any selected entry is replaced by the robot’s current position. The position cannot be expressed relative to another object.

Option

You can also launch the command Edit/Insert position by clicking the following symbol in the toolbar:

See also

Window Position List


Window SRPL robot program
Command Edit Copy
Command Accept Position
Command Move Position
Dialog box Movement Type

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 49 of 562

Command Edit Accept Position

This command is available if the active window contains a SRPL-Robot-Program or a position list.

If the active window contains a SRPL-Robot-Program:

The axis coordinates of the marked program step will be replaced by the actual axis coordinates of the robot. Only this command
enables you to transfer the actual position as a second position of a circular movement (end point or point between) for the marked
program step.

This command opens the dialog box Type of Movement.

If the active window contains a position list:

The marked position list entry will be replaced by the actual position of the robot. If another object is selected, the name of the
object is also transferred to the list and the object-relative position is calculated accordingly.

If the active window contains a MRL-position list:

The marked position list entry will be replaced by the actual position of the robot. No connection to another object can be done.

Option

You can also execute the command Edit Accept Position by a mouseclick on the following symbol of the symbol bar:

See also

Window Position List


Window SRPL-Robot Program
Command Edit/Copy
Command Accept Position
Dialog Box Type of Movement
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Move Position

Use this command, if you want to change the actual position.


This command is only available, if the active window contains a position list.

  This command displays the dialog box move position.

See also

Window Position List


Command Accept Position
Command Rotate Position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Rotate Position

Use this command to rotate the selected position.

  This command opens the dialog box Rotate Position.

See also

Window Position List


Command Accept Position
Command Move Position

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 50 of 562

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Speed Override

This command is only available if the active window contains a SRPL robot program.
This command lets you define a speed override for the selected statement in percent of the maximum velocity.
With PTP movements the override is related to the joint’s velocities, with linear movements the override is related to the maximum
path velocity (default = 100%).

  This command shows the dialog box Speed dialog box Speed.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Acceleration Override

This command is only available if the active window contains a SRPL robot program.
This command lets you define an acceleration override for the selected statement in percent of the maximum acceleration.
WithPTP movements the override is related to the joint’s accelerations, with linear movements the override is related to the
maximum path acceleration (default = 100%).

  This command shows the dialog box Acceleration.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Continuous Motion

This command is only available if the active window contains a SRPL robot program.
This command is useful if the position given by the selected statement does not necessarily have to be reached exactly. The robot
moves in the direction of the target point but eventually turning around and heading for the next point defined on the path.

  This command shows the dialog box Contiuous Motion.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Waiting Time

This command is only available if the active window contains a SRPL robot program.
This command lets you define a delay for the selected program statement. Applying this command stops the robot’s movement for

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 51 of 562

the given time. If the selected statement moves the robot the delay occurs after the movement was executed.

When the delay is over the next statement is executed (default = 0 sec).

  This command shows the dialog box Waiting Time.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Set Output

This command is only available if the active window contains a SRPL robot program.
This command lets you define an output’s value which is set or reset after the robot reaches or runs across its target point.

  This command shows the dialog box Set output.

The following names carry a special meaning due to compatibility reasons with former versions of COSIMIR:

BANDLAUF    This output port starts and stops a conveyor belt that is not modeled as an object of CONVEYOR_BELT type (1=start,
0=stop).
GREIFER    If the workcell contains a gripper which is not modeled as an object of its own this gripper is controlled by this output
port (1=closed, 0=open).

See also

How to control I/O ports

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Poll Input

This command is only available if the active window contains a SRPL robot program.
This command lets you define the input port which is to be polled after the robot reaches or runs over a target position.
The program is stopped until the polled input port shows the desired signal (0-signal or 1-signal).
The command Force inputs/output lets you fix the input port’s values for simulation purposes.

  If the input port’s value is not defined in advance every polling on that input port results in the dialog box Poll Input showing
up which lets you choose an appropriate value.

The following names carry a special meaning due to compatibility reasons with former versions of COSIMIR:

BANDENDE    If the workcell contains a conveyor belt this input port polls the sensor placed at the back end of the conveyor belt.

See also

Command Delete Step Functions


How to control I/O ports

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Step Functions Subroutine

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 52 of 562

This command is only available if the active window contains a SRPL robot program.
This command lets you add a subroutine call to the selected program statement.

  This command shows the dialog box Subroutine.

Bundle sequences of program statements to a separate program. This speeds up modifications and prevents you from doing
unnecessary work. There are two kinds of subroutine calls: the conditional call and the unconditional call.
With a conditional call the program branches to the subroutine only if a certain input port shows a desired signal. With an
unconditional call the subroutine is called always regardless of any input port’s values.

When the subroutine is finished the calling program resumes its operation directly after the calling statement. There is no limitation
to the nesting depth for subroutine calls.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Delete Step Functions

This command is only available if the active window contains a SRPL robot program.

This command lets you delete any step functions added to the selected program statement.

See also

Command Speed override


Command Acceleration override
Command Continuous motion
Command Waiting time
Command Set output
Command Poll input
Command subroutine

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Programming Wizard

  This command opens the dialog box Programming Wizard.

This command lets you generate a syntactically correct program in the select robot language.
This command is available only if the active window is a high-level language window.

See also

Window Robot Program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Edit Controller Selection

Use this command to activate or de-activate the control of an object.

This command is available only in COSIMIR-Versions, that support Multi-Robot-Cells.

  This command opens the dialog box Activate Control.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 53 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View New

Opens another workcell window. The workcell is shown in the default view.

After a movement or a rotation, you can use the present view as a new default view by selecting the command "Look at" from the
View menu. To do so, select the option "as default Setting" in the dialog box "Look at".

See also

Window Workcell View


Command View Close
Command View Lookat

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Close

Use this command to close the active workcell window.

This command is only available if the active window contains a view of the workcell.

See also

Window Workcell View


Command View New

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Default Setting

Use this command to display the default view in the active workcell window.
This command is only available if the active window contains a view of the workcell.
If you open a new workcell window with the command New from the View menu, the default view of the workcell will be displayed.
If you rotate or move the view of the workcell, you can switch back to the default view by executing this command.

You can use the most recent view as a new default view with the help of the command "Look at" from the View menu. To do so,
select the option "as default Setting" in the dialog box Look at.

See also

Command Rotate
Command Move
Command Zoom
Command Look at

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Front View

This command is only available if the active window contains a view of the workcell.

The front view of the workcell is displayed in the active window. Only the viewpoint of the observer changes in the active workcell.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 54 of 562

The viewpoint changes so that its X- and Z-coordinates match those of the reference point.

The rotation angle between the view and reference point is set to 0 °.

See also

Command Look at
Command Default Setting
Command Rear View
Command Top View
Command Left Side View
Command Right Side View
Command Full Format

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Rear View

This command is only available if the active window contains a view of the workcell.
The rear view of the workcell is displayed in the active window. Only the viewpoint of the observer changes in the active workcell.
The viewpoint changes so that its X- and Z-coordinates match those of the reference point.

The rotation angle between the view and reference point is set to 0 °.

See also

Command Look at
Command Front View
Command Top View
Command Left Side View
Command Right Side View
Command Full Format
Command Default Setting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Top View

Use this command to view the workcell from a bird’s-eye view. This command is only available if the active window contains a view
of the workcell.
Only the viewpoint of the observer changes in the active workcell. The viewpoint changes so that its X- and Y-coordinates match
those of the reference point. The Z-coordinate is adjusted so that the present distance of the viewpoint to the reference point
remains the same.

The rotation angle between the view and reference point is set to 0°.

See also

Command Look at
Command Front View
Command Left Side View
Command Right Side View
Command Full Format
Command Default Setting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Left Side View

Use this command to view the workcell from the left side. This command is only available if the active window contains a view of
the workcell.
Only the viewpoint of the observer changes in the active workcell. The viewpoint changes so that its Y- and Z-coordinates match

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 55 of 562

those of the reference point. The X-coordinate is adjusted so that the present distance of the viewpoint to the reference point
remains the same and that the viewpoint is located to the left of the reference point.

The rotation angle between the view and reference point is set to 0°.

See also

Command Look at
Command Front View
Command Top View
Command Right Side View
Command Full Format
Command Default Setting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Right Side View

Use this command to view the workcell from the right side. This command is only available if the active window contains a view of
the workcell.
Only the viewpoint of the observer changes in the active workcell. The viewpoint changes so that its Y- and Z-coordinates match
those of the reference point. The X-coordinate is adjusted so that the present distance of the viewpoint to the reference point
remains the same and that the viewpoint is located to the right of the reference point.

The rotation angle between the view and reference point is set to 0°.

See also

Command Look at
Command Front View
Command Top View
Command Left Side View
Command Default Setting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Standard Full Format

Use this command to view the workcell in full screen format from the present viewpoint. This command is only available if the
active window contains a view of the workcell.
The viewpoint and the reference point change in the active workcell, so that the reference point is located in the middle of the
workcell. The viewpoint changes so that the workcell covers 90% of the window. The calculation is based on a cuboid that encloses
the workcell tightly. The direction of view remains the same, i. e. the difference vector from the view to the reference point only
changes its length but not its direction.

See also

Command Look at
Command Front View
Command Top View
Command Left Side View
Command Right Side View
Command Default Setting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Look at

Use this command to change your position with respect to the workcell, i. e. your viewpoint, and the central point which you
regard, i. e. the reference point. The coordinates you enter refer to the world coordinate system. This command is only avalailable
if the active window contains a view of the workcell.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 56 of 562

  This command opens the dialog box Look at.

See also

Command Rotate
Command Move
Command Zoom

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Move

Use this command to move the view and reference point. This command is only available if the active window contains a view of the
workcell.

The mouse cursor turns into a little coordinate system .

It displays the axes along which the viewpoint and the reference point can be moved. A dotted arrow indicates that it is not possible
to move along the corresponding axis.

Moving along the Z-and X-axis:

1. Hold down the left mouse button.


2. Move the mouse cursor along the Z- or X-axis.
3. Release the left mouse button.   

Afterwards the view changes accordingly.

Moving along the Y- and X-axis:

1. Hold down the right mouse button. The little coordinate system changes. Now the Y-axis becomes a straight line.
2. Move the mouse cursor along the Y- or X-axis.
3. Release the right mouse button.   

Afterwards the view changes accordingly.

Instead of selecting the command Move from the View menu, you can hold down the SHIFT-key and then press the corresponding
mouse button.

Option

You can execute the command View/Move also by selecting the following symbol from the toolbar:

See also

Command Look at
Command Rotate
Command Zoom
Mouse
Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Rotate

Use this command to move the view and reference point. This command is only available if the active window contains a view of the
workcell.

The mouse cursor turns into a little coordinate system   .

It displays the axes along which the viewpoint and the reference point can be moved. A dotted arrow indicates that it is not possible
to rotate along the corresponding axis.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 57 of 562

Moving along the Z-and X-axis:

1. Hold down the left mouse button.


2. Move the mouse cursor along the Z- or X-axis.
3. Release the left mouse button.

Afterwards the view changes accordingly.

Moving along the Y- and X-axis:

1. Hold down the right mouse button. The little coordinate system changes. Now the Y-axis becomes a straight line .
2. Move the mouse cursor along the Y- or X-axis.
3. Release the right mouse button.   

Afterwards the view changes accordingly.

Instead of selecting the command Rotate from the View menu, you can hold down the CTRL-key and then press the corresponding
mouse button.

Option

You can execute the command View Rotate also by selecting the following symbol from the toolbar:

See also

Command Look at
Command Move
Command Zoom
Mouse
Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Zoom

Use this command to scale the view up or down. This command is only available if the active window contains a view of a workcell.

The mouse cursor turns into two little rectangles .

To scale up the view:

Hold down the left mouse button and move the mouse cursor in the arrow direction.

To scale down the view:

Hold down the left mouse button and move the mouse cursor against the arrow direction.

To scale up a particular part:

Place the mouse cursor on a vertex of the detail you want to enlarge. Hold down the key combination SHIFT+CTRL. If you press the
right mouse button and move the mouse cursor, a frame becomes visible. Enclose the part of the image you want to magnify with
the frame by moving the mouse cursor. Now, release the right mouse button. Then the selected part is scaled up.

Notice: Instead of selecting the command Zoom from the View menu, you can hold down the key combination SHIFT+CTRL and then
press the left mouse button.

Option

You can execute the command View/Zoom also by selecting the following symbol from the toolbar:

See also

Command Look at
Command Move
Command Rotate
Command Zoom
Mouse

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 58 of 562

Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Zoom in

Use this command to scale up the view. The distance between the view and reference poitn is reduced by a factor of 0.8.
This command is only available if the active window contains a view of the workcell.

See also

Command Look at
Command Move
Command Rotate
Command Zoom
Mouse
Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Zoom-Out

Use this command to scale down the view. The distance between the view and reference point is reduced by a factor of 1.25.
This command is only available if the active window contains a view of the workcell.

See also

Command Look at
Command Move
Command Rotate
Command Zoom
Mouse
Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Rendering

Use this command to change the quality of rendering. The objects of the workcell can be displayed for example as wireframes, as
hulls with filled surfaces or as flat-shaded hulls. If you choose the flat-shaded hulls the display will take into account the influence
of the ambient light and of different light sources.
If you change the quality of rendering it will be changed in all workcell windows. But take into account that a high quality of
rendering consumes more computational power. Thus the speed of the presentation will decrease.

This command is only available if the active window contains a view of the workcell.

  This command opens the dialog box Rendering.

Option

You can execute the command View/Rendering also by selecting one of the following symbols in the toolbar:

or wireframe rendering mode,

for filled rendering mode,

  for flat shaded rendering mode,

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 59 of 562

  for smooth shaded rendering mode.

See also

Window Workcell View


Command Look at
Command Move
Command Rotate
Command Zoom
Dialog Box Lighting

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Show Workspace

The command shows the workspace of the robot in the workcell. The robot can reach every position in its workspace, but it cannot
reach all the positions with all orientations.
This command is only available when the robot model contains informations on its workspace.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command View Kinematic Skeleton

Selecting this command causes the kinematic skeleton of the robot to be displayed. The kinematic skeleton is a very simple model of
the robot. Each axis is modelled by a line.
The reduction of the computational cost of the graphical representation can increase the simulation speed in some cases
dramatically.
This command is only available when the robot model contains informations on the kinematic skeleton.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Reset Program

This command resets the program counter to the first line or the first step of the robot program. A running robot program will be
stopped automatically.
You can use this function for all types of programs (SRPL, IRL, MRL, IRDATA).

See also

Command Star
Command Stop
Command Start Cycle

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Waiting Position

This command is only available when the active window contains an SRPL robot program.
The execution of this command moves the robot to its waiting position. The waiting position is the first position in the actual SRPL
robot program. The program counter is set to the first line and the first line is executed. The first line is only executed if it contains
a change of the velocity or of the acceleration or if it contains a waiting time.

See also

Command Start

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 60 of 562

Command Stop
Command Start Cycle
Command Reset Program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Program Start

Use this command if you want the robot program to be executed once. If you are executing an SRPL program you can select the
program step, at which the execution should start. The step functions will be executed.
You can activate this command also by selecting the box program state in the status bar with the right mouse button.

Option

You can execute the command Execute/Start by selecting the following symbol from the toolbar, too:

See also

Command Stop
Command Start Cycle
Command Reset Program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Program Stop

This command is used to stop a running robot program. The command is only available, when a robot program is executed.
You can activate this command by selecting the box program state in the status bar. The running robot program will be stopped.

Option

You can execute the command Execute/Stop also by selecting the following symbol from the toolbar:

See also

Command Stop
Command Start
Command Reset Program
Mouse

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Start Cycle

You can use this command to start the robot program cyclically. The program will be re-executed again and again, until you stop the
execution. In SRPL programs you can select the program step, at which the execution of the program should start. The step
functions will be executed.
You can activate this command by selecting the box program state in the status bar with the left mouse button.

See also

Command Stop
ommand Start
Command Reset Program
Mouse

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 61 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Approach Step

This command is only available if the active window contains an SRPL robot program.
Use this command to execute the recent program step. The following step functions will not be executed:

Path smoothing,
Settings of outputs,
Reading of inputs,
Calls to subroutines.

See also

Command Stop
Command Start
Command Reset Program
Command Next Step
Command Previous Step

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Next Step

If the active window contains an SRPL robot program,

use the command to execute the next program step. The following step functions will not be executed:

Path smoothing,
Setting of outputs,
Reading of inputs,
Calls of subroutines.

If the active window contains a high level robot program (IRL, *.MRL,*.V2,*.BAP),

use the command to execute the next program step. The execution will be stopped when the next line of the high level robot
program is reached. The execution will only be stopped if the program was compiled with the compiler option Source Code Cross
References.

Option

You can execute the command Execute/Next Step by selecting the following symbol from the toolbar:

See also

Command Settings Compiler


Command Reset Program
Command Start
Command Start Cycle
Command Approach Step
Command Previous Step

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Previous Step

This command is only available if the active window contains an SRPL robot program.
Use the command if you want the previous program step to be executed. The following step functions will not be executed:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 62 of 562

Path Smoothing,
Settings of outputs,
Readings of inputs,
Calls to subroutines.

Option

You can execute the command Execute/Previous Step by selecting the following symbol from the toolbar:

See also

Command Reset Program


Command Start
Command Start Cycle
Command Approach Step
Command Next Step

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Compile+Link

Use this command to compile the high level robot program in the active window and to link it to an executable IRDATA program.
COSIMIR starts the compiler for the specific robot programming language, that translates the program to an intermediate code.
Afterwards the linker translates the intermediate code to an executable IRDATA code. If the compilation and the linking are
successfull the IRDATA program will be loaded automatically.

You can use this command if your program is not divided into several modules (a subdivision into several modules is currently only
supported for IRL-programs).

Option

You can execute the command Execute/Compile+Link also by selecting the following symbol from the toolbar:

See also

Command Compile
Command Link
Commmand Extras Settings Compiler
Command Extras Settings IRDATA Interpreter

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Compile

Use this command to compile the high level robot program in the active window. COSIMIR starts the compiler for the specific robot
programming language, that translates the program to an intermediate code. In order to produce an executable program in IRDATA
code, you have to link the intermediate code afterwards.

Option

You can execute the command Execute/Compile also by selecting the following symbol from the toolbar:

See also

Command Compile+Link
Command Link
Command Settings Compiler
Command Settings IRDATA Interpreter

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 63 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Link

Use this command to link all necessary modules to the compiled high level robot program in the active window. If the linking process
is successfull an executable program in IRDATA code is generated.

See also

Command Compile+Link
Command Compile
Command Settings Compiler
Command Settings IRDATA Interpreter

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Execute Simulation

Use this command to change the time steps for the graphical simulation. COSIMIR simulates the movements of a real robot and
calculates the time the real robot needs for its movements. COSIMIR uses very small time steps called controller cycle (typically 40
ms) to calculate for example intermediate points for the movements.
The graphical representation does not has to be updated in the same small time steps, because it would need an unnecessary
amount of calculation time. Therefore you can specify the time steps between the graphical updates. A value of 0.3s produces a
relatively smooth animation in approximately real time.

The smaller you choose the time steps, the smoother are on the one hand the movements. But on the other hand the animation
becomes. You may alos use this command to make the simulation run according to teh real time. For further description see dialog
box Simulation.
The value of the time steps for the graphical updates that you choose has no influence at all on the result of the simulation (i. e. the
position of the gripper, the position where an object is placed, etc.), because COSIMIR calculates the movements independent of the
chosen time steps for the graphical update. Instead COSIMIR uses for its calculations always very small time steps.

  This command opens the dialog box Simulation.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Robot Position Show Joint Coordinates

Opens a window which displays the current joint coordinates of the robot. The position of revolute joints is displayed in degrees, the
position of prismatic joints is displayed in millimeters.
Joint coordinate positions can be pasted into the MAIN_JOINT() command of an IRL program as follows:

1. Make sure that the window "Joint Coordinates" is the active window. You might need to click on the window.
2. Select the command Copy from the Edit menu. The joint coordinates will be copied to the clipboard.
3. Position the cursor where you would like to paste the coordinates.
4. Select the command Paste from the Edit menu.

  This command opens the window joint coordinates.

See also

Command Show World Coordinates


Command Edit Copy
Window Position List

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 64 of 562

 
Command Extras Robot Position Show World Coordinates

Opens a window which displays the current pose of the tool center point in world coordinates. The position is displayed in
millimeters while the orientation is displayed as roll, pitch and yaw angles in degrees. The world coordinate system is used as the
reference system.
World coordinates can be pasted as positions into an IRL program as follows:

1. Make sure that the window "World Coordinates" is the active window. You might need to click on the window.
2. Select the command Copy from the Edit menu. The world coordinates will be copied to the clipboard.
3. Position the cursor where you would like to paste the coordinates.
4. Select the command Paste from the Edit menu.

  This command opens the window World Coordinates.

See also

Command Show Joint Coordinates


Command Edit Copy
Window Position List

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Robot Position Set Joint Coordinates

Displays a dialog box which prompts you for the positions of the robot’s joints. Enter revolute joint positions in degrees and
prismatic joint positions in millimeters.

  This command displays the dialog box Set Joint Coordinates

Another way to issue this command is to double-click inside the window Joint Coordinates (Teach-In).

See also

Command Show Joint Coordinates


How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Robot Position Set World Coordinates

Displays a dialog box which lets you enter the position and orientation of the tool center point. Enter the position in millimeters and
the orientation in degrees as roll, pitch and yaw angles. The reference system is the world coordinate system.

  This command displays the dialog box Set World Coordinates.

Another way to issue this command is to double-click inside the window World Coordinates (Teach-In).

See also

Command Show World Coordinates


How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Inputs/Outputs Show Inputs

Opens a window which displays the signals at the inputs of the simulated robot-controller. 0-level signals are displayed in red color.
1-level signals are displayed in green. If an input signal is forced, its level is shown in angular brackets like <1>. If an input is

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 65 of 562

connected to an output, its input level is put in brackets like [1].

  This command opens the window Inputs.

See also

Command Show Outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Inputs/Outputs Show Outputs

Opens a window which displays the current output signals of the simulated robot-controller. 0 level signals are displayed in red
color, 1 level signals are displayed in green.

  This command opens the window Outputs.

See also

How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Teach-In

This command opens a window which enables you to move individual joints of the robot.

  This command opens the window Teach-In.

See also

Command Teach-In Joint Coordinates


Command Teach-In World Coordinates
Command Teach-In Tool Coordinates
Command Show World Coordinates
Command Show Joint Coordinates
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Teach-In Joint Coordinates

Use this command, if you want to move single joints of the robot arm.

  This command displays the window Teach-In Joint Coordinates.

See also

Command Teach-In World Coordinates


Command Teach-In Tool Coordinates
Command Show World Coordinates
Command Show Joint Coordinates
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 66 of 562

COSIMIR® · Operating
 
Command Extras Teach-In Tool Coordinates

Use this command to move the robot regarding to the tool coordinate system.

  This command displays the window window Teach-In Tool Coordinates

See also

Command Teach-In World Coordinates


Command Teach-In Joint Coordinates
Command Show World Coordinates
Command Show Joint Coordinates
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Teach-In World Coordinates

Use this command to move the robot regardings to the world coordinate system

  This command displays the window Teach-In World Coordinates.

See also

Command Teach-In Joint Coordinates


Command Teach-In Tool Coordinates
Command Show World Coordinates
Command Show Joint Coordinates
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras TCP Tracking

Use this command to toggle the recording of the path of the tool center point in all views. If recording is active the TCP's path is
displayed as a line.

See also

Command Coordinate Systems


Command Settings Coordinate Systems

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Coordinate Systems

Use this command to toggle the display of the coordinate systems' axes in all views. You can also toggle the display of the tool
center point and of the gripper points.

  This command displays the dialog box Coordinate Systems.

dialog box Coordinate Systems.

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 67 of 562

Command Extras/Settings/Coordinate Systems

See also

Command Setting Coordinate Systems

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Coordinate Systems

Use this command to adjust the length and color of the axes of all coordinate systems.

  This command displays the dialog box Settings Coordinate Systems.

See also

Command Coordiante Systems

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Object Selection

Use this command to change the color of object selections. Whenever you select an object, it is displayed in the color you choose
with this command.

  This command displays the dialog box Object Selection.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Grip

Use this command to turn on or off the output of a warning sound whenever the gripper is opened or closed without holding an
object.
Furthermore you can indicate the output which should be connected to the gripper button of the window Teach-In.

  This command opens the dialog box Grip.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Floor

This command enables you to change the appearance of the floor of the workcell. The floor is rendered as a grid whose edges and
surface are colored according to your selection. The floor is always located in the X/Y plane of the world coordinate system but you
can adjust the floor's position, its dimensions and the number of lines in the grid.

  This command opens the dialog box Floor.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 68 of 562

COSIMIR® · Operating
 
Command Extras Settings IRDATA Interpreter

Use this command to toggle code sequence tracing of high level robot programs (e. g. IRL or MRL programs).

COSIMIR and COSIPROG enable you to write IRL and MRL programs and to compile them to IRDATA code. COSIMIR interprets the
IRDATA code during the simulation and highlights the current line of the program if this option is turned on.

  This command displays the dialog box IRDATA interpreter.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Compiler

Use this command to specify special compiler settings used for compiling high level robot programs written in IRL or MRL.

  This command opens the dialog box Compiler Settigs.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings View Change

Use this command to determine the settings for the interactive change of your point of view according to mouse movements.
You may select to get an updated view during the mouse movement. To improve the speed you can choose the wireframe rendering
while tracking the mouse cursor.

  This command opens the dialog box Interactive View Change.

See also

Command Rotate
Command Move
Command Zoom
Command Look at

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras TCP-Offset

Use this command to change the offset between the tool flange of the robot and the tool center point (TCP). The TCP offset must
always fit the current tool (e.g. gripper, welding tongs etc.), so that the display and the setting of the robot position in world
coordinates as well as the teaching in tool coordinates is supported correctly.
Besides it is reasonable to bring the grip point of the robot gripper in accordance with the tool center point. Doing so, the gripper
point is moved to the same place as the tool center point during teaching.

  This command opens the dialog box TCP-Offset.

See also

Command Teach-In Tool Coordinates

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 69 of 562

COSIMIR® · Operating
 
Command Extras Settings Simulation

This command determines the simulation cycle, that is the time between graphical updates and redraw of the workcell
representation.
COSIMIR simulates robot movements and calculates the movement time of the real robot using an interpolation time of about 30 ms
to create the path points. Updating the graphics in each interpolation cycle would cause an enormous amount of time for
computational burden.
A typical value for the simulation time is 0.3 s. A small simulation cycle makes robot movement appear more continuous, but it
reduces the speed of the display.

The value of the simulation cycle has no influence on the precision of the simulation, as e.g. grasp and release positions are
calculated using an internal cycle with a very high resolution.

  This command opens the dialog box Simulation.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Model Statistics

This command lets you display statistical information about the workcell. This command is not available in all COSIMIR-versions.

  This command opens the dialog box Model Statistics.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Settings Orientation Representation

Use this command to change the orientation representation. The following options are available: Roll-Pitch-Yaw angles,
Quaternions, Mitsubishi 5-Axis coordinates.

  This command opens the dialog box Orientation Representation.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Disable DDE

Use this command to disable or enable a DDE connection between COSIMIR and another application.

This command is not available in all versions of COSIMIR.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Position List Show

This command is only available with a position list being the active window in COSIMIR
Use this command to display the position entries of the positions list in the windows with a workcell view. Each position is
represented by a coordinate system
The color of the coordinate system axes is selected as follows:

Position reachable: The axes are drawn using the colors selected for the axes of the world coordinate system.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 70 of 562

Position not reachable: All axes are drawn using the color of the X-axis of the world coordinate system.
Position is selected: All axes are drawn using the color to display the lines of a selected object. This color is determined using the
command Extras Settings Object Selection.

See also

Dialog Box Extras Settings Coordinate Systems


Dialog Box Coordinate Systems
Position List, Check Reachabilites

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Position List Check Reachabilities

This command is only available with a position list being the active window in COSIMIR
This command checks for each single position within the list, if the robot inside the workcell is able to reach it. Unreachable
positions are grayed.
If the positions are displayed, the color of the coordinate system axes is selected as follows:

Position reachable: The axes are drawn using the colors selected for the axes of the world coordinate system.
Position not reachable: All axes are drawn using the color of the X-axis of the world coordinate system.
Position is selected: All axes are drawn using the color to display the lines of a selected object. This color is determined using the
command Settings Object Selection.

See also

Window Position List


Dialog box Position List Entry
Position List, Show
How to place objects in the workcell

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Position List Object->World Coordinates

This command is only available with a position list being the active window in COSIMIR
This command updates all positions of the actual position list. The new values are determined using the momentary positions of
those objects, the single entries are relative to.

See also

Window Position List


Dialog box Position List Entry
Command Extras Position List World-Object Coordinates
How to place objects in the workcell

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Extras Position List Object->World Coordinates

This command is only available with a position list being the active window in COSIMIR
This command updates all positions of the actual position list. The new values are determined using the momentary positions of
those objects, the single entries are relative to.

See also

Window Position List


Dialog Box Position List Entry
Command Extras Position List World->Object Coordinates
How to place objects in the workcell

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 71 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Window Cascade

Arrange all open windows in a cascaded view so that their title bars remain visible.

See also

Command Tile Vertical


Command Tile Horizontal
Command Arrange Icons

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Window Tile Vertical

Arrange all open windows in a tiled view so that all windows remain visible. The window size is adjusted automatically.

See also

Command Cascade
Command Arrange Icons

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Window Tile Horizontal

Arrange all open windows in a tiled view so that all windows remain visible. The window size is adjusted automatically.

See also

Command Cascade
Command Arrange Icons

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Window Arrange Icons

Arrange all windows as icons in a row at the bottom of the application window

How to minimize a window to an icon:

Select the command icon in the window menu .

Or:

Click to the icon in the title bar of the window.

See also

Command Tile Vertical


Command Tile Horizontal
Command Cascade

©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 72 of 562

COSIMIR® · Operating
 
Command Window Close All

Closes all open windows. If a workcell has not yet been saved, the user is reminded to save the workcell now.
Annotation: A single window can be closed by the command Close in the window menu.

How to close a single window:

Double-click to the document window menu icon  .

Or:

Click to the document window menu icon, and select the command Close.

Or:

Press the following keys Alt, -, L.

See also

Command Arrange Icons


Command Tile Vertical
Command Tile Horizontal
Command Cascade

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Window 1, 2, 3, 4 WINDOW Name

Selects the window with the given NAME. The number N indicates the order, in which the windows have been opened.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help Contents

Displays the contents of help.

How to select a topic:

Mouse: Move the mouse cursor to the underlined topic you want more information about. The mouse cursor changes into a hand
. Then press the left mouse button.

Keyboard: Press the Tabulator key, in order to move the selection to the underlined topic you want more information about. Then
press the Enter key (RETURN).

To leave help:

Maus: Select the command Close in the File menu.

Keyboard: Hold down the Alt key and press the key D. Release the Alt key and press the key B.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 73 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help Search for Help On

Use this command to search for a help topic.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help Keyboard

Displays a topic list, that describes how to work with the keyboard.

How to select a topic:

Mouse: Move the mouse cursor to the underlined topic you want more information about. The mouse cursor changes into a hand
. Then press the left mouse button.

Keyboard: Press the Tabulator key, in order to move the selection to the underlined topic you want more information about. Then
press the Enter key (RETURN).

To leave help:

Mouse: Select the command Close in the File menu.

Keyboard: Hold down the Alt key and press the key D. Release the Alt key and press the key B.

See also

Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help Mouse

Use this command, if you are searching for information on the use of the mouse in COSIMIR.

See also

Mouse

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help Commands

Displays a list of all COSIMIR commands. Select the command you want more information about.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 74 of 562

How to select a command:

Mouse: Move the mouse cursor to the underlined command you want more information about. The mouse cursor changes into a
hand . Then press the left mouse button.

Keyboard: Press the Tabulator key, in order to move the selection to the underlined command you want more information about.
Then press the Enter key (RETURN).

To leave help:

Mouse: Select the command Close in the File menu.

Keyboard: Hold down the Alt key and press the key D. Release the Alt key and press the key B.

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help How To Use Help

Describes how to use help.

How to select a topic:

Mouse: Move the mouse cursor to the underlined topic you want more information about. The mouse cursor changes into a hand
. Then press the left mouse button.

Keyboard: Press the Tabulator key, in order to move the selection to the underlined command you want more information about.
Then press the Enter key (RETURN).

To leave help:

Mouse: Select the command Close in the file menu.

Keyboard: Hold down the Alt key and press the key D. Release the Alt key and press the key B.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Command Help About COSIMIR

Displays the program’s version number and copyright.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 75 of 562

COSIMIR® · Operating
 
Dialog boxes
The following dialog boxes are available:

Dialog boxes
Dialog box Print Setup
Dialog box Set Joint Coordinates
Dialog box Analog Polling
Dialog box Set Output
Dialog box Step Functions Set Output
Dialog box Acceleration
Dialog box Look at
Dialog box Movement Type
Dialog box Floor
Dialog box Compiler
Dialog box Rendering
Dialog box Rendering Lighting
Dialog box File Print
Dialog box File New
Dialog box File Open
Dialog box File Save as
Dialog box File File Properties
Dialog box Poll Input
Dialog box Input Polling
Dialog box Replace
Dialog box Speed
Dialog box Grip
Dialog box Interactive View Change
Dialog box IRDATA Interpreter
Dialog box Coordinate Systems
Dialog box Setting Coordinate Systems
Dialog box Model Statistics
Dialog box Continuous Motion
Dialog box Position list entry
Dialog box Rotate Position
Dialog box Move Position
Dialog box Programming Wizard
Dialog box Page Setup
Dialog box Simulation
Dialog box Controller Selection
Dialog box Search
Dialog box TCP-Offset
Dialog box Subroutine
Dialog box Waiting Time
Dialog box Set World Coordinates

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Acceleration

The description of the command Acceleration override override gives you a general view of the task to be accomplished by this dialog box.

Override

Insert here the acceleration for the execution of the selected program statement in percent of the maximum acceleration. There are 100 discrete steps
with 100 being the maximum acceleration (default) and 1 the minimum acceleration.

If you want to delete an acceleration override from a program statement:

Type in an override of 100, and enter OK.


or:
Launch the command Edit/Delete step functions which deletes all step functions from the selected statement.

See also

Command Delete step functions

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 76 of 562

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Controller Selection

The decription of the command Controller Selection gives a short survey of the task.

List box

Select the controllers to be activated. In this list all objects having a controller of their own are displayed.
Every robot in COSIMIR is using a controller of its own. Programs can be loaded into these controllers and they can be started,
stopped or executed step by step. To enable these features the controller must be activated.
Display of robot positions, inputs, outputs and teach-in is always done for the emphasized robot that is marked by an asterisk ‘*’ in
the list box.

Controllers can be activated, deactivated or emphasized by simple or double-clicking.


Position lists and programs are assigned to a specific robot, too. By activation of a position list or a program window the assigned
robot will be made the emphasized robot automatically.

See also

Window Outputs
Window Inputs
Window Joint Coordinates
Window World Coordinates
Window Joint Coordinates (Teach-In)
Window Worl Coordinates (Teach-In)
Window Tool Coordinates (Teach-In)
Window High-Level Language Program
Window Position List

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Analog Polling

This dialog box appears during the execution of a program whenever an analog input is read which is neither connected nor forced.
You can enter the desired analog input value or you can force the input to a constant value. Unless you force the input to a certain
value you will be prompted for a value again each time the input is read.
Selecting "Cancel" stops the execution of the program.

See also

Command Show Inputs


How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Compiler Settings

The description of the command Compiler gives you a short survey of this task.

Compiler

Select the compiler the settings in this dialog box are intended for.

Position Lists (MRL Compiler only)

The MRL compiler supports the import of MRL-Position lists, so that all defined positions in these imported lists can be used in the
program. In this edit control you can specify the names of the desired position lists to be imported, multiple names are allowed,
with the single names separated by blanks. The lists specified here are imported anyway, independent of the control Use open MRL
Position Lists. The selected lists are automatically saved before running the compiler.

Include Path (IRL-Compiler only)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 77 of 562

The IRL Compiler has to import SYSTEM modules according to the selected robot. Use this edit control to specify the drive and path
of the SYSTEM modules (system.rob), which are typically located in C:\COSIMIR\IRL6AXIS for a 6 DOF robot, C:\COSIMIR\IRL5AXIS for a
5 DOF robot and C:\COSIMIR\IRL4AXIS for a 4 DOF robot.

Source Code Cross Reference

Select this control to make the compiler generate IRDATA code containing links to the corresponding high level program. The trace
of high level programs during execution is only possible for programs compiled with this option.

Use open MRL-Position Lists (MRL Compiler only)

This control is intended to use all open, actually displayed MRL position lists when compiling an MRL program. Before compiling all
displayed MRL position lists are saved automatically. The position lists selected in the edit control Position Lists are used anyway,
not depending on this selection.

Use Joint Count for Include Path (IRL Compiler only)

If this control is selected, the path for the SYSTEM modules is generated from the entry in the edit control Include Path and the
number of joints of the actual robot. If “C:\COSIMIR” is selected as Include Path and you are using a 6 DOF robot, activating this
option will lead to the path “C:\COSIMIR\IRL6AXIS” as location for the SYSTEM modules, with the 6 in IRL6AXIS presenting the number
of joints of the robot.

Generate IRDATA Code

This option is always selected for IRL, MRL and V+ compilers. When using the BAPS compiler you may select between IRDATA code
and MRL code to be generated.

Generate MRL Code

This option is only available for the BAPS compiler. Select it to compile the BAPS program into a MRL program, which may be
executed using a Mitsubishi Movemaster robot.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Coordinate Systems

The description of the command Coordinate Systems provides a short survey of the task.

Show Tool Center Point

Shows the tool coordinate system in the view of the robot cell. You can then see the position and orientation of the tool center
point. The tool center point is the origin of the tool coordinate system. For teaching robot positions it is recommended to also
enable the display of gripper points. The origins of the TCP and of the object should correspond as well as possible for an exact grip.

Show World Coordinate System

Shows the world coordinate system in the view of the workcell. The positions of the objects always refer to this coordinate system.

Show Base Coordinate System

Shows the base coordinate system of the robot in the view of the workcell.

Show Object Coordinate System

Shows the coordinate systems of all objects of the workcell.

Show Grip points

Shows the coordinate systems of all objects which can be gripped by the robot's gripper. For teaching robot positions it is
recommended to also enable the display of the tool center point. The origins of the TCP and of the object should correspond as well
as possible for an exact grip.

Settings

Displays the dialog box Settings/Coordinate Systems.Dialog box Settings/Coordinate Systems

See also

Dialog box Settings Coordinate Systems

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 78 of 562

COSIMIR® · Operating
 
Dialog box Rendering

The description of the command Rendering provides you with an overview of the task. This command changes the appearance of
objects in all workcell windows.

Click on one of the following buttons to change the appearance of the objects in the workcell window.

Wireframe, backface-culling. This appearance can be selected at any time by pressing the key F11.

Filled surfaces, backface-culling, hidden-surface removal. This appearance can be selected at any time by pressing SHIFT+F11.

Flat-shaded, backface-culling, hidden-surface removal. This appearance can be selected at any time by pressing CTRL+F11.

If you wish to define the quality of rendering in a more detailed way, press the detailed>> button. The dialog box will be expanded
to the right. Afterwards you can change the following settings:

Quality

Select the quality of rendering.

Wireframe    Only the edges of the objects will be displayed. Thus it needs less computation power than the surface models.
Filled    The edges and surfaces of the objects will be displayed. This surface model needs more computation power than the
wireframe model. It should be combined with the option Backface-culling from the group box Hidden-surface Removal.
Flat-shaded    All surfaces will be displayed shaded. In contrast to the filled model the surfaces do not have a uniform color, but a
realistic color representation, that takes the actual lighting into account.

Smooth-shaded    All surfaces will be displayed shaded. In contrast to the flat-shaded mode the light intensity will be interpolated in
individual surfaces if necessary. Thus spheres or cylinders will display smoothly. This option is available in the 32-Bit-version of
COSIMIR only.

Hidden-surface Removal

Backface-culling
    Select this option to suppress the display of hidden surfaces. In the workcell model each surface has a front and a backplane. The
selection of this option suppresses the display of all backplanes.
Depth-sort
    Select the depth-sort option to hide and display the surfaces according to your viewpoint. The surfaces close to the viewpoint will
cover those which are less close to the viewpoint. The distance between a surface and the viewpoint is defined as the distance
between the center of gravity of the surface and the viewpoint. This definition might lead to an unsatisfactory representation if the
angle between the line of view and the surface is close to 0 or 180 degree. You should prefer one of the options Z-buffer or
analytical.

Z-buffer
    With this option correct display of all hidden surfaces will be guaranteed. This option is available in the 32-Bit-version of COSIMIR
only. This is the preferred option in the filled and shaded display modes.
Analytical
    The analytical removal of hidden-surfaces generates an exact representation of all hidden surfaces and edges. The computational
complexity increases rapidly with the complexity of the workcell model.

Projection

orthogonal    The X-, Y- and Z-axis remain orthogonal after projection onto the two-dimensional screen. Objects will be projected
onto the screen according to their size and independent of the viewpoint.
perspective    The viewpoint will be taken into account for the projection of objects onto the screen. Thus objects that are far away
will be displayed smaller than close objects (perspective foreshortening).

3D-Clipping

After several zooming operations the viewpoint might be in the middle of the workcell. In this case the display might become
unrealistic, if objects that are actually located behind the viewpoint are displayed as if they were in front of the viewpoint.

Select this option if objects shall not be displayed, that are located behind the viewpoint. Please take into account that increased
computational power is required and thus the simulation speed is reduced.

Display Frames/s

The actual frame rate (frames/s) will be displayed in all workcell windows, if this option is checked. Easy comparison of different
rendering qualities and different computers is enabled by this option.

Option

You can execute the command View/Rendering by clicking on one of the following three symbols in the toolbar:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 79 of 562

See also

Dialog box Ligthing

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Lighting

Look up the command Rendering to get an idea of the task.


If you choose the flat-shaded model COSIMIR makes use of a lighting model, that calculates the brightness for each displayed surface
as the sum of the ambient light (scattered light) (intensity 0..1) and up to 8 different additional light sources. The reflection of the
surfaces is assumed to be diffuse.
Each light source emits light of a specific color either from a specific point into all directions (point source) or from a specific
direction (Infinitely remote Light Source). If you want to specify a point source you have to insert the coordinates of the light source
in the world coordinate system. For an infinitely remote light source you can specify in the world coordinate system world
coordinate system the direction, from which the light source illuminates the workcell.

Please consider that each specified light source increases the computational cost. Consider also that the computational cost of a
point light source is higher than the computational cost of an infinitely remote light source.

See also

Dialog box Rendering

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Orientation Representation

The description of the command Orientation representation provides a short survey of the task.

Roll pitch yaw angles

Here you can select the representation in roll pich yaw angles.

Quaternions

Here you can select the representation in quaternions.

Mitsubishi-5-Axis-Coordinates

Here you can select the representation of coordinates for the Mitsubishi 5-axis-robot.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box File New

The description of the command File New gives you a general view of the task to be accomplished by this dialog box.

Window type

Choose here whether you want to create a high-level robot program (IRL, MRL, ...) or a SRPL robot program or a position list.

If you create a SRPL robot program (*.PGM) any previously loaded high-level or IRDATA program will be closed.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 80 of 562

 
Dialog box File Open

The description of the command File Open gives you a general view of the task to be accomplished by this dialog box.

This dialog is the windows standard dialog for opening a file. You can choose a file name as well as a path and a drive name.

The file type combo box lets you choose the currently available file types only.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box File Print

The description of the command File Print gives you a general view of the task to be accomplished by this dialog box.

This dialog is the windows standard dialog for printing a file. The dialog allows to set your printer’s parameters.

After changing the settings you can start the printing process by clicking OK.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box File Properties

The description of the command File Properties gives you an overview of the task to be accomplished by this dialog box.
This dialog box will be displayed for robot programs and positions lists. The file associated with the active window, the type of the
file, the number of lines and the object (controller) this file is associated with are displayed.
For workcells the dialog box Model-Statistics will be displayed instead.
Command File Properties
Dialog box Model Statistics

See also

Command File Properties


Dialog box Model Statistics

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box File Print Setup

The description of the command Print Setup gives you a general view of the task to be accomplished by this dialog box.
This dialog is the windows standard dialog for setting up your printer. It is dependent of the currently selected printer.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Floor

The description of the command Floor provides a short survey of the task.

Type of Floor

Choose the display mode of the floor.

Size

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 81 of 562

Defines the dimensions of the floor.

Position

Defines the position of the floor. Enter the coordinates of the floor's center relative to the world coordinate system.

Grid

Determines the number of the grid's rows and columns.

Line Color.../Area Color...

Displays another dialog box where you can select the floor's color.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Grip

The description of the command Grip provides a short survey of the task.

Warnings at Gripping

If this option is enabled and the gripper is being closed without an object within its reach, a warning message appears and a warning
bell sounds.

Warning at Releasing

If this option is enabled and the gripper is opened without holding an object, a warning bell sounds and a warning message appears.

Gripper Control at Teach-In

Select the output of the robot which should be controlled by the "Open Gripper" / "Close Gripper" button of the Teach-In window.

Rename Inputs/Outputs
Command Show Outputs
Command Teach-In

See also

Command Show Outputs


Command Teach-In World Coordinates
Command Teach-in Tool Coordinates
Command Teach-In Joint Coordinates

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Interactive View Change

The description of the command View Change gives you a short survey of this task.

Track Mouse Pointer

A continuously updated view of the workcell and the mouse pointer is shown during the mouse movement.

Wireframe Rendering-tracking

This option activates the wireframe representation while tracking to improve the speed.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 82 of 562

Dialog box IRDATA Interpreter

The description of the command IRDATA Interpreter gives you a short survey of this task.

IRDATA Program in Window

If this control is activated, the loading of an IRDATA program will open a corresponding window. If the control is not activated, no
window will be opened, and an IRDATA window opened before will be closed, but the program will be loaded in both cases.
Attention: When leaving COSIMIR, the configuration of open windows will be saved, but it may be necessary to reload an IRDATA
program manually after opening a workcell.

IRDATA Code Sequence Trace

If an IRDATA program window is open, the actual IRDATA code line will be highlighted during program execution. This option reduces
the speed of the program execution significantly.

Source Code Sequence Trace

While executing an IRDATA program with this control selected, the corresponding windows containing the robot program in high
level programming language (MRL, IRL, ..) will be opened and the actual high level code line is highlighted.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Model Statistics

The description of the command Model Statistics gives you a short survey of this task.

Objects

Number of objects in the currently loaded workcell.

Sections

Number of sections in the currently loaded workcell.

Hulls

Number of hulls in the currently loaded workcell.

Polygons

Number of polygons in the currently loaded workcell.

Vertices

Number of vertices in the currently loaded workcell.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Move Positions

The description of the command Move Position provides a short survey of the task.

With the movement of positions, you can use the word coordinate system or the object coordinate system.

Operators

Positive The ccordinates will be added to the actual coordinates.

Negative The coordinates will be substracted from the actual coordinates.

Translation

Enter the translation for the movement of the actual position.

Move

The button Move activates the movement of the actual position.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 83 of 562

See also

Command Edit Accept Position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Rotate Position

The description of the command Rotate Position provides you with a short overview of the task.

Coordinate System

Choose the reference coordinate system.

Operators

positive    The coordinates specified in the Rotation group are added to the present coordinates of the position.
negative    The coordinates specified in the Rotation group are subtracted from the present coordinates of the position.

Rotation

Enter the angle of the rotation of the selected position about the X- ,Y- and Z-axis of the reference coordinate system.

Rotate

The button Rotate activates the rotation of the position.

See also

Command Accept Position


Command Move Position

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Movement Type

The description of the command Accept Position gives you a general view of the task to be accomplished by this dialog box.
When inserting a position into a SRPL robot program the robot’s current joint values are used. Choose whether the robot shall
approach this position in PTP mode, in linear mode or in circular mode.

Movement types

PTP (point to point)    The gripper is driven to a well defined location on an “undefined” path. All axes start moving and come to a
stop at the same time (synchronous PTP).
LIN (linear)    The tool center point is moved from the current location to the desired one on a straight line (linear interpolation).
Circular movement
Circular end point/intermediate point    The gripper is moved from the current location via the intermediate point to the end point
on a circular path. You have to define the intermediate and the end point in one step. The circular movement’s second position (end
point or intermediate point) is inserted into the selected program statement by the command Accept position.

If the robot violates its workspace restrictions while moving from one point to another it is stopped and an error message is
displayed.

See also

Command Insert position


Command Accept position

See also

Command Insert Position


Command Accept Position

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 84 of 562

COSIMIR® · Operating
 
Dialog box Page Setup

The description of the command Page Setup gives you a general view of the task to be accomplished by this dialog box.
Choose the margins of the current print layout. The File menu’s command Print Setup lets you choose the page’s orientation
(portrait or landscape).

See also

Command Print Setup


Command Print

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Position List Entry

The description of the command Properties gives you a general view of the task to be accomplished by this dialog box.
Every entry of the position list is composed of the following items:

1.     the name of the entry, or within COSIMIR position lists the name of the position, or within MRL position lists the number of the
position,
2.     the type of the position list’s entry,
3.    the entry’s current value,
4.     the position with respect to a certain object or to its gripper point (if available). The object is defined by giving its name which
can be chosen from a combo box (optional). The position is given with respect to the object’s coordinate system respectively the
gripper’s coordinate system and is defined by its position and orientation values.

5.    the position list entry’s configuration,


6.    the position list entry’s gripper status (with MRL position lists only),
7.    a comment on the entry (with MRL position lists only).

Several conversions can be executed by choosing the position list entry’s type.

With a position list these are the available types:

1.     world coordinates,


2.     world coordinates with configuration,
3.     MRL 5 joint values: This type lets you use the position list entry within a Mitsubishi robot with 5 degrees of freedom and an IRL
robot program.
4.     joint values,
5.     position without orientation.

Within a MRL position list used with robots having 5 degrees of freedom only the following entry is available:

1.     MRL 5 joint values

Within a MRL position list used with robots having 6 degrees of freedom the following entries are available:

1.     world coordinates,


2.    world coordinates with configuration.

Not all conversions are executable at any time e.g., because of workspace restrictions.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 85 of 562

Relative positions given with respect to a certain object can be converted to absolute positions with respect to the world coordinate
system and vice versa only if the position is not given by joint values.

The configuration field lets you choose the position list entry’s configuration. The configuration can be ignored.

Within MRL position lists the field “gripper status” is enabled which lets you choose the position’s gripper status. The gripper status
is appended to a PD command as C (CLOSED) or O (OPEN). Omitting any appended letter means an undefined gripper status.

With MRL position lists every single position can have a comment added. This comment makes MRL position lists more readable.

See also

Window type position list


BCommand Properties
World->object coordinates
Object->world coordinates
Configuration right/left
Configuration above/below
Configuration flip/no-flip
How to move a robot
How to place objects in a workcell

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Continuous Motion

The description of the command Continuous Motion gives you a general view of the task to be accomplished by this dialog box.

Continuous motion

Yes    This command lets the robot move across the given position heading for the next position thereby moving continuously without
slowing down while approaching the given position.
No    This command lets the robot move exactly to the given position. The robot will stop if this position is reached. (default).

If you want to delete the step function continuous motion from a program statement:

Choose No and press OK.

or:

Launch the command Edit/Delete step functions which deletes all step functions from the selected statement.

See also

Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Programming Wizard

The description of the command Programming Wizard gives a short survey of the task.

Program Skeleton

Check this option, if a program skeleton should be generated. Enter the name of the program into the edit field.

Import Position Lists

Check this option, if program statements for the import of all opened position lists should be generated.

Generate Position List Variables

Check this option, if all position entries of all opened position lists should be declared as variables and initialized by the actual
values.

Declare Inputs

Check this option, if all inputs of the robot should be declared symbolically.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 86 of 562

Declare Outputs

Check this option, if all outputs of the robot should be declared symbolically.

Generate Move Statements

Check this option, if movement statements for all position list entries should be generated.

OK

Click on this button to generate a robot program in the active window using the selected options.

Not all options are available for all robot programming languages.

See also

Window high-level language program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Replace

The description of the command Replace gives you a short survey of this task.

Find what

Enter the search text here. The last entered search text will be displayed here.

Replace with

Enter the replacement text here.

Match case

If this option is checked the case must match.

Find Next

Starts searching for the next occurences of the search text.

Replace

Replaces the found text and searches for the next occurence.

Replace All

Replaces all occurences of the text.

See also

Window high-level language program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Input Polling

This dialog box appears during the execution of a program whenever a digital input is read which is neither connected nor forced.

You can enter the desired analog input value or you can force the input to a constant value. Unless you force the input to a certain value you will be
prompted for a value again each time the input is read.

Selecting "Cancel" stops the execution of the program.

See also

Command Show Inputs


How to control inputs and outputs

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 87 of 562

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box File Save As

The description of the Command File Save As gives you an overview of the task to be accomplished by this dialog box.
This dialog is the windows standard dialog for storing a file with a new name. You can choose a file name as well as a path and a
drive name.
The file type combo box lets you choose the file type corresponding to the active window. The suggested file extension should not
be changed.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Find

The description of the command Find gives you a short survey of this task.

Find what

Enter the search text here. The last entered search text will be displayed here.

Match case

If this option is checked the case must match.

Find Next

Starts searching for the text.

See also

Window high-level language program

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Object Selection

The description of the command Object Selection provides a short survey of the task.
Use this command to change the color of object selections. Objects selected by e.g. the Model Explorer of COSIMIR are displayed in
the color you choose in this dialog box.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog Box Settings Coordinate Systems

The description of the command Extras Settings Coordinate Systems provides a short survey of the task.

Axis Length

Enter the length of the X, Y and Z axis in millimeters.

Color of ...-Axis

Pops up a dialog box which prompts you for the color of the selected axis.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 88 of 562

COSIMIR® · Operating
 
Dialog box Set Joint Coordinates

The description of the command Set Joint Coordinates provides a short survey of the task.

Joint Coordinates

Enter the positions of revolute joints in degrees and those of prismatic joints in millimeters. The robot’s current joint positions are
given as the default.

Buttons

The buttons marked ‘<‘ and ‘>‘ at the left and right bottom of the dialog box are enabled if a different group of joint coordinates
can be displayed in the dialog box. This is the case if the current workcell’s robot has at least 6 joints.

See also

Dialog box Set World Coordinates


How to move and position the robot

See also

Dialog box Set World Coordinates


How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Set Output

Output

Enter the name of the output or choose one from the list box.

Set

Select whether the output should be set or reset.

There are two output signal names with a special meaning for compatibility reasons:

BANDLAUF    For workcells which include an object of type CONVEYOR_BELT BANDLAUF is the name of an output which controls the
motion of the conveyor belt. (1=move, 0=stop).
GREIFER    For workcells which include a gripper which is not modelled as an object on its own, the GREIFER output controls the
gripper (1=close, 0=open).

See also

How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Set World Coordinates

The description of the command Set World Coordinates provides a short survey of the task.

Position

Enter the coordinates of the position of the tool center point. The reference system is the world coordinate system. The current
position of the tool center point is given as the default.

Orientation

Enter the angular relationship between the joints of the tool coordinate system and the world coordinate system. The current
orientation is given as the default.
Roll = rotation about the z axis

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 89 of 562

Pitch = rotation about the y axis


Yaw = rotation about the x axis

Configuration

This field contains different configurations of the robot. The contents of this field depend on the kind of robot, for some robots this
field is empty.
If the ignore check box is selected, the robot position is set without regard to the configuration. In this case the robot-controller
chooses the configuration closest to the current position’s configuration. The check box is disabled if the robot lacks different
configurations.
The bottom of the field lists different configurations with alternative configurations displayed one below the other.

When setting the robot position consider that an inverse transformation is required which cannot be computed for singular poses.
Also remember that a position might be out of reach when using the desired configuration.

See also

Dialog box Set Joint Coordintes


Configuration Right/Left
Configuration Above/Below
Configuration Flip/No-Flip
How to move and position the robot

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Simulation

The description of the command Execute Simulation provides a short overview of this task.

Simulation Cycle

Enter the time between the updates of the workcell windows. The shorter you choose the time for a simulation cycle, the smoother
but also slower is the animation. A simulation cycle time of about 0.3s produces an animation with relatively smooth movements,
that correspond more or less to the movements of a real robot. The lowest value for Simulation Cycle is the setting Controller Cycle
as described below.
If Realtime is selected in the Graphic’s Update field this control shows the cycle actually set by COSIMIR.

Controller Cycle

This value is the time used to update the internal system values like interpolation steps of robots or I/O update cycles of PLCs. The
Simulation Cycle mentioned above is always a multiple of this controller cycle.

Maximum Simulation Cycle

This control is activated only if Realtime is selected in the Graphic’s Update field. Selecting Realtime makes the system set the
Simulation Cycle automatically to reach a synchronization between the simulation time and the real clock. On PCs without enough
performance the system might try to increase the Simulation Cycle continuously. The value entered here is the upper limit to be set.

Realtime Compensation Parameter

This control is activated only if Realtime is selected in the Graphic’s Update field.
The parameter entered determines the constant (amplification P) to control the Simulation Cycle. Values range from 0.1 to 0.6. A
small value means a slower compensation, higher values may force fluctuations or even oscillations.

Simulation Time Scaling Factor

This control is activated only if Realtime is selected in the Graphic’s Update field.
The parameter entered determines the relation between simulation time and realtime. The default value 1.0 controls the simulation
time according to realtime, a value greater 1.0 makes the simulation time run faster then realtime. 

Selecting the value 5.0 makes the simulation time run five times faster than realtime. A simulation period of 50 seconds will take 10
seconds in realtime.

Graphic’s Update

If you select the option "Show End Position" the final position of a movement will always be displayed in the animation. If you switch
this option off, the animation will only be updated according to the simulation cycle time, thus not every end position might be
displayed.
If you select the option "Skip Waiting Time” the waiting times in the robot program are simulated faster. When a waiting time is
simulated the animation is not updated according to the simulation cycle time but it is updated faster, if nothing changes in the
workcell.

If you select the option "Realtime” the system will set the Simulation Cycle automatically as described above.

Model Update

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 90 of 562

This selection switches the update of model calculations like belts or process simulation from the very small cycle Controller Cycle
to Simulation Cycle. The setting Controller Cycle may lead to decreasing performance for some models, on the other hand
Simulation Cycle may evaluate to some inaccuracies.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Speed

The description of the command Speed Override gives you a general view of the task to be accomplished by this dialog box.

Override

Insert here the velocity for the execution of the selected program statement in percent of the maximum velocity. There are 100
discrete steps with 100 being the maximum velocity (default) and 1 the minimum velocity.

If you want to delete a speed override from a program statement:

Type in an override of 100, and enter OK.

or:

Launch the command Edit/Delete step functions which deletes all step functions from the selected statement.

See also

Command Delete Step functinons

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Step Functions Set Output

Output

The list box shows the output ports of the robot controller to be simulated. You can only set or reset one output port per program
statement. Add a new program statement for every output port you want to set in addition.
Choose the entry <no output> to delete the step function Set output from the selected program statement.

Set

to 0:    Resets the output port (0-signal).


to 1:    Sets the output signal (1-signal).

See also

Command Show Outputs


Command Delete Step Functions
How to control I/O-Ports

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Subroutine

The description of the command Subroutine gives you a general view of the task to be accomplished by this dialog box.

Name

This list box lets you choose the name of the program you want to call as a subroutine. Only programs contained in the current
directory are displayed.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 91 of 562

Input

If you intend to make a conditional subroutine call you can choose an input port here. The subroutine is called only when the chosen
input port shows the desired input signal defined in the group Condition. In all other cases the subroutine is not called but the main
program is resumed.

Conditions

Choose here the signal value which has to be found at the input port for the subroutine to be called.

See also

Command Subroutine
Command Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box TCP-Offset

The description of the command Extras Settings TCP Offset gives you a short survey of this task.
Here you specify the vectors for the displacement and the rotation between the tool center point and the robot flange, i.e. the
gripper point of the robot.

Translation

X    displacement in X-direction


Y    displacement in Y-direction
Z    displacement in Z-direction

Rotation

Roll    rotation on the Z-axis


Pitch    rotation on the Y-axis
Yaw    rotation on the X-axis

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Poll Input

The description of the command Poll input gives you a general view of the task to be accomplished by this dialog box.

Input

The list box shows the input ports of the robot controller to be simulated. You can only poll one input port per program statement.
Add a new program statement for every input port you want to poll in addition.
Choose the entry <no input> to delete the step function Poll input from the selected program statement.

Poll

for 0:    The program is stopped until the input port is showing up a 0-signal.
for 1:    The program is stopped until the input port is showing up a 1-signal.

See also

Command Show Inputs


Command Delete Step Functions
How to control I/O ports

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Look At

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 92 of 562

The description of the command Look at provides a short overview of this task.

Viewpoint

Shows the coordinates of the point that is used to view the workcell. The reference coordinate system is the world coordinate system. You can change the
coordinates by simply overwriting them.

Reference Point

Shows the coordinates of the point that the observer is looking at. The reference coordinate system is the world coordinate system. You can change the
coordinates by simply overwriting them. You should enter the value zero for all three coordinate axes if the workcell is not shown in the workcell window.
Then the origin of the world coordinate system appears in the middle of the workcell window.

Rotation

Indicates the rotation angle about the virtual axis between the viewpoint and the reference point.

as default option

Select this option if you want to use the values from the dialog box as new default values for the workcell view. If you select this option the coordinates of
the viewpoint and of the reference point as well as the value of the rotation angle will be saved for later use. You can switch to this new default setting
with the command Standard Default Setting from the View menu. This is also the default view after a restart of COSIMIR.

Clipping-Planes (Not available in all COSIMIR-versions)

The image of the workcell is clipped to the left, right, top and bottom by the borders of the window. It is clipped by a near and a far plane along the line
of sight from the viewpoint to the reference point. Enter the (positive) distances of these planes from the viewpoint into the fields Near and Far.
These values are important for a correct display of the workcell if the option Z-buffer (dialog box Rendering) has been selected, because the distances are
used for hidden surface removal and they have to be quantisized internally. Choose a value as big as possible for the near plane and as small as possible
for the far plane.

See also

Command Move
Command Rotate
Command Zoom

©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Waiting Time

The description of the command Waiting time gives you a general view of the task to be accomplished by this dialog box.

Time

Type in the desired delay the robot is to wait with the current statement. If the selected statement moves the robot the delay
occurs after this movement is executed. When the delay is over the next statement is executed (default = 0 sec).

If you want to delete the step function waiting time from a program statement:

Type in 0, and enter OK.

or:

Launch the command Edit/Delete step functions which deletes all step functions from the selected statement.

See also

BCommand Delete Step Functions

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Mouse

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 93 of 562

Pressing a key on your keyboard while clicking somewhere with the mouse causes different actions:

Set up the view of the active workcell windows:

Key-Mouse button: Action

SHIFT-Left: Moves the view and reference point in X/Y-direction.

SHIFT-Right: Moves the view point and the reference point in X/Y-direction.

CTRL-Left: Turns the point of view around the point of reference in X/Y-direction.

CTRL-Right: Turns the point of view around the point of reference in X/Z-direction.

SHIFT-CTRL-Left: Same as ZOOM-command from the menu view.

SHIFT-CTRL-Right: Draws a rectangle and zooms its contents to full window size.

You can run several commands by clicking in the status bar.

Clicking the status bar

Item-Mouse Button: Action

Run mode-Left: Starts the current program in cycle mode or stops a running one.

Run mode-Right: Starts the current program in or stops a running one.

Simulation time-Left/Right: Resets the simulation time back to 0.

Copyright-Left: Opens a dialog box showing the version of the program.

Changing the column width of a position list

Position the mouse onto the separator line for the columns inside the title. Press the left mouse button and move the separator line
to the required position.

Usage of the right mouse button

Using this button in any window opens a context sensitive menu with the most important commands for this kind of window.

See also

Keyboard

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Keyboard
Choose one of the following topics if you want to know more about using the keyboard with COSIMIR.

Keys for commands


Keys for dialog boxes
Keys for menus
Keys for help

See also

Mouse

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Keys for commands

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 94 of 562

Editing a SRPL robot program:

CTRL+V: A new, empty program step will be inserted behind the actual one.
DEL: Deletes the actual program step.
CTRL+F2: Same as accept position....
SHIFT+F2: Same as insert position....

Change the view of the workcell:

CTRL+L: Opens the dialog box for setting the point of view to the workcell.
"+"-key: Activates the command zoom-in. It magnifies the view of the workcell.
"-"-key: Activates the command zoom-out. It reduces the view of the workcell.
O: Activates the command default settings.
V: Activates the command front view.
U: Activates the command rear view.
A: Activates the command top view.
L: Activates the command left side view.
R: Activates the command right side view.
F: Activates the command full format.
F11: Switches to wireframe representation.
SHIFT+F11: Switches to filled surfaces represenation.
CTRL+F11: Switches to flat shaded representaion.
SHIFT+CTRL+F11: Switches to smooth shaded representation.
CTRL+D: Opens the rendering dialog box to set the quality and speed of the workcell representation.

Start and Stop the robot program:

CTRL+PAGE UP: Resets the program to the beginning.


CTRL+Q: Continues or starts the current robot program.
CTRL+Y: Continues or starts the current robot program in cyclic mode.
CTRL+S: Stops a running program.

Arrange windows:

SHIFT+F5: Cascade windows.


SHIFT+F4: Tile windows.
ALT+F4: Quit COSIMIR, the settings and the configuration will be saved.

Open information windows:

F7: Displays the joint values of the robot.


SHIFT+F7: Displays the tool coordinates in world coordinates.
F8: Displays the teach window.
F9: Displays the input signals.
SHIFT+F9: Displays the output signals.

Other commands:

CTRL+N: Command File New.


CTRL+O: Command File Open.
SHIFT+F12: Command File Save.
F12: Command File Save As.
CTRL+SHIFT+F12: Command File Print.
CTRL+X: Cut. Cuts the selected text out of the window and puts it into the clipboard.
CTRL+C: Copy. Copies the active window or selected text into the clipboard.
CTRL+V: Paste. Pastes the contents of the clipboard into the active window.

CTRL+K: Opens the dialog box for coordinate systems. Select here which coordinate systems shall be displayed.

See also

Mouse

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Keys for dialog boxes

Use the following keys within dialog boxes:

Moving the Marker to the next box:

TAB-KEY: Moves the marker to the next box (from left to right and from up to down).
SHIFT+TABULATOR: Moves the marker to the previous box (from right to left and from down to up).
ALT+literal: Moves the marker to the named line which corresponds with the literal one.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 95 of 562

Moving the text-insertion cursor within a group:

Cursor key: Moves the text-insertion cursor to the next selection within a group.
    Or:
    Moves the  text insertion cursor to the left, right, up or down within one text box.

Moving the text-insertion cursor within a text box or list box:

Cursor key: Moves the text-insertion cursor to the left or right within a list box or a text box.
POS1: Moves the text-insertion cursor to the first element or character of a list box or a text box.
END: Moves the text-insertion cursor to the last element or character of a list box or a text box.
PAGE UP: Scrolls the contents of a list box one page up.
PAGE DOWN: Scrolls the contents of a list box one page down.
SHIFT+POS1: Moves the text insertion cursor to the first character within a text box and simultaneous selects the text.
SHIFT+END: Moves and selects up to the end of an text box.
SHIFT+Cursor key: Moves and selects up to the next word inside a text box.

Selecting within a list box

ALT+down key: Opens a one line list box.


up/down key: Selects one element of the one line list box.
PAGE UP: Scrolls up one page.
PAGE DOWN: Scrolls down one page.
Spacebar: Marks a selection of a list box or cancels it. Marks or deactivates a combo box.

Activating a button:

Return key: Activates the selected button.


    Or:
    Selects the marked element inside a list box and runs the command.

Closing a dialog box:

ESC or ALT+F4: Closes a dialog box not running the command (same as button "Cancel").

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Keys for menus

Use the following menus to mark menus and choose commands:

ALT: Activates the menu bar and marks the first menu entry.
Literal: If the menu bar has been activated by the ALT-key, the menu with the corresponding underlined letter will pop up.
ALT+literal: Opens the menu which underlined letter corresponds with he pressed literal.
Return key: Activates the marked command of the menu..
ESC: If a menu is already opened:
    Closes the opened menu. The menu bar and the name of the menu remains activated.
    If a menus name is selected:
    Deactivates the menu bar.
Left/Right: Moving between menus
Up/Down: Marks the next command of the actual menu.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Keys for help

Use the following keys to get help:

The F1-Key
Pressing F1-displays information about the selected menu. If no menu is selected the table of contents of the help will be shown. If
this window is already opened, you will get further information about using help.

Pressing SHIFT+F1
If you press the combination SHIFT+F1: A ‘?’ will be attached to your mouse pointer. You may then click on an area you want help
on. If clicking a menu or a symbol in the toolbar, you will get information about this command. Clicking on a window displays help to
this type of window. Try this method with position lists, table header of a position list...

Option

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 96 of 562

You can activate the context-sensitive help by clicking on this symbol in the toolbar:

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Glossary
A

Activate
Activating commands and functions
Active surface
Application
Arrow cursor
Arrow key
ASCII

B  

BAPS (Bosch Automatisierungsprogrammiersprache)


Base coordinate system
Box
Button

Cartesian coordinate system


Clicking (mouse)
Clicking commands, elements,...
Clipboard
Clipping
Combo box
Configurations
Configuration Above/Below
Configuration Flip/No-Flip
Configuration Right/Left
Context menu
Conveyor-surface
Coordinate system
COSIPROG

Definitions
Degree of freedom
Device driver
Dialog box
Display modes
Double-click
Drive Unit

Edge
Element coordinates
Elements
Extrude solid

File window menu box

Geometric primitive
Gripper
Grip-mode
Gripper point
Gripper-offset
Grip point
Grip point initialization
Grip-range

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 97 of 562

Hierarchy Level
Hull

IRDATA (Industrial Robot Data)


IRL (Industrial Robot Language)

Joint
Joint coordinates

Kinematic chain

Line
List box

M  

Maximize window icon


MELFA Basic
Menu bar
Mesh
Minimize window icon
Modelling hierarchy
MRL position list
MRL (Mitsubishi Robot Language)
MRL-5-joint coordinates

Numerical edit box

Object
Object controller
Orientation

Parameterization
Pitch
Point
Polyhedron
Polyhedron-surface
Polyhedron points
Polygon
Polyline
Polylines
Position
Printer driver
Printer options
Prismatic joint
PTP (Point to Point)

Reference point
Rendering modes
Restore window icon
Return key
Revolute joints
Revolve solid
Robot-arm
Robot-controller
Roll, pitch, yaw

Scroll arrow
Scroll bar
Scroll box
Section
Select
Serial inteface

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 98 of 562

Simulation cycle
SRPL (Simple Robot Programming Language)
Static text box
Starting position
Surface
Surface, double sided
Surface, orientation
Surface, visibility
System menu
System menu box

Text box
Text insertion -cusor
Title bar
Toggle
Tool
Tool Center Point
Tool coordinates

VAL-II
Vertex
Viewpoint

Window
Workcell
Workspace
World coordinates

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Operating
 
Dialog box Force Input Value

Input

Displays the name of the input currently selected in the list box. Select the desired input in the list box.

Continuously

Choose the signal which should drive the selected input.

to 1-Signal    The input is fixed at 1 level.


to 0-Signal    The input is fixed at 0 level.
interactive    The input is not fixed to a certain level. Each time a program reads the input the dialog box Input Polling pops up
unless the input is named [inactive]. The dialog box prompts you to enter the desired level of the input.
connected    This box is selected if the input is currently driven by an output signal.

See also

How to control inputs and outputs

 
©·2002·EFR·IRF·GERMANY

COSIMIR®
Extended Operating
This section contains information about partly optional extended operation elements.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Documentation Generation


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 99 of 562

Documentation
Select the Property Sheet Print and configure the documentation for a print-out.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Documentation Generation


 
Print
Use the property sheet Print of the Properties for workcell to print and configure the generation of documentation.

Select the elements for the documentation and press Print.

Note: Only elements that appear in the actual workcell can be selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR®
Modeling
Model Explorer
Model Libraries
Element Properties
Graphical Modeling

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Modelling
 

General
With COSIMIR® you are able to create complete workcells.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Command New Workcell
Use this command to create a new workcell.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 100 of 562

COSIMIR® · Modelling
 
Release Management
COSIMIR® supports the management of different versions of the simulation model.

Use the command Release Management to configure the options in dialog box Release Management.

Also see

Command Release Management


Dialog box Release Management
Dialog box Create/Edit Release

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Command Release Management

Use this command or the to open dialog box Release Management.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Dialog box Release Management

Use this dialog box to configure the option of the release management or to access existing version of the simulation model.

Use the command Release Management to open this dialog box.

Parameter

Options

Activate release control

Activate this option to start the release control. Each time you save the workcell you are asked to
create a new version or a sub version is created depending on the state of the next option.

Save sub versions

Each time you save the workcell a sub version is created.

automatically every ... min

Activate this option to let sub versions being created automatically.

Versions

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 101 of 562

This list shows all versions of the workcell. Use the buttons below the list to edit or remove versions. Click
button New to create a new version.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Dialog box Create/Edit Release

Use these dialog boxes to edit a new or existing version.

Parameters

Version

Shows the complete version number.

Originator

Shows the user who has created this version.

Date

Date of version creation.

Project status

Choose or edit the status of the project here.

Changes

Enter all important model changes of the version.

 
©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 102 of 562

COSIMIR® · Modelling
 
User Name

Dialog box User Name is opend whenever the input of a user name is needed. 

The User Name is applied to Release Management and Model Protection.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Model Protection
COSIMIR® supports the protection of the simulation model that is currently loaded into the simulation system to prevent the
concurrent change of the model.

You can activate the model protection in the dialog box properties for workcell.

If you want to open a simulation model the model protection is activated for you receive the following message.

The model will be opened but you are not able to save any modification of the model.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Pro/E VRML Import
Use the Pro/E VRML Import to work with CAD models of Pro/ENGINEER in COSIMIR®.

The following dialog box supports the setup of the Pro/E VRML Import:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 103 of 562

Options

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Pro/E VRML Import Options

Use this dialog box to configure the Pro/E VRML Import.

General

Show progress

Select this option to open the window showing the progress of the import procedure.

Facet Sets to hulls

To import a complex VRML file with a lot of facet sets negate this option to create objects from facet sets. 

Store file accesses

Change this option if you want to import a complex model with a lot of files and references (> 100). The performance can
be increased if you choose to store e. g. 500 file accesses.

Use import list

To use the internal import list choose this option.

Scaling

Scale factor

Enter the scale factor for the imported model. A factor > 1 enlarges the model.

Internal scale factor

<not supported>

Level-Of-Detail

Import <Precision level ...>

Choose the precision level to be imported. Precision level 1 contains the highest level-of-detail.

Create automatically

<not supported>

Model Optimization

Optimize objects

Deactivate this options if imported objects shall not be optimized regarding vertices and facets.

Optimize materials

Deactivate this options if imported materials shall not be optimized regarding vertices and facets.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 104 of 562

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling
 
Level Of Detail
You are able to configure a Level Of Detail (LOD). This LOD controls the display of hulls certain LODs for hiding and showing are
assigned to. Edit the properties of objects, sections, and hulls to configure the LOD.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Basics
 

Basics
For your guidance, this chapter gives information and directions for elementary methods of modelling workcells. Before working
through this chapter and before modelling your first demo-workcell in the following chapter, it is advisable to read the fundamental
chapter of modelling hierarchy. This basic knowledge is required for a sufficient understanding of the following items.

Basic configurations
Adding objects
Adding sections
Adding hulls
Adding grippers
Adding grip points
Selecting elements
Moving elements
Rotating elements
Modifying hulls
Scaling elments
Renaming elements
Renaming of inputs and outputs
Connecting inputs and outputs
Equipping a robot with a gripper
Saving objects
Saving a workcell

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Basic Configurations
For modelling realistic, three-dimensional workcells a special three-dimensional editor is required. The three dimensions of a
workcell in a 3D-editor however are mapped on a two dimensional output device, your screen. With this kind of workcell display
some objects or parts of the space may be covered by other objects. To edit these hidden objects and to easily place objects at any
place, at least two different views of the workcell are required. In order to avoid complex interdependencies between these views,
it is recommended to choose perpendicular views. In the top view X,Y-coordinates can easily be determined likewise X,Z- or the Y,Z-
coordinates in the lateral view.

Select the command Tile from the Window menu. All windows will be displayed side by side.

To create a new view of the workcell:

1. Select the command New from the View menu. A new workcell window pops up.
2. Select the command Tile Vertical or Tile Horizontal from the Window menu. All windows will be displayed side by side.

To change the view of a workcell:

1. Click the workcell window, whose view is to be changed. The window becomes active.
2. Select the command Standard from the View menu. A pop-up menu is displayed showing a list of several views. Choose your
desired view.

or:

2. Click with the right mouse button into the active window. A context menu with different views is opened. Choose your desired
view.

To close a workcell window:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 105 of 562

Select the command Close from the View menu, or double-click on at the left of the title bar of the workcell window.

©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Adding Objects
To create a new object using the Model Explorer:

1. Open the Model Explorer by clicking on in the symbol bar or by selecting Model Explorer of the menu Execute.
2. Click on Objects with the right mouse button.
3. Select New/Object from the context menu.

To import an object from a library:

1. Select Model Library in the menu Execute or click on in the symbol bar. The dialog box Model Library is opened.
2. Select the name of the model library in the list. The content of this library is shown. Double-click on the library´s name or
select “+„ ion front of of the name to display all objects of the model library.
3. Select an object in the model library to add to the actual workcell.
4. Press Add to add the selected object to your actual workcell.

Using this way, the object is placed at the origin of your actual workcell.

To import objects from other model files:

1. Click on Objects inside the model explorer with the right mouse button.
2. Select Add from the context menu. The dialog box Add objects is opened.
3. Select a model file to import objects from.

Click on an new object with the right mouse button and select Properties from the context menu to edit the new object.

See also

Dialog box Model Library

Dialog box Object Properties

       

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Adding Sections
To add a new section to an object:

1. Select the object using the model explorer.


2. Click with the right mouse button on the object.
3. Select New/Section from the context menu.

Click on a new section with the right mouse button and select Properties from the context menu to edit the new section.

See also

Dialog box Section Properties

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Adding hulls
To add a hull to a section of an object:

1. Select the section in the model explorer.


2. Click with the right mouse button on the section.
3. Select New/Type from the context menu.

Click on a new hull with the right mouse button and select Properties from the context menu to edit the hull.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 106 of 562

See also

Dialog box Hull Properties

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Adding grippers
To add a gripper to a workcell:

1. Select Model Library from the menu Execute or click on in the symbol bar. The dialog box Model Libraries is opened.
2. Select a gripper library from the list. The content of this library is displayed. Double-click on the library´s name or select „+“
in front of the name to display all grippers in the library.
3. Select the gripper to add to your workcell.
4. Select Add to add the selected gripper to the actual workcell.

Click on the new gripper with the right mouse button and select Properties from the context menu to edit the gripper.

Equipping a robot with a gripper:

1. Click on „+“ in front of the gripper´s name.


2. Cick on „+“ in front of the section Base of the selected gripper.
3. Select Grip Points.
4. The grip point is displayed in the right part of the model explorer window.
5. Click with the right mouse button on the grip point and select Properties from the context menu. The dialog box Properties
for grippoint is opened.
6. Select the gripper point of the robot´s flange in the Gripped by combo box.

Connect the inputs and outputs of the robot and the gripper.

See also

Properties for gripper

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Adding Grip Points
To add a grip point to a section of an object:

1. Select the section in the Model Explorer.


2. Click with the right mouse button on the section.
3. Select New/Grip point from the context menu.

Click on the new grip point with the right mouse button and select Properties from the context menu to edit the new grip point.

See also

Dialog box Properties for grip point

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Selecting Elements
The elements to modify with a single command execution have to be marked for this purpose. This can be done with the use of the
model explorer or by selecting the elements with the mouse.

To select elements using the model explorer:

1. Select the elements in the left part of the model explorer window.

or:

1. Select the elements in the right part of the model explorer window after selecting the corresponding parent element.

To select elements using the mouse:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 107 of 562

1. Select in the symbol bar, Edit Mode  in the menu Execute or press Ctrl+E to switch to Edit Mode.
2. Select the element using the target pointer.

Remark:

If selecting an element by clicking with the mouse on it, it is possible to toggle between this element and others that are hidden by
it in the current view of the workcell. All elements that can be toggled are represented in the toggle list.nes Selektionsrechtecks
auswählen.

How to toggle between selections of elements:

Press the Ctrl-key an click with the left mouse button in the view of the actual workcell. The selection is toggled to the next object
in the list.

Press the Ctrl-key an click with the right mouse button on the element. The selection is toggled to the previous object in the list.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Moving elements
To move elements using the model explorer:

1. Select the element that you want to move.


2. Click with the right mouse button on the element.
3. Select Properties/Position from the context menu.
4. Enter the new position for the selected element.

The changes effect the selected element immediately.

See also

Dialog box Properties - Position

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Rotating Elements
To rotate an element using the model explorer:

1. Select the element that you want to rotate.


2. Click with the right mouse button on the element.
3. Select Properties/Position from the context menu.
4. Enter the rotation for the selected element.

The changes effect the selected element immediately.

See also

Dialog box Properties - Position

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Modifying Hulls
How to change the geometry or other properties of parameterizable geometric primitives:

To modify a hull:

1. Select the hull using the model explorer.


2. Click with the right mouse button on the hull.
3. Select Properties from the context menu and then the property sheet General.
4. If the hull is parameterizable, the parameters will be displayed and can be modified. For e.g. boxes, the x-, y- and z-
dimensions may be edited. For round hulls (cylinder, shere, ...) an additional level of approximation can be edited.

The changes effect the selected hull immediately.

See also

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 108 of 562

Dialog box Properties General of a parameterizable hull

©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Properties General of a parameterizable hull

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Scaling elements
Scaling is used to change the size and proportions of elements. The size and proportion of all subordinated elements are also
affected by the scaling.

To scale elements:

1. Select the element that you want to scale.


2. Click with the right mose button on the element.
3. Select Properties from the context menu and then the property sheet Dimension.
4. Scale the selected element.

The changes effect the selected element immediately.

Attention!

When scaling parameterizable elements, their hull type becomes Polyhedron. Afterwards, it is not possible to access this elements
by their parameters. For round elements, a static level of approximation is set.

See also

Dialog box Properties Dimension

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Renaming elements
For easier object- or element-identification, it is advisable to assign self explaining names. Choosing names like "table left" and
"lamp 1" makes more sense than assigning names like "object_1" and "object_2".

To rename an element:

1. Select the element in the model explorer.


2. Click with the right mouse button on the element.
3. Select Properties from the context menu and then the property sheet General.
4. Enter the new name for the selected element.

The changes effect the selected element immediately.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 109 of 562

Renaming of inputs and outputs


n order to connect peripheral devices (objects) to a robot controller it is necessary to make an input-output connection. Before
connecting the inputs of an object to the outputs of another, the inputs and outputs must be named. It is advisable to assign
intuitively understandable names.

To rename inputs and outputs of an object with the model explorer:

1. Click on „+“ in front of the object´s name.


2. Click on „+“ in front of Outputs, resp. Inputs.
3. Click with the right mouse button on the input or output that you want to rename.
4. Select Rename from the context menu.
5. Enter the new name for the input or output.

The changes effect the selected object immediately.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Connecting inputs and outputs
For having interaction between objects in a workcell, there must be an exchange of information. Objects are communicating via
Inputs and Outputs. So you have to connect the Inputs to the appropriate Outputs. In this connection the robot controller plays a
special part, because it is the only programmable object controller in COSIMIR. So all processes are controlled or synchronised by
this special controller.

To connect inputs to outputs:

1. Open the model explorer.


2. The input to be connected should be visible in the right frame of the model explorer´s window as well as the output of the
robot in the left frame.
3. Select the input with the left mouse button and leave the button pressed while moving the input to the robot´s output. Then
release the mouse button. The input and output will be connected.
4. The changes effect the input and output immediately and are displayed in the right frame of the model explorer´s window.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Equipping a robot with a gripper
A robot is the central object in a workcell, so the action of attaching a gripper to a robot is quite important. For different
constellations, there are different ways of how to attach the gripper.

Import a robot and a gripper from a model library:

1. Select Model Libraries from the menu Execute or click on in the symbol bar. This opens the dialog box Model Libraries.
2. Select the name of the robol model library from the list. The content of the library is displayed. Double-click on the name of
the library or select „+“ in front of the library´s name to display all robots in the library.
3. Select the robot from the library that you want to add to the actual workcell.
4. Press Add to add the selected robot to your workcell.
5. Select the name of the corresponding gripper model library. The content of the library is displayed. Double-click on the name
of the library or select „+“ in front of the library´s name to display all grippers in the library.
6. Select the gripper from the model library to add to your workcell.
7. Press Add to add the selected gripper to your workcell.

How to connect the gripper and the robot:

1. Click on „+“ in front of the gripper´s name.


2. Click on „+“ in front of the section Base of the gripper.
3. Select Grip Points.
4. The right frame of the model explorer window shows the grip point.
5. Click with the right mouse button on the grip point and select Properties from the context menu. This opens the dialog box
Properties for grip point.
6. Select the gripper point of the robot´s flange in the Gripped by combo box.

Connect the inputs and outputs of the gripper and the robot.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 110 of 562

Saving objects
If you have modelled your own static objects or if you have modified objects from libraries, you can save them. This offers you the
possibility to create a collection of prototype-objects for objects that are frequently needed. Those objects can be loaded from a
file if necessary, and need not be modelled anew each time. Such objects can be imported into any workcell.

To save objects:

1. Select the object in the model explorer.


2. Click with the right mouse button on the object.
3. Select Save as from the context menu. This opens the dialog box Save selected objects as.
4. Specify the drive, directory and filename, where you want to save the object.
5. Select Save to sve the selected object.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Basics
 
Saving a workcell
Obviously the model of a workcell should not be lost after closing COSIMIR. Therefore you should save the workcell to a file. Later, it
can be reloaded at any time for continuing the work.

To save a new workcell:

1. Select Save or Save as in the menu File. If the workcell has not be named yet, the Save as dialog box pops up.

or:

1. Click on the Save symbol in the horizontal symbol bar. If the workcell has not be named yet, the Save as dialog box pops up.
2. Specify the drive, directory and filename, where you want to save the workcell.
3. Press Ok.

To save a workcell:

Select Save from the menu File.

or:

Click on the Save symbol in the horizontal symbol bar.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · First Steps


 

First Steps
As a first exercise, a simple workcell is to be modelled. The cell should contain a robot, that grips a cube from a baseplate and puts
it in a different place. A simple pick and place task.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 111 of 562

Assembling a robot

Importing a robot
Importing a gripper
Robote Test

Modelling the other objects

Base
Cube

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · First Steps


 
Importing a robot
After having started COSIMIR, an empty workcell with a floor is displayed in the workcell window. At first, the robot will be
imported from the library and placed into the workcell. Therefore select New Workcell from the File menu. Select a directory and
enter a name for the new workcell, e.g. firststeps.mod. The workcell window now contains an empty workcell with a floor.

The next step ist to import a robot from a model library and to place it into the current workcell.

How to import the robot from a model library:

1. Select Model Libraries from the menu Execute or press the symbol in the symbol bar.
2. Import the Robot RV-E2 from the Mitsubishi-Robots Library by clicking on the “+„- symbol in front of the entry Mitsubishi-
Robots. The list with the robots is displayed. Select the Robot RV-E2 and press Add. The robot is displayed in the actual
workcell.
3. Close the dialog box.

The robot is not displayed shades by default. You can now perform a first robot test. For a more realistic shading you have to select
vertex normals.

How to switch to the calculation of vertex normals:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 112 of 562

1. Select Vertex normals... from the menu Extras/Settings.


2. Aktivate the control Enable at workcell startup and press OK.
3. Click on the symbol in the symbol bar or choose the command Vertex normals from the menu Execute.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · First Steps


 
Importing a gripper

Now, the robot will be equipped with a gripper. For this purpose, the gripper should be imported from the library.

How to import a gripper from a model library:

1. Select Model Libraries from the menu Execute or click on the symbol in the symbol bar.
2. Import the Gripper (elec.) for RV-M2/E from the Mitsubishi - Robots model library. Therefore click on the “+„- symbol in front
of the entry Mitsubishi - Robots. The list with the robot types is displayed. Select the desired gripper and press Add. The
gripper will be added to the workcell, but is not visible, because it appears in the origin of the workcell´s coordinate system,
where the robot is located.
3. Close the Dialog box Model Libraries.
4. The next step is to connect the gripper to the robot. Use the model explorer to execute the following steps. Therefore click on
the symbol in the symbol bar or select Model Explorer from the menu Execute.
5. Change the size of the model explorer window to a fourth of the entire COSIMIR window. The move the window to have a good
view on the workcell window.

The Model Explorer is similar to the the MS-Windows Explorer and can be used like it. The left part of the window displays the
model hierarchy and the right part is used to edit the selected elements.

6. Open the hierarchy by clicking on the “+„-symbol in front of the entry Objects. The objects GripperHM and RV-E2 will be
displayed.
7. Open the hierarchy of the GripperHM and select Base. The entries Gripper Point and Grip Points will be displayed. Select the
entry Grip Points. The right part of the window displays the name of the grip point (HMFlange).
8. Select HMFlange, press the right mouse button and select Properties from the context menu.
9. Select the entry Gripped by: from the group Initialization in the property sheet General. Select the entry RV-E2Flange. The
gripper is attached to the robot flange.

To control the gripper you have to connect the appropriate inputs and outputs of the gripper and the robot controller. Open the
hierarchy for the robot RV-E2 and select Inputs. Rename the first input ([inactive 000]) with the right mouse button by selecting
Rename from the context menu. Enter a new name for the input, e.g. Close. Do the same for the first output of the robot ([inactive
-001]). Enter a new name for the output, e.g. Close.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 113 of 562

Finally, the iInputs and outputs have to be connected. This can be done by using Drag&Drop to move the inputs on the desired
outputs. Select the entry Inputs of the object GripperHM in the left part of the model explorer window . The right part of the
window displays the entry Close. Scroll the left part of the window down to the opened hierarchy of the robot´s outputs. Select
Close in the right part of the window and move the entry to the output Close with the mouse button pressed. After releasing the
mouse button the input is connected to the output.

Use this procedure v.v. for the input Close of the robot:
Select the entry Inputs of the robot in the left part, scroll up to see the outputs of the gripper and drag the input from the right
part to the left.

The robot is now ready for its first use.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Erste Schritte


 
Robot Test

Before the implementation of the robot a test is useful (e.g. if the workcell environment fits the robot). This can be done using the
Teach-In window, that enables you to test the robot´s gripper, too.

To test a robot with the help of the Teach-In window:

1. Select Teach-In from the menu Extras. The Teach-In window will be displayed.
2. To enable the control of the gripper, the output for the gripper control has to be defined. Select Grip from the menu
Extras/Settings. Use the list in the Gripper Control at Teach-In group and select the entry Close. Click on OK.
3. For operating the gripper click on the Open Gripper/Close Gripper-button. The text of the button and the display in the
workcell window is changing depending on the state of the gripper.
4. If you want to move the robot in tool- or world-coordinates, select the appropriate radio button within the Teach-In window.
Then you get a panel of control buttons to operate the robot.
5. Select the radio button Joint Coordinates.
6. To move the robot along a single axis select the corresponding buttons  beside the inscription.
7. The position of the axis can also be specified explicitly. Double-click on the Teach-In window outside of a control element. The
Set Joint Coordinates Dialog box pops up. Enter appropriate joint coordinates. The values are accepted by selecting OK. You
can try different settings if you want.
8. Afterwards you can close the Teach-In window by selecting Close from the menu Window or by double-clicking on the symbol
in the Teach-in window or simply by clicking on the Close-symbol of the window.

The robot can also be taught without using the Teach-In window. In this case the Tool Center Point (TCP) can be set by a mouse
click. To teach any point in the robot’s work-space, two different views of the workcell are required. It is usually helpful to select
the top-view and front-view of the workcell. In the top-view you set the X,Y-coordinates of the position and in the front-view you
set the Y,Z-coordinates. This procedure does not change the orientation of the gripper.

To open a new workcell view:

1. Select New from the menu View. A new workcell window will be opened.
2. Select Tile Vertical or Tile Horizontal from the menu Window. Both workcell views are placed next to each other.
3. Change the view of the windows to Front View and Top View from the menu View/Standard.

Use the commands Zoom out and Zoom in from the menu View and size the workcell view to fit the entire workcell in a workcell
view.

To move the robot without Teach-In window:

1. Make sure you´re not in Edit Mode. (the mouse pointer becomed a cross hair inside the workcell window). In that case disable
the Edit Mode by selecting Edit Mode from the menu Execute or by pressing the symbol in the symbol bar.
2. Place the mouse-pointer in the top-view window at the desired X,Y-position and double-click. If the position is reachable, the
robot moves its joints, so that the tool center point reaches the new position
3. Proceed the same way with the front-view window for positioning the TCP to the Y,Z-coordinates.

Furthermore the position of the robot can also be set directly in joint coordinates. This is a very fast way to move the robot to the
desired position.

Set the robot to its nest position. Proceed as described below, for making the following settings: set joint 3 to 110 Degrees; joint 5
to 90 degrees and all others are set to zero.

To set the robot to a position by setting the joint values:

1. Select the command Show Joint Coordinates from the menu Extras/Robot Position. A window pops up, displaying the joint
coordinates of the robot.
2. Double-click on the window. The Set joint coordinates Dialog box pops up..
3. Enter the desired coordinates for all joints.
4. Press Ok.
5. Close the Joint Coordinates Dialog Box by selecting the command Close from the menu Window.

 
©·2000·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 114 of 562

COSIMIR® · First Steps


 
Base
Presently, a big box is sufficient for the baseplate of this simple example.

To create the baseplate:

1. Open the model explorer (Command Model Explorer of the menu Execute).
2. Click with the right mouse button on the entry Objects and select New/Object from the context menu. A new object is added
to the hierarchy. This object will now get a section.
3. Click with the right mouse button on the new object. The command New/Section from the context menu add a new section
Base to the object. Click on the “+„-symbol in front of the entry Object to display the section.
4. Click with the right mouse button on Base and select New/Box from the context menu. A new hull Box 1 will be added to the
section. The hull has got default values. We will change these settings now.
5. Click with the right mouse button on the hull Box 1 and select Properties from the context menu. A dialog box containing the
properties of the selected hull will be opened. Find the entry Dimensions for the box in the property sheet General.

6. Select the entry Length X: <100.00 mm>. An edit box for the X-dimension of the hull appears. Chnage the value to 200. Do
the same for the entries for Y and Z and the values Length Y: <400.00 mm> and Length Z: <300.00 mm>.
7. Select the property sheet Position.

8. Click on the entry Object inside the model explorer. The title of the Dialog Box Properties for hull changes to Properties for
object. This enables you to move the object and not only the object´s hull. These difference in movement effects the origin of
the object coordinate system. In the first case, the origin is moved, too. But for the second selection, the origin stays at its
position. Here, now major effects can be observed. Our new object only consists of a single hull. Usually it is better to move
the entire object because all positions of the dedicated hulls are adjusted.
9. Enter the values 200, -200, 0 into the edit boxes X, Y, Z. The box appears right in front of the robot.

We will now change the color of the box. Therefore activate the property sheet Visualization in the Dialog Box Properties for hull.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 115 of 562

Select Color from the group Fill to change the color of the box (e.g. to Red).

How to change the name of the base:

1. Click with the right mouse button on the new object.


2. Slect Rename from the context menu.
3. Enter the new name for the object (Baseplate).

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · First Steps


 
Cube
A box will be created as a handling object for the pick and place task.

To create a box:

The handling object should be created in the same way as the baseplate, but the following measures and positions have to be set:

Measures: X-length = 4 Y-length = 40 Z-length = 40


Position: X = 280 Y = -130 Z = 300

To change the name of the box:

Change the name of the box using the procedure described in the modelling of the base.

In the actual state, the box cannot be grasped by the robot. For this purpose the box must be equipped with a grip point.

To equip the cube with a grip oint:

1. Click with the right mouse button on the Base of the cube and select New/Grip Point from the context menu. The model explorer´s tree is expanded
with the level Grip Points and the cube gets the grip point Grip Point_1.
2. Chnage the name of the gri point to GrpCube.
3. Enter (X,Y,Z) = (20,20,20) as the new position for the cube.
4. If the grip point does not appear above the cube, you may have entered a wrong position for the cube. Check the position for the object Cube and

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 116 of 562

that of the hull Box 1. The position should only differ from zero for the object. COSIMIR always differentiates from positions of
objects, sections and hulls. This gives you the opportunity to move e.g. section relatively to positions of their parent objects.
Further description...

Now, the workcell has been completely modeled. You may store this workcell using a name of your choice. For this workcell an
example robot program is already provided with COSIMIR.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 

Advanced Modeling
After performing the first steps for modeling a workcell with COSIMIR, now an instruction for creation of a more complex workcell is provided. Not each
step is described in detail, but the concepts of the chapter Basics are needed.

Each chapter in this part of the help is an own unit. After every chapter the workcell has a new finished state. The worcell should be saved to a new file
when each state is reached. These files are the starting point for the next chapter. Clues for the modeling of the workcells and the possibility to compare
is provided by the given files Demo#.mod, which consist of the workcells at the numbered state.

The final cell contains three objects for assembly. The objects are gripped and put by a robot one after the other onto a conveyor belt. At the end of the
belt the objects are transfered to a turn table by a loading device. The turn table is able to rotate the objects by 90°. The assembled model represents a
lamp, which is shown in the picture below.

Assembly of the robot

Importing a robot
Importing a gripper

Modelling the table

First table leg


Second table leg
Remaining legs
Table top
Building a second table

Importing and modification a turn table

Importing a turn table


Positioning the turn table
Scaling the turn table

Importing and modification a conveyor belt

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 117 of 562

Importing a conveyor belt


Modifying the conveyor belt

Import and modifying a loading device

Importing a loading device


Modifying the loading device

Connect I/O

Renaming and connecting all inputs/outputs

Modelling of assembly objects

Modelling a bulb
Modelling a lamp socket
Modelling a lamp stand
Modifying the cell floor
Spatial view of the workcell

©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Importing a robot
After having started COSIMIR, an empty workcell with a floor is displayed in the workcell window. At first, the robot will be
imported from the library and placed into the workcell. Therefore select New Workcell from the File menu. Select a directory and
enter a name for the new workcell, e.g. advanced.mod. The workcell window now contains an empty workcell with a floor.

The next step ist to import a robot from a model library and to place it into the current workcell.

How to import the robot from a model library:

1. Select Model Libraries from the menu Execute or press the symbol in the symbol bar.
2. Import the Robot RV-E2 from the Mitsubishi-Robots Library by clicking on the “+„- symbol in front of the entry Mitsubishi-
Robots. The list with the robots is displayed. Select the Robot RV-E2 and press Add. The robot is displayed in the actual
workcell.
3. Close the dialog box.

The robot is not displayed shades by default. You can now perform a first robot test. For a more realistic shading you have to select
vertex normals.

How to switch to the calculation of vertex normals:

1. Select Vertex normals... from the menu Extras/Settings.


2. Aktivate the control Enable at workcell startup and press OK.
3. Click on the symbol in the symbol bar or choose the command Vertex normals from the menu Execute.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Importing a gripper

Now, the robot will be equipped with a gripper. For this purpose, the gripper should be imported from the library.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 118 of 562

How to import a gripper from a model library:

1. Select Model Libraries from the menu Execute or click on the symbol in the symbol bar.
2. Import the Gripper (elec.) for RV-M2/E from the Mitsubishi - Robots model library. Therefore click on the “+„- symbol in front
of the entry Mitsubishi - Robots. The list with the robot types is displayed. Select the desired gripper and press Add. The
gripper will be added to the workcell, but is not visible, because it appears in the origin of the workcell´s coordinate system,
where the robot is located.
3. Close the Dialog box Model Libraries.
4. The next step is to connect the gripper to the robot. Use the model explorer to execute the following steps. Therefore click on
the symbol in the symbol bar or select Model Explorer from the menu Execute.
5. Change the size of the model explorer window to a fourth of the entire COSIMIR window. The move the window to have a good
view on the workcell window.

The Model Explorer is similar to the the MS-Windows Explorer and can be used like it. The left part of the window displays the
model hierarchy and the right part is used to edit the selected elements.

6. Open the hierarchy by clicking on the “+„-symbol in front of the entry Objects. The objects GripperHM and RV-E2 will be
displayed.
7. Open the hierarchy of the GripperHM and select Base. The entries Gripper Point and Grip Points will be displayed. Select the
entry Grip Points. The right part of the window displays the name of the grip point (HMFlange).
8. Select HMFlange, press the right mouse button and select Properties from the context menu.
9. Select the entry Gripped by: from the group Initialization in the property sheet General. Select the entry RV-E2Flange. The
gripper is attached to the robot flange.

To control the gripper you have to connect the appropriate inputs and outputs of the gripper and the robot controller. Open the
hierarchy for the robot RV-E2 and select Inputs. Rename the first input ([inactive 000]) with the right mouse button by selecting
Rename from the context menu. Enter a new name for the input, e.g. Close. Do the same for the first output of the robot ([inactive
-001]). Enter a new name for the output, e.g. Close.

Finally, the iInputs and outputs have to be connected. This can be done by using Drag&Drop to move the inputs on the desired
outputs. Select the entry Inputs of the object GripperHM in the left part of the model explorer window . The right part of the
window displays the entry Close. Scroll the left part of the window down to the opened hierarchy of the robot´s outputs. Select
Close in the right part of the window and move the entry to the output Close with the mouse button pressed. After releasing the
mouse button the input is connected to the output.

Use this procedure v.v. for the input Close of the robot:
Select the entry Inputs of the robot in the left part, scroll up to see the outputs of the gripper and drag the input from the right
part to the left.

With this step, the first phase of modelling the workcell has been completed. As with the previous example, you are now able to
perform a first robot test.

To gain an adequate view at the objects which will be added in the following steps, a new workcell window should be added:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 119 of 562

To open a new workcell view:

1. Select New from the menu View. A new workcell window will be opened.
2. Select Tile Vertical or Tile Horizontal from the menu Window. Both workcell views are placed next to each other.
3. Change the view of the windows to Front View and Top View from the menu View/Standard.

Use the commands Zoom out and Zoom in from the menu View and size the workcell view to fit the entire workcell in a workcell
view.

The workcell should now be displayed this way, eventually close the model explorer window:

Save the workcell as Cell1.mod in your working directory.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Robot Test

Before the implementation of the robot a test is useful (e.g. if the workcell environment fits the robot). This can be done using the
Teach-In window, that enables you to test the robot´s gripper, too.

To test a robot with the help of the Teach-In window:

1. Select Teach-In from the menu Extras. The Teach-In window will be displayed.
2. To enable the control of the gripper, the output for the gripper control has to be defined. Select Grip from the menu
Extras/Settings. Use the list in the Gripper Control at Teach-In group and select the entry Close. Click on OK.
3. For operating the gripper click on the Open Gripper/Close Gripper-button. The text of the button and the display in the
workcell window is changing depending on the state of the gripper.
4. If you want to move the robot in tool- or world-coordinates, select the appropriate radio button within the Teach-In window.
Then you get a panel of control buttons to operate the robot.
5. Select the radio button Joint Coordinates.
6. To move the robot along a single axis select the corresponding buttons  beside the inscription.
7. The position of the axis can also be specified explicitly. Double-click on the Teach-In window outside of a control element. The
Set Joint Coordinates Dialog box pops up. Enter appropriate joint coordinates. The values are accepted by selecting OK. You
can try different settings if you want.
8. Afterwards you can close the Teach-In window by selecting Close from the menu Window or by double-clicking on the symbol
in the Teach-in window or simply by clicking on the Close-symbol of the window.

The robot can also be taught without using the Teach-In window. In this case the Tool Center Point (TCP) can be set by a mouse
click. To teach any point in the robot’s work-space, two different views of the workcell are required. It is usually helpful to select
the top-view and front-view of the workcell. In the top-view you set the X,Y-coordinates of the position and in the front-view you
set the Y,Z-coordinates. This procedure does not change the orientation of the gripper.

To open a new workcell view:

1. Select New from the menu View. A new workcell window will be opened.
2. Select Tile Vertical or Tile Horizontal from the menu Window. Both workcell views are placed next to each other.
3. Change the view of the windows to Front View and Top View from the menu View/Standard.

Use the commands Zoom out and Zoom in from the menu View and size the workcell view to fit the entire workcell in a workcell
view.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 120 of 562

To move the robot without Teach-In window:

1. Make sure you´re not in Edit Mode. (the mouse pointer becomed a cross hair inside the workcell window). In that case disable
the Edit Mode by selecting Edit Mode from the menu Execute or by pressing the symbol in the symbol bar.
2. Place the mouse-pointer in the top-view window at the desired X,Y-position and double-click. If the position is reachable, the
robot moves its joints, so that the tool center point reaches the new position
3. Proceed the same way with the front-view window for positioning the TCP to the Y,Z-coordinates.

Furthermore the position of the robot can also be set directly in joint coordinates. This is a very fast way to move the robot to the
desired position.

Set the robot to its nest position. Proceed as described below, for making the following settings: set joint 3 to 110 Degrees; joint 5
to 90 degrees and all others are set to zero.

To set the robot to a position by setting the joint values:

1. Select the command Show Joint Coordinates from the menu Extras/Robot Position. A window pops up, displaying the joint
coordinates of the robot.
2. Double-click on the window. The Set joint coordinates Dialog box pops up..
3. Enter the desired coordinates for all joints.
4. Press Ok.
5. Close the Joint Coordinates Dialog Box by selecting the command Close from the menu Window.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
First table leg
The first table leg will be created as a new object. To get a better view of the workcell, you should select the right side view
instead of the left side view during modelling of the table.

To create the first table leg:

1. Open the Model Explorer.


2. Create an new object table. This object will contain all elements of the entire table.
3. Create a new section Legs of inside the object table.
4. Add a box with the dimensions (X,Y,Z) = (30,30,300).
5. To move the leg out of the origin of the world coordinate system, it has to be placed. Therefore move the element 300 mm in
Y-direction using the Dialog box Properties for hull.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 121 of 562

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Second table leg

The second table leg will be created in the same way as the first one. But instead of adding a second new object, the second leg
becomes only a new hull, which is added to the section Legs.

To create the second table leg:

1. Select the hull box, representing the first table leg and choose Copy from the context menu.
2. Click with the right mouse button on the section Legs in the left part of the model explorer window and select Paste.
3. Move the second box 200 mm on Y-position 500.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Remaining table legs

The two remaining table legs should also be created as hulls of the existing section Legs.

To create the remaining table legs:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 122 of 562

1. Select both boxes in the right part of the model explorer window. Therefore select the first box, press the Ctrl-key and select
the second Box.
2. Click with the right mouse button on any of the hulls and select Copy from the context menu.
3. Click with the right mouse button on the section Legs. Add the hulls.
4. No select the new Boxes 3+4. To make them visible, they habe to be moved. Notice that the Dialog box Properties for hull
only contains the property sheet entries Position, Dimension and Visualization. That´s because multiple hulls are selected
and only this options remain useful. Click on Position and move the two legs -200 mm in X-direction.

©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Tabletop

The tabletop should also be created as a hull of the existing object, but inside an own section.

To create a tabletop:

1. Create a new section Tabletop inside the object Table.


2. Add a new hull box with the dimensions (X,Y,Z) = (270,270,30). Finally the tabletop has to be placed onto the four legs of the
table.
3. For a better positioning, switch to another projection of the workcell. By default, the objects are displayed perspectively. To
allow an exact placement of the tabletop, the orthogonal projection is more useful, so that parallel lines are displayed
parallel. Select Rendering from the menu View and then detailed >>. Here you can select orthogonal in the group Projection.
Confirm this setting with OK.
Notice the change of the view of the workcell window.
4. Another useful setting is Wireframe. It can be activated by pressing the symbol in the symbol bar.
5. Move the tabletop to a position on the table legs using the arrows in the position boxes or enter the values for -220 and 280 for
X  and Y.
6. Actually, the tabletop lies on the floor. As we know the length of the table legs (300 mm), we are able to directly enter its Z-
coordinate. Additionally, COSIMIR offers another possibility to align objects without knowledge of their actual positions.
7. Select the object Table in the left part of the model explorer window. The right part displays the sections Legs and Tabletop.
Select both and press the right mouse button. The select Alignement from the context menu and the entry Z elements. The
tabletop is moved onto the table legs.
8. Switch back to the display mode Filled and edit the color for the tabletop.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 123 of 562

Positioning of the entire table:

1. Select the object Table.


2. Enter the following positions: (X,Y,Z) = (100,-450,0)
3. Use the edit boxes in the Rotation group below the Position edit boxes to enter a Roll value of 60.
4. Zoom the workcell view to display all elements.
5. After creating the table, this object can be saved seperately as a file. When you have to model other workcells and you use
this table once more, this file can be imported.   In this case, the time-consuming modelling of same or similar objects isn’t
necessary any more. Click with the right mouse button on the object Table an select Save as from the context menu.
6. Save the table in the file Table.mod.

This table can now be added later to any workcell. Therefore use the command Add from the object contex menu.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Building a second table

The second table should be created as an independent object. In the following, we don’t describe, which view of the workcell
should be used. Now, you have to select on your own, which view of the workcell you use to perform the single steps creating the
new workcell. If another view-direction seems to be more suitable, you can change the displayed views.

To create the second table:

1. Select the object table with the right mouse button.


2. Select the command Copy.
3. Select Objects with the right mouse button.
4. Select Paste from the context menu.

At the moment, the second table is shown at the same position as the original one.

Positioning the entire table:

1. Enter the position (X,Y,Z) = (-20,20,0) for the table.


2. Rotate the table with  (Roll, Nick, Gier) = (30,0,0).

The second table should be named table2.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 124 of 562

The second phase of workcell modelling is now finished. Save the workcell as cell2.mod.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Importing a turn table

To import a turn table:

1. Select Model Libraries in the menu Execute or press the symbol in the symbol bar.
2. Import the object Turn table from the library Miscellaneous Mechanisms. Therefore click on the “+„- Symbol in front of the
entry Miscellaneous Mechanisms. The list with all objects inside the library is displayed. Select the turn table and press Add.
The turn table is added to the actual workcell. Now, it is not visible, because it ist positioned in the origin of the world
coordinate system, where the robot is placed, too.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Positioning the turn table

To position the turn table:

1. Open the Dialog box Properties for object of the turn table.
2. Enter the new position (X,Y,Z) = (100,300,0).

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Scaling the turn table

To scale the turn table:

1. Der turn table consists of the base (one hull cylinder)  and the move segment (one hull cylinder as a tabletop and a conveyor
surface). These hulls have to be scaled serperately
Select the cylinder of the base.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 125 of 562

2. Enter the new dimension 300 for the Height of the cylinder. Basically you can also scale using the group Scale, but afterwards
the hull becomes a polyhedron and the hull specific properties will be lost (e.g. the Approximation level).
3. Adopt the Z-position of the move segment. Therefore enter the Z-position 230 for its hulls.

The third phase of workcell modelling is now finished. Save the workcell as cell3.mod.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Importing a conveyor belt

To import the conveyor belt:

1. Import the object Conveyor belt 1 from the library Miscellaneous Mechanisms.
2. Move the conveyor belt to the position (X,Y,Z) = (600,-800,0).
3. The conveyor belt is too high, so its legs have to be shortened. Select the section Legs of the conveyor belt and look at its
hulls. The legs consist of 8 polyhedrons (4 feet an 4 profiles). Select single polyhedrons using the mouse to see the
representation of elements by  polyhedrons. COSIMIR will display the selected hull with a frame.
4. Select all profiles (polyhedrons 2, 4, 6, 8) by using the CTRL-key.
5. Enter a new value for the Z-dimension of 300 using the Dialog box Properties for hull.
6. Check the Z-Position in the property sheet Position. Enter the correct value of 25 if necessary.
7. The upper half of the conveyor belt has now to be replaced on its legs. Therefore select the object Conveyor Belt and the
entries Body and Drive.
8. Move both sections to a Z-position -70.

Do not care about the length of the belt at this time.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 126 of 562

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Modifying the conveyor belt

The handling objects should not be transported to the end of the conveyor belt. They have to stop at the place, where the loading
device will be mounted later. For this reason, the active surface of the conveyor belt has to be shortened.

To modify the conveyor belt:

1. The conveyor surface that does the transport of elements is part of the section Body. Select the conveyor surface.
2. Enter a length of 1.200 in X-direction. The end of the conveyor surface should now align to the turn table.

The fourth phase of workcell modelling is now finished. Save the workcell as cell4.mod.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Importing a loading device

To import a loading device:

1. Import the object Loading device from the library Miscellaneous Mechanisms.
2. To edit the loading device it is move to an empty position of the actual workcell:
(X, Y, Z) = (0, -700 ,0).

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Modifying the loading device

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 127 of 562

To change the size of the loading device:

1. First, the rack of the device has to extended. Therefore look at the hulls inside the section Strutting. The rack consists of the
surface, the polyhedron 2 ands box 5. Extend all of these elements to a length of 550. Notice that the orientation of the
elemnts is not the same. According to its orientation, the element has to extended in  X-, Y- or Z-direction.
2. The second box that built the end of the rack has to be moved to the end of the arm again.
Move it  250 mm.
3. Move the loading device to the correct position at the conveyor belt.
(X,Y,Z) = (615,450,340).

The geometry of the loading device has now been modified to meet the requirements of the actual workcell. Now the kinematics
have to be adapted to this modified geometry on hull level. Otherwise the device moves according to the old settings. If you had
modified the loading device only on object or section level, the kinematics parameters would have been adjusted automatically.

To adjust the kinematics of the loading device:

1. Click on the section MovingPart of the loading device. The Dialog box Properties for section  can be used to enter new axis
settings. Here you can modify the settings for the lower and upper limits and speed of the gripper.
2. Enter 160 mm as Lower axis limit and 525 mm as Upper axis limit.

Save the workcell as Cell5.mod.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Setting and connecting all inputs and outputs
To connect the inputs and outputs:

To enable the control by a robot program, the inputs and outputs of the robot control have to be connected.

1. The unique identification of the inputs and outputs demands a naming.


2. Edit the names for the inputs and outputs as in the table below. First, open the object robot RV-E2 and Inputs. Select the
entry for the first input ([inactive 000]) with the right mouse button and choose Rename from the context menu. Enter the
new name for the input.
3. Proceed this way for the other objects. Partly the objects already have the correct names as their default setting.
4. Finally, the inputs and outputs have to be connected. Select the entry Inputs of the object Gripper in the left part of the
model explorer window. The right part of the window displays the entry Close. Scroll down in the left part of the window to
display the list of outputs of the robot. Click with the mouse on the the entry Close in the right part of the window and drag
the entry onto the output GrpClose of the robot in the left part. Input and Output are now connected.

Object Input/ Name Description Connected with


Output
RV-E2 Inputs: *GrpClosed state of the  
gripper
    TrsState state of the  
loading device

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 128 of 562

    PartAtEnd state of the  


conveyor belt
    Standstill state of the  
turn table
  Outputs: *GrpClose control signal GripperHM.Close
of gripper   
    Transport control signal LoadingDevice.Transport
of loading
device
    BeltOn control signal ConveyorBelt.BeltOn
of conveyor
belt   
    BeltBackw control signal ConveyorBelt.BeltBackwards
of conveyor
belt   
    TurnOnes control signal TurnTable.TurningOnes
of turn table
         
Gripper Input: *Close control of the  
gripper jaws
  Output: *GrpClosed state of the RV_E2.GrpClosed
gripper   
         
Turn Table Input:: *TurningOnes control of the  
turn table
  Output: *StandingStill state of the RV_E2.Standstill
turn table   
         
Conveyor Inputs: *BeltOn controller: belt  
Belt    on
    *BeltBackw controller: belt  
backwards
  Output: *PartAtEnd state of the RV_E2.PartAtEnd
belt    
         
Loading Input: *Transport control of the  
Device loading device
  Output: *TransportDone state of the RV_E2.TrsState
loading
device   

* These names will automatically be assigned to the corresponding inputs and outputs while importing the objects.

The sixth phase of workcell modelling is now finished. Save the workcell as cell6.mod.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Modelling a bulb
+ =

Modeling the bulb thread:

1. Create a new object and give it the name Bulb.


2. Create a new section Base.
3. Create a new hull, type Cylinder. Radius = 15, Height = 45 and Approximation = 8.
4. To position the cylinder correctly, move it to (X, Y, Z) = (-400, -350, 330) in world coordinates.

Coloring the thread:

1. Open the dialog Properties. Choose Visualization.


2. Select in the field Fill/Color some blue tint.

Modeling the glass part of a bulb:

1. Add to the base a hull of type Sphere. Radius = 25, Approximation = 15.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 129 of 562

2. The correct position for the glass part is (X, Y, Z) = (0, 0, 66) in object coordinate system.

Coloring the glass part:

Usually glass is in some way transparent. So here is described how to assign transparency to objects.

1. Create a new material by clicking at the Explorer with the right mouse key and selecting New/Material.
2. Name it Glass.
3. Open the dialog Properties of the material Glass.
4. Set the Permeability to a value of 40%.
5. Set the color for ambient und diffuse reflexion to yellow tints to retrieve a more realistic view.
6. Assign the material to the bulb. Open the dialog Properties of the hull sphere of the object bulb. It is also possible to assign
the material to the whole object, but in this case only the glass part should become transparent. At the lower end of the
dialog (Change) select the material Glass.

The bulb is now defined. But at this state it is not possible to transport the bulb on the conveyor belt or grip it with the robot or
loading device. For this purpose two grippoints must be assigned to the bulb.

Assigning grippoints to the bulb:

1. Click right with the mouse to the Base of the bulb. Select New/Grippoint.
2. Name it GrpBulb1. This grippoint is positioned directly at the base of the bulb and responsible for the transportation on the
conveyor belt.
3. Repeat the procedure for a second grippoint. Name it GrpBulb2.
4. This grippoint is also located at the basement of the thread. To make it possible for the robot to grip the lamp this grippoint
must be moved up to the glass part. Move the grippoint 70 mm up.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Modelling a lamp socket

How to model a revolve solid as a bulb’s socket:

1. Avtivate Facets and Polyhedron Points to model a revolve solid. This is not the default setting.
2. Select Model Explorer from the menu Extras/Settings.
3. The left part of the dialog window enables you to edit the filter settings for the model explorer. Aktivated elememtns are
displayed in the workcell window. Click on the box in front of the entries for Facets and Polyhedron Points.
4. Confirm with OK.

Now single poinits can be modified.

1. Create a new object LampSocket.


2. Create a new section Base inside the object LampSocket.
3. Add a surface to the section Base. The socket will be build out of this surface by rotation.
4. Modify the dimensions of the surface: X: 30 mm and Y: 15 mm.

The lamp socket will get a hole to fit the lamp. We want to rotate the surface, so the polyhedron points have to be moved away
from the Y-Axis to get that hole.

1. Click down the model explorer´s hierarchy to display the Polyhedron Points and Facets.
2. Select the polyhedron point in the left part of the model explorer window. The right part now contains the four points of the
surface.
3. Select all point using the mouse.
4. Move this selection 15 mm in Y-direction using the Dialog box Properties for polyhedron point.
5. Now select the entry Facets in the left part of the window. The right part then contains a facet that consists of a surface.
6. Select the facet 0001 and press the right mouse button.
7. Select Rotate... from the context menu.
8. Enter an Angle of 360° and 36 as the number of Subdivisions.
9. Confirm with OK.
10. Place the object LampSocket at position

(X, Y, Z) = (-280,-400, 330) / (Roll, Nick, Gier) = (0, -90, 0).

The lamp socket is now defined. In this state it is neither possible to transport it on a conveyor belt, nor to grip it by a robot or a
loading device. For this purpose it is necessary to add two grip points to the lamp socket. The procedure is identical with the one at
the end of the last chapter, which describes the adding of grip points to the bulb. Make sure that the grip point at the upper side of
the lamp socket is moved just 15mm from the origin of the element coordinate system along the Z-axis. Call the grip points with
simple and meaningful names.

 
©·2000·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 130 of 562

COSIMIR® · Advanced Modeling


 
Modelling a lamp stand

Add an extrude solid as an object to the workcell. The procedure is analogous to the modelling of a revolve solid.

How to model an extrude solid as a lamp stand:

1. Create a new object LampStand. Create a new section Base.


2. Add a surface to the section Base. The stand will be build from this surface by extruding it to a polyhedron.
3. Click with the right mouse button on the surface and select Extrude... from the context menu.
4. Enter a Length of 800 an 8 as the number of Subdivisions.
5. Click on OK. The surface becomes a polyhedron that consists of 8 parts.
6. Move the object LampStand to get a better vie on it.

How to form the extrude solid:

1. Open the appropriate level of the model explorer. The left part of the model explorer window should contain the hulls of the
section Base. Clicking on the  symbol “+„ displays the Polyhedron Points.
2. Select the Polyhedron Points so that 40 points appear in the right part of the model explorer window.
3. Select the points 7-11, 16-20, 25-29, 34-38 using the mouse. They are the points of the center segment.
4. Move the points 100 mm in Y-direction.

The extrude solid shall be scaled now to adjust the size of the lamp stand to the size of the other assembly objects.

How to scale the extrude solid:

1. Select the Polyhedron.


2. If not already done, open the Dialog box Properties for hull.
3. Select the property sheet Dimension. The hull can be scaled by two different ways:
a) Enter the new Dimension
b) Scale by percentage
We will use option b).
4. Enter the increment for the Scale group: 75%.
5. Click on each lower arrow for the Scale in every direction (Length, Depth, Height). The hull is lowered by  75%.

How to position the lamp stand:

1. Move the object on the coordinates (X, Y, Z) = (-170, -300, 330).


2. Rotate the object with these values: (Roll, Nick, Gier) = (-122°, 0°, 90°)

The lamp stand is now defined. In this state it is neither possible to transport it on a conveyor belt, nor to grip it by a robot or a
loading device. For this purpose it is necessary to add two grip points to the lamp stand. The procedure is identical with the one of
adding grip points to a bulb, except that the grip point on the bottom, which is necessary for the fixing on the conveyor surface, is
not placed at the origin of the object coordinate system, but at the point (X, Y, Z) = (25, 100, 0). The second grip point, which is
located at the top side of the object, should be at the position X=25, Y=100 and Z=37,5 in the object coordinate system.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Adjustment of the workcell's floor

Now the workcell is modelled completely and can be made available to the simulation system COSIMIR. But before, the floor should
be adjusted to the size of the workcell.

How to change the size of the workcell’s floor:

1. Select Floor... from the menu Extras/Settings.


2. Enter 2000 as a size for X and Y.
3. Select an Area Color for the floor that suits your workcell. If you do not want to display the lines, select the same color as for
the area. The display of the floor can be toggled by the radio button Grid only.
4. Click the OK button.

The last section of the workcell’s modelling is finished now. Save the workcell as Zelle7.mod.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 131 of 562

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Advanced Modeling


 
Spatial view of the workcell

It is possible to look at the workcell from different viewpoints and different directions of view, to get a better view of the workcell’s
spatial division.

How to change your viewpoint and direction of view:

1. Select Look At from the menu View. The Dialog box Look At is opened. Use this dialog box to enter your viewpoint an view
direction. The direction ist determined by the Viewpoint and Reference point. The user looks from the Viewpoint on the
Reference Point.
2. Enter (X, Y, Z) = (2960, -1270, 1190) as the Viewpoint and (X, Y, Z) = (180, 140, 270) as the Reference Point.

Another possibility for an individual view is to rotate, move or zoom  the current view using the mouse. Press one of the keys Ctrl,
Shift or Strg-Shift and move the mouse in side the workcell view with the left mouse button pressed. This commands are associated
with the keys:

1. Ctrl: Rotation of the current view


2. Shift: Move the current view
3. Ctrl: Zoom in/out of the current view

Now the workcell is completely modelled.

 
©·2000·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 132 of 562

COSIMIR® · Modelling of Mechanisms


 

Modelling of Mechanisms
In COSIMIR® the simulation of so called base mechanisms is a powerful feature for simulation of workcells. A mechanism is assigned
to an object using the object’s type. Depending on the mechanism the object structure (concerning number of I/Os, number and
configuration of sections and joints) is given. The mechanism can only be simulated correctly if the given object structure exists.

To model a mechanism, use the model libraries. Add an object with a mechanism to the workcell to guarantee that the object
structure is correct. Afterwards, change the shape as well as the dynamics and I/O names of the object to model your own
mechanism.

Please note that to control any of the mechanisms the input values have to change from low to high to start the mechanism.
Moreover the output values containing the state of the mechanisms are only updated if the outputs are connected to an input.

Basismechanismen
Gripper  
Conveyor Belt
Push Cylinder
Turn Cylinder
Turn Table
Two-Way Push Cylinder
Trashcan
Replicator
Turning Mover
Parts Feeder
Proximity Sensor

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Gripper
Use the gripper mechanism to simulate grasping of workpieces. If system input 0 of the gripper object is set to high, the gripper
grasps an object that has a free grip point in the grip range of the gripper’s gripper point. All sections of the gripper object that
have a degree of freedom are moved to their upper limits. Thus the movement of gripper chucks is simulated.

Mechanism
  Gripper
Object Type
  Gripper
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Closes the gripper.
0 Opens the gripper.
Outputs Index Type Value Description
000 digital 0 Gripper is not closed.
1 Gripper is closed.
Examples
  Object Model Library
Parallel Gripper Miscellaneous Grippers
Three Jaw Gripper Miscellaneous Grippers

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Conveyor Belt
If there is another object with a free grip point above a conveyer belt object, the object is moved along the active surface of the
conveyor belt if the grip point lies inside the grip range of the active surface. This only works if system input 0 of the conveyor belt
is set to high. If the object is moved up to the end of the active surface system output 0 is set to high.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 133 of 562

Mechanism
  Conveyor Belt
Object Type
  Conveyor Belt
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Switches the conveyor
belt on.
0 Switches the conveyor
belt off.
001 digital 1 Conveyor belt
transports backwards.
0 Conveyor belt
transports forward.
Outputs Index Type Value Description
000 digital 0 There is no object at
conveyor’s end.
1 There is an object at
conveyor’s end.
Examples
  Object Model Library
Conveyor Belt Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Push Cylinder
The push cylinder is extended if system input 0 is set to high. If there is an object with a free grip point in the grip range of the push
cylinder’s gripper point the object is moved by the push cylinder. The push cylinder is retracted if system input 0 is set to low.

Mechanism
  Push Cylinder
Object Type
  Push Cylinder
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Extends the push
cylinder.
0 Retracts the push
cylinder.
Outputs Index Type Value Description
000 digital 0 Push cylinder is not
extended.
1 Push cylinder is
extended.
Examples
  Object Model Library
Push Cylinder Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Turn Cylinder
The mechanism rotary drive is based on the push cylinder mechanism.

Mechanism
  Rotary Drive

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 134 of 562

Object Type
  Rotary Drive
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Rotary Drive moves to
upper limit.
0 Rotary Drive moves to
lower limit.
Outputs Index Type Value Description
000 digital 0 Rotary Drive is not at
upper limit.
1 Rotary Drive is at upper
limit.
Examples
  Object Model Library
Rotary Drive Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Turn Table
All axes of turntable object are moved to the upper limits if system input 0 is set to high. If there is an object with a free grip point
inside the grip range of the turntable’s active surface the object is moved with the turntable.

Mechanism
  Turntable
Object Type
  Turntable
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Turns the turntable.
0 -
Outputs Index Type Value Description
000 digital 0 Turntable is moving.
1 Turntable stand still.
Examples
  Object Model Library
Turntable Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Two-Way Push Cylinder
The function of the two-way push cylinder is similar to the function of the push cylinder. For the purpose of control there are two
system inputs. According to this there are two system outputs for the cylinder’s state.

Mechanism
  Two-Way Push Cylinder
Object Type
  Two-Way Push Cylinder
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Extends the push
cylinder.
0 -
001 digital 1 Retracts the push
cylinder.
0 -
Outputs Index Type Value Description
000 digital 0 Push cylinder is not

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 135 of 562

extended.
1 Push cylinder is
extended.
001 digital 0 Push cylinder is not
retracted.
1 Push cylinder is
retracted.
Examples
  Object Model Library
Two-Way Push Cylinder Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Trashcan
 

The trashcan is the counterpart of the replicator. Use the mechanism trash can to remove objects at runtime. Each system input of
the trash can object is associated to a gripper point. If system input 1 is set to high and there is an object with a free grip point
inside the grip range of grip point 1 of the trash can object, the object is removed.

Please note that all objects that have been removed by this mechanism are not recovered by choosing command Reset Workcell
from the Edit menu.

Mechanism
  Trashcan
Object Type
  Trashcan
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Remove object at
gripper point 1.
0 -
001 digital 1 Remove object at
gripper point 2.
0 -
... ... ... ...
00n digital 1 Remove object at
gripper point n.
0 -
Examples
  Object Model Library
Trashcan Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Replicator
Use the replicator mechanism for creation of new objects based on templates. The extended properties of the replicator object
contain the assignment of system inputs and templates (example; template 0 = “Workpiece”). If a system input is set to high, a new
object based on the associated template is created at the gripper point of the replicator object.

Mechanism
  Replicator
Object Type
  Replicator
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Create first configured
object.
0 -
001 digital 1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 136 of 562

Create second
configured object.
0 -
... ... ... ...
00n digital 1 Create n-th configured
object.
0 -
Examples
  Object Model Library
Replicator Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Turning Mover
The turning mover consists of two sections and a vacuum gripper that can be controlled by setting system inputs 2 and 3. Use system
inputs 0 and 1 to control the position of the turning mover.

Mechanism
  Turning Mover
Object Type
  Turning Mover
System Inputs/Outputs
  Inputs Index Type Value Description
000 digital 1 Moves to position A.
0 -
001 digital 1 Moves to position B.
0 -
002 digital 1 Grasp
0 -
003 digital 1 Release
0 -
Outputs Index Type Value Description
000 digital 0 Turning mover is not at
position A.
1 Turning mover is at
position A.
001 digital 0 Turning mover is not at
position B.
1 Turning mover is at
position B.
Examples
  Object Model Library
Turning Mover Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Parts Feeder
Use the mechanism parts feeder to model depots for workpieces etc. The associated object contains a whole string of gripper
points. The sequence of these gripper points is important for the function of the parts feeder that is filled by moving objects with
free grip points in the grip range of the feeder’s gripper points. Note that the first of the feeder’s gripper points must not be
covered. In case of setting system input 0 of the parts feeder to high the object at the second gripper point is moved to the first
gripper point, the object at the third gripper point is moved to the second gripper point etc. If there is an object at the position of
the first gripper point system output 0 is set to high.

Mechanism
  Parts Feeder
Object Type
  Parts Feeder, optional “with Gravity”
System Inputs/Outputs

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 137 of 562

  Inputs Index Type Value Description


000 digital 1 Requests a new part.
0 -
Outputs Index Type Value Description
000 digital 0 No part is available.
1 There is a part
available.
Examples
  Object Model Library
Parts Feeder 1 Miscellaneous Mechanisms
Parts Feeder 2 Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modelling of Mechanisms


 
Proximity Sensor
This simple proximity sensor checks if there is an object with a free grip point in the grip range of the sensor’s gripper point.

Mechanism
  Proximity Sensor
Object Type
  Proximity Sensor
System Inputs/Outputs
  Outputs Index Type Value Description
000 digital 0 No grip point detected.
1 Grip point detected.
Examples
  Object Model Library
Proximity Sensor Miscellaneous Mechanisms

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modell-Explorer
 

Model Explorer
You can access all elements of a workcell using the Model Explorer. Access is possible for objects or elements and for materials,
libraries, lightning an I/O-COnnections, too.

The Model Explorer window consists of two parts: 

The left part contains a The element list in the right


navigation tree with folders part contains the elements of
for each element of the the selected folder in the
workcell. navigation tree.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 138 of 562

To edit an element, you can can select an element displayed in the navigation tree or select it in the element list by clicking with
the mouse on its name.

You can enter a context menu with the most frequently used commands by right-clicking with the mouse on an element or by
pressing the context menu key on your Windows 95 keyboard.

Use the Command Model Explorer in the menu Extras/Settings to configure the settings for the Model Explorer using the Model
Explorer Options.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Modell-Explorer
 
Command Model Explorer
With this command or with the symbol in the symbolbar you can switch to the Model-Explorer or close it.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Modell-Explorer
 
Options
This dialog box can be invoked by selecting the command Model Explorer in the menu Extras/Settings or using the context menu of
the Model Explorer.

Choose a filter from the list of element types, that should be visible in the Model Explorer.

The preview shows an example for the selected filters.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Modellbibliotheken
 

Model Libraries
With the use of model libraries you can easily create new workcells or expand existing workcells.

Open the Dialog box by selecting the Command Model Libraries. Select a model from a model library und add it to your actual
workcell.

To create a special purpose mechanism, select one of a model library and change its parameters for your application.

You are able to create your own libraries as user libraries.

©·2002·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 139 of 562

COSIMIR® · Modellbibliotheken
 
Command Model Libraries
Use this command to open the Dialog box Model Libraries. The dialog box can be invoked using the symbol in the symbol bar.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modellbibliotheken
 
Dialog box
Use the Dialog box Model Libraries to select a model from am Model Library and add it to your actual workcell. The dialog box can
be invoked by using the command Model Libraries of the menu Execute or by pressing the symbol in the symbol bar.

To add a model to your actual workcell, select a model from the list of model libraries and press the Button Add.

Press the Button Details >> to display the details for a model or a model library.

The picture of the model or model library can be switched on/off using the context menu of the list .

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 140 of 562

The selected model can also be added to the actual workcell with the context menu of the list or double-clicking on the model´s
name.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modellbibliotheken
 
Properties
Use the property sheet Libraries in the Properties for workcell to configure the display for the Dialog box Model Libraries and the
automations while adding a model from a library.

Display Beschreibung
Show picture of Select <Yes> to display the picture of the selected model or a selected model library in the dialog box Model
model Libraries.

Automatic Function Beschreibung


Attach gripper to active Select <Yes> to connect a selected gripper automatically to the active robot in the workcell, if this is not
robot already connected to a gripper.
Exchange active robot Select <Yes> to exchange the active robot with another robot from the model libraries.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Modellbibliotheken
 
User libraries
You are able to use file directories as user defined libraries of models. To show a file directory in the navigation tree of dialog box
Model Libraries use the command Show directory from the context menu.

If there exists a .mod-file in the directory an item is added to the navigation tree. The item text is given by the file name of
the .mod-file without extension. As the describing picture if it exists a .bmp-file with the same file name of the .mod-file is used.
Respectively, the describing text is taken from an .htm-file.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 141 of 562

To remove a directory from the navigation tree select the directory and use the command Remove directory from the context
menu. To check the path of a shown directory use command Directory from the context menu.

Note: To open the context menu click the right mouse button within the navigation tree.

 
©·2002·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 

Element Properties
The Element Properties can be displayed with the context menu command Properties by clicking the right mouse button on an
element or with the menu command Properties of the menu Edit while having an element selected.

The representation varies due to the selected element:

Workcell properties
Object properties
Section properties
Hull properties
Material properties
Material properties - Texture
Gripper properties
Grip point properties
Properties - Position
Properties - Dimension
Properties - Visualization
Properties - Extended
Properties - Extended - Extended Property
Properties - Kinematics
Properties - ORL
Properties - OPC

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Properties for workcell
Use the Dialog Box Properties for workcell to check or change the options of the actual workcell.

Name

Enter the text for the name of the workcell.

Parameter

Visualization

Background Color

To click on the color brings up the Color dialog box which is used to select the background color of the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 142 of 562

workcell.

Floor

Configure the visualization of the workcell´s floor with these parameters.

Level Of Detail

Choose the Level-Of-Detail.

Project status

Configure the status of the project.

Activate release management

Choose this option to activate the release management.

Acitvate model protected

To start the model protection activate this entry.

Messages and errors

Confirm errors

Deactivate this option to stop the confirmation of all runtime errors e. g. while Teach-In or program
interpretation and to send all errors to the message window.

Program Interpreter

Restart automatically

Choose <Yes>, if all simulated programs should be restarted automatically. The workcell will be resetted
before the restart.

The Dialog Box Properties for workcell can be displayed with the context menu command Properties by clicking the right mouse
button on a workcell or with the menu command Properties of the menu Edit while having a workcell selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Object
Use the Dialog Box Properties for object to check or change the options of an object.

Dialog box options:

Name

Enter the text for the name of the object.

Parameter

The list displays additional parameters for the selected element.

Material: check or change the material of the selected object.


Object type: check or change the object´s type.
Controller: check or change the controller for the selected object.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 143 of 562

If you have configured an OPC-Server to control the object you are abte to determine the name
and the type of the OPC-Server in two further items of the list.

Operating
configure the object as an operating resource.
Resource:

Change

Changes the parameters using combo boxes.

The Dialog Box Properties for object can be displayed with the context menu command Properties by clicking the right mouse
button on an object or with the menu command Properties of the menu Edit while having an object selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Position
Use the Dialog Box Properties - Position to check or change the position of a selected element.

Dialog box options:

        Position

Enter the X-position of the selected element.

Enter the Y-position of the selected element.

Enter the Z-position of the selected element.

Coordinate system

Here you can select a coordinate system for the position of the selected element.

Increment

Enter the value of the increment for the change of the position using spin controls.

        Rotation

Roll

Here you can enter the roll-value for the selected element.

Pitch

Here you can enter the pitch-value for the selected element.

Yaw

Here you can enter the yaw-value for the selected element

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 144 of 562

Coordinate system

Here you can select a coordinate system for the rotation of the selected element.

Increment

Enter the value of the increment for the change of the rotation using spin controls.

Note: For some elements, as polyhedron points, staically connected sections (grippers), the position and/or rotation controls may be
unavailable.

The Dialog Box Properties - Position can be displayed with the context menu command Properties by clicking the right mouse
button on an element or with the menu command Properties of the menu Edit while having an element selected and selecting the
property sheet Position.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Dimension
Use the Dialog Box Properties - Dimension to check or change the dimension of a selected element.

Dialog box options:

Dimension

        X

Here you can enter the X-dimension of the selected element.

        Y

Here you can enter the Y-dimension of the selected element.

        Z

Here you can enter the Z-dimension of the selected element.

Coordinate system

Here you can select a coordinate system for the dimension of the selected element.

Increment

Enter the value of the increment for the change of the dimension using spin controls.

Scale

        Height

Here you can change the height of the selected element using the spin controls.

        Length

Here you can change the length of the selected element using the spin controls.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 145 of 562

        Depth

Here you can change the depth of the selected element using the spin controls.

Coordinate system

Here you can select a coordinate system for the scale of the selected element.

Increment

Enter the value of the increment for the change of the scale.

The Dialog Box Properties - Dimension can be displayed with the context menu command Properties by clicking the right mouse
button on an element or with the menu command Properties of the menu Edit while having an element selected and selecting the
property sheet Dimension.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Section
Use the Dialog Box Properties for section to check or change the options of a section.

Dialog box options:

Name

Enter the text for the name of the section.

Parameters

The list displays additional parameters for the selected section.

Material: check or change the material of the selected section.

Change

Changes the parameters using combo boxes.

The Dialog Box Properties for section can be displayed with the context menu command Properties by clicking the right mouse
button on a section or with the menu command Properties of the menu Edit while having a section selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Kinematics
Use the Dialog Box Properties - Kinematics to check or change the kinematics of a selected element.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 146 of 562

Dialog box options:

Kinematics

The list displays the parameters of the selected kinematics. You can select kinematics with 4, 5 or 6 axis or select an unknown
kinematics.

The following parameters may be changed separately for each axis:

        X-axis angle

        The range for the angle is from 0° to 180°.

        Length of normal

        Possible values: 0 - 100000

        Distance to origin

        Possible values: 0 - 100000

        Z-axis angle

        Value range: 0° - 180°.

The Dialog Box Properties - Kinematics can be displayed with the context menu command Properties by clicking the right mouse
button on an element or with the menu command Properties of the menu Edit while having an element selected and selecting the
property sheet Kinematics.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Gripper
Use the Dialog Box Properties for gripper to check or change the properties of a selected gripper.

Dialog box options:

Name

Enter the name for the selected gripper.

Gripper mode

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 147 of 562

Two gripper modes are possible:

With gripper-offset

When selected, a gripped grip point and the orientation of the selected element will be transferred according to the gripper point.

Without gripper-offset

No re-orientation of the selected element.

Inititalisation

The initialisation determines the default setting for a grip point.

Grips grip point

The list displays all grip points that can be connected to the selected gripper point. This option may be used to connect a robot to
its gripper.

Beneath you find a button. When clicked, the grip point will be selected and the dialog box Grip Point Properties will be displayed.

The Dialog Box Properties for gripper can be displayed with the context menu command Properties by clicking the right mouse
button on a gripper or with the menu command Properties of the menu Edit while having a gripper selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Grip point
Use the Dialog Box Properties for grip point to check or change the properties of a selected grip point.

Dialog box options:

Name

Enter the name for the selected grip point.

Parameter

The following parameters may be determined for grip points:

Grip point type

Two selections are possible:


        Restricted grip point
        Normal grip point

Grip range

The grip range determines the distance to the origin, where the grip point is active (can be gripped).

Initialisation

The initialisation determines the default settings for the selected grip point.
Gripped by

The list displays all gripper points that can be connected to the selected grip point.
This option may be used to connect a gripper to its robot. With gripper-offset activated in the dialog box Gripper Properties, the
grip point´s element moves to the selected gripper point.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 148 of 562

Beneath you find a button. When clicked, the gripper point will be selected and the dialog box Gripper Properties will be displayed.

The Dialog Box Properties for grip point can be displayed with the context menu command Properties by clicking the right mouse
button on a grip point or with the menu command Properties of the menu Edit while having a grip point selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Hulls
Use the Dialog Box Properties for hull to check or change the options of a hull.

Dialog box options:

Hull type

Choose  the type for the selected hull.

Parameters

The list displays additional parameters for the selected hull.

Material: check or change the material of the selected hull.

Change

Changes the parameters using combo boxes.

The Dialog Box Properties for hull can be displayed with the context menu command Properties by clicking the right mouse button
on a hull or with the menu command Properties of the menu Edit while having a hull selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Visualization
Use the Dialog Box Properties - Visualization to check or change the dimension of a selected element.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 149 of 562

Dialog box options:

Fill

        Color

To click on the color brings up the Color Dialog Box which is used to select the fill color of the selected element.

Line

        Color

To click on the color brings up the Color Dialog Box which is used to select the line color of the selected element.

Display mode

        Fill surface

Click here to display the element with filled surfaces.

        Wireframe

Click here to display the element as a wireframe.

        Invisible

Click here to display the element invisible.

The Dialog Box Properties - Visualization can be displayed with the context menu command Properties by clicking the right mouse
button on an element or with the menu command Properties of the menu Edit while having an element selected and selecting the
property sheet Visualization.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Dialog box Color

Use the Dialog Box - Color to select a color using a standard color palette or choose a specific one.

Dialog box options:

More Colors

Choose More Colors to choose a specific color.

©·2000·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 150 of 562

COSIMIR® · Element Properties


 
Extended
Use the Dialog Box Properties - Extended to check or change the extended properties of a selected element.

Dialog box options:

Extended Properties

Property

Display of the extended property.

Value

Value for the extended property.

New

Creates a new extended property.

Edit

Changes an existing extended property.

Delete

Deletes the selected extended property.

The Dialog Box Properties - Extended can be displayed with the context menu command Properties by clicking the right mouse
button on an element or with the menu command Properties of the menu Edit while having an element selected and selecting the
property sheet Extended.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Extended Property

Use the Dialog Box Properties - Extended - Extended Property to check or change the extended properties of a selected element.

Dialog box options:

Property

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 151 of 562

Name of the extended property


these properties are possible (e.g.):

        InitialPosition

This value determines the axis angle, when the workcell is loaded. (The value has to be entered in arc measure).

        SFGenerateNormals

To display elements, that only consist of surfaces (e.g polyhedrons) in convinient shade, COSIMIR supports the generation
of normals. For elements and surfaces, where generation of normals is unwanted, this effect can be turned off with the
value FALSE.

Value

Value for the extended property.

OK
Closes the dialog box and changes the properties of the selected element.

Cancel

Closes the dialog box without changing the properties of the selected element.

The Dialog Box Properties - Extended - Extended Property can be displayed with the context menu command New by clicking the
right mouse button in the extended properties´ list or by pressing the button New.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Material
Use the Dialog Box Properties for material to check or change the materials of a selected element.

Dialog box options:

Name

Name of the material.

Parameters

This list allows you to change the optical properties of a selected material. When an option is selected, changes may be done by
using the corresponding edit field below this list.

        Refraction index

The refraction index of the material may be changed from 0-100.

        Reflection

The reflection of the material may be changed from 0-100.

        Permeability

Here you can change the permeability of the material in percent. With 0%, the elements appear like normal solids, with
100%, they appear invisible. This option affects the permeability only for materials without textures. For glass, good
values are between 50% and 70%.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 152 of 562

        Reflection and Emission

The following options are mainly for color definition. With the use of textures for the material, the settings only effect
the visualization, when Texture Mode Modulation is selected, using the menu command Extras / Settings / Texture
Mapping.

        Ambient Reflection

The ambient part of the light effects the elements from all directions - independent from the light source. Here you can
change the color value of the reflected ambient light.

        Diffuse Reflection

Diffuse light is emitted by light sources and affects the shading of elements. The color value for diffuse reflection
determines the reflected spectrum.

        Emission

This color value determines the emitted color of the material. It is independent from light sources and ambient light. You
can change this value to emphasize elements. The color only affects the material itself. It is not possible to generate
another light source with this option.

        Specular Reflection

The specular reflection determines the mirrored part of the light and therefore varies from the observer´s viewpoint.
Color determines the reflected spectrum, Shininess determines the dimension of the light source. The higher the value,
the narrower the light source appears (spot effect). Possible values are within a range of 0-128. Typical values for
realistic lamps are e.g. 50.

The Dialog Box Properties for material can be displayed with the context menu command Properties by clicking the right mouse
button on a material or with the menu command Properties of the menu Edit while having a material selected.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
Texture

Use the Dialog Box Properties for material - texture to check or change the texture of a selected material.

Dialog box options:

Name

Filename of the texture to be loaded (incl. extension).

Available Textures

The list displays the names of textures in the present directory. Double-click on an name to transfer it to the edit control Name.

Preview

Mark this control to display the selected texture in the window above.

The Dialog Box Properties for material -texture can be displayed with the context menu command Properties by clicking the right
mouse button on a material or with the menu command Properties of the menu Edit while having a material selected and selecting
the property sheet Texture.

©·2000·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 153 of 562

COSIMIR® · Element Properties


 
Operating Resource Label
Use the Dialog Box ORL for object to determine the operating resource label of an object that has been configured as an operating
resource.

Dialog box options:

Name

Enter the operating resource label of the object.

Parameter

The list displays additional parameters for the selected operating resource.

Actuators: Check or change operating resource labels of the object's actuators.


Comment: Comment for this actuator.
Activating
Configure the time period for activating the action executed by the actuator.
duration:
Signals: Check or change operating resource labels of the object's signals.
Comment: Comment for this signal.

Change

Changes the operating resource label or the comment.

The Dialog Box ORL for object can be displayed with the context menu command Properties by clicking the right mouse button on
an object or with the menu command Properties of the menu Edit while having an object selected. First, the object has to be
configured as an operating resource.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Element Properties


 
OPC
Use the Dialog Box OPC for object to assign OPC-items to all activated inputs and outputs of an object that is controlled by an OPC-
server.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 154 of 562

Dialog box options:

OPC-items

This list shows all activated inputs and outputs of the object and their assigned OPC-items.

If the object contains a kinematic description another item can be assigned. If the connected controller supports an item with an
output field the offset address can be configured.

Change OPC-item

Enter the name of the OPC-item to assign to the selected input, output, or kinematic. Eventually, change the offset address of the
output field.

The Dialog Box OPC for object can be displayed with the context menu command Properties by clicking the right mouse button on
an object or with the menu command Properties of the menu Edit while having an object selected. First, the object has to be
configured as an operating resource.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 

Graphical Modelling
Use the Edit Mode of COSIMIR® for graphical modelling using the mouse.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Edit Mode
Use the Edit Mode of COSIMIR® to execute various functions of modelling in the windows using the mouse. Use the Command Edit
Mode to switch the Edit Mode on and off.

Use the context menu of the workcell window to change the selection level in edit mode. Depending on the activated selection level
appropriate elements are selected by clicking with the mouse.

Note: The interactive view change is not available in edit mode.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Command Edit Mode

Use this command or the symbol in the symbol bar to activate or deactivate the Edit Mode.

Options

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 155 of 562

    Ctrl+E

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Edit Facets
You are able to edit facets graphically. To edit a facet you have to select it exclusively. For this purpose use Point-And-Click in Edit
Mode and activate selection level Facet.

Add a new vertex

To add a new vertex to a facet at the actual position of the mouse cursor in the workcell window press the ALT-key and
the right mouse button.

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Extrude Solid
Example for creating an extrude solid:

1. Add a face from the model library Miscellaneous Primitives to the workcell.

2. Edit the surface of the face.

3. Select the command Edit/Extrude from the context menu of the surface using the Model Explorer.

4. Enter the length and the number of subdivisions for the extrude solid in the dialog box Edit facet(s).

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Revolve Solid
Example for creating a revolve solid:

1. Add a face from the model library Miscellaneous Primitives to the workcell .

2. Edit the surface of the face.

3. Select the command Edit/Rotate from the context menu of the surface using the Model Explorer.

4.Enter the angle and the number of subdivisions for the revolve solid in the dialog box Edit facet(s).

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 156 of 562

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Settings
The settings for the Graphical Modelling can be configured in the Properties for workcell.

The following settings for the Graphical Modelling can be done:

Display
Grid

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Display Properties

Use the property sheet Display to display and change the properties for the Graphical Modelling of the actual workcell.

Parameter

Elements

The list contains the settings for the display properties.

Change

Changes the settings for the selected property of the display.

See also

Grid

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Grid Properties

Use the property sheet Grid of the properties for workcell to display and change the properties for the grid of the actual workcell.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 157 of 562

Parameters

Grid

The list contains the settings for the grid properties.

Change

Changes the settings for the selected property of the grid.

See also

Display

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Graphical Modelling


 
Dialog box Color

Use the Dialog box Color to select a color using a standard color
palette or choose a specific one.

Dialog box options:

More Colors

Choose More Colors to choose a specific color.

 
©·2000·EFR·IRF·GERMANY

COSIMIR®
Programming
 
©·2000·EFR·IRF·GERMANY

COSIMIR®
Programming Languages

 
©·2000·EFR·IRF·GERMANY

COSIMIR® · Programming Language IRL

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 158 of 562

 
 

Industrial Robot Language - IRL (DIN 66312)


This is preliminary documentation. Some of the Elements, that are not supported by COSIMIR or PCROB (due to
the used IRL compiler) are marked with the symbol preceding this line.

DIN 66312 describes the common construction of a higher programming language for industrial robots (IRL = Industrial
Robot Language). It defines the syntax and the semantics of IRL. IRL allows the user of this standard to program the
movement of the robot and the logical program flow in an user oriented form. An IRL program can be transfered into an
ICR (Intermediate Code for Robots) or IRDATA (DIN 66314) representation by an appropriate compiler.

See also

Programs and Program Parts

Declaration Parts

Procedures

Functions

Predefined Functions

Data Lists

System Specification

System Constants and System Variables

IRL Language Description

Definition Conventions

Symbols and Identifiers

Predefined Identifiers

Standard Data Types

User Defined Data Types

Geometric Data Types

Movement Statements

Program Flow Statements

I/O Statements

Parallel Process Statements


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

IRL Language Description

Lexical Elements

The syntax in this section describes the formation of lexical elements out of characters and the separation of these
elements from each other. Therefore, the syntax is not of the same kind as that used in the rest of this standard.

General Remarks

The lexical elements of an IRL program are:

- Word symbols

- Identifiers

- Predefined Identifiers

- Characterstrings

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 159 of 562

- Numbers

Character Set

The character set is taken from the ISO 646 (7 bits coded character set for information processing interchange) in its
current edition.

Letters

Letter =
"a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" |
"n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" |
"A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" |
"N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
"_".

Outside of strings the case is ignored.

Example:

The identifiers HOME, Home, hOme are equivalent.

Digits

Digit =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".

See also

Symbols and Identifiers


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Definition Conventions

The meta language used to describe the syntax of IRL in this standard is based on the Backus Naur Form (BNF). The
notation was changed and extended to accomplish an easy description and to convert recursive productions into iterative
ones. For the definition of the syntax of the IRL language in this standard, the meta symbols according to the following
are used.

meta symboldescription

=defined as

|alternative

.end of definition

[x]no or one appearance of x

{x}no, one or multiple appearance of x

(x|y)select x or y

"xyz"terminal symbol xyz

Identifiernonterminal symbol

Example:

RealConstant =
DecimalConstant Exponent |
DecimalConstant "." { Digit } [ Exponent ] |
"." DecimalConstant [ Exponent ].

DecimalConstant, Digit and Exponent are nonterminal symbols.

"." is a terminal symbol.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 160 of 562

 
 

Programs and Program Parts


Program =
ProgramHead
SystemSpecification
ProgramDeclarationPart
RoutineList
[ "BEGIN" StatementBlock ]
"ENDPROGRAM" [ ";" ].

ProgramHead =
"PROGRAM" ProgramIdentifier ";" CompilerDirective.

RoutineList =
{
ProcedureDeclaration [ ";" ] |
ExternalProcedureDeclaration ";" |
FunctionDeclaration [ ";" ] |
ExternalFunctionDeclaration ";" |
ProcessDeclaration [";"]
}.

An IRL program consists of a program declaration part and a statement part. The declarations may include initialization
of variable values and declaration of functions and procedures including externals. The values of declared teach /
permanent variables will be taken from the associated data list(s). After starting a program all global initializations are
executed, then the statements in the statement part are executed using the declared functions and procedures.

The program declaration part or the statement part can be empty. The latter is only useful in connection with an Export
Declaration.

Example:

PROGRAM test;

{ procedures "moveto" and "operation" for testing}

PROCEDURE moveto ();

BEGIN

{ procedure statements }

ENDPROC;{ end procedure "moveto" }

PROCEDURE operation ();

BEGIN

{ procedure statements }

ENDPROC;{ end procedure "operation" }

BEGIN

operation();{ test of procedure "operation" }

moveto();{ test procedure "moveto" }

WRITELN('end of test');

ENDPROGRAM;

Programs can refer to a specification part which contains system data.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Import- and Export Declarations

ImportDeclaration =
"FROM" ProgramIdentifier "IMPORT"
( "ALL" | ImportIdList ) ";".

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 161 of 562

ImportIdList =
Identifier { "," Identifier }.

ExportDeclaration =
"EXPORT"
( "ALL" | ExportIdList )
[ "TO" ProgramIdList ] ";".

ExportIdList =
Identifier { "," Identifier }.

ProgramIdList =
ProgramIdentifier { "," ProgramIdentifier }.

Import- and export declarations introduce the objects of a program to/from other programs or program parts. Nested
objects can only be imported or exported entirely.

An import declaration defines the program name from which the objects specified in the name list are taken. If ALL is
specified all objects of that program are imported.

An import declaration or an export declaration is only allowed in the program declaration part of a program.

Example:

PROGRAM discharge;

FROM magazin IMPORT ALL;

{ all objects of program "magazin" can be imported }

FROM parts IMPORT start,partnumber;

{ two objects of "parts" }

FROM seek IMPORT x;

{ write "x" in every statement }

EXPORT f1;

{ "f1" exported }

EXPORT discharge_x TO charge;

{ "discharge_x" exported to "charge"}

VAR { Declarations of program "discharge": }

POSE: f1;

INT: i,discharge_x;

PROCEDURE schedule();

VAR INT: local_x;

BEGIN

local_x := 3;{ assignment to local "x" }

x := 17;{ assignment to "x" in program "seek" }

ENDPROC;

BEGIN

discharge_x := 99;

{ assignment to "x" of program "discharge" }

MOVE PTP mag1;

{ "mag1" of program "magazin" }

x := 0;

{ assignment to "x" in program "seek" }

schedule();

{ overwriting of "x" in program "seek" by "schedule()" }

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 162 of 562

WRITE(x);

ENDPROGRAM.

Modular Programming and Testing

With IRL it is possible to divide programs into program parts which can be coded, compiled and tested separately.
Afterwards it is possible to link the different parts into a complete program.

The same parts may be used in different programs.

Example:

PROGRAM dummy;

FROM test IMPORT operation;

BEGIN

{ ... }

operation();

{ ... }

ENDPROGRAM;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Declaration Parts

INTERRUPT, STANDARD_IN and STANDARD_OUT are currently not supported in COSIMIR and PCROB.

ProgramDeclarationPart =
{
DeclarationPart |
ImportDeclaration |
ExportDeclaration |
DataListSpecification |
RobotSpecification |
"INTERRUPT" { InterruptDeclaration } |
"STANDARD_IN" ":=" Identifier ";" |
"STANDARD_OUT" ":=" Identifier ";"
}.

The program declaration part contains a usual declaration part with global definitions and declarations as well as
program specific declarations, that are not allowed as part of function or procedure declaration.

The declaration part consists of definitions of constants, declarations of types and declaration of variables including
signals and channels. In addition to the program declaration part any function or procedure declaration may contain such
a declaration part for local definitions and declarations.

DeclarationPart =
(
"CONST" { ConstantDefinition } |
"TYPE" { TypeDeclaration } |
"VAR" { VariableDeclaration }
)
{
"CONST" { ConstantDefinition } |
"TYPE" { TypeDeclaration } |
"VAR" { VariableDeclaration }
}.

STANDARD_IN and STANDARD_OUT define the file or channel used by input or output statements as default.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 163 of 562

Constant Definition

Constant Definition

ConstantDefiniton =
TeachConstantDefinition | UsualConstantDefinition.

Usual Constant Definition

The constant definition introduces a constant name which represents a fixed value.

UsualConstantDefinition =
Type ":" ConstantIdList ":=" Expression ";".

ConstantIdList =
ConstantIdentifier { "," ConstantIdentifier }.

Expression and Type must be of same data type.

Example:

REAL : pi := 3.1415926;

Teach Constant Definition

TeachConstantDefinition =
TeachType ":" TeachConstantIdList ";".

TeachConstantIdList =
TeachConstantIdentifier
{ "," TeachConstantIdentifier }.

The values of Teach Constants are taken from a data list file. The constants are set to an "undef"-state unless a data list
file is specified which contains these constants. Any application of an "undef" constant will cause a run time error.

Each Teach Constant is of global scope and there is no local Teach Constant Definition allowed.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Formal Parameters

FormalParameter =
[ "IN" | "OUT" | "INOUT" ] ParameterSpecification
{ ";"
[ "IN" | "OUT" | "INOUT" ] ParameterSpecification
}.

ParameterSpecification =
ParameterType ":" ParameterIdList |
ConformantScheme ":" Identifier.

ParameterType =
Type |
TeachType |
SignalType |
SemaphoreType .

ParameterIdList =
Identifier { "," Identifier }.

ConformantScheme =
"ARRAY" "[" IndexTypeSpecList "]" "OF" Type.

IndexTypeSpecList =
IndexTypeSpecification { "," IndexTypeSpecification }.

IndexTypeSpecification =
TypeIdentifier ":"
ConformantParameter ".." ConformantParameter.

ConformantParameter = Identifier.

If the class of the parameter specified by IN, OUT, INOUT is missing this parameter is an INOUT parameter.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 164 of 562

Three mechanisms for passing parameters are possible:

'call by reference': Pointers to the parameters are passed.

Every change of the value within the called procedure or function causes a change of the variable of the calling program.
This passing mechanism is used for output parameters (OUT) and in/output parameters (INOUT).

The numbers of actual and formal parameters have to be identical and the data types have to be parameter compatible.
Passing of arrays see below.

Note:

An output parameter (OUT) is not readable.

'call by value': The values of the parameters are passed.

A change of the value of a parameter in the called procedure or function has no effect on the value of the parameter in
the calling program. Results cannot be returned by this method. This passing mechanism is for input parameters (IN).

The numbers of actual and formal parameters have to be identical and the data types have to be assignment compatible.

'conformant scheme': The purpose of the (formal) conformant parameters is to provide a possibility of working with
array parameters of unknown size but known type. During the execution of the procedure or function, the statements of
the first and second conformant scheme parameters represent the lower and upper limit value of the corresponding
actual parameter.

Index type specification must be INT or CHAR.

Note:

Array parameters can also be declared using array data type instead of a conformant scheme for instance, e.g.:

PROCEDURE test(INOUT array_type1: test_array);

parameter compatibility:

The data types of the corresponding actual and formal parameter are parameter compatible:

-if both types are simple or standard types and if they have the same name of data type.

-if both types are ARRAY types and if they are either of the same type or in the case of a formal conformant scheme if
the numbers of dimensions are identical and the types of the elements are assignment compatible for input parameters
(call by value) and parameter compatible for in/output and output parameters (call by reference). And if the indices are
assignment compatible in any case.

-if both types are LIST types and if there elements are paramater compatible.

-if both types are RECORD types, if all components of the records are parameter compatible two by two.

Exception: The predefined data types POSITION and ORIENTATION are not parameter compatible.

-if both types are FILE types and if the types of elements are parameter compatible.

-if both types are TEACH types and if the proper types of these teach types are parameter compatible.

-if both types are INPUT types and if the types of these signal types are parameter compatible.

-if both types are OUTPUT types and if the types of these signal types are parameter compatible.

Example:

PROGRAM test;

TYPE

ARRAY [4..20] OF REAL = array_type1;

ARRAY [1..10] OF REAL = array_type2;

VAR

array_type1: f1;

array_type2: f2;

PROCEDURE init (INOUT ARRAY [INT: lowindex..highindex] OF REAL: proc_array);

VAR INT: i;

BEGIN

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 165 of 562

FOR i:=lowindex TO highindex

proc_array [i] := 10.0;

ENDFOR;

ENDPROC;

BEGIN

init (f1);

init (f2);

ENDPROGRAM {test};
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Constants

RSXYZYXZ

ZYZ2ZYXVANG

QUAT

Integer Constants

IntegerConstant =
DecimalConstant |
BinaryConstant |
OctalConstant |
HexadecimalConstant.

DecimalConstant:

A decimal constant consists of a sequence of digits. It is of type "INT" (Integer) and interpreted as decimal.

DecimalConstant =
Digit { Digit }.

A decimal constant is unsigned and it is positive. Negative constants are built with Expression.

The maximum number of digits is limited by the range of the integer data type.

Note:

The number of digits depends on the implementation; for constant computation the compiler shall use always at least 32
bit.

BinaryConstant:

The following notation stands for the constant which is interpreted to base 2:

BinaryConstant =
"2#" ( "0" | "1" | "_" )
{ "0" | "1" | "_" }.

The symbol "2#" can be followed by the digits 0 or 1 or by underlines. The maximum number of digits is limited by the
range of the integer data type. The last digit is the least significant one.

OctalConstant:

The following definition stands for the constant which is interpreted to base 8:

OctalConstant =
"8#" ( "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "_" )
{ "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "_" }.

The symbol "8#" can be followed by the digits 0 to 7 or by underlines. The maximum number of digits is limited by the
range of the integer data type. The last digit is the least significant one.

HexadecimalConstant:

Constants can also be hexadecimal which means that they are interpreted to base 16. The letters A to F correspond to

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 166 of 562

the decimal values 10 to 15.

HexadecimalConstant =
"16#" ( Digit | "A" | "B" | "C" | "D" | "E" | "F" | "_" )
{ Digit | "A" | "B" | "C" | "D" | "E" | "F" | "_" }.

The symbol "16#" may be followed by hexadecimal characters or by underlines. The maximum number of the hexadecimal
characters is limited by the range of the integer data type. The character which is positioned on the farest right side has
the least significance.

Note:

The character '_' in non decimal integer constants serves only to format the constant for human convenience.

Real Constants

RealConstant =
DecimalConstant Exponent |
DecimalConstant "." { Digit } [ Exponent ] |
"." DecimalConstant [ Exponent ].

Exponent =
( "E" | "e" ) ["+" | "-"] DecimalConstant.

A real constant is unsigned and it is positive. Negative constants are built with Expression.

Example:

5.

100.07

.3

23.4E5

10.2E-3

Characters and Strings

CharacterString =
"'" { Any-Character-Except-"'" | "''" } "'".

All characters of the character set are permitted.

A CharacterString which consists of one character only is of type CHAR and is called a character constant.

A CharacterString with more than one character is of type STRING and is called a string constant. The maximum length of
a string constant should be restricted to 255.

Note:

To include a quote mark (character ') in a CharacterString, it has to be written twice.

Example:

'alarm'

'abc''def'

Record Constants

CallOrRecord =
Object "(" [ ValueList ] ")".

ValueList =
Expression { "," Expression }.

Every Expression in ValueList represents the value of a record component. The number and the sequence of components
is fixed by the type declaration.

Object describes the type of the record constant. This information is optional.

Example:

POSITION( 17.2, -20.4, 33.4 )

In the case of nested records the component value is again a record constant.

Example :

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 167 of 562

JOINT (MAIN_JOINT( 10.2, -220.4, 135.5, -90.0, 0.0, 90.0 ),

ADD_JOINT( -90.0 ) )

Boolean Constants

BooleanConstant = "TRUE" | "FALSE".

Boolean constants can only be true (<>0) or false (0). They are represented by the word symbols TRUE or FALSE,
respectively.

Range of Value

The minimum range of the integer data type is:

-2147483647 to +2147483647 (32 bits)

The minimum range of the real data type is (32 bits):

-1.7 E38 to -1.7 E-38

1.7 E-38 to 1.7 E38

and 'TrueZero'

The accuracy is not fixed.

Note:

For calculation of constant expressions the compiler always works with a precision of 32 bits.

The range of the boolean data type is true (<>0) and false (0).

These values represent a minimum demand for an IRL implementation.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Procedures

IRL Procedures

A procedure call is a statement. Therefore a given ReturnStatement does not have a value.

ProcedureDeclaration =
"PROCEDURE" ProcedureIdentifier
"(" [ FormalParameter ] ")" ";"
[ DeclarationPart ] "BEGIN" StatementBlock "ENDPROC".

External Procedures

External procedures are currently not supported in COSIMIR and PCROB. Similar functionality can be achieved
using inline IRDATA code in IRL procedures.

Unlike IRL procedures the body of external procedures is not defined within the IRL program but, for example, in the
robot control system. The ExternalProcedureDeclaration offers the possibility to extend the scope of IRL in accordance
with the features of the robot control system or additional equipment in use. An ExternalProcedureDeclaration is allowed
in the SystemSpecification only.

ExternalProcedureDeclaration =
"EXTERNALPROCEDURE" ProcedureIdentifier
"(" [ FormalParameter ] ")".

Such external procedures may be used for instance to process specific sensor data.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Functions

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 168 of 562

IRL Functions

Unlike procedures, functions return a value and can therefore be used in expressions like variables.

FunctionDeclaration =
"FUNCTION" FunctionIdentifier
"(" [ FormalParameter ] ")" ":" PredefinedType ";"
[ DeclarationPart ] "BEGIN" StatementBlock "ENDFCT".

The data type of the function value is defined with the Type. Function values must have a predefined but not robot
specification type.

A function is left by the return statement. The value of the expression in this statement is passed to the calling program
as the result value.

Example: (signum function)

FUNCTION sign (IN REAL: x ): INT;

{declaration part}

BEGIN

{statements}

IF x>0.0 THEN

RETURN 1;

ENDIF;

IF x<0.0 THEN

RETURN -1;

ENDIF;

RETURN 0;

ENDFCT;

External Functions

External functions are currently not supported in COSIMIR and PCROB. Similar functionality can be achieved
using inline IRDATA code in IRL functions.

The ExternalFunctionDeclaration corresponds with the ExternalProcedureDeclaration. An ExternalFunctionDeclaration is


allowed in the SystemSpecification only.

ExternalFunctionDeclaration =
"EXTERNALFUNCTION" FunctionIdentifier
"(" [ FormalParameter ] ")" ":" PredefinedType.

Such external functions may be used for instance to process specific sensor data.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Predefined Functions

ABS ACOSANGLEX

ANGLEYANGLEZANGLEZ2

APPENDCASINATAN2

CHRCOMPARECONCATS

COSCROSSDELETEC

DOTEOFEOL

EXTRACTSFLOATGETCHR

INVLENGTHLOCATE

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 169 of 562

ORDORIQUATORIRS

ORIVANGORIXYZORIYXZ

ORIZYXORIZYZ2QUATA

QUATBQUATCQUATD

ROTANGLEROTAXISROUND

SETCHRSINSIZE

SQRTTANTRAFO

TRAFOINVTRUNC

©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Parallel Processes

IRL allows the definition and use of processes that are executed in parallel with other processes defined within the
program. This for example enables the programmer to write a main program moving the robot and a second process,
simultaneously reading data from an intelligent sensor and changing the path of the robot depending on this data. In
addition to these parallel processes, defined, started and stopped within an IRL-program the controller may allow the
execution of several programs or tasks on a higher level. Those programs can probably be started or stopped
independently by the user. How the controller handles the execution and control of these programs is not part of this
standard. IRL does not provide elements to allow access for one program to variables of another independent program
and vice versa. IRL does offer functions to handle the communication of and to share variables between processes started
within an IRL program. Thus, dependent processes or processes which have to share data must be defined and
started/stopped within one IRL program. To keep the complexity of the language as low as possible the instruction set for
parallel processing is quite small. Nevertheless it offers all necessary features to make use of parallel processing in robot
applications.

One problem to be solved in connection with parallel processes is the access to shared variables. The parallel writing or
reading of shared variables (variables that can be accessed by several parallel processes) has to be prevented. Therefore
parallel processes in IRL can only access variables explicitly defined as SHARED. The access has to be announced to the
control by the LOCK and UNLOCK statements. When a process has locked a shared variable (that means it has gained
access to this variable) no other process can read or write this variable until the process has unlocked the variable again.
The other processes trying to get access to this variable (by a LOCK statement) are stopped until the variable is unlocked.
If more than one process wants to read or write a shared variable the processes are served in the order they claimed the
access.

In contrary to just using semaphores for the protection of variables against multiple access this method is safer, because
it forces the user to claim access to shared variables. So multiple access to the same variable is not possible as it would
produce a runtime error. Additionally no special semaphore variables have to be defined by the user.

Another problem concerning parallel processes is their synchronization. For this purpose Semaphores are used in IRL.

Definition of parallel processes

ProcessDeclaration =
"PROCESS" ProcessIdentifier
"(" [ FormalParameter ] ")" [ IntegerConstant ] ";"
DeclarationPart "BEGIN" StatementBlock "ENDPROCESS".

A parallel process is defined like a procedure. The only difference is that the keyword PROCEDURE is substituted by the
keyword PROCESS and only formal parameters of class "IN" are allowed. Additionally an optional parameter can be
specified. This optional parameter must be an IntegerConstant between 0 and 255. It defines the priority of the process,
from lowest priority (0) to highest priority (255). This priority of processes cannot be compared to the priority of
interrupts. How the control handles processes with different priorities has to be defined in its users manual. Processes
are terminated by executing a ReturnStatement or by reaching the ENDPROCESS keyword at the end of the process
declaration.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Data Lists

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 170 of 562

The IRL data lists are synonymous for the COSIMIR position lists. All COSIMIR positions lists can directly be used
as IRL data lists. The following table lists the correspondence between the position list entry types and the IRL data
types.

Position typeIRL data type

World Coordinates+ConfigurationROBTARGET

World CoordinatesPOSE

MRL 5-axis coordinates

Joint CoordinatesMAIN_JOINT

Add. AxisADD_JOINT

BooleanBOOL

IntegerINT

RealREAL

Position without OrientationPOSITION

TextSTRING

Data lists are files which contain names and values of PERMANENT and TEACH data objects. All predefined data types
including those which are declared by the System Specification file and arrays or lists of these types are applicable. They
are administrated by the robot controller and are independent of IRL programs or IRL program execution. There is only
one instance of such a variable, i. e. the alteration of a PERMANENT (or TEACH) variable by a program will persist after
program termination.

Every program is associated with its default data list (which owns the name of the program). In case of "DECLOFF" the
IMPORT DATALIST statement is optional for this data list. Any number of additional data lists may be used one after
another.

The identification between the IRL data objects and the data list elements is done by their names. The IMPORT DATALIST
statement associates the given data list to the program and all following PERMANENT (or TEACH) declarations cause an
initialization trial from that data list until a new IMPORT DATALIST statement is encountered. lf no IMPORT DATALIST
statement is given, the default data list is used. If the name of a PERMANENT (or TEACH) data object is not found in the
actual data list it is added there and set to an "undef"-state. lf the types of the data objects within the data list and
within the program are not identical they are checked as follows:

- TEACH constants:The data list object should be assignment compatible to the constant.

- TEACH variables:They should be assignment compatible in both directions.

If the result is positive the initialization is done and a warning is given to the user indicating the type conversion
performed. If the result is negative no initialization is done and a runtime error occurs.

The DataList Specification which is not allowed within the declaration part of a procedure or function is as follows:

DataListSpecification =
"IMPORT" "DATALIST" Expression ";".

The Expression describes path and filename. Therefore expression has to be of type ARRAY OF CHAR or STRING.

Note:

It is recommended that the compiler may be told e.g. by a switch to extract all TEACH or PERMANENT objects declared
within a program to a new or existing data list file. Tools should be available to fill, extract, change and update data lists
by means of Teach-In methods, editing or printing. Crossreferences between program(s) and data list(s) should also be
possible. A time stamp with at least the creation date and the date of last modification may also be useful for every item
within a data list.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

System Specification

When compiling and linking programs in COSIMIR use of predefined system specifications is recommended.
These predefined system specifications are installed as SYSTEM.IRL and SYSTEM.ROB (compiled format) in the
subdirectories IRL4AXIS, IRL5AXIS and IRL6AXIS of the COSIMIR installation directory. These system spefications are
used for robots with 4, 5, or 6 axes (joints) if the option "Use Joint Count for Include Path" in the dialog box

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 171 of 562

"Compiler Settings" is checked.

To use a system specification of your own (required for robots with additional axes), uncheck this option, make a
copy of an appropriate system specification (SYSTEM.IRL) into the current directory and modify it. Then compile it
(Command "Execute/Compile") to SYSTEM.ROB. Afterwards your IRL programs in the current directory will use this
new system specification.

The system specification used in COSIMIR has some extensions to the standardized system specification.
Furthermore it is used to implement several of the predefined functions.

The System Specification is stored by the producer of the robot controller in a special file. The file contains system data,
for example the declaration of data types for the robot configuration. This way it is possible to adapt IRL for different
applications and systems.

A default System Specification exists which contains a minimum of data types.

SystemSpecification=
[ "SYSTEM_SPECIFICATION" Expression ";" ].

The Expression describes path and filename. Therefore expression has to be of type ARRAY OF CHAR or STRING.

The System Specification file has to contain the following declarations:

CONST

INT: R_NTURNS := 2;
{ maximum number of joints in a cell which can rotate more than 360 degrees }

INT: R_NADDJ := 1;
{ maximum number of additional joints in a cell; see type ADD_JOINT }

INT: R_NJ := 7;
{number of joints; must correspond with type JOINT}

{ The different ways to define Orientations }

STRING : RS := 'RS';

STRING : XYZ := 'XYZ';

STRING : YXZ := 'YXZ';

STRING : ZYX := 'ZYX';

STRING : ZYZ2 := 'ZYZ2';

STRING : VANG := 'VANG';

STRING : QUAT := 'QUAT';

{ Total number of devices }

INT :R_DEVICE_NUMBER := 4;

{ The next 5 definitions are used for D_AXES_TYPE in D_SPEC_TYPE }

INT :AX_NONE := -1; { No device }

INT :AX_MAIN := 0; { Main axes (robot) }

INT :ADAX_IS := 1; { Additional axes starting the kinematical chain; e.g. a rail }

INT :ADAX_IE := 2; { Additional axes ending the kinematical chain }

INT :ADAX_EX := 3; { External additional axes; e.g. a positioner }

{ The following 4 values are returned by GETSTATUS(...) }

INT :R_PROCESS_READY := 0;

INT :R_PROCESS_RUNNING := 1;

INT :R_PROCESS_STOPPED := 2;

INT :R_PROCESS_BLOCKED := 3;

TYPE

RECORD REAL: lower, upper; ENDRECORD = BOUNDS;

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 172 of 562

RECORD

REAL: A1, A2, A3, A4, A5, A6;


{the number of joints can be six or smaller}

ENDRECORD = MAIN_JOINT;

RECORD

REAL: AA1;

ENDRECORD = ADD_JOINT;

RECORD

MAIN_JOINT: M_JOINT;

ADD_JOINT: A_JOINT;{name and type compatibility with ROBTARGET}

ENDRECORD = JOINT;

RECORD

POSE: PSE;

INT: STATUS;

ARRAY[1..R_NTURNS] OF INT: TURNS;

ADD_JOINT: A_JOINT;

ENDRECORD = ROBTARGET;{ ROBTARGET has to be defined suitable for all robots in a common cell; the exact semantic of
the structure ROBTARGET has to be explained in comment }

RECORD

INT :D_NO; { Unique identification number of this device; must be >= 0 }

INT :D_AXES_TYPE; { Type of additional axes: AX_MAIN, ADAX_IS, ADAX_IE, ADAX_EX; for information only }

INT :D_PRED_DEVICE; { Identification number of the preceeding device in the kinematical chain; -1 if there is no
predecessor }

INT :D_NJ; { Number of joints of this device }

ENDRECORD = D_SPEC_TYPE;

RECORD

REAL:R_ACC;

ARRAY[1..R_NJ] OF REAL:R_ACC_PTP;

REAL:R_C_PTP;

REAL:R_C_CP;

REAL:R_C_SPEED;

ARRAY[1..R_DEVICE_NUMBER] OF INT : R_DEVICES;

JOINT:R_JOINT_ACT;

ROBTARGET:R_ROBTARGET_ACT;

ROBTARGET:R_ROBTARGET_START;

ROBTARGET:R_ROBTARGET_END;

ROBTARGET:R_ROBTARGET_INTER;

REAL:R_SPEED_ACT;

REAL:R_SPEED;

ARRAY[1..R_NJ] OF REAL:R_SPEED_PTP;

REAL:R_SPEED_ORI;

POSE:R_BASE;

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 173 of 562

POSE:R_TOOL;

ENDRECORD = R_SPEC_TYPE;

ROBOT ROBOT_AND_POSITIONER :=

{ robot 1 used together with the 2 axis external positioner }

R_SPEC_TYPE(50.0, [50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0],


50.0, 200.0, 50.0,

[ 1 {robot 1}, 3 {2 axis positioner},

AX_NONE, AX_NONE {just to fill up} ],

JOINT(250.0, 350.0, 250.0, 150.0, 0.0, 250.0, 0.0),

ROBTARGET(

POSE(POSITION(100.0,1000.0,0.0),ORIRS(90.0,0.0,90.0)),

0,[0,0],0.0),

ROBTARGET(

POSE(POSITION(100.0,1000.0,0.0),ORIRS(90.0,0.0,90.0)),

0,[0,0],0.0),

ROBTARGET(

POSE(POSITION(100.0,1000.0,0.0),ORIRS(90.0,0.0,90.0)),

0,[0,0],0.0),

ROBTARGET(

POSE(POSITION(100.0,1000.0,0.0),ORIRS(90.0,0.0,90.0)),

0,[0,0],0.0),

0.0, 50.0, [100.0, 100.0, 100.0, 50.0, 50.0, 50.0, 100.0], 50.0,

POSE(POSITION(0.0,0.0,0.0),ORIRS(0.0,0.0,0.0))

POSE(POSITION(0.0,0.0,-100.0),ORIRS(90.0,0.0,0.0)));

ROBOT ROBOT_2 := { robot 2 used without any additional axes }

R_SPEC_TYPE( 50.0,
[100.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0],
50.0, 250.0, 50.0,

[ 2 {robot 2}, AX_NONE, AX_NONE,

AX_NONE {just to fill up} ],

(150.0, 250.0, 350.0, 150.0, 250.0, 0.0, 180.0 ),

(((200.0,200.0,10.0),ORIXYZ(90.0,0.0,90.0)),

0,[0,1],180.0),

(((200.0,200.0,10.0),ORIXYZ(90.0,0.0,90.0)),

0,[0,1],180.0),

(((200.0,200.0,10.0),ORIXYZ(90.0,0.0,90.0)),

0,[0,1],180.0),

(((200.0,200.0,10.0),ORIXYZ(90.0,0.0,90.0)),

0,[0,1],180.0),

0.0, 50.0, [100.0, 100.0, 100.0, 50.0, 50.0, 100.0, 100.0], 50.0,

((0.0,0.0,0.0),ORIRS(0.0,0.0,0.0) )

((0.0,0.0,-200.0),ORIRS(0.0,0.0,90.0) ) );

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 174 of 562

VAR

ARRAY[1..R_NJ] of CHAR: R_JT;{types of joint}

ARRAY[1..R_NJ] OF BOUNDS: R_JBD;{limits of joints}

STRING: R_DEF_ORI := XYZ;


{ RS | XYZ | YXZ | ZYZ2 | ZYX | VANG | QUAT }

ARRAY[1..R_DEVICE_NUMBER] OF D_SPEC_TYPE :

D_DEVICES :=

[ (1, AX_MAIN, -1, 6), { 6 axis robot 1 }

(2, AX_MAIN, -1, 6), { 6 axis robot 2}

(3, ADAX_EX, -1, 2), { a 2 axis positioner }

(4, ADAX_EX, -1, 3) { a 3 axis positioner }

]; { all devices }
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

System Constants and System Variables

Predefined constants and variables do not have to be declared by the user and they are to be used just as normal
constants or variables, respectively.

The CSR name is the name of the variable or component with the same meaning in MMS Companion Standard for Robots
(ISO 9506-3).

The names of the predefined constants, variables and components always start with "R_".

See also

Predefined Variables

Predefined System Constants


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Comments

Comment =
"{" { CommentCharStream | Comment } "}"

CommentCharStream =
{ Any-Character-Exept-"{"-or-"}" }.

Accepted are all characters of the character set (incl. end-of-line), except of the opening and closing curly bracket.
Comments may be nested.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Symbols and Identifiers

Word Symbols

Word symbols are reserved which means they are not allowed to be identical with identifiers.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 175 of 562

ACCACC_PTPACT_ROB

ADAX_CONTROLALLAND

ARRAYATBRAKE

BEGINCANCELCASE

C_PASSCIRCLECLOSE

CONSTCONTINUEC_CP

C_PTPC_SPEEDDATALIST

DECLDECLOFFDECLON

DECLSYSDEFAULTDELAY

DEVICEDISABLEDIV

DODURATIONELSE

ENABLEENDCASEENDERROR

ENDFCTENDFORENDIF

ENDPROCENDPROCESSENDPROGRAM

ENDRECORDENDWHILEERROR

EXOREXPORTEXTERNALFUNCTION

EXTERNALPROCEDUREFALSEFAST

FILEFORFROM

FUNCTIONGETSTATUSGOTO

HALTHIGHIF

IMPORTININOUT

INPUTINTERRUPTINTO

LINLISTLISTADD

LISTDELLISTINDEXLISTINS

LISTLENGTHLOCKLOW

MODMOVEMOVE_INC

NOTOFOFF

ONOPENOR

OUTOUTPUTPATH

PAUSEPERMANENTPROCEDURE

PROCESSPROGRAMPTP

PULSEREADREADLN

READRACRECORDREPEAT

RESUMERETURNROBOT

SECSEMAPHORESEMA_SIGNAL

SEMA_WAITSHAREDSPEED

SPEED_ORISPEED_PTPSTANDARD_IN

STANDARD_OUTSTARTSTEP

STOPSYNACTSYSTEM_SPECIFICATION

TEACHTHENTIME

TIMEOUTTOTRUE

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 176 of 562

TYPEUNLOCKUNTIL

VARWAITWHEN

WHILEWOBBLEWRITE

WRITELNWRITERAC
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Symbols and Identifiers

Identifiers are allowed to be of any length. All characters of one identifier are significant. All identifiers have to be
different from word symbols.

Identifier =
Letter { Letter | Digit }.

For a better readability the following identifiers are distinguished in this standard:

ProgramIdentifier =Identifier.

TeachConstantIdentifier =Identifier.

ConstantIdentifier =Identifier.

StructuredTypeIdentifier =Identifier.

SimpleTypeIdentifier =Identifier.

StandardTypeIdentifier =Identifier.

SystemTypeIdentifier =Identifier.

TeachTypeIdentifier =Identifier.

SignalTypeIdentifier =Identifier.

VariableIdentifier =Identifier.

SignalIdentifier =Identifier.

ProcedureIdentifier =Identifier.

FunctionIdentifier =Identifier.

TypeIdentifier =Identifier.

LabelIdentifier =Identifier.

ComponentIdentifier =Identifier.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Predefined Identifiers
System Constants and System Variables

Functions

Channels

Constants

Types
©·2000·IRF·EFR·Dortmund

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 177 of 562

COSIMIR® · Programming Language IRL


 
 

Predefined Functions for String Handling

Not all of the string handling functions are currently supported in COSIMIR and PCROB.

IdentifierType of Types ofExplanation

resultparameters

APPENDCSTRINGSTRING, CHAR
Appends the character c to the end of the string s.

COMPAREINTSTRING, STRING
Compares string s1 with string s2. Returns the index of the first character that differs. If the two strings are identical 0 is
returned.

CONCATSSTRINGSTRING, STRING
Appends the characters of the string s2 to the end of the string s1.

DELETECSTRINGSTRING, INT, INT


Deletes the characters from the string s, that are specified by the integer i1 (start index) and the integer i2 (final index).
If the second index is less than the first index nothing will be deleted.

EXTRACTSSTRINGSTRING, INT, INT


Extracts a part of the string s, that is specified by the integer i1 (start index) and the integer i2 (final index). If the
second index is less than the first index an empty string is returned.

GETCHRCHARSTRING, INTGets one character out of the string s indexed by the integer i.

LENGTHINTSTRINGReturns the length of the string s (number of characters).

LOCATEINTSTRING, STRING
Checks if string s2 is a substring of string s1. If it is the first index of s1 where s2 starts is returned. If not 0 is returned.

SETCHRSTRINGSTRING, CHAR, INT


Copies the string s, sets one character of s indexed by the integer i to the value of character c.

SIZEINTSTRINGReturns the maximal size of the string s.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Predefined Variables

Predefined constants and variables do not have to be declared by the user and they are to be used just as normal
constants or variables, respectively.

Variablewrite protection

nametype|meaning

R_ACT_ROBR_SPEC_TYPEnactual robot

R_TARGET_BASEPOSEnactual cell base coordinate system

R_DEF_ORISTRINGndefault orientation mode

Trigger variables used in SynactStatements:

R_MOVE_TIMEREALytime gone from the start of the actual robot movement

R_SCALE_FORWREALyfactor (%) of the movement distance already covered

R_SCALE_BACKREALyfactor (%) of the movement distance still to cover

R_DISTANCE_FORWREALydistance from the start point (only LIN and CIRCLE movements)

R_DISTANCE_BACKREALydistance to the end point (only LIN and CIRCLE movements)

©·2000·IRF·EFR·Dortmund

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 178 of 562

COSIMIR® · Programming Language IRL


 
 

Predefined Constants

The following predefined constants exist. There values have to been defined in the System Specification:

constantpredefined

nametypefixed valuemeaning

R_NTURNSINTnumber of joints that can rotate more then 360 degrees

R_NADDJINTmax. number of additional joints

R_NJINTnumber of joints

RSSTRING'RS'constants specifying different

XYZSTRING'XYZ'descriptions of orientations

YXZSTRING'YXZ'used in system functions to assign

ZYXSTRING'ZYX'orientations, write

ZYZ2STRING'ZYZ2'statements and read

VANGSTRING'VANG'statements

QUATSTRING'QUAT'

NO_ADAX_CONTROLINT0constants specifying the type of coordinated movement, here the default

TCP_KEEPINT1world coordinate TCP position is kept

TCP_KEEP_RELINT2TCP position relative to a device is kept

DEVICE_RELINT3movement execution relative to a device

R_PROCESS_READYINT0constants returned by the system function getstatus, here process ready

R_PROCESS_RUNNINGINT1process running

R_PROCESS_STOPPEDINT2process stopped

R_PROCESS_BLOCKEDINT3process blocked

R_DEVICE_NUMBERINTnumber of devices in the cell

AX_NONEINT-1placeholder for a non device in the


device group specifications

AX_MAININT0constants specifying different


device types, here the main axes
(robot)

ADAX_ISINT1additional axes starting the


kinematical chain, e. g. a rail

ADAX_IEINT2additional axes ending the


kinematical chain

ADAX_EXINT3external additional axes,


e. g. a positioner

For every robot defined by a Robot Specification a predefined record with the name of the robot exists. Every record
consists of the following components. Some of these components are write protected (y) outside the System Specification
and are not allowed to be used on the left side of an user written assignment. The rest of them is not write protected
(n).

componentCSRwrite protection

namenametype|meaning

R_ACCREALnacceleration (path)

R_ACC_PTPARRAY[1..R_NJ]nacceleration factor (axes, %)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 179 of 562

OF REAL

R_C_PTPREALnpath smoothing:
axis distance (factor, %)

R_C_CPREALnpath smoothing:
distance to the intermediate point

R_C_SPEEDREALnpath smoothing:
(% of programmed speed)

R_JOINT_ACTR_AJVJOINTyactual robot position in robot coordinate system

R_ROBTARGET_ACTROBTARGETyactual robot position

R_ROBTARGET_ACT.PSE

R_CTUPPOSEyactual tool point (commanded pose)

R_ROBTARGET_STARTROBTARGETyrobot position at the start of the actual movement statement

R_ROBTARGET_ENDROBTARGETyrobot position to be reached at the end of theactual movement statement

R_ROBTARGET_INTERROBTARGETyrobot position at the last executed interrupt

R_SPEED_ACTREALyactual speed (path)

R_SPEEDR_PSTUREALnspeed (path)

R_SPEED_PTPARRAY[1..R_NJ]nspeed factor (axes, %)

OF REAL

R_SPEED_ORIREALnorientation speed

R_BASER_TUBPOSEnactual robot base coordinate system

R_TOOLR_TTMPOSEnactual tool correction

A commanded pose describes that pose which will be commanded to the transformation algorithm.

Predefined system variables which are not write protected had to be set by a default value inside the System
Specification.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Predefined Functions for Mathematical Operations

Not all of the mathematical functions are currently supported in COSIMIR and PCROB.

IdentifierType of Types ofExplanation

resultparameters

ABSREALREALAbsolut value

INTINT -"-

ACOSREALREALArc cosine, results in the interval [0,180]

ASINREALREALArc sine, results in the interval [-90,90]

ATAN2REALREAL, REALArc tangent 2, results in the interval


(-180,180] are equal to the arc component of the polar coordinates of the Cartesian value pair (x,y)

COSREALREALCosine (unit: degree)

CROSSPOSITIONPOSITION, POSITION
Cross or Vector product

DOTREALPOSITION, POSITION
Inner or Scalar product

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 180 of 562

FLOATREALINTConvert

INVPOSEPOSEInverse of POSE

ROUNDINTREALRound to the nearest

integer value

SINREALREALSine (unit: degree)

SQRTREALREALSquare root

TANREALREALTangent (unit: degree)

TRAFOROBTARGETJOINTTransformation axes into cartesian coordinates and

TRAFOINVJOINTROBTARGETviceversa, both according to the actual base (R_BASE) and tool (R_TOOL) correction of the
actual robot (R_ACT_ROBOT) and to the actual cell base coordinate system (R_TARGET_BASE)

TRUNCINTREALTruncate to an integer value by ignoring the digits after the decimal point

The functions which work on the geometric data types are described in the topic about Orientation Data Types.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Miscellaneous Predefined Functions

As I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB, the functions
EOF and EOL are not supported.

IdentifierType of Types ofExplanation

resultparameters

EOFBOOLFileTypeEnd of file

EOLBOOLFILE OF CHAREnd of line

CHRCHARINTCharacter with the ASCII-Code equal to the value of the parameter

ORDINTCHARASCII-Code Value of the Character


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Types
INTREAL

CHARSTRINGTEXT

BOOL

ORIENTATIONPOSITION

POSEROBTARGET

ADD_JOINTMAIN_JOINT

JOINT
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 181 of 562

Standard Data Types

StandardType = StandardTypeIdentifier.

There are 5 predefined Standard Data Types with the predefined identifiers STRING, TEXT, POSITION, ORIENTATION and
POSE.

String Type

The predefined data type STRING describes objects which can hold a number of ASCII characters. The maximum length of
STRING type objects is restricted to 255. The first element of a string is referenced with the index 1. The controller
should reserve additional space to store the maximum and the actual size of any string. For manipulating objects of type
STRING predefined functions can be used.

Text Type

The predefined data type TEXT is used for file handling in sequential text files and for channel handling. The data type
bases on data type CHAR and is defined as FILE OF CHAR.

See also

Predefined Geometric Data Types


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Simple Type

SimpleType = SimpleTypeIdentifier.

There are 4 predefined Simple Data Types with the predefined identifiers BOOL, CHAR, INT and REAL.

Boolean Type

The predefined data type name BOOL describes objects which can only hold the values true (<>0) and false (=0).

Character Type

The predefined data type name CHAR describes objects which can hold exactly one ASCII character.

Integer Type

The predefined data type INT describes integer values.

Real Type

The predefined data type REAL describes real numbers.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Array Types

An array is a data structure consisting of a fixed number of components which are all of the same type. An array element
is accessed by indices.

ArrayTypeDescription =
"ARRAY" "[" IndexBoundList "]" "OF" Type.

IndexBoundList =
IndexBound { "," IndexBound }.

The dimension of an array is determined by the number of indices. IndexBound describes the lower and upper bounds of
an array.

IndexBound =
Expression ".." Expression.

Expressions are allowed to be only constants of the data type INT or CHAR.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 182 of 562

Example:

TYPE

ARRAY [4..10] OF ROBTARGET = p_type;

{one dimensional array, with elements of type ROBTARGET}

ARRAY [1..100,1..80] OF CHAR = text_type;

{two dimensional array, elements of type CHAR}


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

List Types

Lists are currently not supported in COSIMIR and PCROB.

A list is a data structure consisting of a variable number of components which are all of the same type. A list element can
be accessed by indices, the first index is 1, the highest index is equal to the length of the list. Additional there are
statements to insert, append or delete single list elements.

ListTypeDescription =
"LIST" "OF" Type.

Example:

TYPE

LIST OF ROBTARGET = dynamic_path;

{list type with variable number of elements of type ROBTARGET}


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

System Data Types

SystemType = SystemTypeIdentifier.

There are 6 predefined System Data Types with the predefined identifiers MAIN_JOINT, ADD_JOINT, JOINT, ROBTARGET,
D_SPEC_TYPE and R_SPEC_TYPE. These predefined record types are system specific and have to be defined in the System
Specification.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

File Types

Files are currently not supported in COSIMIR and PCROB.

FileTypeDescription =
"FILE" "OF" Type.

IRL defines symbolic names of file types and files. The "real" structure of the files is not treated by IRL, because the
structure depends on the operating system.

IRL allows the following file types:

- Sequential text files

These files are declared as FILE OF CHAR and are stored as ASCII-files. They are treated sequentially.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 183 of 562

The data type TEXT is predefined as FILE OF CHAR .

- Sequential typed files

These files only store values of a certain type defined by Type given in the FileType definition. They are treated
sequentially.

- Random access typed files

These files only store values of a certain type defined by Type given in the FileType definition. They are treated in a
random access manner.

- Channels
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Signal Types

SignalTypeDeclaration =
SignalTypeDescription ":" SignalTypeIdentifier.

SignalTypeDescription =
( "INPUT" | "OUTPUT" ) SimpleType.

The declaration of Signals is allowed and so attached data types may be defined.

SignalType =
SignalTypeIdentifier |
SignalTypeDescription.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Robot Specification Type

The Type R_SPEC_TYPE consists of the robot specific predefined system variables. As well as the system specific
geometric data types it must be declared in the System Specification. For every robot used within an IRL program a
record of that type has to be initialized by a Robot Specification.

Example:

TYPE

RECORD

REAL:R_ACC;

ARRAY[1..R_NJ] OF REAL:R_ACC_PTP;

REAL:R_C_PTP;

REAL:R_C_CP;

REAL:R_C_SPEED;

ARRAY[1..R_DEVICE_NUMBER] OF INT : R_DEVICES;

JOINT:R_JOINT_ACT;

ROBTARGET:R_ROBTARGET_ACT;

ROBTARGET:R_ROBTARGET_START;

ROBTARGET:R_ROBTARGET_END;

ROBTARGET:R_ROBTARGET_INTER;

REAL:R_SPEED_ACT;

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 184 of 562

REAL:R_SPEED;

ARRAY[1..R_NJ] OF REAL:R_SPEED_PTP;

REAL:R_SPEED_ORI;

POSE:R_BASE;

POSE:R_TOOL;

ENDRECORD = R_SPEC_TYPE;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

User Defined Data Types

Userdefined data types are restricted to structured, teach, signal or semaphore types.

Structured Data Types

StructuredTypeDeclaration =
StructuredTypeDescription ":" StructuredTypeIdentifier

StructuredTypeDescription =
RecordTypeDescription |
ArrayTypeDescription |
ListTypeDescription |
FileTypeDescription.

See also

Record Types

Array Types

List Types

File Types

Teach Types

Signal Types

Semaphore Types
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Type Declaration

IRL includes predefined data types and allows the definition of several user specific data types. The predefined data
types consist of simple data types (BOOL, INT, REAL or CHAR), standard data types (STRING, TEXT, POSITION,
ORIENTATION or POSE) and the so called system data types (MAIN_JOINT, ADD_JOINT, JOINT, ROBTARGET, D_SPEC_TYPE
or R_SPEC_TYPE). The properties of the system data types are partially determined in the system specification.

Only structured data types can be determined by the user, namely structures (RECORD) arrays (ARRAY), lists (LIST) or
files (FILE), and only predefined data types can be more precisely specified by additional informations namly by the key
words TEACH, PERMANENT, SIGNAL or SEMAPHORE. TEACH- or PERMANENT-specifications for teach data types are allowed
for all predefined data types including all system data types, but no robot specification type (R_SPEC_TYPE). The SIGNAL-
specification for signal data types is only allowed for simple data types, the SEMAPHORE-specification is only possible in
connection with boolean or integer types.

The predefined data types TEXT up to R_SPEC_TYPE simultaneously are structured data types, TEXT is a special file type
(FILE OF CHAR), the other types except ORIENTATION are structures. For the data types POSITION up to ADD_JOINT the
term geometric data types is also allowed.

TypeDeclaration =
StructuredTypeDeclaration |
TeachTypeDeclaration |
SignalTypeDeclaration |

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 185 of 562

SemaphoreTypeDeclaration.

Type Description and Type Identifier

By the needs of variable declaration and constant definition it is necessary to have possibilities to reference to specified
data types. This can be done by explicit type description or by using type identifiers.

A type identifier represents the name of an existing predefined or userdefined data type.

Type =
PredefinedType |
StructuredTypeIdentifier |
StructuredTypeDescription.

Predefined Data Types

PredefinedType =
SimpleType |
StandardType |
SystemType.

See also

Simple Type

Standard Types

System Types
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Record Types

A userdefined record type introduces a new data type.

RecordTypeDescription =
"RECORD" ComponentList "ENDRECORD".

ComponentList =
Type ":" ComponentIdList
{ ";" Type ":" ComponentIdList }.

ComponentIdList =
ComponentIdentifier { "," ComponentIdentifier }.

A record type is a collection of several objects which may be of different data types. These objects are called
components. If one component is a record type itself the record is nested.

Each component has an identifier by which it can be accessed. Identifier and data type of the components are described
in the definition of the record type. The identifier has to be unique within one record type description.

Example:

TYPE

RECORD

position_type: p1, p2;

REAL: current;

ENDRECORD = test_type;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Geometric Data Types

Geometric data types and the attached operators enable the programmer to handle datas from CAD-systems,

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 186 of 562

to optimize robot movements under various aspects, or to calculate the path of a robot under sensor
definition.

The geometric data types are used for description of position and orientation of robots or effectors or other
objects. These types is underlying a cartesian coordinate system whose origin and orientation will be defined
during the installation of the robot control system. It is called world coordinate system and all other
coordinate systems are directly or indirectly related to it. The values of an object description can be related
to any reference system, but the language does not support the explicit specification of this relation.
Therefore the programmer using the geometric operations defined later to combine such object descriptions is
responsible for matching the relations between the corresponding reference systems assumed by these
operations.

If the reference system of an object description is not the world coordinate system in the definitions and in
the examples of this standard variables are used with an upper left index specifying the reference system. In
most cases the index identifier corresponds to a POSE or ROBTARGET variable representing the reference
coordinate system.

For the record types MAIN_JOINT, ADD_JOINT, JOINT, ROBTARGET, D_SPEC_TYPE and R_SPEC_TYPE see the
following chapter.

See also

Position Data Type

Orientation Data Types

Pose Data Type

System Data Types

Robot Target Data Type

Joints Data Type

Device Specification Type

Robot Specification Type


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Pose Data Type

TYPE

RECORD

POSITION: POS;

ORIENTATION: ORI

ENDRECORD = POSE;

The predefined data type POSE is composed of the components POS and ORI of POSITION and ORIENTATION type,
respectively. Besides other possible interpretations a variable of type POSE can specify a transformation between two
coordinate systems, the components representing the origins position and the direction of the second coordinate system
in relation to the first one or the position and orientation of an object or the robot TCP in relation to the world
coordinate system.

In order to select a POSE component, the POSE structure must be splitted in its POSITION and ORIENTATION part and then
these datatypes have to be handled in the above described way. Besides this the type conversion in assignment
statements can be used to select the POSITION or ORIENTATION part of a POSE type expression.

Assignment to a POSE variable:

VAR

POSITION: first_pos, next_pos;

ORIENTATION: ori;

POSE: f,g;

BEGIN

f.POS := first_pos;

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 187 of 562

f.ORI := ori;

g := POSE (next_pos,f.ORI);

Selection of a component of POSE:

next_pos := f.POS;

ori := g.ORI;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Orientation Data Types

Quaternion orientation functions are currently not supported in COSIMIR and PCROB.

The inner structure of the predefined data type ORIENTATION is fixed by the producer of the IRL-compiler.

This type describes the direction of a coordinate system in space in relation to a reference system. The zero orientation
is identical with the orientation of the reference system. The internal realization of the data type ORIENTATION in the
programming system is no part of this standard, but for the exact semantic specification of the geometric operations the
representation of an orientation by a rotation matrix is used.

If an orientation describes the direction of a coordinate system R1 in relation to a reference system R the corresponding
rotation matrix M = ( Rn Ro Ra ) consists of three columns equal to the R-coordinates of the three basic vectors Rn, Ro
and Ra of the coordinate system R1.

For every orientation ori there is one unique rotation matrix here written as M = M(ori), and because of the properties of
the basic vectors of a cartesian coordinate system the identity M-1 = MT is true for all M.

Besides other possible interpretations an ORIENTATION type variable can specify a rotation or the direction of a
coordinate system describing a transformation. This can be seen in the following equations using normal matrix
operations.

Rotation: Rp' = M(Rori) * Rp

Here Rp and Rp' represent the vector p before and after the rotation represented by Rori, all variables specified in
relation to the same reference system R.

Transformation: Rp = M(Rori) * R1p

Here R1p represents the local coordinates of the Point P in relation to the coordinate system R1, Rori describing the
direction of R1 in relation to R. The result Rp represents the coordinates of the same Point P in relation to R.

It is sufficient to define the orientation by some rotations, but there are different ways to specify the behavior of the
rotations. Therefore the rotations are notified as different function calls, each one is defining another meaning of the
rotation values. The calculation of the internal representation from the given orientation function is a task of the
programming system.

Assignment to an orientation variable:

VAR

ORIENTATION: ori;

POSITION: n1,o1,a1,v;

REAL: a,b,c,d;

BEGIN

ori := ORIRS(a,b,c);

first a rotates about the x-axis of the reference system, then b about the y-axis of the original reference system, third c
rotates about the z-axis of the original reference system

ori := ORIXYZ(a,b,c);

first a rotates about the x-axis of the reference system, then b about the new y-axis of the rotated reference system,
third c rotates about the new z-axis of the two times rotated reference system

ori := ORIYXZ(a,b,c);

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 188 of 562

first a rotates about the y-axis of the reference system, then b about the new x-axis of the rotated reference system,
third c about the new z-axis of the two times rotated reference system

ori := ORIZYX(a,b,c);

first a rotates about the z-axis of the reference system, then b about the new y-axis of the rotated reference system,
third c about the new x-axis of the two times rotated reference system (equal to ORIRS(c,b,a))

ori := ORIZYZ2(a,b,c);

first a rotates about the z-axis of the reference system, then b about the new y-axis of the rotated reference system,
third c about the new z-axis of the two times rotated reference system

ori := ORIVANG(v,a);

a rotates about the axis v, described in the reference system

ori := ORIQUAT(a,b,c,d);

a, b, c, d are parameters of the quaternion specification

ori := ORIMAT(n1,o1,a1);

n1, o1, a1 are unit vectors representing the three columns of a rotation matrix, they build a rigth-handed coordinate
system

Selection of a component of ORIENTATION:

Selecting a component of an orientation, i.e. rotation angle or axis of rotation or quaternion value, there is the need to
specify the kind of orientation which should underlie the values; this is done by an additional parameter of the select
function.

VAR

ORIENTATION: ori;

POSITION: n1,o1,a1,v;

REAL: r;

BEGIN

r := ANGLEX(RS,ori);

result: rotation about the x-axis under ORIRS definition

r := ANGLEX(XYZ,ori);

... under ORIXYZ definition

r := ANGLEX(YXZ,ori);

... under ORIYXZ definition

r := ANGLEX(ZYX,ori);

... under ORIZYX definition

r := ANGLEY(RS,ori);

result: rotation about the y-axis under ORIRS definition

r := ANGLEY(XYZ,ori);

... under ORIXYZ definition

r := ANGLEY(YXZ,ori);

... under ORIYXZ definition

r := ANGLEY(ZYZ2,ori);

... under ORIZYZ2 definition

r := ANGLEY(ZYX,ori);

... under ORIZYX definition

r := ANGLEZ(RS,ori);

result: rotation about the z-axis under ORIRS definition

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 189 of 562

r := ANGLEZ(XYZ,ori);

... under ORIXYZ definition

r := ANGLEZ(YXZ,ori);

... under ORIYXZ definition

r := ANGLEZ(ZYZ2,ori);

... under ORIZYZ2 definition

r := ANGLEZ(ZYX,ori);

... under ORIZYX definition

r := ANGLEZ2(ZYZ2,ori);

result: rotation about the z2-axis under ORIZYZ2 definition

v := ROTAXIS(ori);

result: vector of rotation under ORIVANG definition

r := ROTANGLE(ori);

result: rotation about the v-axis under ORIVANG definition

r := QUATA(ori);

result: parameter a of the quaternion specification

r := QUATB(ori);

result: parameter b ...

r := QUATC(ori);

result: parameter c ...

r := QUATD(ori);

result: parameter d ...

a1 := VECTORA(ori);

result: unit vector representing the third column of the rotation matrix

n1 := VECTORN(ori);

result: unit vector representing the first column of the rotation matrix

o1 := VECTORO(ori);

result: unit vector representing the second column of the rotation matrix

ENDPROGRAM;

It is important, that the definition of an orientation can use values greater than 90 or 180 degree, but that the selection
of an orientation component will always yield a value between -180 and 180 degree. Furthermore the results of a select
operation can differ from the input value which are used for generating the orientation, because of the ambiguity of
angle statements in the mathematical world.

To solve the following three problems it is necessary to specify the results of these select operations in detail. Even if all
angle results are defined as degree between -180 and 180 there is no unique solution for every orientation value. Thats
why some of the results must be between -90 and 90 degree or between 0 and 180 degree, respectively. Secondly even
then there exist orientation values with more than one possible correct solution of the select operations. Then some
default values should be used. Thirdly the results of the select operations are not independent from each other.
Especially if one angle was set to such a default value then the select operations must give results which yield to the
original orientation using the underlying orientation definition function.

The exact specification of the possible results of the select operators for every kind of orientation definition is given in a
short form, specifying the select operators of the same kind of orientation in complex.

For a := ANGLEX(RS,ori), b := ANGLEY(RS,ori) and c := ANGLEZ(RS,ori) the following must be true:

-180 <= a <=180- first rotation about the x-axis

-90 <= b <=90 - second rotation about the y-axis

-180 <= c <=180- third rotation about the z-axis

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 190 of 562

if b = -90 or b = 90 then a := 0 (no rotation about the x-axis) and the value of c must realize that ORIRS(a,b,c) is equal to
the original orientation

For a := ANGLEX(XYZ,ori), b := ANGLEY(XYZ,ori) and c := ANGLEZ(XYZ,ori) the following must be true:

-180<= a <=180 - first rotation about the x-axis

-90<= b <=90 - second rotation about the y-axis

-180<= c <=180 - third rotation about the z-axis

if b = -90 or b = 90 then a := 0 (no rotation about the x-axis) and the value of c must realize that ORIXYZ(a,b,c) is equal
to the original orientation

For a := ANGLEY(YXZ,ori), b := ANGLEX(YXZ,ori) and c := ANGLEZ(YXZ,ori) the following must be true:

-180 <= a <= 180 - first rotation about the y-axis

-90 <= b <= 90 - second rotation about the x-axis

-180 <= c <= 180 - third rotation about the z-axis

if b = -90 or b = 90 then a := 0 (no rotation about the y-axis) and the value of c must realize that ORIYXZ(a,b,c) is equal
to the original orientation

For a := ANGLEZ(ZYZ2,ori), b := ANGLEY(ZYZ2,ori) and c := ANGLEZ2(ZYZ2,ori) the following must be true:

-180 <= a <= 180 - first rotation about the z-axis

0 <= b <= 180 - second rotation about the y-axis

-180 <= c <= 180 - third rotation about the new z-axis

if b = 0 or b = 180 then a := 0 (no rotation about the y-axis) and the value of c must realize that ORIZYZ2(a,b,c) is equal
to the original orientation

For a := ANGLEZ(ZYX,ori), b := ANGLEY(ZYX,ori) and c := ANGLEX(ZYX,ori) the following must be true:

-180 <= a <= 180 - first rotation about the z-axis

-90 <= b <= 90 - second rotation about the y-axis

-180 <= c <= 180 - third rotation about the x-axis

if b = -90 or b = 90 then a := 0 (no rotation about the y-axis) and the value of c must realize that ORIZYZ2(a,b,c) is equal
to the original orientation

For v := ROTAXIS(ori) and r := ROTANGLE(ori) the following must be true:

v must be a unit vector

0 <= r <= 180 - rotation about the v-axis

if r = 0 then v := ( 0, 0, 1 ) (parallel to z-axis)

if r = 180 then ((v.x > 0) or ((v.x = 0) and (v.y > 0)) or

((v.x = 0) and (v.y = 0) and (v.z = 1)))

For a := QUATA(ori), b := QUATB(ori), c := QUATC(ori) and d := QUATD(ori) the Quatrupel (a,b,c,d) must be a unit
quaternion with:

0 <= a - per definition

if a = 0 then ((b > 0) or ((b = 0) and (c > 0)) or

((b = 0) and (c = 0) and (d = 1)))

Example:

VAR

ORIENTATION: ori1, ori2;

REAL: r;

BEGIN

ori1 := ORIRS(90,90,0);

the orientation of the reference system will be rotated about the x-axis of the reference system with 90 degree and

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 191 of 562

afterwards about the y-axis of the original reference system with 90 degree

ori2 := ORIXYZ(90,90,0);

the orientation of the reference system will be rotated about the x-axis of the reference system with 90 degree and
afterwards about the new y-axis of the rotated reference system with 90 degree

r := ANGLEZ(RS,ORIZYZ2(90,90,90));

assigns to r the rotation angle 180 degree about the original z-axis; the other solution with a rotation of 0 degree about
the z-axis including a rotation of 180 degree about the y-axis is not possible because of ANGLEY(RS,ORIZYZ2(90,90,90))
must between -90 and 90

ENDPROGRAM;

Note:

Even with the given exact specification the use of the select operators on a sequence of continuous orientation values
can lead to non-continuous results which is very dangerous if the results should be used to control some robot or
additional axis. But only this specification makes it possible to detect such problems by the user and to write algorithms
that may handle such non-continuous values.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Robot Target

ROBTARGET has to be defined suitable for all robots in a common cell; the exact semantic of the structure ROBTARGET
should be explained in a comment.

ROBTARGET describes the position and orientation of the tool center point (TCP) of an industrial robot. ROBTARGET
consists of a pose type part which defines the position and the orientation of the TCP, some parts which describes the
exact status of the robot axes and if necessary the position of additional axes.

Objects of this data type may be operands of geometric operations or in special statements (e.g. MOVE PTP).

Example:A robot with additional axis

TYPE

RECORD

POSE: PSE;

INT: STATUS;

ARRAY[1..R_NTURNS] OF INT: TURNS;

ADD_JOINT: A_JOINT;

ENDRECORD = ROBTARGET;

In this example STATUS describes an additional degree of freedom (for example 'shoulder right or left'). The relation
between values of data type INT and the robot configuration is system dependent. TURNS describes the number of
rotations of 360 degree performed by some of the axes. R_NTURNS defines the maximum number of joints in a cell which
can rotate more than 360 degrees.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Teach Types

TeachTypeDeclaration =
TeachTypeDescription ":" TeachTypeIdentifier.

TeachTypeDescription =
( "TEACH" | "PERMANENT" ) PredefinedType.

The global declaration of TEACH-variables is allowed and so attached data types may be defined.

TeachType =

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 192 of 562

TeachTypeIdentifier |
TeachTypeDescription.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Joints

The predefined data type JOINT describes the position of the TCP of an industrial robot in the robot coordinate system.
Its definition depends on the number of axis of the industrial robot. According to the axis type, the components are
either angles (rotation axis) or distances (translation axis).

JOINT is composed of the components M_JOINT and A_JOINT of MAIN_JOINT and ADD_JOINT type, respectively to
distinguish between main axis and additional axis. The components A_JOINT of this type JOINT and of the above defined
type ROBTARGET must be identical. This implicates, that the predefined functions TRAFO and TRAFOINV must not change
the values of this ADD_JOINT type component.

The predefined data types MAIN_JOINT, ADD_JOINT and JOINT have to be defined in the System Specification.

Example:

TYPE

RECORD REAL: A1,A2,A3,A4,A5 ENDRECORD = MAIN_JOINT;

RECORD REAL: AA1,AA2,AA3 ENDRECORD = ADD_JOINT;

RECORD

MAIN_JOINT: M_JOINT;

ADD_JOINT : A_JOINT

ENDRECORD = JOINT;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Program Flow
ProgramflowStatement =
GotoStatement |
ConditionalBranchStatement |
CaseStatement |
LoopStatement |
WaitStatement |
PauseStatement |
ReturnStatement |
ProgramHaltStatement |
InterruptStatement |
ResumeStatement |
SynactStatement.

See also

Goto Statement

Conditional Branch Statement

Case Statement

For Loop Statement

Repeat Loop Statement

While Loop Statement

Wait Statement

Pause Statement

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 193 of 562

Return Statement

Program Halt Statement

Interrupt Statement

Resume Statement

Synact Statement
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Goto Statement

GotoStatement =
"GOTO" LabelIdentifier.

The GOTO statement forces control to the statement which is marked by the label. The label must be within the same
function or procedure. A jump is not allowed to lead into a block.

A label identifier is not declared by a declaration of variables.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

For Loop

ForStatement =
"FOR" Object ":=" Expression "TO" Expression
[ "STEP" Expression ]
StatementBlock "ENDFOR".

The first Expression is the limit to start the loop, the second Expression is the limit to end the loop. The third Expression
is the increment. The default increment is 1. Negative increments are allowed.

All expressions must be arithmetical expressions. They and the Object must be of data type INT. Before the
StatementBlock of the ForStatement starts execution all three expressions are evaluated.

In the case of positive increment the StatementBlock is executed if the value of Object which represents the counter is
less or equal to the second Expression. With negative increment the counter has to be greater or equal for execution. In
the case of zero increment the StatementBlock is executed as long as it is not left by a GotoStatement.

After leaving the loop with a GotoStatement the counter keeps its current value. After normal completion of the loop the
counter is equal to the first value that does not match the condition for the execution of the statement block.

Example:

FOR i := 1 TO 10

MOVE LIN palette [i];

ENDFOR;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Case Statement

CaseStatement =
"CASE" Expression "OF"
CaseList [ "DEFAULT" [ ":" ] StatementBlock ]
"ENDCASE".

CaseList =

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 194 of 562

Case { ( "|" | "WHEN" ) Case }.

Case =
[ CaseConstantList ":" StatementBlock ].

CaseConstantList =
CaseConstant { "," CaseConstant }.

CaseConstant =
Expression.

The CASE statement dispatches control to one of the StatementBlocks in its list, according to the calculated value of its
arithmetical Expression. If no CaseConstant matches the calculated value the DEFAULT block is executed.

DEFAULT is optional. If there is no DEFAULT block and no CaseConstant is matched control is passed to the next
statement.

Expression and CaseConstants must be of data type INT or CHAR.

Example:

CASE workpiece OF

WHEN 0:length := 1;

WHEN 1,6:length := 5;

DEFAULT: length := 0;

ENDCASE;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Conditional Branch Statement

ConditionalBranchStatement =
"IF" Expression
"THEN" StatementBlock
[ "ELSE" StatementBlock ]
"ENDIF".

The statement block following the keyword THEN is executed if the result of the logical Expression has the value true
(<>0).

If the Expression has the value false (=0) the statement block behind the keyword ELSE is executed. The ELSE-block may
be omitted.

Every IF needs an ENDIF.

Example:

IF x > 1

THEN

y := 50;

z := 20;

ELSE

y := 30;

ENDIF;

IF x < 25 THEN y := 30; z := 10; ELSE z := 2*y; ENDIF;


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 195 of 562

Procedure Call

ProcedureCall =
ProcedureIdentifier "(" [ ValueList ] ")".

The call of procedure starts the execution of this procedure. The actual parameters are passed to the corresponding
formal parameters. Therefore the number of expressions and of formal parameters has to be identical and the types have
to be parameter compatible to the formal parameters.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

While Loop

WhileStatement =
"WHILE" Expression StatementBlock "ENDWHILE".

The statement block will be repetitively executed as long as the evaluation of the logical Expression returns true (<>0). If
the first interpretation of Expression returns false (=0) the statement block will not be executed at all.

Every WHILE needs an ENDWHILE.

Example:

i := 1;

WHILE i<=10

MOVE LIN palette[i];

i := i+1;

ENDWHILE;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Repeat Loop

RepeatStatement =
"REPEAT" StatementBlock "UNTIL" Expression.

The statement block is executed once. Afterwards the logical Expression is interpreted. If it has the value false (=0) the
execution of the StatementBlock is repeated, otherwise the next statement is executed.

Every REPEAT needs an UNTIL

Example:

i := 1;

REPEAT

MOVE LIN palette[i];

i := i+1;

UNTIL i>10;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Resume Statement

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 196 of 562

Interrupts and the RESUME statement are currently not supported in COSIMIR and PCROB.

ResumeStatement =
"RESUME".

The ResumeStatement terminates the execution of an interrupt procedure. It can only be used within a procedure called
by an InterruptStatement.

The difference between the termination of an interrupt procedure by the ReturnStatement and by the ResumeStatement
is the position where the program is continued. The ReturnStatement as well as the "ENDPROC"-keyword cause the
resumption of the program at the position where it had been interrupted whereas after a ResumeStatement the program
continues with the statement behind the interrupted statement on the program level where the interrupt has been
defined.

To make use of the advantages of the ResumeStatement the program has to be adequately structured. It is advised to put
all statements that might be interrupted into one procedure and to use the top-level of the program for definitions and
error handling only. In the example given an interrupt occuring within the procedure "Main" would be handled by the
"Int_Gripper" procedure. If this procedure is terminated by the ResumeStatement - e.g. because the error cannot be
eleminated - the program is continued with the statement following the "Main" function call, no matter in what part of
"Main" or in which function called by "Main" the program had been interrupted. By this errors during program execution
can easily be handled at one point of the program.

Example:

PROGRAM ResumeDemo;

VAR

INT:ErrorNumber;

INTERRUPT DECL 41 WHEN GripperError=TRUE DO Int_Gripper();

PROCEDURE Int_Gripper();

BEGIN

...

ErrorNumber:=1;

RESUME;

ENDPROC;

BEGIN

INTERRUPT ON 41;

Main();{complete body of the program}

INTERRUPT OFF;

CASE ErrorNumber OF

WHEN 0: ...

WHEN 1: ...

...

ENDCASE;

ENDPROGRAM
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Return Statement

ReturnStatement =
"RETURN" [ Expression ].

The return statement terminates the execution of a function or a procedure.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 197 of 562

The execution of a function must always end with a RETURN statement. A return value must be passed to the calling
program. Therefore the data type of Expression must be equal to the data type of the function.

A procedure can be left by a RETURN statement. A return value is not allowed. If no RETURN statement is given, the
procedure will be left after having reached the end.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

I/O Statements
Signals

Signal identifiers are treated like variables. They can be checked by using expressions and set by value assignments.

Example:

CONST

BOOL: lowlevel := FALSE;

BOOL: highlevel := TRUE;

VAR

INPUT BOOL: IN_1 AT 1, IN_2 AT 2, IN_3 AT 3;

OUTPUT REAL: ANOUT_2 AT 2;

OUTPUT BOOL: OUT_5 AT 5;

BEGIN

OUT_5 := lowlevel; { reset output 5: }

IF IN_1 = highlevel THEN ...{ branch, if input 2 has high level }

ANOUT_2 := 3.4;{ analog value 3.4 to output 2 }

WAIT FOR IN_2 = lowlevel;{ wait, until input 2 is low }

Every appearance of a signal in an expression causes an inquiry to the interface.

Furthermore there is the possibility to define user specific signal identifiers by signal declarations.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Write Statement

I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB.

WriteStatement =
( "WRITE" | "WRITELN" ) "(" FormatList ")" |
"WRITERAC" "(" Expression "," ElementNumber "," ValueList ")".

FormatList =
[ OutputValue
[ ":" Expression
[ ":" Expression
[ ":" Expression
]]]
{ "," OutputValue
[ ":" Expression
[ ":" Expression
[ ":" Expression
]]]
}
].

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 198 of 562

OutputValue = Expression.

ElementNumber = Expression.

With the write statement, followed by a file identifier or a channel identifier and a list of expressions, the expression
values are written to the file or channel.

- Sequential typed files

The output data always are ASCII.

In the FormatList the first element of OutputValues may be an Object which defines the FileType. This object represents
the required file or channel identifier. If it is missing STANDARD_OUT is used as default.

Every (other) element of the FormatList may consist of up to four expressions. The first of them is the OutputValue, that
defines the value to be written. The other three expressions specify the way the OutputValue is to be written. They are
called Fieldwidth, Precision and OriMode.

If the second expression is of type INT it defines the Fieldwidth. It is only allowed for OutputValues of type INT or REAL
(or those containing these types like POSITION).

If the third expression is of type INT it defines the Precision. It is only allowed for OutputValues of type REAL (or those
containing a REAL like POSITION).

If the last of the expressions is of type STRING it defines the OriMode. It must be one of the following predefined
constants: RS, XYZ, YXZ, ZYZ2, ZYX, VANG or QUAD. The specification of OriMode is only allowed for OutputValues that
are of type ORIENTATION (or contain that type like POSE).

The Fieldwidth value describes the number of digits to be written for the REAL or INT OutputValue (or for each REAL or
INT within OutputValue). The default value for Fieldwidth is 10.

The Precision is the number of digits behind the decimal point for the REAL value to be written (or for each REAL). The
default value for Precision is 4.

If the value "Fieldwidth minus Precision" is not sufficient to represent the digits to the left of the decimal point but a
Fieldwidth value of 10 (the default) would be sufficient the necessary number of digits will automatically written instead.
If even a Fieldwidth value of 10 (the default) would not be sufficient a representation using a decimal exponent will be
used automatically in that case (e.g. -1.23456789E+15).

Writing an orientation type value (or a value containing an orientation type) the OriMode expression defines the
orientation mode that will be used to represent the printed value. The default value for OriMode is defined in the system
specification by R_DEF_ORI.

A boolean value will be written as '0' (FALSE) or '1' (TRUE).

The following examples show the representation of the printed values:

WRITE(orivar:4:2:XYZ);

==> ORIXYZ(-11.22, 44.44, -33.33)

WRITE(orivar:ZYX);

==> ORIZYX( -45.0001, 0.0, 45.6789)

with defaults for Fieldwidth and Precision, here: 10 and 4.

WRITE(orivar);

==> ORIRS( 12.3456, 89.0123, -3.0)

uses the default orientation specification, here: RS.

WRITE(orivar:2:1:VANG);

==> ORIVANG(( 1.0, 0.0, 0.0), 145.0)

with the first three components describing the unit vector of the rotation, and the fourth component comprises the
rotation angle (note that here 2 digits are not sufficient to express the correct value, so more digits are written).

WRITE(orivar:3:1:QUAT);

==> ORIQUAT( 11.0, 0.1, 0.3)

- Random access typed files

The first Expression has to be a File Type Variable. It represents the required file or channel identifier.

The output data must have the type which is defined by the component type of the File Type Variable of the first
Expression, otherwise an error will be created.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 199 of 562

The element to be written is defined by ElementNumber which is an expression of data type INT. If the element number
does not exist (e. g. too large) the element number is set to the last element number + 1. The end of a set is not checked
during writing.

- Channels

Channels are handled as sequential text files.

The write statement with line feed (WRITELN) only is allowed in connection with sequential text files. After writing a
CR/LF is appended.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Read Statement

I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB.

ReadStatement =
( "READ" | "READLN" ) "(" ObjectList ")" |
"READRAC" "(" Expression "," ElementNumber "," ObjectList ")".

ObjectList =
Object { "," Object }.

The read statement reads data from the file or the channel and assigns them to the objects. The use of the different file
types is analog to the write statement.

Reading an orientation type variable by "READ(orivar)" needs the following input:

ORIRS(value1, value2, value3)

ORIZYX(value1, value2, value3)

ORIQUAT(value1, value2, value3, value4)

ORIVANG(value1, value2, value3, value4)

"READ(orivar)" results in:

orivar:=ORIRS(value1, value2, value3)

orivar:=ORIVANG(POSITION(value1, value2, value3), value4)

The read statement with linefeed (READLN) is only allowed in connection with sequential text files. It causes a jump
behind the next line feed after reading.

A boolean value will be read as '0' (FALSE) or '1' (TRUE).


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Channels

Channels are currently not supported in COSIMIR/PCROB.

SER_1 .. SER_xserial interfaces (x = number of interfaces)

PAR_1 .. PAR_xparallel interfaces (x = number of interfaces)

KEYBOARD

PANEL

PRINTER

SCREEN

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 200 of 562

TTY

HPU( hand programming unit )

MCP( manual control panel )


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Open Statement

I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB. This means that
the OPEN statement is not supported.

OpenStatement =
"OPEN" "(" Object "," Expression ","
Expression "," Object ")".

The first Object has to be a FileType. It defines the file pointer. The second Object returns an error code of data type
INT.

The first Expression must be a character string, that defines the name and the accesspath of the file. This string is
systemdependent and is not fixed by this standard.

The second Expression defines the working mode of the file:

'R' =open file for reading from the beginning.

'W' =open file for writing from the beginning;

if the file already exists it will be erased.

'A' =open file for writing at the end.

'RAC' =open file for random access.

The options 'R', 'W', 'A' and 'RAC' are meaningless to channels.

If the file is opened for random access it is opened for reading and writing from given position.

A sequential file which was opened for writing cannot be read. A sequential file which was opened for reading cannot be
accessed for writing.

If a file or a channel is just opened the open statement causes an implicit closing and an opening again. This can be used
to position the pointer for reading back to the beginning of a file.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Close Statement

I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB. This means that
the CLOSE statement is not supported.

With the close statement an open file or an open channel is closed. If file pointer is omitted all open files and channels
(except PANEL, SCREEN, KEYBOARD, TTY, HPU and MCP) are closed.

CloseStatement =
"CLOSE" [ "(" Expression ")" ].

Expression defines the file pointer and has to be an Identifier.


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 201 of 562

I/O for Channels and Files

I/O for channels and files is currently only supported for the CONSOLE in COSIMIR and PCROB.

File_I_O_Statement =
OpenStatement |
CloseStatement |
WriteStatement |
ReadStatement.

A file or a channel has to be opened before the first write statement or read statement. If a file does not exist it is
created.

Channels that are defined with the predefined channel identifier PANEL, SCREEN, KEYBOARD, TTY, HPU and MCP must
not be opened.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Pulse Statement

The PULSE statement is currently not supported in COSIMIR and PCROB.

PulseStatement =
"PULSE" Object ( "HIGH" | "LOW" ) "DURATION" ":=" Expression.

The PulseStatement sets a binary output to high or low level for a specified time. The object is an OUTPUT signal type
and specifies the output to be pulsed. HIGH or LOW, respectively define whether the output is set to high or low level.
The expression is the duration of the pulse in seconds and of data type REAL. The PulseStatement has no effect if the
output specified already has the given level.

Example:

...

OUTPUT BOOL: Reset AT 15;

...

PULSE Reset HIGH DURATION := 0.2;

{set binary output 15 to high-level for 200 ms}

...
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Expressions
Expression =
"+" Expression |
"-" Expression |
"NOT" Expression |
Expression Operator Expression |
Object |
IntegerConstant |
RealConstant |
BooleanConstant |
CharacterString |
CallOrRecord |
Precedence |
ArrayInit.

Precedence =
"(" [ ValueList ] ")".

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 202 of 562

Expressions may be of some kinds. The following types are distinguished in their semantics:

Arithmetical Expressions

Logical Expressions

Geometric Expressions

Interpretation of Expressions

For the interpretation of an expression, the operator of higher priority will always be used first. Operators of the same
rank are interpreted from left to right. Parentheses may be used to change this order.

The priority of the different operators is defined from top (highest priority) to bottom (lowest priority) according to the
following table:

NOT, + , - (unary)high priority

*, / , MOD, DIV, @

+, -

<, >, >=, <=

=, <>

AND

EXOR, ORlow priority

The type of an expression depends on the type of operands and on the used operators.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Arithmetical Expressions

The operands in arithmetical expressions have to be of the simple data types CHAR, REAL or INT. Operands of data type
CHAR are implicitly converted to type INT. The ASCII-value is interpreted as unsigned integer.

The result type of a binary arithmetical Expression is determined according to the following table:

operand 1operand 2result

INTINTINT, REAL with operator "/"

INTREALREAL

INTCHARINT, REAL with operator "/"

REALINTREAL

REALREALREAL

REALCHARREAL

CHARINTINT, REAL with operator "/"

CHARREALREAL

CHARCHARINT, REAL with operator "/"

A connective of two operands of different data types leads to a type conversion.

The operands of DIV and MOD have to be of data type INT or CHAR.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Logical Expressions

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 203 of 562

Operands of logical expressions have to be of a simple data type. The result of a comparison is of data type BOOL.

Operands of the data type CHAR are converted to data type INT before evaluation.

Using operands of the data types INT and BOOL the result type of a binary logical Expression is determined according to
the following table:

operand 1operand 2result

BOOLINTnot allowed.

INTINTINT (bit pattern operation)

INTBOOLnot allowed

BOOLBOOLBOOL (logical operation)

The operator NOT carries out the logical negation. Applied to "0" (FALSE) it yields "1" (TRUE). In all other cases it yields
"0" (FALSE).
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Geometric Expressions

In the following definitions of geometric operations the specified types of operands mean that every expression being an
operand of such an operation will be automatically converted into this operand type before performing the operation.
This will be done according to the same rules as used for the cast operators. If the type of an operand is specified by a
cast operator and this type is not the required operand type then the implicit type conversion will be done after the
execution of the explicit type conversion specified by the cast operator. The value of the resulting operand may differ
from the original value of the operand, even if the required operand type and the type of the original operand are
identical (see example k).

type oftype oftype of

nroperand1operand2resultshort description

operator

1POSITION+POSITIONPOSITIONaddition of two positions

2POSITION-POSITIONPOSITIONsubtraction of positions

3POSITION/REALPOSITIONdivision of all components with real number

4POSITION*REALPOSITIONmultiplication of all

5REAL*POSITIONPOSITIONposition components with real number

6ROBTARGET@POSEROBTARGETrelative translation and rotation

Now the semantic of the last geometric operation will be defined in more detail.

Relative translation and rotation (symbol '@')

Be RK1 a ROBTARGET type variable and R1R2 a POSE type variable with RK1 = (RR1,add1) = ((Rori1,Rpos1),add1) =
((RM1,Rpos1),add1) where add1 includes the STATUS TURNS and A_JOINTS components of RK1 and R1R2 = (R1ori2,R1pos2)
= (R1M2,R1pos2), then the ROBTARGET type result RK3 = (RR3,add3) = ((Rori3,Rpos3),add3) = ((RM3,Rpos3),add3) of the
operation RK1 @ R1R2 is defined by the following three equations

RM3= RM1 * R1M2

Rpos3= RM1 * R1pos2 + Rpos1

add3= add1.

The first operand is seen as a configuration of the robot TCP which is translated by the position R1pos2 and rotated by
the orientation R1ori2. These components are related to the reference system R1 represented by the pose RR1, so it
describes a relative movement of the robot TCP where the direction and rotation depends on the actual orientation of
the robot TCP.

Examples:

a)Calculating the transformation of a position we can use the @-operator. Be RR1 a POSE type variable and R1p a
POSITION type variable with RR1 = (Rori1,Rpos1) = (RM1,Rpos), then the result Rp of the operation POSITION( RR1 @ R1p)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 204 of 562

is defined as

Rp= RM1 * R1p + Rpos1,

using normal matrix operations. This operation assumes, that R1p are the local coordinates of the Point P in relation to
the local coordinate system R1, represented by the POSE variable. The result are the global coordinates of the same
Point P in relation to the original reference system R which is also the reference system of R1.

b)Calculating the result of the rotation of a vector, the @-operation can also be used because of the intern conversion
from an ORIENTATION to a POSE and the identity of the necessary matrix operations.

c)Calculating the result of the multiplication of two transformations it is again possible to use the @-operator. Be RR1
and R1R2 two POSE type variables with RR1 = (Rori1,Rpos1) = (RM1,Rpos1) and R1R2 = (R1ori2,R1pos2) = (R1M2,R1pos2),
then the POSE type result RR2 = (Rori3,Rpos3) = (RM3,Rpos3) of the operation RR1 @ R1R2 is defined by the following two
equations

RM3= RM1 * R1M2

Rpos3= RM1 * R1pos2 + Rpos1.

This operation assumes, that R1 is a transformation which describes the position and orientation of a local coordinate
system R1 in relation to the reference system R, and R2 describes the position and orientation of another local coordinate
system in relation to the system R1. The result describes the position and orientation of R2 in direct relation to the
original reference system R.

d)Calculate for a given position R1p, related to reference system R1, the component values, expressed in the reference
system R2S which is related to its reference system R2. We want to get Sp, so we have to form a chain, starting with S
and ending in P:

Sp= SR2 @ R2R1 @ R1p


= SR2 @ R2Worldsystem @ WorldsystemR1 @ R1p
= INV(R2S) @ INV(WorldsystemR2) @ WorldsystemR1 @ R1p

e)Calculate the pose S which transfers pose1 in pose2 (pose1 and pose2 refer to the reference system R, system S refers
to pose1); therefore the following equation must be true:

Rpose1 @ pose1S = Rpose2

This yields: pose1S = INV(Rpose1) @ Rpose2

Calculate the pose S which transfers pose1 in pose2 (all three systems refer to the reference system R); therefore the
following equation must be true:

RS @ Spose1' = Rpose2

where Spose1' is numerically identic with Rpose1. This yields:

RS = Rpose2 @ INV(Spose1')

which could be expressed with the numerically identic expression:

RS = Rpose2 @ INV(Rpose1)

f)Combining the two orientations ori1 and ori2 to a new orientation ori3, so that POSITION (ori3 @ p) = POSITION (ori1 @
POSITION (ori2 @ p)) will be true for every position p, using the assignment

ori3 := ori1 @ ori2

will yield to the correct result where M3 = M1 * M2 using the implicit and explicit type conversion properties. For instance
the equation ORIXYZ(a,b,c) = ORIXYZ(a,0,0) @ ORIXYZ(0,b,0) @ ORIXYZ(0,0,c) is true. More general the combination of
orientations by "@" corresponds to the description of an orientation by some rotations each one related to the resulting
reference system after execution of the rotations given before.

g)Combining the two rotations ori1 and ori2 to a new rotation ori3, so that rotating any vector p by ori3 to get p'' is the
same as first rotating p by ori1 to get p' and then rotating p' by ori2 to get p'' (that means p'' = ori2 @ p' = ori2 @
POSITION (ori1 @ p) = ORIENTATION (ori2 @ ori1 ) @ p = ori3 @ p) the assignment

ori3 := ori2 @ ori1

will yield to the correct result where M3 = M2 * M1 using the implicit and explicit type conversion properties. For instance
the equation ORIRS(a,b,c) = ORIRS(0,0,c) @ ORIRS(0,b,0) @ ORIRS(a,0,0) is true. More general the combination of
orientations by "@" with operands in reverse order corresponds to the description of an orientation by some rotations all
related to the same reference system.

h)Computing a circular movement with changing gripper orientation

VAR

INT: i;

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 205 of 562

ORIENTATION: rot1 := ORIRS(0,0,30);

POSITION: pos1 := rot1 @ (100,0,0);

ARRAY [1..12] OF ROBTARGET: usercircle;

BEGIN

usercircle[1] := R_ROBTARGET_ACT;

FOR i := 2 to 12

usercircle[i] := usercircle[i-1] @ POSE(rot1,pos1);

{here pose does not describe the cast operator but a

record constant }

ENDFOR;

ENDPROGRAM;

i)Computing a circular movement with fixed but unknown gripper orientation

VAR

INT: i;

POSITION: pos1 := (100,0,0);

ORIENTATION: ori1 := ORIRS(0,0,30);

ARRAY [1..12] OF ROBTARGET: usercircle;

BEGIN

usercircle[1] := R_ROBTARGET_ACT;

FOR i := 2 to 12

usercircle[i] := usercircle[i-1];

pos1 := ori1 @ pos1;

usercircle[i].PSE.POS :=

usercircle[i-1].PSE.POS + pos1;

ENDFOR;

ENDPROGRAM;

j)Calculate the ROBTARGET value K1 for grasping a part on place 1 with coordinates represented by ps1, using the tought
ROBTARGET value K2 from gripping the same part with the same gripper on place 2 with coordinates represented by ps2.
Assuming that the relations between K1 and ps1 and between K2 and ps2 are equal we can form a chain which is used in
the @-expression. Before that we have to define the additional components of K1 which here is done by copying the
components of K2.

K1 := K2

K1.PSE := ps1 @ INV(ps2) @ K2.PSE

k)If p1 and p2 are variables of type POSE, where p2 has a non-zero orientation component, then the result of the
expression

p1 @ POSITION(p2)

differs from the result of the expression

p1 @ p2

because the POSITION type value in the first expression is expanded by a zero orientation as default to get a POSE type
value before computing the result of the @-operation.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 206 of 562

The operation "ROBTARGET @ POSE = RESULT" covers a lot of interesting and useful applications:

type of 1sttype of 2ndinterestinginterpretation

operandoperandcomponent of

robtarget

POSEPOSITIONPOSEshifting the POSE with given POSITION relative to given POSE

POSEPOSITIONPOSITIONshifting the POSITION-component of the POSE with given POSITION relative to given POSE (not
identical with addition of vectors)

POSITIONPOSEPOSEshifting the POSE with given POSITION relative to the basis of the given POSE

ORIENTATIONORIENTATIONORIENTATIONcombining two rotations to a new rotation (see example g))

ORIENTATIONPOSITIONPOSITIONrotation of a vector

POSITIONORIENTATIONPOSEPOSE-Generator

POSITIONPOSITIONPOSITIONaddition of vectors

POSITIONINV(POSITION)POSITIONdifference of vectors
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Operators

Operator =
"*" | "/" | "DIV" | "MOD" | "@" |
"+" | "-" |
"<" | ">" | "<=" | ">=" |
"=" | "<>" |
"AND" |
"OR" | "EXOR".

arithmetical operators:

+addition

-subtraction, sign operator

/division

*multiplication

DIVinteger division

MODmodulo function

boolean operators:

ANDlogical and

ORlogical or

NOTlogical not (unary operator, not in syntax rule)

EXORexclusive or

logical operators:

=equal

>greater

<less

<>not equal

>=greater equal

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 207 of 562

<=less equal

geometric operators:

+addition

-subtraction

/division

*multiplication

@relative translation and rotation


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Function Calls

A function call starts the execution of a local or external function. The actual parameters are passed to the formal
parameters. Parenthesis are necessary even if no parameters are passed.

CallOrRecord =
Object "(" [ ValueList ] ")".

ValueList =
Expression { "," Expression }.

In this case Object defines the identifier of the function, therefore this information is necessary contrary to Record
Constant. The Expressions of the ValueList represent the actual parameters. Therefore the number and the type of
expressions has to correspond to the formal parameters.

Example:

a:=SIN(X);

b:=DISTANCE(point_1,point_2);

c:=init();
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Statements
Construction of Statements

Statement =
[
Assignment |
ProcedureCall |
ProgramflowStatement |
MovementStatement |
I_O_Statement |
ListControlStatement |
ParallelProcessStatement
].

A sequence of statements is called a block.

StatementBlock =
{ LabelIdentifier ":" | Statement ";" }.

Blocks may be empty.

Assignment

Assignment =
Object ":=" Expression.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 208 of 562

The Expression has to be assignment compatible to the left side.

If the data types of both sides are different a type conversion to the data type of the Object is done automatically
according to the following tables:

= = no typeconversion

x = typeconversion

- = not allowed

simple data typeof object

REALBOOLINTCHAR

of expressionREAL=---

BOOL-=x-

INTxx=x

CHARx-x=

geometric data typeof object

POSITIONORIENTAT.POSEROBTARGET

of expressionPOSITION=-x2x2

ORIENTAT.-=x2x2

POSEx1x1=x2

ROBTARGETx1x1x1=

There is no possible type conversion between simple data and geometric data types. In the second table the type
conversion follows the same rules as described for the cast operators. So its not necessary to use the cast operators for
whole expressions on the right hand side of an assignment statement.

For following non simple types of Expression and of Object an assignment is allowed (they are then called assignment
compatible):

-if both types are ARRAY types, if the numbers of elements are identical and if the types of the elements are assignment
compatible.

-if both types are LIST types and if the types of the elements are assignment compatible. After the assignment the object
list has as many elements as the list in the right hand side expression had before.

-if both types are RECORD types and if all components of the records are assignment compatible two by two.

Exception: The predefined data types POSITION and ORIENTATION are not assignment compatible.

-if both types are FILE types and if the types of elements are assignment compatible.

-if one or both types are TEACH types and if the proper types of these teach types are assignment compatible.

-if one or both types are signal types, if the proper types (type1, type2) are assignment compatible and if the assignment
is one of the following assignments:

Object:=Expression

type2INPUT type1

OUTPUT type2type1

OUTPUT type2INPUT type1


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Movement Statements

MovementStatement =
LinearMovement |
PointToPointMovement |
CircleMovement |

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 209 of 562

BrakeStatement.

Path and PTP Statements

LinearMovement =
( "MOVE" | "MOVE_INC" ) "LIN" ToPoint ContinuePathParameter.

PointToPointMovement =
( "MOVE" | "MOVE_INC" ) "PTP" ToPoint PointToPointParameter.

CircleMovement =
( "MOVE" | "MOVE_INC" ) "CIRCLE" Circle ContinuePathParameter.

ToPoint =
Expression | Path.

Circle =
Expression "," Expression | Path.

Path =
"PATH" [ Expression ":" ]
( Object "[" [ IndexBound ] "]" |
"(" ValueList ")" ).

Note:

All the expressions and the array or list elements shall be geometric expressions.

The tool center point (TCP) of the industrial robot moves according to the given interpolation. In MOVE statements the
values of the geometric expressions and of the array elements are interpreted as absolute coordinates. The target pose in
ToPoint is always given in dependence upon the base coordinate system and with respect to the actual tool (R_TOOL).

There are only allowed expressions with the result types ROBTARGET, MAIN_JOINT, ADD_JOINT or JOINT. Expressions with
the result types POSITION, ORIENTATION or POSE will be converted into ROBTARGET values using the components of the
ROBTARGET at the starting point of the actual movement.

In MOVE_INC statements the values of the geometric expressions and of the array elements are interpreted as
increments. POSITION, ORIENTATION or POSE components will be handled as defined for the @-operation. MAIN_JOINT or
ADD_JOINT components will simply be added to the actual axes values.

Statement without PATH:

In LIN and PTP movements the geometric expression defines the target position. In CIRCLE movements the second
geometric expression defines the target position. The coordinates X,Y,Z of the first expression are used as intermediate
point.

Statement with PATH:

Normally the desired path is defined in a list or an one dimensional array of geometric data type ORIENTATION,
POSITION, POSE, MAIN_JOINT, ADD_JOINT, JOINT or ROBTARGET. It can also be given as a comma separated list of values
of such geometric expressions. In case of data types ORIENTATION or POSITION the missing components are taken from
the current position (R_ROBTARGET_ACT.PSE).

The intermediate points are treated as in statements without PATH. A type conversion is done from POSE to ROBTARGET.

The optional geometric expression within the PATH branch must be of data type POSE. It transforms all the positions of
the array or of the list by "optional expression" @ PATH.

In the case of LIN or PTP the path is interpolated according to the statement. Additional parameters and system variables
are valid.

In the case of CIRCLE elements with odd indices define the coordinates X,Y,Z of the intermediate points and elements
with even indices define the coordinates of the target position.

The number of points must be even.

The first array or list element is the first point of the path.

Path smoothing:

Normally the robot stops at the target position. If a path smoothing parameter is defined the robot will not stop. The
kind of path smoothing depends on the defined additional parameter (see below).

Additional parameters:

Additional parameters are only valid for the movement statement in which they are defined (in contrast to the system
variables).

PTP additional parameters:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 210 of 562

PTP additional parameters are currently not supported in COSIMIR and PCROB. Use system variables (R_C_PTP,
...) instead.

PointToPointParameter =
[ "ACT_ROB" ":=" Expression ]
{
"C_PTP" [ ":=" Expression] |
"C_PASS" |
"SPEED_PTP" [ ":=" Expression ] |
"ACC_PTP" [ ":=" Expression ] |
"TIME" ":=" Expression |
"UNTIL" Expression
[ "ERROR" StatementBlock "ENDERROR" ] |
"ALTER_BY" ProcedureCall
}.

parameterdescription

ACT_ROBSpecification of the desired robot. This is only active for the actual move command and opens the scope of the
associated predefined record containing the move parameters. Expression must be an identifier corresponding to a robot
specified by a Robot Specification. If not an error will occur.

Default: system variable R_ACT_ROB.

C_PTPThe arithmetical expression means the factor (%) of the axis distance to the intermediate point where the
smoothing starts. For each axis exists a machine parameter (path smoothing ON/OFF).

Default: system variable R_C_PTP.

C_PASSActivates a path smoothing algorithm that starts the transition when the next set point is passed through. Thus all
points programmed will definitely be passed.

SPEED_PTPThe arithmetical Expression defines an array of factors (%) of a given movement speed.

Example: SPEED_PTP := [ 50.0, 50.0, 100.0, 50.0, 50.0, 50.0, 100.0 ];

Default: system variable R_SPEED_PTP.

ACC_PTPThe arithmetical Expression defines an array of factors (%) of a given movement acceleration.

Default: system variable R_ACC_PTP.

TIMETime for movement

UNTILStop of movement if the logical Expression becomes true (<>0). In this case the statement block following "ERROR"
is executed if this error handling exists.

Only SIGNALS are allowed as variables.

ALTER_BYSpecification of an external procedure controlling the actual movement, for instance by processing sensor
signals. This procedure has to be declared as EXTERNAL. The use of ordinary IRL procedures is not possible. The robot
control vendor or if the robot controller allows the implementation of user specific external routines the user are
responsible for the functionality of the external procedure in connection with the MovementStatement.

SPEED_PTP and TIME as well as C_PTP and C_PASS are mutually exclusive.

CP additional parameters:

Some of the CP additional parameters are currently not supported in COSIMIR and PCROB. Use system variables
(R_C_CP, ...) instead.

ADAX_CONTROL and DEVICE parameters ARE currently supported in COSIMIR and PCROB.

ContinuePathParameter =
[ "ACT_ROB" ":=" Expression ]
[ "ADAX_CONTROL" ":=" Expression ]
[ "DEVICE" ":=" Expression ]
{
"C_CP" [ ":=" Expression ] |
"C_SPEED" [ ":=" Expression ] |
"SPEED_ORI" [ ":=" Expression ] |
"C_PASS" |
"SPEED" [ ":=" Expression ] |
"ACC" [ ":=" Expression ] |
"TIME" ":=" Expression |
"UNTIL" Expression
[ "ERROR" StatementBlock "ENDERROR" ] |
"WOBBLE" |

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 211 of 562

"ALTER_BY" ProcedureCall
}.

parameterdescription

ACT_ROBSpecification of the desired robot. This is only active for the actual move command and opens the scope of the
associated predefined record containing the move parameters. Expression must be of type ARRAY OF CHAR or STRING and
contains the name of the robot. If the name does not correspond to a robot specified in the System Specification a
runtime error will occur.

Default: system variable R_ACT_ROB.

ADAX_CONTROLSpecification of the coordinated movement with respect to additional axes. The Expression describes the
type of coordinated movement. The possible values are

NO_ADAX_CONTROL: usual movement without special coordination


of additional axes

TCP_KEEP: The current position and orientation of the TCP in world


coordinates is kept. Only the ADD_JOINT component of ToPoint or
Circle is considered for the movement.

TCP_KEEP_REL: The current position and orientation of the TCP


relative to the coordinate system of the device given by
DEVICE:=Expression is kept. Only the ADD_JOINT component of
ToPoint or Circle is considered for the movement.

DEVICE_REL: The movement is executed relative to the (possibly moving)


coordinate system of the device given by DEVICE:=Expression.

Default: NO_ADAX_CONTROL

DEVICEDefinition of the device coordinate system for movements relative to additional axes' by the device identification
(D_NO of the D_SPEC_TYPE type). The Expression must be of type INT. This parameter can only be used in conjunction
with the ADAX_CONTROL parameter.

Default: 1 (should be defined in every case)

C_CPThe arithmetical expression means the distance to the intermediate point where the smoothing starts (path
smoothing ON/OFF).
Default: system variable R_C_CP.

C_SPEEDPath smoothing speed value in % of programmed speed (path smoothing ON/OFF)


Default: system variable R_C_SPEED.

SPEED_ORIspeed orientation, length of the path must be zero.


Default: system variable R_SPEED_ORI.

C_PASSActivates a path smoothing algorithm that starts the transition when the next set point is passed through. Thus all
points programmed will definitely be passed.

SPEEDThe arithmetical Expression defines the movement speed (path).

Example: SPEED := 350.0;

Default: system variable R_SPEED.

ACCThe arithmetical Expression defines the movement acceleration (path).

Default: system variable R_ACC.

TIMETime for movement

UNTILStop of movement if the logical Expression becomes true (<>0). In this case the statement block following "ERROR"
is executed if this error handling exists.

Only SIGNALS are allowed as variables.

WOBBLEsuperimposed movement

ALTER_BYSpecification of an external procedure controlling the actual movement, for instance by processing sensor
signals. This procedure has to be declared as EXTERNAL. The use of ordinary IRL procedures is not possible. The robot
control vendor or if the robot controller allows the implementation of user specific external routines the user are
responsible for the functionality of the external procedure in connection with the MovementStatement.

SPEED and TIME as well as C_CP, C_SPEED and C_PASS are mutually exclusive.

Examples:

- movement statements:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 212 of 562

VAR

INPUT BOOL: alarm AT 1;

ROBTARGET: p1 := ( ( (100.0, 1000.0, 0.0), ORIRS(90.0, 0.0, 90.0) ), 4, 100, 0);


{The last but two entry represents the RecordComponent Status, this describes the robot configuration; the last two
values represent additional axes, there is no TURNS component}

ROBTARGET:p2 := ( ( (200.0, 200.0, 10.0), ORIXYZ(90.0, 0.0, 90.0) ), 8, 200, 0);


{the meaning of status is system dependent. For example number 4 means elbow left and number 8 means elbow right}

BEGIN

MOVE LIN p1; { linear movement to P1 }

p1.status := 8; { change of the configuration: elbow left to elbow right }

MOVE PTP p1;

MOVE LIN p2 UNTIL alarm; { move to P2, stop movement, when signal 'alarm' becomes true }

MOVE_INC PTP POSITION(10,30,0);

MOVE PTP R_ROBTARGET_ACT @ POSITION(10,30,0);


{ both commands have the same meaning, shifting the robot TCP position according as local coordinates related to the
TCP system itself }

MOVE PTP POSITION(20,20,-100) @ R_ROBTARGET_ACT;


{ shifting the robot TCP position according as global coordinates related to the world coordinate system }

ENDPROGRAM;

- movement with path

DECLOFF;

VAR

ARRAY[1..10] OF ROBTARGET: path1;

LIST OF ROBTARGET: listpath := [p1,p2];

POSE:p3, p4;

BEGIN

MOVE PTP PATH (p1, p2, p3, p4);{ implicit declaration of p1, p2 as ROBTARGET }

MOVE LIN PATH path1[];

LISTADD p4 TO listpath;

LISTINS p3 INTO listpath AT 3;

MOVE PTP PATH listpath;{results in the same movement as the first statement of that block}

MOVE CIRCLE PATH path1[3..8];

- Programming of the velocity:

R_SPEED := 100.0;

{ Assumed an overridefactor for the velocity is equal to 1.0 (100%). }

{ An overridefeature of a robot controller is outside the scope of this standard. }

MOVE LIN corner;{ velocity = 100.0 mm/s }

MOVE LIN home SPEED := 200.0;{ velocity = 200.0 mm/s }

MOVE LIN start_pos;{ velocity = 100.0 mm/s }

{ Assumed an overridefactor for the velocity changed to 0.8 (80%). }

MOVE LIN corner;{ velocity = 80.0 mm/s }

MOVE LIN home SPEED := 200.0;{ velocity = 160.0 mm/s }

MOVE LIN start_pos;{ velocity = 80.0 mm/s }

©·2000·IRF·EFR·Dortmund

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 213 of 562

COSIMIR® · Programming Language IRL


 
 

Brake Statement

The BRAKE statement is currently not supported in COSIMIR and PCROB.

BrakeStatement =
"BRAKE" ["FAST"].

The BrakeStatement is used to terminate the movement of the robot within procedures called by interrupts. As explained
with the interrupt statement an interrupt can stop the program flow within a movement. Usually the movement would
continue during the processing of the interrupt procedure. To avoid collision the interrupt procedure should stop any
movement with the BrakeStatement.

If the BrakeStatement is performed without the FAST keyword the robot will slow down as fast as possible without
leaving the programmed path. If the FAST keyword is added the robot is stopped abruptly, probably leaving the path
(emergency brake).
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Pause Statement

PauseStatement =
"PAUSE" [ Expression ].

The program is halted until the worker sets the signal 'START' of the robot control system.

Expression has to be of type ARRAY OF CHAR or STRING. If an expression is given it is written to the message line of
control system and deleted after the worker sets the signal 'START'. If no message line exist the expression is written to
the standard output device (STANDARD_OUT).

Example:

PAUSE 'Please change palette';


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Program Halt Statement

ProgramHaltStatement =
"HALT".

The ProgramHaltStatement stops the execution of the program.

 
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
    

Wait Statement

WaitStatement =
"WAIT"
( Expression "SEC" |
"FOR" Expression
[ "TIMEOUT" Expression "SEC"
[ "ERROR" StatementBlock "ENDERROR" ]

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 214 of 562

]
).

WAIT SEC: The program is halted for the number of seconds given in the arithmetical Expression.

WAIT FOR: The program is continued when the logical Expression has the value true (<>0).

If an additional time is given and if the logical expression becomes true before this timeout period ends the program is
continued immediately. Otherwise the statement block following "ERROR" will be executed before the program execution
is continued.

Only WAIT SEC and WAIT FOR are currently supported in COSIMIR and PCROB.

Example:

WAIT 2.4 SEC;{wait 2.4 sec }


©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Parallel Processes Statements

ParallelProcessStatement =
ProcessControlStatement |
VariableControlStatement |
GetStatusStatement |
SemaphoreControlStatement.

IRL allows the definition and use of processes that are executed in parallel with other processes defined within the
program. There are statements controlling the parallel processes themselves, statements controlling the variables
declared as shared variables and statements controlling semaphores to synchronize parallel processes with them.

Controlling parallel processes

ProcessControlStatement =
StartStatement |
StopStatement |
ContinueStatement |
CancelStatement.

Starting a process

A process is started with the StartStatement. If the process had not been started before it is loaded and started at the
beginning. If it had been started but is running or stopped by a StopStatement the StartStatement has no effect. If a
process had terminated itself (by a ReturnStatement or the ENDPROCESS keyword) or was terminated by the
CancelStatement the process is also started at the beginning. The ValueList contains the actual parameters for the
process.

StartStatement =
"START" ProcessIdentifier "(" ValueList ")".

Stopping a process

The StopStatement stops the execution of the given process and of all processes started by the stopped process (child
processes). If no ProcessIdentifier is specified the process or program which calls the StopStatement is stopped. A
stopped process can be restarted at any time and at the point it was stopped by the ContinueStatement.

StopStatement =
"STOP" [ ProcessIdentifier ].

Continuing a process

A stopped process can be continued by the ContinueStatement. If the process is running or had been terminated the
ContinueStatement has no effect. Child processes which where running when the process to be continued had been
stopped are also continued.

ContinueStatement =
"CONTINUE" ProcessIdentifier.

Terminating a process

A process can be terminated by the CancelStatement. A terminated process cannot be continued at the point it had been
stopped. All child processes are terminated as well. The process is completely deleted, all local variables are lost and it
has to be reloaded to start it again (the StartStatement does this automatically). If no ProcessIdentifier is given, all
processes are terminated.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 215 of 562

CancelStatement =
"CANCEL" [ ProcessIdentifier ].
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

List Control Statements

Lists are currently not supported in COSIMIR and PCROB.

ListControlStatement =
ListElementInsertionStatement |
ListElementAddingStatement |
ListElementDeletionStatement |
ListLengthStatement |
ListElementIndexStatement.

ListElementInsertionStatement =
"LISTINS" Expression "INTO" Object "AT" Expression.

ListElementAddingStatement =
"LISTADD" Expression "TO" Object.

ListElementDeletionStatement =
"LISTDEL" Expression "OF" Object.

ListLengthStatement =
"LISTLENGTH" "(" Object "," Object ")".

ListElementIndexStatement =
"LISTINDEX" "(" Object "," Expression "," Object ")".

The first Expression of an ListElementInsertionStatement and the only Expression of a ListElementAddingStatement have
to be assignment compatible with the type of the elements of the list. The second Expression of a
ListElementInsertionStatement or the only Expression of a ListElementDeletionStatement are used to describe the index
of a list element and so they must be assignment compatible with INT. In any ListControlStatement Object has to be of a
List Type.

The insertion of a new element given by the first expression into a list takes place previous to the index given by the
second expression. After insertion the index of the new element is equal to the given index. The index can range from 1
up to the actual length of the list + 1. In the latter case the element insertion has the same result as adding. If the index
is outside that range a runtime error occurs.

Adding a new list element simply takes place at the end of the list.

To delete an element of a list the index of that element has to be given. The index can range from 1 up to the actual
length of the list. In other cases a runtime error occurs.

To get the actual length of a list the ListLengthStatement is used. The first Object there must be a list identifier, the
second Object the actual list length is assigned to must be an identifier of type INT or CHAR, respectively. With an empty
list the result is zero.

With the ListElementIndexStatement it is possible to get the value of the index of the first list element which is equal to
the given Expression that has to be assignment compatible with the type of the list elements. The first Object in the
statement must be a list identifier, the second Object the index is assigned to must be an identifier of type INT or CHAR,
respectively. If no equality is found the result is zero.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Synchronized Action Statement

Synchronized actions are currently not supported in COSIMIR and PCROB.

SynactStatement =
"SYNACT" "WHEN" Expression "DO"
( Assignment | PulseStatement ) [ "DELAY" Expression ].

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 216 of 562

The SynactStatement (SYNchronized ACTion) serves for the fast and exact reaction on an event during the actual robot
movement. It must be inserted just before the MOVE statement to activate the cyclic and parallel monitoring of the logic
condition expressed by the first Expression.

When the condition becomes true (<>0) the given Assignment or PulseStatement is executed exactly once in parallel to
the execution of the MOVE statement. After this or at the end of the movement the monitoring of the condition stops.

The condition must be a simple logical expression without function calls or nested expressions, respectively. It may
contain predefined system variables refering to times or distances. There are predefined variables refering to the start or
to the end point of a movement.

In addition the optional definition of a time delay of the event reaction is possible. The second Expression is the positive
or negative time delay given in seconds.

Multiple SynactStatements for one MOVE statement are allowed but any SynactStatement controls only one MOVE
statement.

Example:

VAR

OUTPUT BOOL: out_5 AT 6;

ROBTARGET: point_1;

...

BEGIN

...

SYNACT WHEN R_DISTANCE_F > 20.0 DO out_5 := TRUE;

MOVE LIN point_1;

...

ENDPROGRAM
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Semaphore Types

In COSIMIR/PCROB a SemaphoreTypeDescription differs in the following way:

SemaphoreTypeDescription =
"SEMA" Identifier.

SemaphoreTypeDeclaration =
SemaphoreTypeDescription ":" SemaphoreTypeIdentifier.

SemaphoreTypeDescription =
"SEMAPHORE" SimpleType.

The semaphore data type in IRL is dedicated to the synchronization of multiple processes.

There are two types of semaphores in IRL. Boolean semaphores that can only be true (=0) or false (<>0) and integer
semaphores with the range of the integer data type.

SemaphoreType =
SemaphoreTypeIdentifier |
SemaphoreTypeDescription.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Synchronization of Parallel Processes Using Semaphores

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 217 of 562

SemaphoreControlStatement =
SemaphoreWaitStatement |
SemaphoreSignalStatement.

SemaphoreWaitStatement =
"SEMA_WAIT" "(" Object ["," Expression] ")".

SemaphoreSignalStatement =
"SEMA_SIGNAL" "(" Object ["," Expression] ")".

IRL supports the use of semaphores to synchronize parallel processes. Semaphores can be of boolean or integer type.
They must be initialized in their declaration. Every semaphore has an associated queue of processes waiting for this
semaphore. This queue may be empty. Processes requesting a semaphore are served according to a first-in first-out rule.
There are two indivisible operations that can be performed on semaphores the SemaphoreWaitStatement and the
SemaphoreSignalStatement.

The Object in each statement must be of type SemaphoreType. The optional argument Expression must only be given for
integer semaphores not for binary semaphores and it must be greater than 0. If this argument is given the semaphore
control operation is indivisibly executed Expression times with Expression evaluated as an integer value. If Expression is
missing the operation will be executed once. The meaning of signalling and waiting are explained in detail for each type
of semaphore.

Binary Semaphores

A process that requests a binary semaphore using the SemaphoreWaitStatement continues execution if the semaphore has
been true (<>0). In the SemaphoreWaitStatement the value of the semaphore is set to false (=0) and can only be set to
true again by the SemaphoreSignalStatement. If the value of the semaphore is false while executing the
SemaphoreWaitStatement the process is put into the BLOCKED state and added to the end of the semaphore's queue of
processes waiting for it. Whenever a SemaphoreSignalStatement is executed while there are waiting processes in the
semaphore's queue the first process in the queue is put into the state RUNNING and removed from the queue but the
semaphore's value stays at false. The semaphore's value will only be changed to true, if the SemaphoreSignalStatement is
executed while the queue is empty.

Example:

...

VAR

SEMAPHORE BOOL: a := FALSE, b := FALSE;

POSE: p;

SENSORDATA: sendata;

...

{ Task A: Sensor-Data processing } { Task B: Robot movements }


... ...

WHILE TRUE WHILE TRUE

{ Read sensor data } .

read_sensor_data(sendata); .

{ Process sensor data } { wait for position }

p := pos_from_data(sendata); SEMA_WAIT a;

{ calculated position available for task { move to position }


B}
MOVE LIN p;
SEMA_SIGNAL a;
{ we are there }
{ wait for position reached }
SEMA_SIGNAL b;
SEMA_WAIT b;
.
ENDWHILE;
.
...
ENDWHILE;

...

Integer Semaphores

Integer semaphores are handled slightly differently than boolean semaphores. Whenever a process requests an integer
semaphore using the SemaphoreWaitStatement, the Expression will be evaluated to an integer value. If Expression is

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 218 of 562

missing, it will default to 1. The value of Expression will be subtracted from the current value of the semaphore and this
will become the new value of the semaphore. If the result is greater or equal than 0 the process will be continued. If the
resulting semaphore's value is less than 0 the process will be put into the BLOCKED state and added to the end of the
semaphore's queue of processes waiting for it.

Whenever a process executes the SemaphoreSignalStatement the Expression, if present, will be evaluated to an integer
value. If Expression is missing it will default to 1. The resulting value will be added to the current value of the
semaphore. If there are processes in the semaphore's queue as many processes as the semaphore's new value will be put
into the state RUNNING and for every process the semaphore's value will be decremented again. All these operations are
executed indivisibly in the SemaphoreSignalStatement.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Interrupt Statement

Interrupts are currently not supported in COSIMIR and PCROB.

The InterruptStatement is used to instantly react on certain events, no matter which part of a program is just executed.
The condition within the InterruptStatement is permanently tested by the robot control system in parallel with the
normal program flow. When the condition becomes true (<>0) the program flow is interrupted and the given procedure is
called. The interrupt can even stop the execution within a statement (e.g. a movement statement) so the programmer
has to be aware, that the movement may continue during execution of the called interrupt procedure. If the movement
has to be stopped this can be done with the brake statement within the interrupt procedure.

After the complete execution of the interrupt procedure or when the procedure is terminated by a ReturnStatement the
program is continued exactly where it was interrupted (provided that the interrupt procedure did not terminate the
complete program). That means the execution of the program will continue with the execution of the interrupted
statement. But if the interrupted statement is a movement statement and the interrupt procedure contains a BRAKE or
another movement statement the interrupted statement has not to be continued. So it depends on the executed
interrupt procedure whether the target point of an interrupted movement statement was reached or not. The three
system variables R_ROBTARGET_START, R_ROBTARGET_END and R_ROBTARGET_INTER (they store the start and target
position of the actual movement statement and the position at the interrupt) can be used to reconstruct a definite state
before returning from an interrupt procedure.

The programmer has to keep in mind that any interrupt switched on will charge the control, thus the number of active
user defined interrupts should not become too large, though this is not restricted by IRL.

The INTERRUPT DECL allows the definition of an interrupt. This statement does not start the interrupt processing. The
first expression has to be of data type integer and is used for identification within other interrupt statements and defines
the priority. Thus interrupts of the same priority are not allowed. The priority defines the order interrupts are processed
in, the highest priority is 255, the lowest is 0. The priorities from 128 to 255 are reserved for system interrupts and may
thus not be used for user defined interrupts. Available system interrupts and their priorities have to be determined in the
documentation of the control in use. The second expression is the logical expression that has to become true to start the
procedure given in the ProcedureCall-parameter. Only procedures may be called (no functions), parameters within the
call are allowed. All variables used in this expression have to be of global scope. To reduce the time needed by the
control for testing the logical expression, the expression should be as simple as possible. Nevertheless IRL does not
restrict its complexity.

As mentioned above the INTERRUPT DECL statement does not activate the interrupt processing. This enables the
programmer to put all interrupt statements at the beginning of the program to improve readability of the program. To
easily change priorities it is recommended to define all interrupt identifiers (and priorities) as integer constants in the
declaration part of the program or in the system declaration. System interrupt identifiers have to be defined in the
system declaration.

InterruptStatement = "INTERRUPT"
("ON" | "OFF" | "ENABLE" | "DISABLE" ) [ Expression ].

The INTERRUPT ON statement activates the interrupt processing of the interrupt with the identifier given in the optional
expression. If no expression is given all interrupts defined are activated.

The INTERRUPT OFF statement deactivates the interrupt processing of the given interrupt. If no expression is given all
interrupts are deactivated. Interrupts occurring when the interrupt is deactivated are not buffered.

INTERRUPT ENABLE / DISABLE enables or disables the interrupt processing. Only activated interrupts can be disabled and
only disabled interrupts can be enabled. The difference between an interrupt switched off and disabled is, that
interrupts occurring in disabled status are buffered and performed when the interrupt is enabled again in order of their
priority. If no expression is given, all interrupts are enabled / disabled.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 219 of 562

Getting the Status of a Process

GetStatusStatement =
"GETSTATUS" "(" ProcessIdentifier "," Object ")".

The GetStatusStatement returns the actual status of the given process. As part of the System Specification there have to
be declared integer constants for each process state. Possible states are:

0 = R_PROCESS_READY:the process is ready.


1 = R_PROCESS_RUNNING:the process is running.
2 = R_PROCESS_STOPPED:the process is stopped.
3 = R_PROCESS_BLOCKED:the process is blocked.

The following figure shows all possible states of a process and the statements controlling the changes between different
states.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Devices and Groups (Additional Axes)

IRL supports additional axes. These additional axes are controlled by the robot controller and may be for example
external devices like positioners or internal devices like a linear axis (rail) the robot is mounted on. The joint values of
these devices are determined by the A_JOINT component (of type ADD_JOINT) of JOINT or ROBTARGET variables.

IRL allows only PTP movements of additional axes but it enables the user to synchronize the movements of the robot and
the additional axes in time as well as kinematically.

To execute a movement synchronized in time a normal MOVE statement with a ToPoint with an A_JOINT component will
be sufficient.

For a movement synchronized in time and in space (kinematically) a MOVE statement with the ADAX_CONTROL and
DEVICE parameters will be used.

For this type of kinematically synchronized movements the specification of a group of devices, that are moved in a
coordinated fashion, is necessary. To allow this, each device in a cell is described in the system specification using the
array D_DEVICES of R_DEVICE_NUMBER elements of the system data type D_SPEC_TYPE.

Example (exctract from the system specification):

CONST

INT :R_DEVICE_NUMBER := 4;

INT :AX_NONE := -1; { No device }

INT :AX_MAIN := 0; { Main axes (robot) }

INT :ADAX_IS := 1; { Additional axes starting the kinematical chain; e.g. a rail }

INT :ADAX_IE := 2; { Additional axes ending the kinematical chain }

INT :ADAX_EX := 3; { External additional axes; e.g. a positioner }

TYPE

RECORD

INT :D_NO; { Unique identification number of this device; must be >= 0 }

INT :D_AXES_TYPE; { Type of additional axis: AX_MAIN, ADAX_IS, ADAX_IE, ADAX_EX; for information only }

INT :D_PRED_DEVICE; { Identification number of the preceeding device in the kinematical chain; -1 if there is no
predecessor }

INT :D_NJ; { Number of joints of this device }

ENDRECORD = D_SPEC_TYPE;

VAR

ARRAY[1..R_DEVICE_NUMBER] OF D_SPEC_TYPE :

D_DEVICES :=

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 220 of 562

[ (1, ADAX_IS, -1, 1), { a rail }

(2, AX_MAIN, 1, 6), { a 6 axis robot mounted on the

rail }

(3, ADAX_EX, -1, 2), { a 2 axis positioner }

(4, ADAX_EX, -1, 3) { a 3 axis positioner }

]; { all devices }

Furthermore the individual configuration of kinematically coordinated devices is defined by the R_DEVICES array of the
robot specification, which enumerates all devices that will be considered in movement statements for that group of
devices. In the following example four groups of devices are defined. GROUP_1 and GROUP_2, based upon the previous
example, differ only in the external positioner; the group POSITIONER_1 comprises only the 2 axis positioner whereas
POSITIONER_2 comprises only the 3 axis positioner:

ROBOT GROUP_1 :=

R_SPEC_TYPE(

...

[ 1 {rail}, 2 {robot}, 3 {2 axis positioner},

AX_NONE {just to fill up} ],

...

);

ROBOT GROUP_2 :=

R_SPEC_TYPE(

...

[ 1 {rail}, 2 {robot}, 4 {3 axis positioner},

AX_NONE {just to fill up} ],

...

);

ROBOT POSITIONER_1 :=

R_SPEC_TYPE(

...

[ 3 {2 axis positioner},

AX_NONE, AX_NONE, AX_NONE {just to fill up} ],

...

);

ROBOT POSITIONER_2 :=

R_SPEC_TYPE(

...

[ 4 {3 axis positioner},

AX_NONE, AX_NONE, AX_NONE {just to fill up} ],

...

);

Using these definitions we can build the following example, that uses multitasking to load and unload the two positioners
and to do some welding. Task A does the welding, Task B loads and unloads positioner 1 and Task C (not listed) loads and
unloads positioner 2:

{ Task A: Welding } { Task B: Loading and Unloading 1 }


... ...

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 221 of 562

{ use the robot together with the 2 axis R_ACT_ROB := POSITIONER_1;


positioner 1 }
WHILE TRUE
R_ACT_ROB := GROUP_1;
{ load positioner 1 }
{ wait for workpiece on positioner 1 }
load_positioner(1);
SEMA_WAIT positioner_1_loaded;
SEMA_SIGNAL positioner_1_loaded;
weld(1); { do welding }
{ wait for welding on 1 done }
SEMA_SIGNAL positioner_1_done;
SEMA_WAIT positioner_1_done;
{ use robot with 3 axis positioner 2 }
unload_positioner(1);
R_ACT_ROB := GROUP_2;
ENDWHILE;
{ wait for workpiece on positioner 2 }

SEMA_WAIT positioner_2_loaded;

weld(2); { do welding }

SEMA_SIGNAL positioner_2_done;

...

Switching between the groups is done by the R_ACT_ROB variable or the ACT_ROB clause.

Assignment of ADD_JOINT components and device joints:

As the ADD_JOINT system data type comprises all additional axes in a cell, the manufacturer of the robot controller has
to document the assignment of the components of the ADD_JOINT structure and the devices in the cell. This assignment
will be fixed. In a movement statement only those additional axes will be moved, that belong to the actual group of
devices.

Device "TCP" coordinate systems:

Furthermore the manufacturer has to document the position and orientation of all device "TCP" coordinate systems, that
might be used for relative movements.

Types of coordinated movements:

The ADAX_CONTROL parameter of the movement statements defines the type of kinematically coordinated movement.
There are three types of movements:

NO_ADAX_CONTROL: usual movement without special coordination of additional axes

TCP_KEEP: The current position and orientation of the TCP in world coordinates is kept. The addional axes are moved
according to the ADD_JOINT component of ToPoint or Circle. If the movement of the additional axes would move the
TCP, the robot's joints are moved to compensate for that.

TCP_KEEP_REL: The current position and orientation of the TCP relative to the "TCP" coordinate system of the device
given by DEVICE:=Expression is kept. Only the ADD_JOINT component of ToPoint or Circle is considered for the
movement. This type of movement is useful to re-orient a workpiece on a positioner while keeping the relative position
of the tool towards the workpiece.

DEVICE_REL: The movement is executed relative to the (possibly moving) "TCP" coordinate system of the device given by
DEVICE:=Expression. This type of movement is intended to move the robot e.g. on a linear path relative to a workpiece
moved by a positioner.

Example:

{ A cell composed of a robot and an external positioner }

{ Extract from the System specification }

CONST

INT : R_DEVICE_NUMBER := 2;

TYPE

RECORD

...

ARRAY[1..R_DEVICE_NUMBER] OF INT: R_DEVICES;

...

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 222 of 562

ENDRECORD = R_SPEC_TYPE;

ROBOT

ROB_AND_POS := R_SPEC_TYPE(

...

[ 1 {the robot }, 2 { the external positioner } ],

...

);

VAR

{ The robot and the positioner }

ARRAY[1..R_DEVICE_NUMBER] OF D_SPEC_TYPE:

D_DEVICES := [ (1, AX_MAIN, -1, 6) { a 6 axis robot },

(2, ADAX_EX, -1, 3) { a 3 axis external positioner } ];

{--- part of the robot program --- }

VAR

TEACH POSE: start, p1, p2, p3;

ADD_JOINT: pos_start := ADD_JOINT(0.0,0.0,0.0);

TEACH ADD_JOINT: pos_p1, pos_p2, pos_p3;

BEGIN

R_ACT_ROB := ROB_AND_POS;

{ Move the robot and the positioner to the starting position. No kinematical synchronization }

MOVE PTP ROBTARGET(start,0,[0,0],pos_park);

{ Start welding, while moving the tool relative to the workpiece moved by the positioner. The robot movement is
kinematically synchronized with the movement of the workpiece. }

start_weld(3.0);

MOVE LIN ROBTARGET(p1,0,[0,0],pos_p1)

ADAX_CONTROL:=DEVICE_REL

DEVICE:=2;

MOVE CIRCLE ROBTARGET(p3,0,[0,0],pos_p3),

ROBTARGET(p3,0,[0,0],pos_p3)

ADAX_CONTROL:=DEVICE_REL

DEVICE:=2;

stop_weld();

©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Position Data Type

TYPE

RECORD REAL: X,Y,Z ENDRECORD = POSITION;

The predefined data type POSITION is given by three real numbers, describing the coordinate values in X-, Y- and Z-
direction. The three values will be assigned in a single way to a record component or can be treated as an entity.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 223 of 562

Assignment to a position variable:

VAR

POSITION: p;

REAL: x := -10.5;

BEGIN

p.X := x;

p.Y := p.Y * 0.5;

p.Z := 2.01;

p := (x,p.y*0.5,2.01);

p := POSITION(100.0,150.0,200.0);

Selection of a component of POSITION:

x := p.X;
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Device Specification Type

The Type D_SPEC_TYPE is used to define the devices that are controlled by the robot controller. These devices are the
robot(s) and all devices that are controlled via additional axes like rails, positioners mounted at the robot mounting
flange and external positioners.

Example:

TYPE

RECORD

INT :D_NO; { Unique identification number of this device; must be >= 0 }

INT :D_AXES_TYPE; { Type of additional axes: AX_MAIN, ADAX_IS, ADAX_IE, ADAX_EX; for information only }

INT :D_PRED_DEVICE; { Identification number of the preceding device in the kinematical chain; -1 if there is no
predecessor }

INT :D_NJ; { Number of joints of this device }

ENDRECORD = D_SPEC_TYPE;

All devices together are described in the Array D_DEVICES with R_DEVICE_NUMBER elements. To define groups of devices,
that are controlled together by MOVE statements, the R_SPEC_TYPE is used.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Multi Robot Handling

Multi robot handling is currently not supported in COSIMIR and PCROB. Use separate programs to control
multiple robots instead.

All robots used within an IRL program must be specified within the System Specification. The following Robot
Specification can only be used there. It is possible to use it more than once. The identifier of each robot within one
System Specification must be unique.

RobotSpecification =
"ROBOT" Identifier ":=" CallOrRecord ";".

CallOrRecord has to be a constant of type R_SPEC_TYPE to initialize the robot specific system parameters.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 224 of 562

For every robot declared by a Robot Specification a record variable of type R_SPEC_TYPE is automatically declared having
an identifier equal to that of the robot given in the specification. Because this record variable has to be initialized all the
parameters have a defined value at the beginning of the program.

Even if the controller handles only one robot a Robot Specification is necessary.

The use of the ACT_ROB clause within a move command or an assignment to the corresponding system variable
R_ACT_ROB within the statement part of a program opens the scope of the robot specific record associated with the used
robot identifier. So there is no need to write e.g. this_robot.R_SPEED if the speed parameter of this_robot shall be
accessed and R_ACT_ROB holds the value this_robot. Of cause a parameter of any other robot can be accessed by the
normal record selector, e.g. another_robot.R_SPEED. Furthermore the use of the ACT_ROB clause or an assignment to the
R_ACT_ROB variable selects the desired robot for the following move commands.

The use of the ACT_ROB clause or an assignment to R_ACT_ROB will cause an error if the used expression does not
correspond to an identifier of a robot specified in the System Specification.

By default R_ACT_ROB holds the value of the first specified robot and so the corresponding record scope is open at the
beginning of the program execution.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Objects

Objects have a predefined or structured data type.

Object =
Identifier |
ArrayOrListElement |
RecordComponent.

RecordComponent =
Object "." ComponentIdentifier.

ArrayOrListElement =
Object "[" ArrayExpressionList "]".

ArrayExpressionList =
Expression { "," Expression }.

The number of the arithmetical expressions in an ArrayExpressionList must be equal to the dimension of the array or list.
So in the case of lists or one dimensional arrays there must be exactly one Expression. The expressions to index the array
or list elements have to be of data type INT or CHAR, respectively.

Example:

Given the following declarations:

TYPE

ARRAY [1..5] OF ROBTARGET = position_type;

{ Array with elements of type ROBTARGET }

RECORD

ROBTARGET: p;

REAL: current;

ENDRECORD = spot;{ record type definition }

VAR

ROBTARGET: p1; { variable of record type ROBTARGET }

position_type: pos_array;{ variable of type position_type }

spot: door; { variable door of record type spot }

In this case the following record components are correct:

p1.PSE.POS.X{ x component of p1 }

pos_array[1].PSE.POS.X{ x component of the first element of pos_array }

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 225 of 562

door.p.PSE.POS

door.p.PSE.POS.X

door.current
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Processing Sensor Data in IRL

Except the ALTER_BY-specification in MovementStatements IRL provides no explicit sensor signal processing statements.

With the possibility of the declaration of external functions and procedures and of the definition and use of parallel
processes there are many tools available to implement a great variety of cell specific, robot specific or user specific
sensor processing tasks. This is true with computations critical in time (realized by external procedures or functions) as
with very complex computational task which may be realized by parallel processes.

On the other hand and because of the great number of different sensor signals, sensor functions and parameters
influencing the sensor processing it is impossible to give a useful selection of recommended routines handling the sensor
data processing.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Controlling shared variables

The LOCK and UNLOCK statements are currently not supported in COSIMIR and PCROB. Semaphores must be
used instead.

The variables controlled by the following statements have to be declared as shared variables and each process using a
shared variable must include the declaration of it.

VariableControlStatement =
LockStatement |
UnlockStatement.

Locking variables

LockStatement =
"LOCK" Identifier { "," Identifier }.

The LockStatement enables a process to access the shared variables or system resources (like robot arms, serial or
parallel interfaces, channels, signals etc.) given in the identifier list. In the following shared variables and system
resources are called resources. Only one process a time can lock a certain resource. If a process has locked a resource (or
several resources) all other processes trying to lock that resource are automatically stopped until the resource is
unlocked. Then the second process that tried to lock the resource gets the access and continues. The waiting processes
are served in the order they tried to get access to the resource.

Unlocking variables

UnlockStatement =
"UNLOCK" [ Identifier { "," Identifier } ].

The UnlockStatement returns control over the locked resources given in the identifier list to the system. The system then
decides, whether another process gets access to those resources. If the UnlockStatement is called without any identifier,
all resources locked by the process are unlocked.
©·2000·IRF·EFR·Dortmund

COSIMIR® · Programming Language IRL


 
 

Units

velocity (path) [mm/s]

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 226 of 562

acceleration (path)[mm/(s*s)]

distance [mm]

angle [degree]

time [sec]

velocity (axis) real factor (%) of a maximum value

acceleration (axis)real factor (%) of a maximum value


©·2000·IRF·EFR·Dortmund

COSIMIR® · Movemaster Command


 

MOVEMASTER COMMAND
Overview

Overview of commands

Explanation of commands

Alphabetic command list

Position and motion control commands

Program control commands

Hand control commands

I/O control commands

Operation, substitute, exchange command

Communication command (Using RS232C)

Other command

Parameter

Overview of the parameters for the RV-E2 and RV-E3J

Overview of the parameters for additional axes of RV-E2 and RV-E3J

Overview of the parameters for the RV-EN series

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Explanation of command
All commands are explained in alphabetical order to the following.

(1) A viewpoint of command explanation

This shows the meaning of title described in the explanation of each command.

* Symbol

The command that has * mark can not be described in the program with line number. (If done, it will become alarm.) You
should execute the commands directly by personal computer or teaching box.

Function

Shows the brief function of command.

Input Format

Shows the argument of the command entry.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 227 of 562

< > indicates the command parameter.[ ] indicates the parameter that can be omitted.

Term

Shows the meaning and limited range of command argument.

Explanation

Explains detailed function and precautions.

Relating Parameters

Shows the parameters that have relationship with the command.

Sample program

Gives a typical program using MOVEMASTER command and BASIC language.

(2) Line

Line consists of line number and a command sentence. The length of one line contains 120 characters in maximum.

(3) Position number

The range of position numbers is 1-999. When programs are different from each other, positions from 1-900 are
memorized as individual data even if they have the same number. On the other hand, positions from 901-999 are
memorized as common.

Further, you can appoint position number indirectly by the value of counter.

An example:

10 SC 21 ,10;Sets value 10 in counter 21.

20 MO @21;Moves to position 10, the value of counter 21.

Relating Commands: CF, HE, MA, MC, MO, MR, MRA, MS, MT, MTS, PC, PL, PR, PX and SF.

(4) Counter number

The range of counter number is 1-99. When program is different from each other, counters from 1-90 are memorized as
individual data even if they have the same number. On the other hand, counters from 91-99 are memorized as common.
Further, you can appoint counter number indirectly by the value of counter.

An example:

10 SC 21 ,10;Sets value10 in counter 21.

20 IC —21;Adds one to counter 10, the value of counter 21.

Relating Commands CL, CP, CR, DC, IC, OC and SC.

(5) Character string numbers

By using a character string number, character strings (max. 120 alphanumeric or symbol characters) can be
communicated to the external device over the serial channel.

The character string number can be specified from $1 to $99. If the program differs between $1 and $90, these will be
registered as separate data even if the number is the same. On the other hand, $91 to $99 are common for all programs.
Depending on the counter number value (details), the character string number cannot be specified indirectly.

An example:

10 SC $1, "ABC";Character string "ABC" is set in character string number 1

20 CP $1 ;The details of character string number 1 are set

; in the character string register

30 CL $2 ;The details of the character string register are set in

; character string number 2.

Relating commands CL, CP, CR, INP, LG, NE, EQ, SM.

(6) Direct execution

If you transfer command to the controller without line number by personal computer or teaching box, it will be executed
instantaneously. (Not to be programmed.) Especially hold with care in case executing moving command. Conditional
branching commands are effective only in the program with line number and not be executed directly. (Example
‚s‚a,‚d‚p)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 228 of 562

You can execute HLT, PRN and RS-232C communication command even if the program is running.

(7) Internal register

The data taken from external I/O are memorized in so called "internal register", then used for conditional branching,
comparison, logical bit operation, counter setting, and etc. When you carry out conditional branching on the basis of
counter value, you use this internal register too.

Relating Commands AN, CL, CP, DR, EQ, ID, NE, OR, SM, TB and XO.

(8) Character string register

The character string led in to the external device over the serial channel is stored in the memory called the "character
string register". It is then used for making settings of the character string comparison or character string number to jump
conditions.

Relating commands CL, CP, INP, LG, NE, EQ, SM.

(9) Non-executing commands

These commands are provided for the purpose of keeping compatibility with MOVEMASTER M2 series. If you execute these
commands in MOVEMASTER Super series, no operation and no alarm will occur.

Relating Commands IN, ML, NR, OT, SL, TR and WR.

(10) Internal resister and related command. (Reference)

It shows it as follows about interior resister, counter, input port and flow of treatment of command concerned.

Character string register and related commands (Reference)

The flow of the character string register, character string and related command process is shown in the manual.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Overview of commands
This section gives an overview of a wealth of commands provided for the MOVEMASTER command method. Commands are classified
mainly into seven types to the following. You should use appropriate commands according to your application.

(1) Position and motion control commands

These commands are concerned with definition of position and coordinates as well as assignment of interpolation, speed, timer,
tool, palette, etc.

(2) Program control commands

These commands are concerned with conditional branching, repetitive operation, interrupting of signals, starting and stopping,
counter operation, etc.

(3) Hand control commands

These commands are concerned with opening/closing action of hand. For the optional motor-operated hand, you can control
gripping force by parameter setting.

(4) I/O control commands

These commands are concerned with input/output control of external I/O. Both single and parallel bits can be handled enabling the
logical operation in the internal register.

(5) Operation, substitute, exchange command

These commands are concerned with mathematical operations.

(6) Communication command (Using RS232C)

These commands transfer internal information of the robot such as counters, positions, program list, input/output signal status,
parameters to personal computer.

(7) Other command

These commands are concerned with setting of parameters, selecting of programs, resetting of alarms, and describing of comments.
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 229 of 562

COSIMIR® · Movemaster Command


 
Position and motion control commands

These commands are concerned with definition of position and coordinates as well as assignment of interpolation, speed, timer,
tool, palette, etc.

Command   Function
ADL (Acceleration/Deceleration)
CF (Change Figure)
DJ (Draw Joint)
DP (Decrement Position)
DS (Draw Straight)
DW (Draw)
HE (Here)
HO (Home)
IP (Increment Position)
JRC (Joint Roll Change)
MA (Move Approach)
MC (Move Continuous)
MJ (Move Joint)
ML (Move Linear)
MO (Move)
MP (Move Position)
MPB (Move Playback)
MPC (Move Playback Continuous)
MR (Move R)
MRA (Move R A)
MS (Move Straight)
MT (Move Tool)
MTS (Move Tool Straight)
NT (Nest)
OG (Origin)
OVR (Override)
PA (Pallet Assign)
PC * (Position Clear)
PD (Position Define)
PL (Position Load)
PT (Pallet)
PW (Pulse Wait)
PX (Position Exchange)
SD (Speed Define)
SF (Shift)
SL (Set Limit)
SP (Speed)
TI (Timer)
TL (Tool)
TLM (Tool Matrix)
WRM (Wait Robot Motion)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Program control commands

These commands are concerned with conditional branching, repetitive operation, interrupting of signals, starting and stopping, counter
operation, etc.

Command    Function
CL (Counter Load)
CP (Compare Counter)
DA (Disable Act)
DC (Decrement Counter)
DL * (Delete Line)
EA (Enable Act)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 230 of 562

ED (End)
EQ (Equal)
GS (Go Sub)
GT (Go To)
HLT (Halt)
IC (Increment Counter)
LG (If Larger)
LR * (Line Read)
NE (If Not Equal)
NW * (New)
NX (Next)
RC (Repeat Cycle)
RN * (Run)
RT (Return)
SC (Set Counter)
SM (If Smaller)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Hand control commands

These commands are concerned with opening/closing action of hand. For the optional motor-operated hand, you can control
gripping force by parameter setting.

Command    Function
GC (Grip Close)
GF (Grip Flag)
GO (Grip Open)
GP (Grip Pressure)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
I/O control commands

These commands are concerned with input/output control of external I/O. Both single and parallel bits can be handled enabling the
logical operation in the internal register.

Command    Function
AN (And)
ID (Input Direct)
IN (Input)
OB (Output Bit)
OC (Output Counter)
OD (Output Direct)
OR (Or)
OT (Output)
TB (Test Bit)
TBD (Test Bit Direct)
XO (Exclusive Or)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Communication commands (using RS232C)

These commands transfer internal information of the robot such as counters, positions, program list, input/output signal status,
parameters to personal computer.

Command   Function
CR (Counter Read)
DR (Data Read)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 231 of 562

ER * (Error Read)
LR * (Line Read)
NR (Nest Read)
PMR (Parameter Read)
PR (Position Read)
QN (Question Number)
STR * (Step Read)
VR (Version Read)
WH (Where)
WT (What Tool)
WTM (What Tool Matrix)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Operation, substitute, exchange commands

These commands are concerned with mathematical operations.

Command     Function
ADD (Add)
AN (And)
DC (Decrement Counter)
DIV (Divide)
IC (Increment Counter)
MUL (Multiply)
SC (Set Counter)
SUB (Subtract)
XO (Exclusive Or)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Other commands

These commands are concerned with setting of parameters, selecting of programs, resetting of alarms, and describing of comments.

Command   Function
INP (Input)
N* (Number)
OPN (Open)
PMW (Parameter Write)
PRN * (Print)
RS * (Reset)
TR * (Transfer)
WR * (Write)
' (Comment)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Alphabetic command list
Command    Function
ADL (Acceleration/Deceleration)
ADD (Add)
ADL (Acceleration/deceleration)
AN (And)
CF (Change Figure)
CL (Counter Load)
CP (Compare Counter)
CR (Counter Read)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 232 of 562

DA (Disable Act)
DC (Decrement Counter)
DJ (Draw Joint)
DIV (Divide)
DL * (Delete Line)
DP (Decrement Position)
DR (Data Read)
DS (Draw Straight)
DW (Draw)
EA (Enable Act)
ED (End)
EQ (Equal)
ER * (Error Read)
GC (Grip Close)
GF (Grip Flag)
GO (Grip Open)
GP (Grip Pressure)
GS (Go Sub)
GT (Go To)
HE (Here)
HLT (Halt)
HO (Home)
IC (Increment Counter)
ID (Input Direct)
IN (Input)
INP (Input)
IP (Increment Position)
JRC (Joint Roll Change)
LG (If Larger)
LR * (Line Read)
MA (Move Approach)
MC (Move Continuous)
MJ (Move Joint)
ML (Move Linear)
MO (Move)
MP (Move Position)
MPB (Move Playback)
MPC (Move Playback Continuous)
MR (Move R)
MRA (Move R A)
MS (Move Straight)
MT (Move Tool)
MTS (Move Tool Straight)
MUL (Multiply)
N* (Number)
NE (If Not Equal)
NR (Nest Read)
NT (Nest)
NW * (New)
NX (Next)
OB (Output Bit)
OC (Output Counter)
OD (Output Direct)
OG (Origin)
OPN (Open)
OR (Or)
OT (Output)
OVR (Override)
PA (Pallet Assign)
PC * (Position Clear)
PD (Position Define)
PL (Position Load)
PMR (Parameter Read)
PMW (Parameter Write)
PR (Position Read)
PRN * (Print)
PT (Pallet)
PW (Pulse Wait)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 233 of 562

PX (Position Exchange)
QN (Question Number)
RC (Repeat Cycle)
RN * (Run)
RS * (Reset)
RT (Return)
SC (Set Counter)
SD (Speed Define)
SF (Shift)
SL (Set Limit)
SM (If Smaller)
SP (Speed)
STR * (Step Read)
SUB (Subtract)
TB (Test Bit)
TBD (Test Bit Direct)
TI (Timer)
TL (Tool)
TLM (Tool Matrix)
TR * (Transfer)
VR (Version Read)
WH (Where)
WR * (Write)
WRML (Wait Robot Motion)
WTM (What Tool Matrix)
XO (Exclusive Or)
' (Comment)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ADD (Add)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Add the direct value or the contents of the specified counter to the internal register value.

Input Format

ADD <Operation data>

Term

<Operation data>   Describes the data to be operated as a numeric value or counter No. with @.
-32768 <= numeric value (decimal) <= 32767
&8000 <= numeric value (hexadecimal) <= &7FFF
@1 <= Counter No. <= @99

Explanation

Designate the operation data setting as a numeric value or counter No.


When designating with a numeric value, use a decimal or hexadecimal value. When using a hexadecimal, add a "&" to the head of
the operation data.
When setting with a counter No. add a "@" to the head of the counter No.
The contents of the set counter No. will be used as the operation data.
The operation results are stored in the internal register, so operation, comparison and reading, etc., of the operation results can
be carried out with the related commands.
(Refer to SUB, MUL, DIV, EQ, NE, LG, SM, CL, DR and OR commands)

Sample program (MOVEMASTER Command)

10 CP 1 'Stores counter No. 1 value in internal register


20 ADD @2 'Add counter No.2 to the contents internal register value.
30 CL 3 'Sets internal register value in counter No. 3 (Counter No. 3 = counter No. 1 + counter No.
2)
40 CP 1 'Stores counter No. 1 value in internal register
50 ADD 15 'Add 15 to the contents of the internal register value.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 234 of 562

60 CL 4 'Sets internal register value in counter No. 4 (Counter No. 4 = counter No. 1 + 15)

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ADL (Acceleration/deceleration)

RV-A, RH-AH, RP-AH, RV-EN, RV-E with additional axis

Function:

Sets the acceleration/deceleration time for the robot and additional axis.

Input Format

ADL [<Acceleration time>] [, <Deceleration time>] [, <Valid devices>]

Term

<Acceleration time>   Sets the acceleration time for reaching the motor rated speed.
0 <= Acceleration time <= 2000 (msec)
<Deceleration time>   Sets the deceleration time for reaching the motor rated speed.
0 <= Deceleration time <= 2000 (msec)
<Valid devices> Specifies the device for which acceleration/deceleration will be valid.
0: Robot (When omitted)
1: First additional axis
2: Second additional axis

Explanation

This is an additional command for the additional axis system.


Sets the acceleration/deceleration time for each device.
The acceleration time is the time it takes from a stopped position to the motor rated speed.
The deceleration time is the time it rakes from the motor rated speed to a stopped position.
The acceleration time and the deceleration time have the same value as that for the SD command. Consequently, the robot‚s
acceleration/deceleration times can be set with the ADL and SD commands.
With this command, the value of the parameter AXAD does not change.
When omitting an argument, all the other settings are still valid.
When the power is turned on, it will have the initial value of the parameter AXAD.
When a non-existing device is designated, it will not execute.

Related parameters

AXAD

Sample program (MOVEMASTER Command)

10 MO 1 'Move to the position 1


20 ADL 100,100,1 'Set the acceleration time for the first additional axis to 0.1sec.
30 MO 2 'Move to the position 2

   

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series without any additional axis.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 235 of 562

 
AN (And)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

ANDs the specified value with the internal register, then stores the result to the internal register.

Input Format

AN <operation data>

Term

<Operation data>   Specify the data to be operated.


-32768 <= operation data (decimal) <= 32767
& 8000 <= operation data (hexadecimal) <= &7FFF

Explanation

Specify the data to be operated in decimal or hexadecimal.


Any hexadecimal value must be headed by "&".
The operation result is stored into the internal register and can be changed, compared or read by relevant commands. (See the
EQ, NE, LG, SM, CL and DR, OR commands)
Execution of the AN command after the input commands (ID or IN) allows receiving of only the required bits of the parallel input
data fetched from the external device

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 AN &000F 'Receives four lower bits only
30 CL 12 'Loads above data into counter 12
40 EQ 8,200 'Jumps to line 200 if above data is equal to 8.
50 ED 'Ends program.
:
200 MO 99 'Moves to position 99.

    

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
CF (Change Figure)

RV-A, RV-E-Robot with 5 axes (RV-2AJ, RV-E3J, RV-E5NM, etc.)

Function:

Changes the attitude data of the robot at the specified position.

Input Format

CF <Position number> [, [<R/L>] [, [<A/B>]]]

Term

<Position number>   Specify position number changing attitude data in integer value.
1 <= Position number <= 999
<R/L>   Appoint structure flag of the robot to Right or Left.
R : Right (Default)
L : Left
<A/B> Appoint structure flag of the robot to Above or Below.
A :Above (Default)
B :Below

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 236 of 562

Explanation

Changes the attitude data of the robot at the specified position.


Does not effect the coordinate data of the specified position and the open/close state of the hand.
Even if the position is reachable before executing this command, there is case becoming not reachable in the waist and shoulder
joint after execution.
You can confirm the attitude of the specified position by PR command.

Sample program (MOVEMASTER Command)

10 PD 1,-280,-50,970,-10,-20,L,A, 'Defines the position 1.(Left, Above)


20 MO 1 'Moves to position 1.
30 CF 1,R,A 'Changes the attitude of position 1.(Right, Above)
40 MO 1 'Moves to position 1.

RV-A, RV-E-Robot with 6 axes (RV-1A, RV-E2, RV-E4N, etc.)

Function:

Changes the attitude data of the robot at the specified position.

Input Format

CF <Position number> [, [<R/L>] [, [<A/B>] [, [<N/F>]]]]

Term

<Position number>   Specify position number changing attitude data in integer value.
1 <= Position number <= 999
<R/L>   Appoint structure flag of the robot to Right or Left.
R : Right (Default)
L : Left
<A/B> Appoint structure flag of the robot to Above or Below.
A :Above (Default)
B :Below
<N/F>   Appoint structure flag of the robot to Non flip or Flip.
N : Non flip (Default)
F : Flip

Explanation

Changes the attitude data of the robot at the specified position.


Does not effect the coordinate data of the specified position and the open/close state of the hand.
Even if the position is reachable before executing this command, there is case becoming not reachable in the waist and shoulder
joint after execution.
You can confirm the attitude of the specified position by PR command.

Sample program (MOVEMASTER Command)

10 PD1,530,0,470,10,135,-10,R,A,N 'Defines the position 1. (Right, Above, Non flip)


20 MO 1 'Moves to position 1.
30 CF 1,R,A 'Changes the attitude of position 1.(Right, Above, Flip)
40 MO 1 'Moves to position 1.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
CL (Counter Load)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The internal register value is set in the counter with the specified number. The character string register details are set in the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 237 of 562

character string with the specified value.

Input Format

CL <counter number/character string number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99
<Character string number>   Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99

Explanation

<When counter number is specified>

Sets the data fetched from the input port to the specified counter. Hence, the CL commands must be executed after the input
command. (See ID)
Since the data from the input port is treated as signed, the data set to the counter is signed. (Take value between -32768 and
32767.)
Used to specify the number of job sequences and the counter value at palletizing from an external device, such as a
programmable controller. At this case, any of the logical operation commands (see AN, OR or XO) may be used as necessary.
Execution of the CL command after the CP command allows the counter data to be transferred.
The counter value can be changed, compared or read by the relevant commands.
(See IC, DC, SC, CP and CR commands.)

<When character string number is specified>

The data lead in from the character string register is set in the specified character string. Thus, this command must be executed
after the character string register setting command (refer to CP, INP commands) is executed.
This is used to set and confirm the work details or work results from an external device such as a sequencer. Use the compare
command are required at this time. (Refer to EQ, LG, NE, SM commands.)
The character string register value is set in the specified character string by this command, so if this command is executed after
the CP command, the data can be copied between character strings.
Operation, comparison and reading of the character string are possible by using the related commands.
(See CP, CR, EQ, INP, LG, NE, SC, SM commands.)

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 CL 25 'Sets above data to counter 25.
30 CP 11 'Sets data of counter 11 to internal register.
40 CL 21 'Sets data of internal register to counter 21.
50 SC $5,"ABC" 'Set character string "ABC" in character string number 5
60 CP $5 'Set details of character string number 5 in the character string register
70 CL $10 'Set the details of the character string register in character string number 10

RV-E-Robot (RV-E2, RV-E3J, etc.), RV-M2

Function:

The internal register value is set in the counter with the specified number.

Input Format

CL <counter numberr>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99

Explanation

Sets the data fetched from the input port to the specified counter. Hence, the CL commands must be executed after the input
command. (See ID)
Since the data from the input port is treated as signed, the data set to the counter is signed. (Take value between -32768 and
32767.)
Used to specify the number of job sequences and the counter value at palletizing from an external device, such as a
programmable controller. At this case, any of the logical operation commands (see AN, OR or XO) may be used as necessary.
Execution of the CL command after the CP command allows the counter data to be transferred.
The counter value can be changed, compared or read by the relevant commands.
(See IC, DC, SC, CP and CR commands.)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 238 of 562

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 CL 25 'Sets above data to counter 25.
30 CP 11 'Sets data of counter 11 to internal register.
40 CL 21 'Sets data of internal register to counter 21.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
' (Comment)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Allows the programmer to write a comment.

Input Format

'[<string consisting of up to 120 alphanumeric characters including line number and '(apostrophe)>]

Explanation

You can describe up to 120 alphanumeric characters including line number and ' (apostrophe).
Use it to describe the name and date on the generated program or to mark a subroutine. Comments are helpful to check back the
program as the LR (Line Read) command is used.
The system ignores comments as it processes its commands.
If the number of characters exceeds the limit, the whole excess is ignored.

Sample program (MOVEMASTER Command)

10 '* * * * * * * * * * * * * * * * * * * * * * * * * * * *
20 'Sample Program
30 'Date: 93-10-01
40 'Programmed by Mitsubishi
50 '* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
60 NT

RV-M2, RV-M1

Function:

Allows the programmer to write a comment.

Input Format

'[<string consisting of up to 7 alphanumeric characters>]

Explanation

This command allows the programmer to write a comment consisting of up to 7 alphanumeric characters following the
' (apostrophe).
Use it to describe the name and date on the generated program or to mark a subroutine. Comments are helpful to check back the
program as the LR (Line Read) command is used.
The system ignores comments as it processes its commands.
If the number of characters exceeds 7, the whole excess is ignored.

Sample program (MOVEMASTER Command)

10    'DATE
20 '890311

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 239 of 562

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
CP (Compare Counter)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The value of the specified counter is set in the internal register. The details of the specified character string are set in the character
string register.

Input Format

CP <counter number/character string number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99
<Character string number>   Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99

Explanation

<When counter number is specified>

To be executed before a conditional jump command (see EQ, NE, LG and SM commands) is executed if the value in the specified
counter is used for the jump. Conditional branching command carries out jump on the basis of value of internal register set by
the CP command.
Even if the value of the specified counter has changed after execution of the CP command, the value of internal register remains
intact. Accordingly when you carry out conditional branching by value of counter, need to carry out this command after the
counter value has changed.
The input instruction (see ID) uses the same internal register, meaning that the old contents of the internal register are lost when
any input command is executed.
The contents of the counter can be changed or read by the relevant commands.
(See SC, IC, INP, DC, CR, CL, AN, OR and XO commands.)

<When character string number is specified>

When jumping the conditions due to the details of the specified character string, this command must be executed before the
conditions jump command (refer to EQ, NE, LG and SM commands). The conditions jump command will execute comparison
jumping based on the value of the character string register set by the CP command.
Even if the details of the specified character string change after this command is executed, the character string register value
will not be affected. Thus, when executing condition jump according to the details of the character string, this command must
be executed after the details of the character string change.
1. Operation, comparison and reading of the character string are possible by using the related commands.
(See CP, CR, EQ, INP, LG, NE, SC, SM commands.)

Sample program (MOVEMASTER Command)

100 IC 21 'Add 1 to the contents of counter 21


110 CP 21 'Sets the value of counter 21 to the internal register.
120 EQ 255,500 'If the contents of the internal register equal 255, the program jumps to line number
500.
130 GT 100 'The program jumps to line number 100.
500 SC 21,0 'Sets value 0 to counter 21.
600 SC $5,"OK" 'Set character string "OK" in character string number 5
610 CP $5 'Set details of character string number 5 in the character string register
620 EQ $10,800 'If the contents of the character string register equal character string number 10,
the program jumps to line number 800.
:
800 GT 100 'The program jumps to line number 100.

        

RV-E-Robot (RV-E2, RV-E3J, etc.), RV-M2, RV-M1

Function:

The value of the specified counter is set in the internal register.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 240 of 562

CP <counter number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99

Explanation

To be executed before a conditional jump command (see EQ, NE, LG and SM commands) is executed if the value in the specified
counter is used for the jump. Conditional branching command carries out jump on the basis of value of internal register set by
the CP command.
Even if the value of the specified counter has changed after execution of the CP command, the value of internal register remains
intact. Accordingly when you carry out conditional branching by value of counter, need to carry out this command after the
counter value has changed.
The input instruction (see ID) uses the same internal register, meaning that the old contents of the internal register are lost when
any input command is executed.
The contents of the counter can be changed or read by the relevant commands.
(See SC, IC, INP, DC, CR, CL, AN, OR and XO commands.)

Sample program (MOVEMASTER Command)

100 IC 21 'Add 1 to the contents of counter 21


110 CP 21 'Sets the value of counter 21 to the internal register.
120 EQ 255,500 'If the contents of the internal register equal 255, the program jumps to line number
500.
130 GT 100 'The program jumps to line number 100.
500 SC 21,0 'Sets value 0 to counter 21.
510 GT100 'The program jumps to line number 100.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
CR (Counter Read)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The details of the specified counter or character string are read out. (Using RS-232-C)

Input Format

CR <counter number/character string number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99
<Character string number>   Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99

Explanation

Outputs the contents of the specified counter from RS-232C port.


The output format is in ASCII coded decimal.
Because the terminator of the output data is carriage return (Hex. 0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If an undefined counter is read, the initial value of 0 is returned. (+0 is returned in the case of "0")
If a non-set character string is read, the final code's carriage return (CR: hexadecimal 0D) will be returned.
The contents of the counter are battery backed after the power is switched off.

Sample program (BASIC)

<When counter number is specified>

10 OPEN "COM1:E83" AS #1 'Opens the RS-232C communication file by the BASIC.


20 INPUT "Counter number" ;N 'Enter the counter number.
30 INPUT "Counter data "; D 'Enter the counter data.
40 PRINT #1, "SC "+STR$(N)+","+STR$(D) 'Specified data is input into the counter.
50 PRINT #1,"CR"+STR$(N) 'Transfers the data to the personal computer.
60 LINE INPUT #1,A$ 'Saves the received data to A$.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 241 of 562

70 PRINT A$ 'Displays the data to the screen.


80 END 'Program ends.
RUN 'Run the BASIC program.

Counter number 1
Counter data 100
+100

<When character string number is specified>

10 OPEN "COM1 :E83" AS #1 'Opens the RS-232C communication file by the


BASIC.
20 INPUT "Character string number";N 'Enter the character string number.
30 INPUT "Character string data ";J$ 'Enter the character string data.
40 PRINT #1, "SC $"+STR$(N)+","+CHR$(&H22)+J$+CHR$(&H22) 'Specified data is input into the counter.
50 PRINT #1,"CR $"+STR$(N) 'Transfers the data to the personal
computer.
60 LINE INPUT #1,A$ 'Saves the received data to A$.
70 PRINT A$ 'Displays the data to the screen.
80 END 'Program ends.
RUN 'Run the BASIC program.

Counter number 1
Counter data 100
+100

RV-E-Robot (RV-E2, RV-E3J, etc.), RV-M2, RV-M1

Function:

The details of the specified counter are read out. (Using RS-232-C)

Input Format

CR <Counter number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99

Explanation

Outputs the contents of the specified counter from RS-232C port.


The output format is in ASCII coded decimal.
Because the terminator of the output data is carriage return (Hex. 0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If an undefined counter is read, the initial value of 0 is returned. (+0 is returned in the case of "0")
If a non-set character string is read, the final code's carriage return (CR: hexadecimal 0D) will be returned.
The contents of the counter are battery backed after the power is switched off.

Sample program (BASIC)

10 OPEN "COM1:E83" AS #1 'Opens the RS-232C communication file by the BASIC.


20 INPUT "Counter number" ;N 'Enter the counter number.
30 INPUT "Counter data "; D 'Enter the counter data.
40 PRINT #1, "SC "+STR$(N)+","+STR$(D) 'Specified data is input into the counter.
50 PRINT #1,"CR"+STR$(N) 'Transfers the data to the personal computer.
60 LINE INPUT #1,A$ 'Saves the received data to A$.
70 PRINT A$ 'Displays the data to the screen.
80 END 'Program ends.
RUN 'Run the BASIC program.

Counter number 1
Counter data 100
+100
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 242 of 562

DA (Disable Act)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Disables an interrupt of the specified bit through the external input port.

Input Format

DA <input bit number>

Term

<Input bit number>   Specify the bit number to be disabled.


0 <= input bit number <= 32767
0 - 8999: Input signal interrupt
9003 - 32767: Input signal interrupt
0 - 299: General input
900 - 903: Hand input
9000: Alarm interrupt
9001: Emergency stop interrupt
9002: Communication interrupt

Explanation

Clears the interruptible state of the bit defined by the interrupt enable commands (see the EA commands).
After the DA command has been executed, no interrupt is executed by the specified bit during program execution. Note that
execution of the DA command dose not affect the interruptible states of the other bits.
To inhibit repeated interrupts by a level signal, the DA command must be executed at the beginning line to which the program
jumps after the interrupt has taken place

Sample program (MOVEMASTER Command)

see EA command.

RV-M2

Function:

Disables an interrupt of the specified bit through the external input port.

Input Format

DA <input bit number>

Term

<Input bit number>   Specify the bit number to be disabled.


0 <= input bit number <= 17
16 - 17: Hand check inputs

Explanation

Clears the interruptible state of the bit defined by the interrupt enable commands (see the EA commands).
After the DA command has been executed, no interrupt is executed by the specified bit during program execution. Note that
execution of the DA command dose not affect the interruptible states of the other bits.
To inhibit repeated interrupts by a level signal, the DA command must be executed at the beginning line to which the program
jumps after the interrupt has taken place

Sample program (MOVEMASTER Command)

see EA command.

RV-M1

Function:

Disables an interrupt of the specified bit through the external input port.

Input Format

DA <input bit number>

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 243 of 562

Term

<Input bit number>   Specify the bit number to be disabled.


0 <= input bit number <= 7 (15)
Figure in () is for type A16 or B16 I/O card.

Explanation

Clears the interruptible state of the bit defined by the interrupt enable commands (see the EA commands).
After the DA command has been executed, no interrupt is executed by the specified bit during program execution. Note that
execution of the DA command dose not affect the interruptible states of the other bits.
To inhibit repeated interrupts by a level signal, the DA command must be executed at the beginning line to which the program
jumps after the interrupt has taken place

Sample program (MOVEMASTER Command)

see EA command.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DC (Decrement Counter)

Function:

Subtracts 1 from the value in the specified counter.

Input Format

DC <Counter number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99

Explanation

Alarm occurs if the counter value becomes smaller than -32768.


Used to count the number of workpieces and job sequences and to set the number of grid points in pallet.
The contents of the counter can be changed, compared or read by the relevant command. (See SC, IC, CP, CR, CL, AN, OR and XO
commands.)

Sample program (MOVEMASTER Command)

10 SC 21,15 'Sets value 15 to the counter 21.


20 DC 21 'Subtracts 1 from the value in the counter 21.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DIV (Div)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Divide the internal register value by the direct value or the contents of the specified counter.

Input Format

DIV <Operation data>

Term

<Operation data>   Describes the data to be operated as a numeric value or counter No. with @.
-32768 <= numeric value (decimal) <= 32767
&8000 <= numeric value (hexadecimal) <= &7FFF
@1 <= Counter No. <= @99

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 244 of 562

Designate the operation data setting as a numeric value or counter No.


When designating with a numeric value, use a decimal or hexadecimal value. When using a hexadecimal, add a "&" to the head of
the operation data.
When setting with a counter No. add a "@" to the head of the counter No.
The contents of the set counter No. will be used as the operation data.
The operation results are stored in the internal register, so operation, comparison and reading, etc., of the operation results can be
carried out with the related commands.
(Refer to SUB, ADD, MUL, EQ, NE, LG, SM, CL and DR, OR commands)

Sample program (MOVEMASTER Command)

10 CP1 'Stores counter No. 1 value in internal register


20 DIV @2 'Divides the internal register value by the counter No. 2.
30 CL 3 'Sets internal register value in counter No. 3 (Counter No. 3 = counter No. 1/ counter No.
2)
40 CP 1 'Stores counter No. 1 value in internal register
50 DIV 15 'Divide the internal register value by 15.
60 CL 4 'Sets internal register value in counter No. 4 (Counter No. 4 = counter No. 1 / 15)

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DJ (Draw Joint)

RV-A, RV-E-Robot with 5 axes (RV-2AJ, RV-E3J, RV-E5NM, etc.)

Function:

Rotates the specified joint by the specified angle from the current position. (Joint interpolation)

Input Format

DJ <joint number>, <turning angle>

Term

<Joint number>   Specify joint number that you want to move.


1: Waist joint
2: Shoulder joint
3: Elbow joint
4: Pitch joint
5: Roll joint
<Rotating angle>   Specify joint angle that you want to turn.

Explanation

The least input increment of the turning angle is 0.01 degree, e.g., specify 15.02 for 15.02 degree.
The open/close state of the hand does not change before and after the movement. Alarm occurs before the joint motion if any
turning angle entry exceeds the robot's operational space.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 DJ 1,10 'Turns the waist joint 10 degrees in the positive direction.

RV-A, RV-E-Robot with 6 axes (RV-1A, RV-E2, RV-E4N, etc.)

Function:

Rotates the specified joint by the specified angle from the current position. (Joint interpolation)

Input Format

DJ <joint number>, <turning angle>

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 245 of 562

Term

<Joint number>   Specify joint number that you want to move.


1:Waist joint
2:Shoulder joint
3:Elbow joint
4:Twist joint
5:Pitch joint
6:Roll joint
<Rotating angle>   Specify joint angle that you want to turn.

Explanation

The least input increment of the turning angle is 0.01 degree, e.g., specify 15.02 for 15.02 degree.
The open/close state of the hand does not change before and after the movement. Alarm occurs before the joint motion if any
turning angle entry exceeds the robot's operational space.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 DJ 1,10 'Turns the waist joint 10 degrees in the positive direction.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DL * (Delete Line)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Deletes commands of the specified line or step in the program.

Input Format

DL [<Line number (a)>] [,<Line number (b)>] [, [<step(a)>][<step(b)>]]]]

Term

<Line number(a)>   Specify the top line number that you want to delete in the program.
<Line number(b)>   Specify the last line number that you want to delete in the program.
<step(a)> Specify the top step number that you want to delete in the program.
<step(b)> Specify the last step number that you want to delete in the program.
1 <= Line number (a), (b) <= 9999
1 <= Step (a), (b) <= 9999
Line number (a) <= Line number (b)
Step (a) <= Step (b)

Explanation

Deletes commands from step (a) to step (b), then deletes commands from line (a) to line (b). (Step (b) and line (b) are included
too.)
When you omitted line (b), only line (a) is deleted.
When you omitted step (b), only step (a) is deleted.
An alarm will occur if the size relation of (a) and (b) is incorrect.
* This command can only be executed directly. It cannot be used in a program.

Sample program (MOVEMASTER Command)

100 MO 10 'Moves to position 10.


110 MO 12 'Moves to position 12.
120 MO 15 'Moves to position 15.
130 MO 17 'Moves to position 17.
140 MO 20 'Moves to position 20.
DL 110 'Deletes line number 110.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 246 of 562

DL 120,140 'Deletes line number from 120 to 140.

RV-M2

Function:

Deletes commands of the specified line or step in the program.

Input Format

DL [<Line number (a)>] [,<Line number (b)>] 

Term

<Line number(a)>   Specify the top line number that you want to delete in the program.
<Line number(b)>   Specify the last line number that you want to delete in the program.
1 <= Line number (a), (b) <= 3584
Line number (a) <= Line number (b)

Explanation

Deletes commands from line (a) up to and including line (b).


If line number (b) is omitted, the contents of line number (a) only are deleted.
* This command can only be executed directly. It cannot be used in a program.

Sample program (MOVEMASTER Command)

100 MO 10 'Moves to position 10.


110 MO 12 'Moves to position 12.
120 MO 15 'Moves to position 15.
130 MO 17 'Moves to position 17.
140 MO 20 'Moves to position 20.
DL 110 'Deletes line number 110.
DL 120,140 'Deletes line number from 120 to 140.

RV-M1

Function:

Deletes commands of the specified line or step in the program.

Input Format

DL [<Line number (a)>] [,<Line number (b)>] 

Term

<Line number(a)>   Specify the top line number that you want to delete in the program.
<Line number(b)>   Specify the last line number that you want to delete in the program.
1 <= Line number (a), (b) <= 2048
Line number (a) <= Line number (b)

Explanation

Deletes commands from line (a) up to and including line (b).


If line number (b) is omitted, the contents of line number (a) only are deleted.
* This command can only be executed directly. It cannot be used in a program.

Sample program (MOVEMASTER Command)

100 MO 10 'Moves to position 10.


110 MO 12 'Moves to position 12.
120 MO 15 'Moves to position 15.
130 MO 17 'Moves to position 17.
140 MO 20 'Moves to position 20.
DL 110 'Deletes line number 110.
DL 120,140 'Deletes line number from 120 to 140.

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 247 of 562

COSIMIR® · Movemaster Command


 
DP (Decrement Position)

Function:

Moves the robot to a predefined position with a position number smaller than the current one. (Joint interpolation)

Input Format

DP

Explanation

Moves the robot to a predefined position with a position number smaller than, and closest to, the current one. (See command IP)
Alarm takes place if there is no predefined position which is smaller in position number than the current position.
Even if an alarm occurs, current position number is still maintained.
The additional axis will move if the position includes additional axis data.

Sample program (MOVEMASTER Command)

100 MO 3 'Moves to position 3.


110 MO 4 'Moves to position 4.
120 MO 5 'Moves to position 5.
130 DP 'Moves to position 4.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DR (Data Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the values of the internal register, hand check state, and general output state. (Using RS-232C )

Input Format

DR <Output bit number>

Term

<Output bit number>   0 <= Output bit number <= 32767


(0 for default)

Explanation

Outputs the values of the internal register, hand check state, and general output state through the RS-232C. Allows the external
input data and hand open/close state to be read when executed after the input command (ID).
Hand check state read by the DR command corresponds to the current state.
When you specify the output bit number, you can read the general output state of 16 bits-width beginning from the specified bit
number.
The output format is in ASCII coded hexadecimal, which is headed by "&H" and delimited by "," (Hex. 2C).

The output format:

Value of hand check state and the internal register, general output

The first column next to "& H" responds to the hand check input and the following 4 columns responds to the value of internal
register, and the remaining 4 columns headed by "&H" responds to the current general output.
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file by the personal
computer.
20 PRINT #1,"ID" 'Sets the value of input port to the internal register.
50 PRINT #1,"DR" 'Reads the value of internal register and hand check input.
60 LINE INPUT #1,A$ 'Saves the data to A$.
70 PRINT "Data is ";A$ 'Displays the value of A$.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 248 of 562

80 END 'Ends
RUN 'Run the BASIC program.

Data is &H10FB2, &H30BA              'Displays data.


'Value of hand check input:1 (Hexadecimal)
'Value of the internal register: 0FB2 (Hexadecimal)
'Value of general output:30BA (Hexadecimal)

RV-M2

Function:

Reads the values of the internal register and the hand check state (Using RS-232C).

Input Format

DR  

Explanation

Outputs the values of the internal register and the hand check state through the RS-232C. Allows the external input data and
hand open/close state to be read when executed after the input command (ID or IN).
Hand check state read by the DR command corresponds to the current state.
The output format is in ASCII coded hexadecimal, which is headed by "&H" and delimited by "," (Hex. 2C).

The output format:

Value of hand check state and the internal register

The first column next to "& H" responds to the hand check input and the following 4 columns responds to the value of internal
register.
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC)

10 OPEN " COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file by the personal
computer.
20 PRINT #1,"ID" 'Sets the value of input port to the internal register.
50 PRINT #1,"DR" 'Reads the value of internal register and hand check input.
60 LINE INPUT #1,A$ 'Saves the data to A$.
70 PRINT "Data is ";A$ 'Displays the value of A$.
80 END 'Ends
RUN 'Run the BASIC program.

Data is &H10FB2                                     'Displays   data.


'Value of hand check input:1 (Hexadecimal)
'Value of the internal register: 0FB2 (Hexadecimal)

RV-M1

Function:

Reads the values of the internal register (Using RS-232C).

Input Format

DR  

Explanation

Outputs the values of the internal register and the hand check state through the RS-232C. Allows the external input data and
hand open/close state to be read when executed after the input command (ID or IN).
The output format is in ASCII coded hexadecimal, which is headed by "&H" and delimited by "," (Hex. 2C).

The output format:

Value of hand check state and the internal register

The first column next to "& H" responds to the hand check input and the following 4 columns responds to the value of internal
register.
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 249 of 562

10 OPEN " COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file by the personal
computer.
20 PRINT #1,"ID" 'Sets the value of input port to the internal register.
50 PRINT #1,"DR" 'Reads the value of internal register and hand check input.
60 LINE INPUT #1,A$ 'Saves the data to A$.
70 PRINT "Data is ";A$ 'Displays the value of A$.
80 END 'Ends
RUN 'Run the BASIC program.

Data is &HFF                                      'Displays data.


'Value of the internal register: FF (Hexadecimal)
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DS (Draw Straight)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves the end of the hand to a position away from the current position by the distance specified in X,Y and Z directions. (Linear
interpolation)

Input Format

DS [<travel distance in X>], [<travel distance in Y>], [<travel distance in Z>]

Term

<Travel distance in X>   Specify the amount that you want to move in X direction from the current position.
<Travel distance in Y>   Specify the amount that you want to move in Y direction from the current position.
<Travel distance in Z>   Specify the amount that you want to move in Z direction from the current position.
(Zero traveling for default of each axis.)

Explanation

The least input increment for the distance is 0.01mm (e.g., specify 20.01 for 20.01mm)
The attitude of the hand, including the open/close status of the gripper, remains the same before and after the movement.
Alarm occurs before or during movement if the destination or travel path exceeds the operating space of the robot. Especially
the roll joint tends to exceed the operating space since it is controlled to remain the same orientation during the movement.
Moving speed during linear interpolation is decided by the SP or SD commands. (Hand tip at constant speed.)
The hand tip is decided by the tool length at that time. (see TL command).

Sample program (MOVEMASTER Command)

10 DS 100,0,0 'Moves to X axis direction by 100 mm.


20 DS 0,100,0 'Moves to Y axis direction by 100 mm.
30 DS -100,0,0 'Moves to X axis direction by -100 mm.
40 DS 0,-100,0 'Moves to Y axis direction by -100 mm.

In the above example, the hand tip moves through the four corners of a square by linear

RV-M2

Function:

Moves the end of the hand to a position away from the current position by the distance specified in X,Y and Z directions. (Linear
interpolation)

Input Format

DS [<travel distance in X>], [<travel distance in Y>], [<travel distance in Z>]

Term

<Travel distance in X>   Specify the amount that you want to move in X direction from the current position.
<Travel distance in Y>   Specify the amount that you want to move in Y direction from the current position.
<Travel distance in Z>   Specify the amount that you want to move in Z direction from the current position.
(Zero traveling for default of each axis.)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 250 of 562

Explanation

The least input increment for the distance is 0.01mm (e.g., specify 20.01 for 20.01mm)
The attitude of the hand, including the open/close status of the gripper, remains the same before and after the movement.
Alarm occurs before or during movement if the destination or travel path exceeds the operating space of the robot. Especially
the roll joint tends to exceed the operating space since it is controlled to remain the same orientation during the movement.
Moving speed during linear interpolation is decided by the SP or SD commands. (Hand tip at constant speed.)
The hand tip is decided by the tool length at that time. (see TL command).

Sample program (MOVEMASTER Command)

10 DS 100,0,0 'Moves to X axis direction by 100 mm.


20 DS 0,100,0 'Moves to Y axis direction by 100 mm.
30 DS -100,0,0 'Moves to X axis direction by -100 mm.
40 DS 0,-100,0 'Moves to Y axis direction by -100 mm.

In the above example, the hand tip moves through the four corners of a square by linear.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
DW (Draw)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves the end of the hand to a position away from the current position by the distance specified in X,Y and Z directions. (Joint
interpolation)

Input Format

DW [<travel distance in X>], [<travel distance in Y>], [<travel distance in Z>]

Term

<Travel distance in X>   Specify the amount that you want to move in X direction from the current position.
<Travel distance in Y>   Specify the amount that you want to move in Y direction from the current position.
<Travel distance in Z>   Specify the amount that you want to move in Z direction from the current position.
(Zero traveling for default of each axis.)

Explanation

The least input increment for the distance is 0.01mm (e.g., specify 20.01 for 20.01mm )
The attitude of the hand, including the open/close status of the gripper, remains the same before and after the movement.
Alarm occurs before the movement if the destination exceeds the operating space of the robot.
The moving path draws a curve in the case of large traveling path because of the linear interpolation.
The hand tip is decided by the tool length at that time. (See TL command).

Sample program (MOVEMASTER Command)

10 DW 200,0,0 'Moves to X axis direction by 200 mm


20 DW 0,200,0 'Moves to Y axis direction by 200 mm
30 DW -200,0,0 'Moves to X axis direction by -200 mm
40 DW 0,-200,0 'Moves to Y axis direction by -200 mm

In the above example, the hand tip moves through the four corners of a square by joint interpolation and returns the start
point finally.

RV-M2, RV-M1

Function:

Moves the end of the hand to a position away from the current position by the distance specified in X,Y and Z directions. (Joint
interpolation)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 251 of 562

Input Format

DW [<travel distance in X>], [<travel distance in Y>], [<travel distance in Z>]

Term

<Travel distance in X>   Specify the amount that you want to move in X direction from the current position.
<Travel distance in Y>   Specify the amount that you want to move in Y direction from the current position.
<Travel distance in Z>   Specify the amount that you want to move in Z direction from the current position.
(Zero traveling for default of each axis.)

Explanation

The least input increment for the distance is 0.01mm (e.g., specify 20.01 for 20.01mm )
The attitude of the hand, including the open/close status of the gripper, remains the same before and after the movement.
Alarm occurs before the movement if the destination exceeds the operating space of the robot.
The moving path draws a curve in the case of large traveling path because of the linear interpolation.
The hand tip is decided by the tool length at that time. (See TL command).

Sample program (MOVEMASTER Command)

10 DW 200,0,0 'Moves to X axis direction by 200 mm


20 DW 0,200,0 'Moves to Y axis direction by 200 mm
30 DW -200,0,0 'Moves to X axis direction by -200 mm
40 DW 0,-200,0 'Moves to Y axis direction by -200 mm

In the above example, the hand tip moves through the four corners of a square by joint interpolation and returns the
start point finally.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
EA (Enable Act)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Enables the interrupt motion by the specified bit of the external input signal.

Input Format

EA [<+/->] <input bit number>, <line number> [, [<branching approach>]]

Term

<+/->     + : If the <input bit number> of the external input port turns ON, the program jumps to the <line number>.
(Default)
- :If the <input bit number> of the external input port turns OFF, the program jumps to the <line number>.
<Input bit number>   Specify the bit number of external input signal that you want to assign for interrupt signal
0 <= Input bit number <= 32767
0 - 8999: Input signal interrupt
(0 - 299: general input)
(900 - 903: hand input)
9003 - 32767: Input signal interrupt
- Enables the interrupt motion by the external input signal.
- The EA command allows eight input bits to be registered as interrupt signals concurrently.
- When the interrupt signal is input, the robot is decelerated to a stop and the program jumps to the <line
number>.
-Once the interrupt has taken place, the robot remains stopping until the DA command is executed at the
beginning line to which the program jumps or the interrupt signal turns off.
- The signal input except for the specified bit does not occur any interrupt.
9000 : Alarm interrupt
When alarm occurred, executes the program from the specified line number.
9001 : Emergency stop interrupt
When emergency stop occurred in the operation panel, teaching box, or external signal, then executes the
program from the specified line number.
9002 : Communication interrupt
When data received through the RS-232C port, executes the program from the specified line number.
<Line number>   Specify the line number to which the program jumps by the interrupt signal.
1 <= Line number <= 9999
<Branching approach> Specify a jump or subroutine calling.
0: Jump (See GT command) (Default)
1: Subroutine calling (See GS command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 252 of 562

Explanation

Causes an interrupt to be executed by an external signal while the program is running. When the interrupt signal is input after
execution of the EA command, the robot is decelerated to a stop and the program jumps to the specified line number.
The EA command allows 8 signals, giving the priority to the larger number, to be registered as the interrupt signal at the same
time.
Once this command has been executed, the effective condition is maintained till the interrupt disable command (DA), the end
command (ED), or the reset command (RS) is carried out.
If the specified line number has no command, alarm will occur in the program execution.

Sample program (MOVEMASTER Command)

100 EA +5,500 'Sets that the program jumps to the line 500 in case of bit 5 turning ON.
110 MO 1 'Moves to position 1.
120 ED 'Ends program.
500 DA 5 'Interrupt disable
510 MO 2 'Moves to position 2.
520 GT 110 'Jumps to line number 110.

In the above example, line 100 causes an interrupt to be enabled and line 110 moves the robot to position 1. When the
specified signal is input during this motion, the robot is decelerated to a stop and then the program jumps to line 500, where
the interrupt is disabled. Line 510 moves the robot to position 2 and line 520 causes the program to jump to line 110. The
robot moves to position 1 again.

RV-M2

Function:

Enables the interrupt motion by the specified bit of the external input signal.

Input Format

EA [<+/->] <input bit number>, <line number> 

Term

<+/->     + : If the <input bit number> of the external input port turns ON, the program jumps to the <line number>.
(Default)
- :If the <input bit number> of the external input port turns OFF, the program jumps to the <line number>.
<Input bit number>   Specify the bit number of external input signal that you want to assign for interrupt signal
0 <= Input bit number <= 17
0 - 17: Input signal interrupt
(0 - 15: general input)
(16 - 17: hand input)
<Line number>   Specify the line number to which the program jumps by the interrupt signal.
1 <= Line number <= 3584

Explanation

Causes an interrupt to be executed by an external signal while the program is running. When the interrupt signal is input after
execution of the EA command, the robot is decelerated to a stop and the program jumps to the specified line number.
Two or more bits may be specified at one time. If there are more than one inputs received, the bit with the highest bit number
has precedence over the other bits.
Once this command has been executed, the effective condition is maintained till the interrupt disable command (DA), the end
command (ED), or the reset command (RS) is carried out.
If the specified line number has no command, alarm will occur in the program execution.
The EA command is invalid during jog operation from the teaching box and during movement effected by the move joint
instruction (MJ) or nest instruction (NT).

Sample program (MOVEMASTER Command)

100 EA +5,500 'Sets that the program jumps to the line 500 in case of bit 5 turning ON.
110 MO 1 'Moves to position 1.
120 ED 'Ends program.
500 DA 5 'Interrupt disable
510 MO 2 'Moves to position 2.
520 GT 110 'Jumps to line number 110.

In the above example, line 100 causes an interrupt to be enabled and line 110 moves the robot to position 1. When the
specified signal is input during this motion, the robot is decelerated to a stop and then the program jumps to line 500, where
the interrupt is disabled. Line 510 moves the robot to position 2 and line 520 causes the program to jump to line 110. The
robot moves to position 1 again.

RV-M1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 253 of 562

Function:

Enables the interrupt motion by the specified bit of the external input signal.

Input Format

EA <+/-> <Input bit number>, <Line number>

Term

<+/->

+ : If the <input bit number> of the external input port turns ON, the program jumps to the <line number>.
(Default)
- :If the <input bit number> of the external input port turns OFF, the program jumps to the <line number>.

<Input bit number>

Specify the bit number of external input signal that you want to assign for interrupt signal
0 <= Input bit number <= 7 (15)
Figure in () is for A16 or B16 type I/O card

<Line number>

Specify the line number to which the program jumps by the interrupt signal.
1 <= Line number <= 2048

Explanation

Causes an interrupt to be executed by an external signal while the program is running. When the interrupt signal is input after
execution of the EA command, the robot is brought to an immediate stop and the program jumps to the specified line number.
Avoid using the command while the robot is moving at high speed, as mechanical failure could result. (Set speed below SP5)
Two or more bits may be specified at one time. If there are more than one inputs received, the bit with the highest bit number
has precedence over the other bits.
Once this command has been executed, the effective condition is maintained till the interrupt disable command (DA), the end
command (ED), or the reset command (RS) is carried out.
If the specified line number has no command, alarm will occur in the program execution.
The EA command is invalid during jog operation from the teaching box and during movement effected by the move joint
instruction (MJ) or nest instruction (NT).

Sample program (MOVEMASTER Command)

100 EA +5,500 'Sets that the program jumps to the line 500 in case of bit 5 turning ON.
110 MO 1 'Moves to position 1.
120 ED 'Ends program.
500 DA 5 'Interrupt disable
510 MO 2 'Moves to position 2.
520 GT 110 'Jumps to line number 110.

In the above example, line 100 causes an interrupt to be enabled and line 110 moves the robot to position 1. When the
specified signal is input during this motion, the robot is decelerated to a stop and then the program jumps to line 500, where
the interrupt is disabled. Line 510 moves the robot to position 2 and line 520 causes the program to jump to line 110. The
robot moves to position 1 again.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ED (End)

Function:

Ends the program.

Input Format

ED

Explanation

Marks the end of a program. The program ends when the ED command is executed. In the case of a program to program
subroutine, however, returns to the calling program .
Required at the end of a program unless the program commands are directly executed from the personal computer.

Example for RV-E type robots

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 254 of 562

Program can call other program from inside the program using GS command.

Arrows shows the sequential order of program execution .

In the above example of <Program to program calling>, the program is executed to line 50 then jumps to the program 10.
After executing to line 30 of program 10, the program returns line 60 of program 1. Program ends when the ED command
of program 1 is executed.

Sample program (MOVEMASTER Command)

100 SP 3 'Set speed 3


110 MO 3 'Moves to position 3.
120 MO 5 'Moves to position 5.
130 ED 'Ends the program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
EQ (Equal)

RV-A, RH-AH, RP-AH, RV-EN

Function:

This compares the value of the internal register with a specified value. If they are the same, the program will jump to the specified line
number. The character string register and the details of the specified character string are compared, and if the values are the same,
the program will jump to the specified line number.

Input Format

EQ <compared value/character string number>, <branching line number>

Term

<Compared value>   Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
&8000 <= compared value (hexadecimal) <= &7FFF
@1 <= counter number <= @99
<Character string number>   Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99
<Branching line number> Specify the line number to which the program jumps when the comparison result is equal.
1 <= branching line number <= 9999

Explanation

<When counter number is specified>

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value equals to the compared value (i.e., when the condition is met), the program jumps to the specified
line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".
Alarm occurs at a jump if the specified line number does not exist.

<When character string number is specified>

The conditions will jump depending on the details of the character string register.
If the details of the character string register are equal to the details of the character string number (when the conditions are
established), the program will jump to the specified line number. If the details are not equal (when conditions are not
established), the next line will be executed.
By executing an INP command, the data input from an external device will be set in the character string register. The details of
the character string number will be set by executing a CP command. Thus, when executing condition jumping, one of these
commands must be executed first.
If the specified line number is not registered, an alarm will occur during jumping.

Sample program (MOVEMASTER Command)

100 ID 'Fetches data from external input port.


110 EQ 100,130 'Jumps to line 130 if the data equals 100.
120 ED 'Ends the program if above condition is not met.
130 SC $5,"OK" 'Set character string "OK" in character string number 5
140 CP $5 'Set details of character string number 5 in the character string register

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 255 of 562

150 EQ $10,200 'Jumps to line 200 if the data equals character string number 10.
:
200 MO 7 'Moves to position 7.

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

Causes a jump to occur if the contents of the internal register equal a specified value.

Input Format

EQ <compared value>, <branching line number>

Term

<Compared value>   Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
&8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number> Specify the line number to which the program jumps when the comparison result is equal.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value equals to the compared value (i.e., when the condition is met), the program jumps to the specified
line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".
Alarm occurs at a jump if the specified line number does not exist.

Sample program (MOVEMASTER Command)

100 ID 'Fetches data from external input port.


110 EQ 100,130 'Jumps to line 130 if the data equals 100.
120 ED 'Ends the program if above condition is not met.
130 MO 7 'Moves to position 7.

RV-M2

Function:

Causes a jump to occur if the contents of the internal register equal a specified value.

Input Format

EQ <compared value>, <branching line number>

Term

<Compared value>   Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
&8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number> Specify the line number to which the program jumps when the comparison result is equal.
1 <= branching line number <= 3584

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value equals to the compared value (i.e., when the condition is met), the program jumps to the specified
line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".
Alarm occurs at a jump if the specified line number does not exist.

Sample program (MOVEMASTER Command)

100 ID 'Fetches data from external input port.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 256 of 562

110 EQ 100,130 'Jumps to line 130 if the data equals 100.


120 ED 'Ends the program if above condition is not met.
130 MO 7 'Moves to position 7.

RV-M1

Function:

Causes a jump to occur if the contents of the internal register equal a specified value.

Input Format

EQ <compared value>, <branching line number>

Term

<Compared value>   Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
&8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number> Specify the line number to which the program jumps when the comparison result is equal.
1 <= branching line number <= 2048

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value equals to the compared value (i.e., when the condition is met), the program jumps to the specified
line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".
Alarm occurs at a jump if the specified line number does not exist.

Sample program (MOVEMASTER Command)

100 ID 'Fetches data from external input port.


110 EQ 100,130 'Jumps to line 130 if the data equals 100.
120 ED 'Ends the program if above condition is not met.
130 MO 7 'Moves to position 7.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ER * (Error Read)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Reads the current error status and alarm history contents. (Using RS-232C )

Input Format

ER [<alarm history number>]

Term

<Alarm history number>   Specify the number of alarm history.


1 <= alarm history number <= 128 (If omitted, shows the current alarm)

Explanation

Outputs the alarm condition of the robot from the RS-232C port.
Specify the alarm history number on the basis of the current alarm (0). When you specified 1, outputs the alarm information
former than the current alarm by 1.
The ER command outputs the former alarm history in the ASCII format as below.

The output format:


Alarm history number, alarm number, year, month, day, hour, minute, second.
If the alarm history number is omitted, the ER command outputs the current alarm with following ASCII code.

0; No alarm

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 257 of 562

1: Serious alarm (Alarm 0100-1900)


2: Operation alarm (Alarm 2300-8900)
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
Useful to transfer a sequence of data from the personal computer to the robot while checking for an alarm.
* This command can only be executed directly. It cannot be used in a program.

1. Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer by BASIC.
20 PRINT#1, "MO1" 'Moves to position 1.
30 GOSUB 100 'Calls the subroutine line 100 in BASIC.
40 PRINT #1, "MO2" 'Moves to position 2.
50 GOSUB 100 'Calls the subroutine line 100 in BASIC.
60 END 'Ends
100 PRINT #1, "ER" 'Reads the current alarm.
110 LINE INPUT #1,A$ 'Saves the received data to A$.
120 IF A$="0"THEN RETURN 'If there is no alarm, returns subroutine.
130 PRINT "Alarm level is "; A$ 'Displays the data on the personal computer screen.
140 END 'Ends
RUN 'Run the BASIC program.

Alarm level is 2                            'Displays alarm level.


(2: Operation alarm)

2. Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer by BASIC.
20 INPUT "History number is "; N 'Enters the alarm history number by the personal computer.
30 PRINT #1,"ER"+STR$(N) 'Reads the alarm information.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Alarm information ";A$ 'Displays the data on the personal computer screen.
60 END 'Ends
RUN 'Run the BASIC program.

History number is 1
Alarm information 1,3800,93,10,21,11,34,20

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

Reads the current error status and alarm history contents. (Using RS-232C )

Input Format

ER [<alarm history number>]

Term

<Alarm history number>   Specify the number of alarm history.


1 <= alarm history number <= 16  (If omitted, shows the current alarm)

Explanation

Outputs the alarm condition of the robot from the RS-232C port.
Specify the alarm history number on the basis of the current alarm (0). When you specified 1, outputs the alarm information
former than the current alarm by 1.
The ER command outputs the former alarm history in the ASCII format as below.

The output format:

Alarm history number, alarm number, year, month, day, hour, minute, second.
If the alarm history number is omitted, the ER command outputs the current alarm with following ASCII code.

0: No alarm
1: Serious alarm (Alarm 0100-1900)
2: Operation alarm (Alarm 2300-8900)
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
Useful to transfer a sequence of data from the personal computer to the robot while checking for an alarm.
* This command can only be executed directly. It cannot be used in a program.

1. Sample program (BASIC)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 258 of 562

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer by BASIC.
20 PRINT#1, "MO1" 'Moves to position 1.
30 GOSUB 100 'Calls the subroutine line 100 in BASIC.
40 PRINT #1, "MO2" 'Moves to position 2.
50 GOSUB 100 'Calls the subroutine line 100 in BASIC.
60 END 'Ends
100 PRINT #1, "ER" 'Reads the current alarm.
110 LINE INPUT #1,A$ 'Saves the received data to A$.
120 IF A$="0"THEN RETURN 'If there is no alarm, returns subroutine.
130 PRINT "Alarm level is "; A$ 'Displays the data on the personal computer screen.
140 END 'Ends
RUN 'Run the BASIC program.

Alarm level is 2                           'Displays alarm level.


(2: Operation alarm)

2. Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer by BASIC.
20 INPUT "History number is "; N 'Enters the alarm history number by the personal computer.
30 PRINT #1,"ER"+STR$(N) 'Reads the alarm information.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Alarm information ";A$ 'Displays the data on the personal computer screen.
60 END 'Ends
RUN 'Run the BASIC program.

History number is 1
Alarm information 1,3800,93,10,21,11,34,20

RV-M2, RV-M1

Function:

Reads the current error status and alarm history contents. (Using RS-232C )

Input Format

ER  

Explanation

Outputs the alarm condition of the robot from the RS-232C port.
The ER command outputs the current alarm with following ASCII code.
0: No alarm
1: Serious alarm
2: Operation alarm
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
Useful to transfer a sequence of data from the personal computer to the robot while checking for an alarm.
* This command can only be executed directly. It cannot be used in a program.

1. Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal
computer by BASIC.
20 PRINT#1, "MO1" 'Moves to position 1.
30 GOSUB 100 'Calls the subroutine line 100 in BASIC.
40 PRINT #1, "MO2" 'Moves to position 2.
50 GOSUB 100 'Calls the subroutine line 100 in BASIC.
60 END 'Ends
100 PRINT #1, "ER" 'Reads the current alarm.
110 LINE INPUT #1,A$ 'Saves the received data to A$.
120 IF A$="0"THEN RETURN 'If there is no alarm, returns subroutine.
130 PRINT "Alarm level is "; A$ 'Displays the data on the personal computer screen.
140 END 'Ends
RUN 'Run the BASIC program.

Alarm level is 2                                     'Displays alarm level.


(2: Operation alarm)

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 259 of 562

COSIMIR® · Movemaster Command


 
GC (Grip Close)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Close the grip of hand.

Input Format

GC [<hand number>]

Term

<Hand number>   Specify the hand number opening grip.


0: Hand 1 (Default)
1: Hand 2
2: Hand 3
3: Hand 4

Explanation

<Motor-operated hand> Causes the grip of the hand to be closed by the gripping force waveform defined by the GP command.
The motor-operated hand corresponds to only hand 1.
<Pneumatic hand> Causes the solenoid valve to be energized to close the hand (or to attract the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and grasp the workpiece. Therefore a time delay before and
after the GC command may be necessary. The GC commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Relating Parameters

The open or close state of the hand at the execution of hand command and at the power activation can be changed by the
following parameter (see the parameters for the RV-E2 and RV-E3J and the RV-EN series). To find the change operation,
refer to your manual.

Parameter GCD:
Hand 1 forward/reverse, hand 1 default,
Hand 2 forward/reverse, hand 2 default
Contents of each value are

(1) Hand 1 forward/reverse, hand2 forward/reverse: Set direction of hand open/close.(Default set is 0.)

Motor-operated hand

Hand 1 (2,3,4) 0 1
forward/reverse setting
Open/close direction Normal Reverse
open/close open/close

(2) Hand 1 default, hand 2 default: Set status of output signal 900 and 901 at power on. If hand 2 then output signal are 902
and 903.(Default set is 1.)

Pneumatic hand

Hand 1 (2,3,4) default 0 1 2 3


setting
Output bit 900 (902, 0 1 0 1
904, 906)
Output bit 901 (903, 0 0 1 1
905, 907)

Sample program (MOVEMASTER Command)

10 MO 10,O 'Moves to position 10 with hand opened.


20 TI 5 'Sets 0.5 second timer.
30 GC 'Closes hand to grasp workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,C 'Moves to position 15 with hand closed.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 260 of 562

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

Close the grip of hand.

Input Format

GC [<hand number>]

Term

<Hand number>   Specify the hand number opening grip.


0: Hand 1 (Default)
1: Hand 2

Explanation

<Motor-operated hand> Causes the grip of the hand to be closed by the gripping force waveform defined by the GP command.
The motor-operated hand corresponds to only hand 1.
<Pneumatic hand> Causes the solenoid valve to be energized to close the hand (or to attract the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and grasp the workpiece. Therefore a time delay before and
after the GC command may be necessary. The GC commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Relating Parameters

The open or close state of the hand at the execution of hand command and at the power activation can be changed by the
following parameter (see the parameters for the RV-E2 and RV-E3J and the RV-EN series).To find the change operation, refer
to your manual.

Parameter GCD:
Hand 1 forward/reverse, hand 1 default,
Hand 2 forward/reverse, hand 2 default
Contents of each value are

(1) Hand 1 forward/reverse, hand2 forward/reverse: Set direction of hand open/close.(Default set is 0.)

Motor-operated hand

Hand 1 (2) 0 1
forward/reverse setting
Open/close direction Normal Reverse
open/close open/close

(2) Hand 1 default, hand 2 default: Set status of output signal 900 and 901 at power on. If hand 2 then output signal are 902
and 903.(Default set is 1.)

Pneumatic hand

Hand 1 (2) default 0 1 2 3


setting
Output bit 900 (902) 0 1 0 1
Output bit 901 (903) 0 0 1 1

Sample program (MOVEMASTER Command)

10 MO 10,O 'Moves to position 10 with hand opened.


20 TI 5 'Sets 0.5 second timer.
30 GC 'Closes hand to grasp workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,C 'Moves to position 15 with hand closed.

RV-M2

Function:

Close the grip of hand.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 261 of 562

GC  

Explanation

<Motor-operated hand> Causes the grip of the hand to be closed by the gripping force waveform defined by the GP command.
The "retained gripping force" is only valid among the GP command parameters if the GC command is used repeatedly.
<Pneumatic hand> Causes the solenoid valve to be energized to close the hand (or to attract the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and grasp the workpiece. Therefore a time delay before and
after the GC command may be necessary. The GC commands still contains the timer specified by "starting gripping force
retention time" in the GP command.
The hand open/close condition depends on the setting of bit 3 of switch SW1 in the drive unit side door. (Ordinary open/close
operation in the lower position. Revers open/close operation in the upper position.)

Sample program (MOVEMASTER Command)

10 MO 10,O 'Moves to position 10 with hand opened.


20 TI 5 'Sets 0.5 second timer.
30 GC 'Closes hand to grasp workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,C 'Moves to position 15 with hand closed.

RV-M1

Function:

Close the grip of hand.

Input Format

GC  

Explanation

<Motor-operated hand> Causes the grip of the hand to be closed by the gripping force waveform defined by the GP command.
The "retained gripping force" is only valid among the GP command parameters if the GC command is used repeatedly.
<Pneumatic hand> Causes the solenoid valve to be energized to close the hand (or to attract the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and grasp the workpiece. Therefore a time delay before and
after the GC command may be necessary. The GC commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Sample program (MOVEMASTER Command)

10 MO 10,O 'Moves to position 10 with hand opened.


20 TI 5 'Sets 0.5 second timer.
30 GC 'Closes hand to grasp workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,C 'Moves to position 15 with hand closed.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
GF (Grip Flag)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Defines the open/close state of the grip of the hand (used with the PD command).

Input Format

GF <switch>

Term

<Switch>   Specify open or close state of the hand in 0 or 1.


0: Open
1: Close

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 262 of 562

Explanation

Defines the open or close state of the hand grip used with the PD command which defines the coordinates of the specified
position. The PD command takes precedence if the hand open/close state has been specified by the PD command.

Sample program (MOVEMASTER Command)

10 GF 0 'Sets the grip flag to open.


20 PD 10,50,320,70,50,40,30,R 'Defines position 10 with hand opened.

RV-M2

Function:

Defines the open/close state of the grip of the hand (used with the PD command).

Input Format

GF <switch>

Term

<Switch>   Specify open or close state of the hand in 0 or 1.


0: Open
1: Close

Explanation

Defines the open or close state of the hand grip used with the PD command which defines the coordinates of the specified
position. The PD command takes precedence if the hand open/close state has been specified by the PD command.
The grip is open when the switch is set to 0 and closed when the switch is 1. The switch is set to 0 (grip open) when the power is
turned on. The hand open/close state depends on the setting of bit 3 of switch SW1 in the drive unit side door. (Ordinary
open/close operation in the lower position. Reverse open/close operation in the upper position.)
Once made, the switch setting is valid until a new value is set.

Sample program (MOVEMASTER Command)

10 GF 0 'Sets the grip flag to open.


20 PD 10,0,550,450,-50,0 'Defines position 10 with hand opened.

RV-M1

Function:

Defines the open/close state of the grip of the hand (used with the PD command).

Input Format

GF <switch>

Term

<Switch>   Specify open or close state of the hand in 0 or 1.


0: Open
1: Close

Explanation

Defines the open or close state of the hand grip used with the PD command which defines the coordinates of the specified
position. The PD command takes precedence if the hand open/close state has been specified by the PD command.
The grip is open when the switch is set to 0 and closed when the switch is 1. The switch is set to 0 (grip open) when the power is
turned on. The hand open/close state depends on the setting of bit 3 of switch SW1 in the drive unit side door. (Ordinary
open/close operation in the lower position. Reverse open/close operation in the upper position.)
Once made, the switch setting is valid until a new value is set.

Sample program (MOVEMASTER Command)

10 GF 0 'Sets the grip flag to open.


20 PD 10,0,550,450,-50,0 'Defines position 10 with hand opened.
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 263 of 562

COSIMIR® · Movemaster Command


 
GO (Grip Open)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Opens the grip of the hand.

Input Format

GO [<hand number>]

Term

<Hand number>   Specify the hand number opening grip.


0: Hand 1 (Default)
1: Hand 2
2: Hand 3
3: Hand 4

Explanation

<Motor-operated hand> Causes the grip of the hand to be opened by the gripping force waveform defined by the GP command.
The motor-operated hand corresponds to only hand 1.
<Pneumatic hand> Causes the solenoid valve to be energized to open the hand (or to release the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and releases the workpiece. Therefore a time delay before and
after the GO command may be necessary. The GO commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Relating Parameters

The open or close state of the hand at the execution of hand command and at the power activation can be changed by the
following parameter (see the parameters for the RV-E2 and RV-E3J and the RV-EN series). To find the change operation,
refer to your manual.

Parameter GCD:
Hand 1 forward/reverse, hand 1 default,
Hand 2 forward/reverse, hand 2 default
Contents of each value are

(1) Hand 1 forward/reverse, hand2 forward/reverse: Set direction of hand open/close.(Default set is 0.)

Motor-operated hand

Hand 1 (2) 0 1
forward/reverse setting
Open/close direction Normal Reverse
open/close open/close

(2) Hand 1 default, hand 2 default: Set status of output signal 900 and 901 at power on. If hand 2 then output signal are 902
and 903.(Default set is 1.)

Pneumatic hand

Hand 1 (2,3,4) default 0 1 2 3


setting
Output bit 900 (902, 0 1 0 1
904, 906)
Output bit 901 (903, 0 0 1 1
905, 907)

Sample program (MOVEMASTER Command)

10 MO 10,C 'Moves to position 10 with hand closed.


20 TI 5 'Sets 0.5 second timer.
30 GO 'Opens hand to release workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,O 'Moves to position 15 with hand opened.

  

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 264 of 562

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

Opens the grip of the hand.

Input Format

GO [<hand number>]

Term

<Hand number>   Specify the hand number opening grip.


0: Hand 1 (Default)
1: Hand 2

Explanation

<Motor-operated hand> Causes the grip of the hand to be opened by the gripping force waveform defined by the GP command.
The motor-operated hand corresponds to only hand 1.
<Pneumatic hand> Causes the solenoid valve to be energized to open the hand (or to release the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and releases the workpiece. Therefore a time delay before and
after the GO command may be necessary. The GO commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Relating Parameters

The open or close state of the hand at the execution of hand command and at the power activation can be changed by the
following parameter (see the parameters for the RV-E2 and RV-E3J and the RV-EN series). To find the change operation,
refer to your manual.

Parameter GCD:

Hand 1 forward/reverse, hand 1 default,

Hand 2 forward/reverse, hand 2 default

Contents of each value are

(1) Hand 1 forward/reverse, hand 2 forward/reverse: Set direction of hand open/close.(Default set is 0.)

Motor-operated hand

Hand 1 (2) 0 1
forward/reverse setting
Open/close direction Normal Reverse
open/close open/close

(2) Hand 1 default, hand 2 default: Set status of output signal 900 and 901 at power on. If hand 2 then output signal are 902
and 903.(Default set is 1.)

Pneumatic hand

Hand 1 (2) default 0 1 2 3


setting
Output bit 900 (902) 0 1 0 1
Output bit 901 (903) 0 0 1 1

Sample program (MOVEMASTER Command)

10 MO 10,C 'Moves to position 10 with hand closed.


20 TI 5 'Sets 0.5 second timer.
30 GO 'Opens hand to release workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,O 'Moves to position 15 with hand opened.

RV-M2

Function:

Opens the grip of the hand.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 265 of 562

GO 

Explanation

<Motor-operated hand> Causes the grip of the hand to be opened by the gripping force waveform defined by the GP command.
The "retained gripping force" is only valid among the GP command parameters if the GC command is used repeatedly
<Pneumatic hand> Causes the solenoid valve to be energized to open the hand (or to release the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and releases the workpiece. Therefore a time delay before and
after the GO command may be necessary. The GO commands still contains the timer specified by "starting gripping force
retention time" in the GP command.
The hand open/close condition depends on the setting of bit 3 of switch SW1 in the drive unit side door. (Ordinary open/close
operation in the lower position. Revers open/close operation in the upper position.)

Sample program (MOVEMASTER Command)

10 MO 10,C 'Moves to position 10 with hand closed.


20 TI 5 'Sets 0.5 second timer.
30 GO 'Opens hand to release workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,O 'Moves to position 15 with hand opened.

RV-M1

Function:

Opens the grip of the hand.

Input Format

GO 

Explanation

<Motor-operated hand> Causes the grip of the hand to be opened by the gripping force waveform defined by the GP command.
The "retained gripping force" is only valid among the GP command parameters if the GC command is used repeatedly
<Pneumatic hand> Causes the solenoid valve to be energized to open the hand (or to release the workpiece). Refer to the OB
command about output bits pattern in this case.
A certain period of time is required when the robot is positioned and releases the workpiece. Therefore a time delay before and
after the GO command may be necessary. The GO commands still contains the timer specified by "starting gripping force
retention time" in the GP command.

Sample program (MOVEMASTER Command)

10 MO 10,C 'Moves to position 10 with hand closed.


20 TI 5 'Sets 0.5 second timer.
30 GO 'Opens hand to release workpiece.
40 TI 5 'Sets 0.5 second timer.
50 MO 15,O 'Moves to position 15 with hand opened.

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
GP (Grip Pressure)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Defines the gripping force to be applied when the motor-operated hand is closed and opened.

Input Format

GP <Starting gripping force>, <Retained gripping force>, <Starting gripping force retention time>

Term

<Starting gripping force>   Specify necessary gripping force as integer value to activate hand open or close
0 <= Starting gripping force <= 63
<Retained gripping force>  
Specify necessary gripping force as integer value to maintain hand open or close.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 266 of 562

0 <= Retained gripping force <= 63


<Starting gripping force retention time>   Specify time continuing starting gripping force as integer value
0 <= Starting gripping force retention time <= 99 (9,9 seconds)

Explanation

Sets the gripping force of the motor-operate hand (option) as it changes with time (See commands GO and GC).
The starting and retained gripping forces are 63 at their maximum and 0 at their minimum. The starting gripping force retention
time is the parameter times 0.1 seconds (max. 9.9 seconds). Define the parameters optimum for the workpiece to be held. The
parameter setting, once made, remains effective until a new value is set and also effective in other programs.
The default parameter values are "GP 63,63,3".
When the pneumatic hand is used, the parameter, starting and retained gripping forces, are ineffective.
The robot motion stops during starting gripping force retention time.

Sample program (MOVEMASTER Command)

10 GP 10, 6, 10 'Set grip pressure


20 GC 'Closes hand in above settings

RV-M1

Function:

Defines the gripping force to be applied when the motor-operated hand is closed and opened.

Input Format

GP <Starting gripping force>, <Retained gripping force>, <Starting gripping force retention time>

Term

<Starting gripping force>   Specify necessary gripping force as integer value to activate hand open or close
0 <= Starting gripping force <= 15
<Retained gripping force>   Specify necessary gripping force as integer value to maintain hand open or close.
0 <= Retained gripping force <= 15
< Starting gripping force retention time>   Specify time continuing starting gripping force as integer value
0 <= Starting gripping force retention time <= 99 (9,9 seconds)

Explanation

Sets the gripping force of the motor-operate hand (option) as it changes with time (See commands GO and GC).
The starting and retained gripping forces are 63 at their maximum and 0 at their minimum. The starting gripping force retention
time is the parameter times 0.1 seconds (max. 9.9 seconds). Define the parameters optimum for the workpiece to be held. The
parameter setting, once made, remains effective until a new value is set and also effective in other programs.
The default parameter values are "GP 10,10,3".
When the pneumatic hand is used, the parameter, starting and retained gripping forces, are ineffective.
The robot motion stops during starting gripping force retention time.

Sample program (MOVEMASTER Command)

10 GP 10, 6, 10 'Set grip pressure


20 GC 'Closes hand in above settings
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
GS (Go Sub)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Carries out subroutine beginning with the specified line number.

Input Format

GS [<line number>] [, [<program name>]]

Term

<Line number>   Specify line number of subroutine in integer value.


1 <= line number <= 9999

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 267 of 562

<Program name>   Specify program name of subroutine in integer value or characters. (Less than 8 characters)
1 <= program name <= 8 (characters)
Possible letter used: Digits (0-9)
Characters (A - Z)
Symbols (! @ # $ % ^ & ( ) _ | { } -)
Impossible letter used: * + , . / : ; = ? [ \ ] '
Special specification: When you specified only numeric value, the program name is handled as number.
Need to enclose program name with " " in the case of character used.

Explanation

Allows the program to jump to the specified line of the specified program and execute subroutine. The program returns to the
main program after executing the subroutine. When you specified program number, returns to the main program by ED command
and when you specified only line number, returns by RT command.
Use the RT command to terminate the subroutine existing in the same program. Use the ED command to terminate the subroutine
existing in other program.
If the specified line or the specified program does not exist, alarm occurs at the time of GS execution.
When you omitted line number, executes the specified program from the top line.
When you omitted line number and program name, nothing occurs .
To call subroutines in other subroutines is called "Nesting". Up to 9 Nesting levels are possible.

Example on the GS command

In the above example of <The same program call>, executes the program from line 10 to 30, then calls the subroutine of line
200. When the RT command is executed in the subroutine, the program returns to the main program and continues from line
40. The program ends when the ED command is executed.

Program can call other program from inside the program using GS command. In the above example of <Program to program
call>, executes the program from line 20 to 50, then calls the program 30. Executes the program from line 40 to 100 and
returns to the main program, i.e., line 60 of program 20. The program ends when the ED command is executed.

Sample program (MOVEMASTER Command)

10 GS 100 'Carry out subroutine beginning with line number 100.


:
90 ED 'Ends program.
100 MO 11 'Moves to position 11.
110 MO 12 'Moves to position 12.Subroutine
120 MO 13 'Moves to position 13.
130 RT 'Ends subroutine

        

RV-M2

Function:

Carries out subroutine beginning with the specified line number.

Input Format

GS [<line number>] 

Term

<Line number>   Specify line number of subroutine in integer value.


1 <= line number <= 3584

Explanation

Allows the program to jump to the specified line of the specified program and execute subroutine. The program returns to the
main program after executing the subroutine. If the specified line does not exist, alarm (error mode II) occurs at the time of GS
execution.
Subroutines are written and stored separately from the main program and must be terminated by the RT command.
To call subroutines in other subroutines is called "nesting". Up to 9 nesting levels are possible.

Sample program (MOVEMASTER Command)

10 GS 100 'Carry out subroutine beginning with line number 100.


:
90 ED 'Ends program.
100 MO 11 'Moves to position 11.
110 MO 12 'Moves to position 12.Subroutine
120 MO 13 'Moves to position 13.
130 RT 'Ends subroutine

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 268 of 562

RV-M1

Function:

Carries out subroutine beginning with the specified line number.

Input Format

GS [<line number>] 

Term

<Line number>   Specify line number of subroutine in integer value.


1 <= line number <= 2048

Explanation

Allows the program to jump to the specified line of the specified program and execute subroutine. The program returns to the
main program after executing the subroutine. If the specified line does not exist, alarm (error mode II) occurs at the time of GS
execution.
Subroutines are written and stored separately from the main program and must be terminated by the RT command.
To call subroutines in other subroutines is called "nesting". Up to 9 nesting levels are possible.

Sample program (MOVEMASTER Command)

10 GS 100 'Carry out subroutine beginning with line number 100.


:
90 ED 'Ends program.
100 MO 11 'Moves to position 11.
110 MO 12 'Moves to position 12.Subroutine
120 MO 13 'Moves to position 13.
130 RT 'Ends subroutine

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
GT (Go To)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Jumps to the specified line number unconditionally.

Input Format

GT <Line number>

Term

<Line number>   Specify the line number to which the program jumps.
1 <= line number <= 9999

Explanation

Causes the program to jump to the specified line number.


If the specified line number does not exist, alarm occurs at the time of GT execution.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 GT 100 'Jumps to line 100 unconditionally.
:
100 MO 12 'Moves to position 12.
110 MO 15 'Moves to position 15.
:

RV-M2

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 269 of 562

Jumps to the specified line number unconditionally.

Input Format

GT <Line number>

Term

<Line number>   Specify the line number to which the program jumps.
1 <= line number <= 3584

Explanation

Causes the program to jump to the specified line number.


If the specified line number does not exist, alarm occurs at the time of GT execution.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 GT 100 'Jumps to line 100 unconditionally.
:
100 MO 12 'Moves to position 12.
110 MO 15 'Moves to position 15.
:

RV-M1

Function:

Jumps to the specified line number unconditionally.

Input Format

GT <Line number>

Term

<Line number>   Specify the line number to which the program jumps.
1 <= line number <= 2048

Explanation

Causes the program to jump to the specified line number.


If the specified line number does not exist, alarm occurs at the time of GT execution.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 GT 100 'Jumps to line 100 unconditionally.
:
100 MO 12 'Moves to position 12.
110 MO 15 'Moves to position 15.
:

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
HE (Here)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Defines the current coordinates as the specified position.

Input Format

HE <Position number>

Term

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 270 of 562

<Position number>   Specify the position number to be registered.


0 <= position number <= 999
Registers the current position to the user-defined origin in case of zero.

Explanation

The coordinates of the current position are calculated on the basis of the currently set tool length (see the TL command). In the
initial condition, the tool length is 123 mm, a point away from the hand mounting surface toward the end of the hand.
If a single number is assigned to two different positions, the one defined last takes precedence with the former cleared.
The open/close position of the hand and the structure flag data are also stored as the position data.
Alarm occurs if the HE command is executed before the origin setting.
When you specified zero position number, current position data in joint coordinates are defined to user-defined origin parameter
UOG (see the parameters for the RV-E2 and RV-E3J and the RV-EN series). In this case, you must change the permission
parameter HOE to permit the origin setting at first. After that, return the permission parameter to the former value. (Does not
permit the setting.) The above operation is effective only by direct command execution.

Sample program (MOVEMASTER Command)

10 MO 10 'Moves to position 10.


20 DW 10,0,0 'Moves to +X direction by 10 mm
30 HE 11 'Defines above location as position 11.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Registers the current coordinates in a designated position.

Input Format

HE <Position number> [, <Input format>]

Term

<Position number>   Specify the position number to be registered.


0 <= position number <= 999
Registers the current position to the user-defined origin in case of zero. However, when if 0 is used,
enter the user-defined origin.
<Input format>   Specifies the input format of the position data for an additional axis.
1: For registering both the robot‚s and the additional axis‚ current positions. (When omitting)
2: For registering only the robot‚s current position.
Note that if the position No. Is 0, or during the standard system, this will be invalid.

Explanation

When 0 is designated as the position number, the additional axis position data will not be registered in the user-defined origin
parameter, UOG.
If you omit the input format, or if you enter 0, the current position of the robot and the additional axis will be registered. If you
designate 1 for the input format, only the robot‚s current position will be entered.
When there is a movement command immediately before this command, it will be executed even though the additional axis is
moving. In that event, a position along the moving path will be registered.
In the event that you designate a command to start executing before the additional axis finishes, when the HE command is
issued, it might register a position along the moving path of the additional axis (Refer to WRM command).

Related parameters

UOG and HOE

Related language

WRM

Sample program (MOVEMASTER Command)

10 MO 10 'Moves to position 10.


20 ML 100 'Move the first additional axis 100 (mm or deg.)
30 HE 11 'Enter the above position as the position 11. (the additional axis data is also
entered)

RV-M2

Function:

Defines the current coordinates as the specified position.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 271 of 562

HE <Position number>

Term

<Position number>   Specify the position number to be registered.


0 <= position number <= 999
Registers the current position to the user-defined origin in case of zero.

Explanation

The coordinates of the current position are calculated on the basis of the currently set tool length (see the TL command). In the
initial condition, the tool length is 123 mm, a point away from the hand mounting surface toward the end of the hand.
If a single number is assigned to two different positions, the one defined last takes precedence with the former cleared.
The open/close position of the hand and the structure flag data are also stored as the position data.
Error mode II may occur if the HE command is executed when any of the axes of the robot is positioned near the boundary of its
operational space. In such cases avoid such attitude of the robot.
Alarm (error mode II) occurs if the HE command is executed before the origin setting.

Sample program (MOVEMASTER Command)

10 MO 10 'Moves to position 10.


20 DW 10,0,0 'Moves to +X direction by 10 mm
30 HE 11 'Defines above location as position 11.

RV-M1

Function:

Defines the current coordinates as the specified position.

Input Format

HE <Position number>

Term

<Position number>   Specify the position number to be registered.


0 <= position number <= 629
Registers the current position to the user-defined origin in case of zero.

Explanation

The coordinates of the current position are calculated on the basis of the currently set tool length (see the TL command). In the
initial condition, the tool length is 123 mm, a point away from the hand mounting surface toward the end of the hand.
If a single number is assigned to two different positions, the one defined last takes precedence with the former cleared.
The open/close position of the hand and the structure flag data are also stored as the position data.
Error mode II may occur if the HE command is executed when any of the axes of the robot is positioned near the boundary of its
operational space. In such cases avoid such attitude of the robot.
Alarm (error mode II) occurs if the HE command is executed before the origin setting.

Sample program (MOVEMASTER Command)

10 MO 10 'Moves to position 10.


20 DW 10,0,0 'Moves to +X direction by 10 mm
30 HE 11 'Defines above location as position 11.

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
HLT (HALT)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Interrupts the motion of the robot and the operation of the program.

Input Format

HLT

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 272 of 562

Explanation

Interrupts the operation of the program and decelerates the robot to a stop. (It becomes the same condition that the external
stop signal is input or the STOP switch of the controller front panel is pushed.)
To restart the program, push the START switch, input the starting signaling, or execute the RN command. Program restarts from
the next line of HLT command.
If the HLT command is directly executed from the personal computer during program running, the program is interrupted and the
robot stops with deceleration.
The robot does not stop by the HLT command, however, during the execution of the direct motion command.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 HLT 'Stops
30 MO 2 'Moves to position 2.
40 ED 'Ends program.

The program restarts with START switch from line 30.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Interrupts the movement and the operation of the program of the robot and the additional axis.

Input Format

HLT

Explanation

If there is a movement command preceding this command, the additional axis may not reach its objective position, since this
command will be executed even if the additional axis is still moving.
If the next command is designated to execute the next operation before the additional axis has completed operation, when the
HLT command is executed, the moving additional axis will come to stop (Refer to the WRM command).
The additional axis will come to a gradual stop.

Related language

WRM

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 HLT 'Stops
30 MO 2 'Moves to position 2.
40 ED 'Ends program.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
HO (Home)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Defines the current location and the attitude as origin point.

Input Format

HO [<origin setting approach>]

Term

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 273 of 562

<Origin setting approach>    Specify the method to set origin in integer value.
0: Mechanical stopper origin
1: Jig origin
2: User-defined origin

Explanation

Establishes the reference position for origin setting.


If you have replaced the robot or changed the combination of robot and controller, you must carry out origin setting again using
this command. There is another approach using teaching box to execute origin setting. See your manual for details.
Change the parameter HOE (see the parameters for the RV-E2 and RV-E3J and the RV-EN series) to permit origin setting at first,
then execute the HO command directly. When the origin setting is completed, return the parameter to the former value,
otherwise the program can not be started. To find the change operation, refer to your manual.

Relating Parameters

Permits the origin setting from the command (HO).


Parameter name HOE : Origin setting permission parameter
0: Does not permit the use of HO command. (Default)
1: Permits the use of HO command.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 PRINT #1, "HO" 'Executes the "HO" command from the personal computer.
30 END 'Ends
RUN 'Run the BASIC program.

RV-M2, RV-M1

Function:

Establishes the reference position in the Cartesian coordinate system.

Input Format

HO 

Explanation

Establishes the reference position for origin setting. Execute the HO command after matching the match marks on each axis of
the robot using the teaching box.
If you have replaced the robot or changed the combination of robot and controller, you must carry out origin setting again using
this command. There is another approach using teaching box to execute origin setting. See your manual for details.
The HO command cannot be executed when bit 4 of the switch SW1 in the drive unit side door is in the lower (OFF) position.

Sample program

10 LPRINT "HO"
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
IC (Increment Counter)

Function:

Adds 1 to the value of the specified counter.

Input Format

IC <Counter number>

Term

<Counter number>   Specify counter number in numeric value.


1 <= counter number <= 99

Explanation

Alarm occurs if the counter value exceeds 32767.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 274 of 562

Used to count the number of workpieces and job sequence and to set the number of grid point in the pallet.
The contents of the counter can be changed, compared, or read by the relevant command. (See SC, DC, CP, CR, CL, AN, OR and
XO).commands.)

Sample program (MOVEMASTER Command)

10 SC 21,15 'Sets value 15 to counter 21.


20 IC 21 'Add 1 to the contents of counter 21.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ID (Input Direct)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Fetches data unconditionally from the external input and hand check input.

Input Format

ID [<input bit number>]

Term

<Input bit number>   Specify the bit number of input port in integer value.
Fetches data of 16 bits width including the specified bit.
0 <= input bit number <= 32767 (0 for default)

Explanation

Fetches signals from the external equipment, e.g., programmable controller, unconditionally. The data from the hand check
input can be fetched by specifying the 900th number to the input bit number.
The fetched data is loaded into the internal register and is subsequently used for comparison, bit test, etc. (See EQ, NE, LG, SM
and TB commands.)

Sample program (MOVEMASTER Command)

100 ID 'Fetches the input data into the internal register for comparison.
110 EQ 100,130 'If the input data equals 100, then jumps to line number 130.
120 ED 'Else ends program.
130 MO 1 'Moves to position 1.
140 ID 100 'Fetches the input data into the internal register for comparison. (Input signals 100
to 115.)
150 TB +0,180 'If the input bit 100 is ON, then jumps to line 180.
160 TB+5,200 'If the input bit 105 is ON, then jumps to line 200.
170 ED 'Else ends program.
180 MO 2 'Moves to position 2.
190 ED 'Ends program.
200 MO 3 'Moves to position 3.
210 ED 'Ends program.

RV-M2

Function:

Fetches data unconditionally from the external input port and hand check input.

Input Format

ID  

Explanation

Fetches signals from the external equipment, e.g., programmable controller, unconditionally. The data from the hand check
input can be fetched by specifying the 900th number to the input bit number.
The fetched data is loaded into the internal register and is subsequently used for comparison, bit test, etc. (See EQ, NE, LG, SM
and TB commands.)

Sample program (MOVEMASTER Command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 275 of 562

100 ID 'Fetches the input data into the internal register for comparison.
110 EQ 100,130 'If the input data equals 100, then jumps to line number 130.
120 ED 'Else ends program.
130 MO 7 'Moves to position 7.

RV-M1

Function:

Fetches data unconditionally from the external input port.

Input Format

ID  

Explanation

Fetches signals from the external equipment, e.g., programmable controller, unconditionally. The data from the hand check
input can be fetched by specifying the 900th number to the input bit number.
The fetched data is loaded into the internal register and is subsequently used for comparison, bit test, etc. (See EQ, NE, LG, SM
and TB commands.)

Sample program (MOVEMASTER Command)

100 ID 'Fetches the input data into the internal register for comparison.
110 EQ 100,130 'If the input data equals 100, then jumps to line number 130.
120 ED 'Else ends program.
130 MO 7 'Moves to position 7.

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
IN (Input)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

IN [<input bit number>]

Term

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-M2

Function:

Fetches data synchronously from the external input port and hand check input (using the control signal lines.)

Input Format

IN 

Explanation

Causes a signal (parallel data from the external device, e. g. a programmable controller, to be fetched synchronously from the
input port, and simultaneously, data to be fetched from the hand check input. At this time, the control signals (!STB and !BUSY
signals) must have been connected to the external device.
The external input port data is loaded into the internal comparison register and is subsequently used for comparison, bit test,
etc. (See the EQ, NE, LG, SM and TB commands.)
For information on connections refer to your manual.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 276 of 562

Sample program (MOVEMASTER Command)

100 IN 'Fetches data from external input port.


110 EQ 100,130 'Jumps to line number 130 if input data equals 100.
120 ED 'Ends program if above condition is not met.
130 MO 7 'Moves to position 7.

RV-M1

Function:

Fetches data synchronously from the external input port (using the control signal lines.)

Input Format

IN 

Explanation

Causes a signal (parallel data from the external device, e. g. a programmable controller, to be fetched synchronously from the
input port, and simultaneously, data to be fetched from the hand check input. At this time, the control signals (!STB and !BUSY
signals) must have been connected to the external device.
The external input port data is loaded into the internal comparison register and is subsequently used for comparison, bit test,
etc. (See the EQ, NE, LG, SM and TB commands.)
For information on connections refer to your manual.

Sample program (MOVEMASTER Command)

100 IN 'Fetches data from external input port.


110 EQ 100,130 'Jumps to line number 130 if input data equals 100.
120 ED 'Ends program if above condition is not met.
130 MO 7 'Moves to position 7.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
INP (Input)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The specified counter value, the coordinate value of the position number or the data of the specified character string is received
according to the PRN command. (Using RS-232-C)

Input Format

INP <channel number>, <counter number/position number/character string number> [, [<contents selection>]]

Term

<Channel number>   Specify the channel number opened by the OPN command.
0 <= channel number <= 2
<Counter number>   Specify counter number.
1 <= counter number <= 99
<Position number>   Specify position number.
1 <= position number <= 999
<Character string number>   Specify character string number in numerical value which $" is added to the head.
$1 <= character string number <= $99
<Contents selection>   Select either counter or position or character string number corresponding to <Counter number/
position number/character string number>.
0: Counter number (Default)
1: Position number
2: character string number

Explanation

This command receives the specified counter value, the coordinate value of the position number or the data of the specified
character string is received according to the PRN command through the RS-232-C port.
The OPN command must be executed first to open the RS-232-C channel.
If the counter number is omitted, the data will be read into the internal register. If the character string number is omitted, the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 277 of 562

data will be read into the character string register. If the position number is omitted, an alarm will occur during execution.
The data is sent from an external device such as a personal computer using the PRM command. The robot program will stop while
the data is being red.
The PRM command can be executed before the INP command while the program is running. In that case, the sent PRM command
data will be registered once, and then will be led into the specified counter, position or character string when the INP command
is executed. A max. of 256 characters can be registered in the robot. If the PRM command is executed in succession and the
number of registered characters exceeds 256 characters, the robot will be set to the "L" level based on the RS-232-C ER (DRT) and
RS (RTS) signal lines (DR (DSR) and CS (CTS) signal lines on the personal computer side). Temporarily stop the data transmission
from the personal computer during this time.
If there is an error in the data sent by the PRN command, an alarm will occur when the INP command is executed.

Sample program (MOVEMASTER Command)

10 OPN 2,1 'Opens the RS-232C port.


20 INP 2,1,0 'Reads the data of counter 1 from the RS-232C port.
30 INP 2,5,1 'Reads the data of position 5 from the RS-232C port.
40 IC 1 'Adds 1 to the contents of counter 1.
50 MO 5 'Moves to position 5.
60 OPN 1,1 'Opens the RS-232C port.
70 INP 1,$10,2 'Reads the data of character string 10 from the RS-232C port.

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

Reads the data of counter or position transmitted by the PRN command. (Using RS-232-C)

Input Format

INP <channel number>, <counter number/position number> [, [<contents selection>]]

Term

<Channel number>   Specify the channel number opened by the OPN command.
0 <= channel number <= 2
<Counter number>   Specify counter number.
1 <= counter number <= 99
<Position number>   Specify position number.
1 <= position number <= 999
<Contents selection>   Select either counter or position or character string number corresponding to <Counter number/
position number/character string number>.
0: Counter number (Default)
1: Position number

Explanation

This command receives the specified counter value, the coordinate value of the position number or the data of the specified
character string is received according to the PRN command through the RS-232-C port.
The OPN command must be executed first to open the RS-232-C channel.
If the counter number is omitted, the data will be read into the internal register.  If the position number is omitted, an alarm
will occur during execution.
The data is sent from an external device such as a personal computer using the PRM command. The robot program will stop while
the data is being red.
The PRM command can be executed before the INP command while the program is running. In that case, the sent PRM command
data will be registered once, and then will be led into the specified counter when the INP command is executed.
If there is an error in the data sent by the PRN command, an alarm will occur when the INP command is executed.

Sample program (MOVEMASTER Command)

10 OPN 2,1 'Opens the RS-232C port.


20 INP 2,1,0 'Reads the data of counter 1 from the RS-232C port.
30 INP 2,5,1 'Reads the data of position 5 from the RS-232C port.
40 IC 1 'Adds 1 to the contents of counter 1.
50 MO 5 'Moves to position 5.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 278 of 562

COSIMIR® · Movemaster Command


 
IP (Increment Position)

Function:

Moves the robot to a predefined position with a position number greater than the current one. (Joint interpolation)

Input Format

IP

Explanation

Moves the robot to a predefined position with a position number greater than, and closest to, the current one. (See the DP
command.)
Alarm occurs if there is no predefined position which is greater in position number than the current position.
Even if an alarm occurs, the current position number still remains unchanged.
The additional axis will also move if the position includes additional axis data.

Sample program (MOVEMASTER Command)

10 MO 5 'Moves to position 5.
20 MO 4 'Moves to position 4.
30 MO 3 'Moves to position 3.
40 IP 'Moves to position 4.
50 IP 'Moves to position 5.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
JRC (Joint Roll Change)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Overwrites the current position by adding +/-360 degrees to the joint position of the R-axis. This is done when you want to use shortcut
control of the R-axis, or when you want to use endless control.

Input Format

JRC <[+] 1/-1>

Term

<+1>   Adds 360 degrees to the current joint position on the R-axis.
<-1>    Subtracts 360 degrees to the current joint position on the R-axis.

Explanation

When you use this command, you need to change the operation range of the R-axis by +/- 720 degrees beforehand. Set the -J6
setting to -720 on the joint operation range parameter JAR (see the parameters for the RV-E2 and RV-E3J and the RV-EN series),
and +J6 to 720. For information on how to change parameters, refer to your manual. If you set a value that is more than +/- 720
degrees, it could result in position slips.
Even though the current coordinate value changes, the robot won't move.
If the joint coordinate value on the R-axis exceeds +/- 720 degrees, the current coordinate value won't change, and the out-of-
bounds alarm will be generated.
If you are using the RV-E4N/E4NM/E4NC, and you want to move the R-axis by more than +/- 180 degrees with this command, the
move up to +/- 180 degrees should be by joint interpolation commands. If you use linear interpolation commands or circular
interpolation commands, when you execute the program, alarms will be generated. If you are using RV-E5NJ/E5NJM/E5NJC, you
don't have such a restriction.
If you use this command while doing continuous movements without acceleration/deceleration(passing), it will not be able to do
continuous movements with acceleration/deceleration. (Refer to CNT of the SP command)
When the controller power is a disconnected state, if you move the R axis by more than +/- 7 turns, the next time the power
source is supplied, the position of R's axis will slip. In this case, it is necessary to reset the origin for only the R-axis.
Refer to your manual in how to reset the origin.

Sample program (MOVEMASTER Command)

10 MO 1 'Move to position 1 (R-axis is -150 degrees)


20 MO 2 'Move to position 2 (R-axis is +170 degrees)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 279 of 562

30 JRC -1 'Subtract 360 degrees from the current position on the R-axis(R-axis is -190 degrees)
40 MO 1 'Move to position 1

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
LG (If Larger)

RV-A, RH-AH, RP-AH, RV-EN

Function:

This command compares the value of the internal register with a specified value. If larger, the program will jump. The character string
register and the numbers of characters in a specified character string are compared. If the character string register is larger, the
program will jump.

Input Format

LG <compared value/character string number>, <branching line number>

Term

<Compared value>   Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
@1 <= counter number <= @99
<Character string number>   Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99
<Branching line number>   Specify the line number to which the program jumps when the value of the internal register is larger
than compared value.
1 <= branching line number <= 9999

Explanation

<When compared value is specified>

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is larger than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

<When character string number is specified>

The conditions will jump depending on the data input from an external source or the number of characters in a specified
character string.
If the number of characters in the character string register is larger than the number of characters in a specified character string
(when the conditions are established), the program will jump to the specified line number. If the number is smaller (when
conditions are not established), the next line will be executed. If the specified line number is not registered, an alarm will occur
when jumping.
By executing an INP command, the data input from an external device will be set in the character string register. The details of
the character string number will be set by executing a CP command. Thus, when executing condition jumping, one of these
commands must be executed first.

Sample program (MOVEMASTER Command)

100 ID 'Fetches the data from the external input port.


110 LG 100,130 'If the input data is larger than 100, jumps to line 130.
120 ED 'Else program ends.
130 MO 1 'Moves to position 1.
140 OPN 1,1 'Opens the RS-232C port.
150 INP 1, ,2 'Reads the data of character string register from the RS-232C port.
160 LG $5,200 'Jumps to line 200 if the data length large than character string number 5.
:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 280 of 562

200 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E3J, etc.)

Function:

This command compares the value of the internal register with a specified value. If larger, the program will jump.

Input Format

LG <compared value>, <branching line number>

Term

<Compared value>   Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
@1 <= counter number <= @99
<Branching line number>   Specify the line number to which the program jumps when the value of the internal register is larger
than compared value.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is larger than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

100 ID 'Fetches the data from the external input port.


110 LG 100,130 'If the input data is larger than 100, jumps to line 130.
120 ED 'Else program ends.
130 MO 1 'Moves to position 1.

RV-M2

Function:

This command compares the value of the internal register with a specified value. If larger, the program will jump.

Input Format

LG <compared value>, <branching line number>

Term

<Compared value>   Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
@1 <= counter number <= @99
<Branching line number>   Specify the line number to which the program jumps when the value of the internal register is larger
than compared value.
1 <= branching line number <= 3584

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is larger than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

100 ID 'Fetches the data from the external input port.


110 LG 100,130 'If the input data is larger than 100, jumps to line 130.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 281 of 562

120 ED 'Else program ends.


130 MO 1 'Moves to position 1.

RV-M1

Function:

This command compares the value of the internal register with a specified value. If larger, the program will jump.

Input Format

LG <compared value>, <branching line number>

Term

<Compared value>   Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
@1 <= counter number <= @99
<Branching line number>   Specify the line number to which the program jumps when the value of the internal register is larger
than compared value.
1 <= branching line number <= 2048

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is larger than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

100 ID 'Fetches the data from the external input port.


110 LG 100,130 'If the input data is larger than 100, jumps to line 130.
120 ED 'Else program ends.
130 MO 1 'Moves to position 1.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
LR * (Line Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the program of the specified line number. (Using RS-232C )

Input Format

LR [<Line number>]

Term

<Line number>   Specify the line number to be read


0 <= Line number <= 9999
((If omitted, reads the current line number stopping)

Explanation

Outputs the program of the specified line number (or the current stopping line number) from the RS-232C port.
The output format is ASCII coded as follows;
- If you specify the line number, => Program content is read.
- If you omit the line number (or specify zero) => Current stopping line number is read.
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
The hexadecimal 0D is read out when the specified line has not been defined.
If an alarm takes place, you can confirm the line number in which the alarm occurs by executing the LR command without line
number.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 282 of 562

* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer
in BASIC.
20 INPUT "Start line = ";S 'Enter the top line number that you want to read.
30 INPUT "End line = ";E 'Enter the last line number that you want to read.
40 FOR I=S TO E 'Repeatedly
50 PRINT #1; "LR" + STR$ (I) 'Transmit "LR" + "line number" to the controller side.
60 LINE INPUT #1,A$ 'Saves the received data to A $.
70 IF A$="" THEN 90 'If there is no data, jumps to line 90.
80 PRINT I ; :PRINT A$ 'Displays the data on the personal computer screen.
90 NEXT 'Repeats and jumps to line 40.
100 END
RUN 'Run the BASIC program.

Start line = 1                               'Insert the start line (1)


End line = 5                                 'Insert the end line (5)
1 NT
2 MO 6
3 MO 4
4 MO 3
5 ED

RV-M2

Function:

Reads the program of the specified line number. (Using RS-232C )

Input Format

LR [<Line number>]

Term

< Line number >   Specify the line number to be read


0 <= Line number <= 3584

Explanation

Outputs the program of the specified line number (or the current stopping line number) from the RS-232C port.
The output format is ASCII coded. 
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
The hexadecimal 0D is read out when the specified line has not been defined.
The parameter entered in hexadecimal using "&" is output in decimal equivalent (e.g. "OD &FF" is converted into "OD 255").
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer
in BASIC.
20 INPUT "Start line = ";S 'Enter the top line number that you want to read.
30 INPUT "End line = ";E 'Enter the last line number that you want to read.
40 FOR I=S TO E 'Repeatedly
50 PRINT #1; "LR" + STR$ (I) 'Transmit "LR" + "line number" to the controller side.
60 LINE INPUT #1,A$ 'Saves the received data to A $.
70 IF A$="" THEN 90 'If there is no data, jumps to line 90.
80 PRINT I ; :PRINT A$ 'Displays the data on the personal computer screen.
90 NEXT 'Repeats and jumps to line 40.
100 END
RUN 'Run the BASIC program.

Start line = 1                                     'Insert the start line (1)


End line = 5                                      'Insert the end line (5)
1 NT
2 MO 6
3 MO 4
4 MO 3
5 ED

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 283 of 562

RV-M1

Function:

Reads the program of the specified line number. (Using RS-232C )

Input Format

LR [<Line number>]

Term

< Line number >   Specify the line number to be read


0 <= Line number <= 2048

Explanation

Outputs the program of the specified line number (or the current stopping line number) from the RS-232C port.
The output format is ASCII coded. 
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
The hexadecimal 0D is read out when the specified line has not been defined.
The parameter entered in hexadecimal using "&" is output in decimal equivalent (e.g. "OD &FF" is converted into "OD 255").
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer
in BASIC.
20 INPUT "Start line = ";S 'Enter the top line number that you want to read.
30 INPUT "End line = ";E 'Enter the last line number that you want to read.
40 FOR I=S TO E 'Repeatedly
50 PRINT #1; "LR" + STR$ (I) 'Transmit "LR" + "line number" to the controller side.
60 LINE INPUT #1,A$ 'Saves the received data to A $.
70 IF A$="" THEN 90 'If there is no data, jumps to line 90.
80 PRINT I ; :PRINT A$ 'Displays the data on the personal computer screen.
90 NEXT 'Repeats and jumps to line 40.
100 END
RUN 'Run the BASIC program.

Start line = 1                                     'Insert the start line (1)


End line = 5                                      'Insert the end line (5)
1 NT
2 MO 6
3 MO 4
4 MO 3
5 ED
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MA (Move Approach)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Moves the hand tip to the added position. (Linear interpolation)

Input Format

MA <position number (a)>, <position number (b)> [, [<O/C>]]

Term

<Position number (a)>   Specify the position number to be added. (The reference position)
<Position number (b)>    Specify the position number to add. (The increments position)
1 <= position number (a) (b) <= 999
<O/C>    Specify open or close state of the hand.
O: Hand open
C: Hand close

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 284 of 562

Explanation

Moves to the added position, i.e., the coordinates of positions (a) and (b) are added to make the destination, although positions
(a) and (b) remain unchanged after executing the MA command. (See the SF command.)
If the open/close state of the hand has been specified, the robot moves after executing the hand control command. If it has not
been specified, the hand state in position (a) remains valid.
If the calculating results exceed the robot's operational space, alarm occurs before the robot moves.
Alarm also takes place if positions (a) and (b) have not been defined.
The position of the hand tip is decided by the tool length currently established. (see TL command).

Sample program (MOVEMASTER Command)

6-axis type

10 HE 1 'Sets the current coordinates to position 1.


20 PD 5,0,0,30,0,0,0 'Defines the Z coordinate of position 5 as 30 mm.
30 MA 1,5,O 'Moves to the position that only Z direction added to coordinate value of
position 1 by 30 mm with the hand opened.

5-axis type

10 HE 1 'Sets the current coordinates to position 1.


20 PD 5,0,0,30,0,0 'Defines the Z coordinate of position 5 as 30 mm.
30 MA 1,5,O 'Moves to the position that only Z direction added to coordinate value of
position 1 by 30 mm with the hand opened. Coordinates values of position 1 and
position 5 do not change.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Moves to a position determined by adding the previously defined coordinate values in one position to the coordinate values of a
designated position. (Joint interpolation)

Input Format

MA <position number(a)>, <position number(b)> [, [<O/C>]]

Term

<Position number (a)>    Specify the position number to be added. (The reference position)
<Position number (b)>    Specify the position number to add. (The increments position)
1 <= position number (a) (b) <= 999
<O/C>    Specify open or close state of the hand.
O: Hand open
C: Hand close

Explanation

The additional axis will also move if the additional position includes additional axis data.
The table below shows how the existence/non-existence of position data for the additional axis determines the positions after
the MA command is executed.
The original position (a) will not change.

Pattern 1 Pattern 2 Pattern 3


Position (a) Robot Exists Exists Exists
Position (a) Additional axis Doesn‚t exist Exists Exists
Position (b) Robot Exists Exists Exists
Position (b) Additional axis Exists Doesn‚t exist Exists
MA (a),(b) Robot (a) <- (a) + (b) (a) <- (a) + (b) (a) <- (a) + (b)
MA (a),(b) Additional axis (a) <- (b) (a) <- (a) (a) <- (a) + (b)

Sample program (MOVEMASTER Command)

6-axis type

10 HE 1 'Sets the current coordinates to position 1.


20 PD 5,0,0,0,0,0,0,30,0 'Set the additional axis components of position 5 to 30 [mm or deg.]
30 MA 1,5,O 'Open the hand and move it to a position that is equal to position 1 plus 30
[mm or deg.] added to its additional axis components.

5-axis type

10 HE 1 'Sets the current coordinates to position 1.


20 PD 5,0,0,0,0,0,30,0 'Set the additional axis components of position 5 to 30 [mm or deg.]

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 285 of 562

30 MA 1,5,O 'Open the hand and move it to a position that is equal to position 1 plus 30
[mm or deg.] added to its additional axis components.

Note: Coordinates values of position 1 and position 5 do not change.

RV-M1

Function:

Moves the hand tip to the added position. (Linear interpolation)

Input Format

MA <position number(a)>, <position number(b)> [, [<O/C>]]

Term

<Position number (a)>    Specify the position number to be added. (The reference position)
<Position number (b)>    Specify the position number to add. (The increments position)
1 <= position number (a) (b) <= 629
<O/C>    Specify open or close state of the hand.
O: Hand open
C: Hand close

Explanation

Moves to the added position, i.e., the coordinates of positions (a) and (b) are added to make the destination, although positions
(a) and (b) remain unchanged after executing the MA command. (See the SF command.)
If the open/close state of the hand has been specified, the robot moves after executing the hand control command. If it has not
been specified, the hand state in position (a) remains valid.
If the calculating results exceed the robot's operational space, alarm occurs before the robot moves.
Alarm also takes place if positions (a) and (b) have not been defined.
The position of the hand tip is decided by the tool length currently established. (see TL command).

Sample program (MOVEMASTER Command)

10 HE 1 'Sets the current coordinates to position 1.


20 PD 5,0,0,30,0,0 'Defines the Z coordinate of position 5 as 30 mm.
30 MA 1,5,O Moves to the position that only Z direction added to coordinate value of position
1 by 30 mm with the hand opened. Coordinates values of position 1 and position 5
do not change.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MC (Move Continuous)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Moves the robot continuously through the predefined intermediate points between two specified position numbers. (Linear
interpolation)

Input Format

MC <position number (a)>, <position number (b)> [, [<O/C>]]

Term

<Position number (a)>    Specify the top position number moving continuous.
<Position number (b)>    Specify the last position number moving continuous.
1 <= position number (a) (b) <= 999
| Position number (a) - position number (b)| <= 99
<O/C>    Specify open or close state of the hand.
(If omitted, the hand data of each position is valid.)
O: Hand open
C: Hand close

Explanation

Moves the robot along the series of positions via (a) to (b) without acceleration and deceleration. (Linear interpolation)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 286 of 562

Depending on whether position number of (a) is greater than that of (b), or vice versa, the robot moves through the intermediate
points in descending or ascending order. The robot decelerates to a stop as it reaches the end position.
When the hand open/close setting has been done, hand control is executed before the movement.
Since the robot does not accelerate or decelerate during motion, alarm may occur when the path involves a great change in
direction of any of the joints at high speed.
The speed of travel during linear interpolation is determined by the SP or SD command. (Hand tip at constant speed)
Alarm occurs if specified positions (a) and (b) have not been defined or if the difference between the position numbers (a) and
(b) exceeds 99.
Alarm also takes place during movement if the movement path goes beyond the robot's operational space.

Sample program (MOVEMASTER Command)

10 SP 10 'Sets speed to 10.


20 MO 1 'Moves to position 1 in joint interpolation.
30 MC 5,9 'Moves continuously from position 5 to 9 in linear interpolation.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Moves the robot cont inuously through the predefined intermediate points between two specified position numbers (a) (b) without
acceleration and deceleration. (Linear interpolation)

Input Format

MC <position number (a)>, <position number (b)> [, [<O/C>]]

Term

<Position number (a)>    Specify the top position number moving continuous.
<Position number (b)>    Specify the last position number moving continuous.
1 <= position number (a) (b) <= 999
| Position number (a) - position number (b)| <= 99
<O/C>    Specify open or close state of the hand.
(If omitted, the hand data of each position is valid.)
O: Hand open
C: Hand close

Explanation

The additional axis will move it the position includes additional axis data.
If there are additional axis movement components at the destination position while the additional axis is still moving, after
making a gradual stop, the next interpolation will be executed.
When the robot moves in response to the movement of the additional axis (travel axis, etc.) the locus of the tip of the hand may
not be straight.

Sample program (MOVEMASTER Command)

10 SP 10 'Sets speed to 10.


20 MO 1 'Moves to position 1 in joint interpolation.
30 MC 5,9 'Moves continuously from position 5 to 9 in linear interpolation.

RV-M1

Function:

Moves the robot continuously through the predefined intermediate points between two specified position numbers. (Linear
interpolation)

Input Format

MC <position number (a)>, <position number (b)> 

Term

<Position number (a)>    Specify the top position number moving continuous.
<Position number (b)>    Specify the last position number moving continuous.
1 <= position number (a) (b) <= 999
| Position number (a) - position number (b)| <= 99

Explanation

Moves the robot along the series of positions via (a) to (b) without acceleration and deceleration. (Linear interpolation)
Depending on whether position number of (a) is greater than that of (b), or vice versa, the robot moves through the intermediate
points in descending or ascending order. The robot decelerates to a stop as it reaches the end position.
When the hand open/close setting has been done, hand control is executed before the movement.
Since the robot does not accelerate or decelerate during its movement through the intermediate points, avoid movement paths

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 287 of 562

that involve a great change in orientation of any of the axes of motion; otherwise, the resultant oscillations adversely affect the
robot mechanical. (The maximum speed of travel using command MC is equivalent to SP4.).
The speed of travel during linear interpolation is determined by the SP or SD command. (Hand tip at constant speed)
Alarm occurs if specified positions (a) and (b) have not been defined or if the difference between the position numbers (a) and
(b) exceeds 99
Alarm also takes place during movement if the movement path goes beyond the robot's operational space.

Sample program (MOVEMASTER Command)

10 SP 10 'Sets speed to 10.


20 MO 1 'Moves to position 1 in joint interpolation.
30 MC 5,9 'Moves continuously from position 5 to 9 in linear interpolation.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MJ (Move Joint)

RV-A, RV-E-Robot with 5 axes (RV-2AJ, RV-E3J, RV-E5NM, etc.)

Function:

Turns each joint the specified angle from the current position. (Joint interpolation)

Input Format

MJ [<waist joint angle>], [<shoulder joint angle>], [<elbow joint angle>], [<pitch joint angle>], [<roll joint angle>]

Term

<Each joint angle>    Specify relative amount of each joint turning from the current position.

Explanation

The least increment of the turning angle is 0.01 degree, e.g., specify 15.02 for 15.02 degree.
The open/close state of the hand does not change before and after the movement. Alarm occurs before the joint motion if any
turning angle entry exceeds the robot's operational space.
The default turning angle is 0.
For the positive and negative directions of each joint of motion refer to your manual.

Sample program (MOVEMASTER Command)

10 MJ 90,0,0,0,0 'Turns the waist joint + 90 degrees.


20 MJ 0,-30,0,0,0 'Turns the shoulder joint - 30 degrees.

RV-A, RV-E-Robot with 6 axes (RV-1A, RV-E2, RV-E4N, etc.)

Function:

Turns each joint the specified angle from the current position. (Joint interpolation)

Input Format

MJ [<waist joint angle>], [<shoulder joint angle>], [<elbow joint angle>], [<pitch joint angle>],  [<twist joint angle>], [<pitch joint
angle>], [<roll joint angle>]

Term

<Each joint angle>   Specify relative amount of each joint turning from the current position.

Explanation

The least increment of the turning angle is 0.01 degree, e.g., specify 15.02 for 15.02 degree.
The open/close state of the hand does not change before and after the movement. Alarm occurs before the joint motion if any
turning angle entry exceeds the robot's operational space.
The default turning angle is 0.
For the positive and negative directions of each joint of motion refer to your manual.

Sample program (MOVEMASTER Command)

10 MJ 90,0,0,0,0,0 'Turns the waist joint + 90 degrees.


20 MJ 0,-30,0,0,0,0 'Turns the shoulder joint - 30 degrees.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 288 of 562

30 MJ 0,0,0,20,0,0 'Turns the elbow joint + 20 degrees.

RV-M1, RV-M2

Function:

Turns each joint the specified angle from the current position. (Joint interpolation)

Input Format

MJ [<waist joint angle>], [<shoulder joint angle>], [<elbow joint angle>], [<pitch joint angle>], [<roll joint angle>]

Term

<Each joint angle>    Specify relative amount of each joint turning from the current position.

Explanation

The least increment of the turning angle is 0.1 degree, e.g., specify 15.2 for 15.2 degree.
The open/close state of the hand does not change before and after the movement. Alarm occurs before the joint motion if any
turning angle entry exceeds the robot's operational space.
The default turning angle is 0.
For the positive and negative directions of each joint of motion refer to your manual.

Sample program (MOVEMASTER Command)

10 MJ 90,0,0,0,0 'Turns the waist joint + 90 degrees.


20 MJ 0,-30,0,0,0 'Turns the shoulder joint - 30 degrees.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
ML

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series.

Input Format

ML

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-A, RH-AH, RP-AH, RV-EN, RV-E with additional axis

Function

Moves the additional axis as an independent unit.

Input Format

ML [<Movement amount of First additional axis>] [, <Movement amount of Second additional axis>]

Terms

< Movement amount of First Specifies the movement amount from


additional axis > the current position of First additional
axis.
(0 when omitted. The unit is determined
by the parameter AXUN)
< Movement amount of Specifies the movement amount from
Second additional axis > the current position of Second additional
axis.
(0 when omitted. The unit is determined
by the parameter AXUN)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 289 of 562

Explanation

Moves the additional axis from the current position only by the specified movement amount.
If omitted, the movement amount is 0.
The unit for the movement amount can be specified in the parameter AXUN.
An alarm will occur if the destination position exceeds the operation range.
Nonexistent movement amounts for the additional axis are ignored.
If the next movement command following this command does not contain movement components for the additional axis, that
movement command will be executed even though the additional axis might be moving.

Related parameters

AXUN

Related language

WRM

Sample program (MOVEMASTER Command)

10 MO 1 'Move to position 1
20 ML 100 'Move the additional axis 1 to 100 [mm or deg.] in the + direction
30 MO 2 'Move to position 2
40 ML 'Do not move the additional axis

RV-M2 with additional axis

Function

Allows the Locomotive to be operated independently.

Input Format

ML <Travel distance (mm)>

Sample Input

ML +105.3

Explanation

The least input increment of the travel distance is 0.1mm. (Example: Specify 10.1 for 10.1mm.)
Allows the Locomotive to move independently along the specified distance. Define a positive value for a travel in the positive
direction and a negative value for a travel in the negative direction.
Error mode II is caused if the specified position exceeds the operating range defined by the SL command.
When this command is used, the Locomotive coordinate data changes in accordance with the distance traveled, but the other
coordinates data (which indicates the current robot position, e.g. X, Y, Z coordinates, pitch and roll angles) remains unchanged.

Sample Program

10 LPRINT "MO 1" 'Move to position 1.


20 LPRINT "ML 100" 'Move the Locomotive 100mm in the positive direction.
30 LPRINT "DW 0,50,0" 'Move the hand end 50mm in the Y-axis positive direction.
40 LPRINT "ML -100" 'Move the Locomotive 100mm in the negative direction.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MO (Move)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Moves the hand tip to the specified position. (Joint interpolation)

Input Format

MO <position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 290 of 562

<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid)
O: Hand open
C: Hand close

Explanation

Moves the tip of hand to the coordinates of the specified position by joint interpolation. The hand tip is decided by the tool
length currently established. (see TL command)
If open/close state of the hand has been specified, the robot moves after executing the hand control command.
If it has not been specified, the definition of the specified position is executed.
Alarm takes place if the specified position has not been predefined or the movement exceeds the robot's operational space.

Sample program (MOVEMASTER Command)

10 SP 10 'Sets speed to 10.


20 MO 20,C 'Moves to position 20 with hand closed.
30 MO 30,O 'Moves to position 30 with hand opened.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Moves the hand tip to the specified position. (Joint interpolation)

Input Format

MO <position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid)
O: Hand open
C: Hand close

Explanation

If the position includes additional axis data, the additional axis will also move.

Sample program (MOVEMASTER Command)

10 ADL 100,100,1 'Set the acceleration time for additional axis 1 to 0.1 sec.
20 MO 20,C 'Moves to position 20 with hand closed.
30 MO 30,O 'Moves to position 30 with hand opened.

RV-M1

Function:

Moves the hand tip to the specified position. (Joint interpolation)

Input Format

MO <position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 629
<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid)
O: Hand open
C: Hand close

Explanation

Moves the tip of hand to the coordinates of the specified position by joint interpolation. The hand tip is decided by the tool
length currently established. (see TL command)
If open/close state of the hand has been specified, the robot moves after executing the hand control command.
If it has not been specified, the definition of the specified position is executed.
Alarm takes place if the specified position has not been predefined or the movement exceeds the robot's operational space.

Sample program (MOVEMASTER Command)

10 SP 3 'Sets speed to 3.
20 MO 20,C 'Moves to position 20 with hand closed.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 291 of 562

30 MO 30,O 'Moves to position 30 with hand opened.


©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MP (Move Position)

RV-A, RV-E-Robot with 5 axes (RV-2AJ, RV-E3J, RV-E5NM, etc.)

Function:

Moves the tip of hand to a position whose coordinates (position and angle) have been specified. (Joint interpolation)

Input Format

MP [< X coordinate value>], [< Y coordinate value>], [< Z coordinate value>], [<A turning angle>], [<B turning angle>] [, [<R/L>] [,
[<A/B>]]]

Term

<X, Y, Z coordinate>    Specify the position in XYZ coordinates (mm) of the robot. (Zero for default)
<A, B turning angle>    Specify the turning angle of roll and pitch joints in XYZ coordinates (degree) of the robot. (Zero
for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>     Specify the structure flag of the robot. (Above or Below))
A: Above(Default)
B: Below

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree.


If the structure flag has not been specified, Right and Above flag is selected.
If the specified value exceeds the robot's operational space, alarm occurs at the execution of the MO command.
The open or close state of the hand remains the same before and after the movement.
The position of hand tip is decided by the tool length currently established.

Sample program (MOVEMASTER Command)

10 MP 400,0,300,0,0 'Moves to the specified coordinates.


20 MP 200,200,500,0,0,R 'Moves to the specified coordinates. (Structure flags are also
specified.)

RV-A, RV-E-Robot with 6 axes (RV-1A, RV-E2, RV-E4N, etc.)

Function:

Moves the tip of hand to a position whose coordinates (position and angle) have been specified. (Joint interpolation)

Input Format

MP [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle A>], [<B turning angle >], [<C turning
angle >], [, [<R/L>] [, [<A/B>] [, [<N/F>]]]]

Term

<X, Y, Z coordinate>    Specify the position in XYZ coordinates (mm) of the robot. (Zero for default)
<A, B, C turning angle>    Specify the turning angle of roll and pitch joints in XYZ coordinates (degree) of the robot.
(Zero for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>     Specify the structure flag of the robot. (Above or Below))
A: Above(Default)
B: Below
<N/F>    Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 292 of 562

If the structure flag has not been specified, Right and Above flag is selected.
If the specified value exceeds the robot's operational space, alarm occurs at the execution of the MO command.
The open or close state of the hand remains the same before and after the movement.
The position of hand tip is decided by the tool length currently established.
 

Sample program (MOVEMASTER Command)

10 MP 400,0,300,0,0,0 'Moves to the specified coordinates.


20 MP 200,200,500,0,0,0,R,A,N 'Moves to the specified coordinates. (Structure flags are also
specified.)

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.) and with additional axis

Function:

Moves the tip of hand to a position whose coordinates (position and angle) have been specified. (Joint interpolation)

Input Format

MP [< X coordinate value>], [< Y coordinate value>], [< Z coordinate value>], [<A turning angle>], [<B turning angle>] [, <First
additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>]]]

Term

<X, Y, Z coordinate>    Specify the position in XYZ coordinates (mm) of the robot. (Zero for default)
<A, B turning angle>    Specify the turning angle of roll and pitch joints in XYZ coordinates (degree) of the robot. (Zero
for default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<Second additional axis>    Specifies the moving position for Second additional axis (If omitted, value is the current position)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>   Specify the structure flag of the robot. (Above or Below))
A: Above(Default)
B: Below

Explanation

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the parameter, AXUN.

Related parameters:

AXUN

Sample program (MOVEMASTER Command)

10 MP 400,0,300,0,0,100,0 'Moves to the specified coordinatesvalues (First additional axis moves


100 [mm of deg.]).

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.) and with additional axis

Function:

Moves the tip of hand to a position whose coordinates (position and angle) have been specified. (Joint interpolation)

Input Format

MP [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle A>], [<B turning angle >], [<C turning
angle >], [, <First additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>] [, [<N/F>]]]]

Term

<X, Y, Z coordinate>    Specify the position in XYZ coordinates (mm) of the robot. (Zero for default)
<A, B, C turning angle>    Specify the turning angle of roll and pitch joints in XYZ coordinates (degree) of the robot. (Zero
for default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<Second additional axis>    Specifies the moving position for Second additional axis (If omitted, value is the current position)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 293 of 562

<A/B>   Specify the structure flag of the robot. (Above or Below))


A: Above(Default)
B: Below
<N/F>    Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip

Explanation

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the parameter, AXUN.

Related parameters:

AXUN

Sample program (MOVEMASTER Command)

10 MP 400,0,300,0,0,0,100,0 'Moves to the specified coordinates values (First additional axis moves
100 [mm of deg.]).

RV-M2, RV-M1

Function:

Moves the tip of hand to a position whose coordinates (position and angle) have been specified. (Joint interpolation)

Input Format

MP [< X coordinate value>], [< Y coordinate value>], [< Z coordinate value>], [<Pitch angle>], [<Roll angle>]

Term

<X, Y, Z coordinate>    Specify the position in XYZ coordinates (mm) of the robot. (Zero for default)
<Roll/Pitch angle>    Specify the turning angle of roll and pitch joints in XYZ coordinates (degree) of the robot. (Zero
for default)

Explanation

The least increment of the coordinate value is 0.1 mm or 0.1 degree.


If the structure flag has not been specified, Right and Above flag is selected.
If the specified value exceeds the robot's operational space, alarm occurs at the execution of the MO command.
The open or close state of the hand remains the same before and after the movement.
The position of hand tip is decided by the tool length currently established.

Sample program (MOVEMASTER Command)

10 MP 400,0,300,0,0 'Moves to the specified coordinates.


20 MP 200,200,500,0,0,R 'Moves to the specified coordinates. (Structure flags are also specified.)

RV-M2 with additional axis

Function

Moves the hand end to a position whose coordinates (position and angle) have been specified. (Articulated interpolation)

Input Format

MP [< X-axis coordinate value>], [< Y-axis coordinate value>], [< Z-axis coordinate value>], [<Pitch angle>], [<Roll angle>],
[<Locomotive coordinate>]

Sample Input

MP 0, 380, 300, -70, -40, 520

Explanation

The least input increment of the coordinate values is 0.1 mm or 0.1 degree(e.g. specify 20.1 for 20.1mm).
Error mode II occurs if the specified coordinates exceeds the robot‚s operational space.
Any coordinate value defaults to 0.
The open/close state of the hand remains unchanged before and after the movement.
The position of the hand end depends on the current tool length. (See command TL.)

Sample Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 294 of 562

10 LPRINT "PD 1, 0, 550, 450, -50, 0, 280"


20 LPRINT "MO 1"
30 LPRINT "MP 0, 550, 430, -50, 0, 280"

* In the above example, the hand end first moves to position 1, then goes 20mm down in the Z-axis direction according to line
number 30, with the open/close state of the hand remaining unchanged.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MPB (Move Playback)

RV-1A, RV-2AJ

Function: No operation.

No operation. This command isn't available for these robottypes.

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.)

Function:

Moves to the specified position with specified interpolation, specified speed, specified timer, and specified input and output signal.

Input Format

MPB [<speed>], [<timer>], [<output ON>], [<output OFF>], [<input ON>], [<input OFF>] [, [<interpolation>], [<X coordinate>], [<Y
coordinate>], [<Z coordinate>], [<A turning angle>], [<B turning angle>],[, [<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Speed>    Specify the interpolation speed to the destination position.


0 <= speed <= 32767(Joint interpolation: %, Linear interpolation: mm/s)
<Timer>    Set timer at the destination position after the movement.
0 <= timer <= 255
<Output ON>    Set the output signal that turns ON.
0 <= output ON (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Output OFF>    Set the output signal that turns OFF.
0 <= output OFF (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Input ON>    Set the input waiting signal that turns ON.
0 <= input ON (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Input OFF>    Set the input waiting signal that turns OFF.
0 <= input OFF (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Interpolation>    Specify the interpolation mode to the destination position.
Joint interpolation: 0 (Default)
Linear interpolation: 1
Circular interpolation: 2
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot.
(Zero for default)
<A, B turning angle >    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0 for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<O/C>    Specify open or close state of hand 1.
O: Hand 1 open (Default)
C: Hand 1 close

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g., specify 20.01 for 20.01 mm).
Alarm occurs if the specified coordinates exceed the robot's operational space.
The default structure flags are R (Right), A (Above), N (Non Flip).
The default coordinate value is zero.
If you set any condition of speed, timer, or input/output in the teaching playback method, the MPB command is generated at
each step .
The input and output setting must be hexadecimal code headed with "&".
If the input/output signal is not set, the bit corresponding on the teaching box's screen display will be "-".

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 295 of 562

The order that the condition data specified with this command is executed is as follows:
1)Interpolation method 2)Speed 3)Movement to target position 4)Timer 5)Signal output (including hand control) 6)Signal input
wait

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.)

Function:

Moves to the specified position with specified interpolation, specified speed, specified timer, and specified input and output signal.

Input Format

MPB [<speed>], [<timer>], [<output ON>], [<output OFF>], [<input ON>], [<input OFF>] [, [<interpolation>], [<X coordinate>], [<Y
coordinate>], [<Z coordinate>], [<A turning angle>], [<B turning angle>], [<C turning angle>][, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [,
[<O/C>]]

Term

<Speed>    Specify the interpolation speed to the destination position.


0 <= speed <= 32767(Joint interpolation: %, Linear interpolation: mm/s)
<Timer>    Set timer at the destination position after the movement.
0 <= timer <= 255
<Output ON>    Set the output signal that turns ON.
0 <= output ON (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Output OFF>    Set the output signal that turns OFF.
0 <= output OFF (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Input ON>    Set the input waiting signal that turns ON.
0 <= input ON (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Input OFF>    Set the input waiting signal that turns OFF.
0 <= input OFF (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Interpolation>    Specify the interpolation mode to the destination position.
Joint interpolation: 0 (Default)
Linear interpolation: 1
Circular interpolation: 2
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot.
(Zero for default)
<A, B, C turning angle >    Specify the turning angle around X (A), Y (B), Z (C) axes in XYZ coordinates (degree) of the robot. (0 for
default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<N/F> Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip
<O/C>    Specify open or close state of hand 1.
O: Hand 1 open (Default)
C: Hand 1 close

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g., specify 20.01 for 20.01 mm).
Alarm occurs if the specified coordinates exceed the robot's operational space.
The default structure flags are R (Right), A (Above), N (Non Flip).
The default coordinate value is zero.
If you set any condition of speed, timer, or input/output in the teaching playback method, the MPB command is generated at
each step .
The input and output setting must be hexadecimal code headed with "&".
If the input/output signal is not set, the bit corresponding on the teaching box's screen display will be "-".
The order that the condition data specified with this command is executed is as follows:
1)Interpolation method 2)Speed 3)Movement to target position 4)Timer 5)Signal output (including hand control) 6)Signal input
wait

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.) and with additional axis

Function:

Moves to the specified position with a specified interpolation method, speed, timer, and input/output signal.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 296 of 562

MPB [<speed>], [<timer>], [<output ON>], [<output OFF>], [<input ON>], [<input OFF>] [, [<interpolation>], [<X coordinate>], [<Y
coordinate>], [<Z coordinate>], [<A turning angle>], [<B turning angle>] [, <First additional axis> [, <Second additional axis>]] [,
[<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Speed>    Specify the interpolation speed to the destination position.


0 <= speed <= 32767(Joint interpolation: %, Linear interpolation: mm/s)
<Timer>    Set timer at the destination position after the movement.
0 <= timer <= 255
<Output ON>    Set the output signal that turns ON.
0 <= output ON (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Output OFF>    Set the output signal that turns OFF.
0 <= output OFF (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Input ON>    Set the input waiting signal that turns ON.
0 <= input ON (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Input OFF>    Set the input waiting signal that turns OFF.
0 <= input OFF (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Interpolation>    Specify the interpolation mode to the destination position.
Joint interpolation: 0 (Default)
Linear interpolation: 1
Circular interpolation: 2
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot.
(Zero for default)
<A, B turning angle >    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0 for
default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<Second additional axis>    Specifies the moving position for Second additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<O/C>    Specify open or close state of hand 1.
O: Hand 1 open (Default)
C: Hand 1 close

Explanation

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the parameter, AXUN.
The linear interpolation is specified for the <interpolation>, the speed of the additional axis will be converted from the speed of
the joint interpolation (%) (the control of the robot will continue to function as usual). The relationship between linear
interpolation and joint interpolation is shown below:

Linear Joint Linear Joint


interpolation interpolation interpolation interpolation
speed speed [%] speed speed [%]
[mm/s] [mm/s]
1-2 0.4 106-123 19.0
3 0.6 124-144 22.2
4-5 0.8 145-168 25.9
6-7 1.1 169-193 29.8
8-9 1.5 194-222 34.2
10-13 2.0 223-264 40.7
14-17 2.7 265-307 47.3
18-23 3.7 308-350 53.9
24-31 4.9 351-393 60.5
32-42 6.5 394-436 67.1
43-53 8.2 437-478 73.7
54-63 9.7 479-521 80.2
64-75 11.6 522-564 86.8
76-89 13.7 565-607 93.4
90-105 16.2 608-32767 100.0

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 297 of 562

Related parameters:

AXUN

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.) and with additional axis

Function:

Moves to the specified position with a specified interpolation method, speed, timer, and input/output signal.

Input Format

MPB [<speed>], [<timer>], [<output ON>], [<output OFF>], [<input ON>], [<input OFF>] [, [<interpolation>], [<X coordinate>], [<Y
coordinate>], [<Z coordinate>], [<A turning angle>], [<B turning angle>], [<C turning angle>] [, <First additional axis> [, <Second
additional axis>]] [, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [, [<O/C>]]

Term

<Speed>    Specify the interpolation speed to the destination position.


0 <= speed <= 32767(Joint interpolation: %, Linear interpolation: mm/s)
<Timer>    Set timer at the destination position after the movement.
0 <= timer <= 255
<Output ON>    Set the output signal that turns ON.
0 <= output ON (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Output OFF>    Set the output signal that turns OFF.
0 <= output OFF (Hexadecimal) <= & FFFF
1: Setting, 0: Not setting
<Input ON>    Set the input waiting signal that turns ON.
0 <= input ON (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Input OFF>    Set the input waiting signal that turns OFF.
0 <= input OFF (Hexadecimal) <= & FFFF
1: Setting,0: Not setting
<Interpolation>    Specify the interpolation mode to the destination position.
Joint interpolation: 0 (Default)
Linear interpolation: 1
Circular interpolation: 2
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot.
(Zero for default)
<A, B, C turning angle >    Specify the turning angle around X (A), Y (B), Z (C) axes in XYZ coordinates (degree) of the robot. (0 for
default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<Second additional axis>    Specifies the moving position for Second additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default)
L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<N/F> Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip
<O/C>    Specify open or close state of hand 1.
O: Hand 1 open (Default)
C: Hand 1 close

Explanation

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the parameter, AXUN.
The linear interpolation is specified for the <interpolation>, the speed of the additional axis will be converted from the speed of
the joint interpolation (%) (the control of the robot will continue to function as usual). The relationship between linear
interpolation and joint interpolation is shown below:

Linear Joint Linear Joint


interpolation interpolation interpolation interpolation
speed speed [%] speed speed [%]
[mm/s] [mm/s]
1-2 0.4 106-123 19.0
3 0.6 124-144 22.2
4-5 0.8 145-168 25.9

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 298 of 562

6-7 1.1 169-193 29.8


8-9 1.5 194-222 34.2
10-13 2.0 223-264 40.7
14-17 2.7 265-307 47.3
18-23 3.7 308-350 53.9
24-31 4.9 351-393 60.5
32-42 6.5 394-436 67.1
43-53 8.2 437-478 73.7
54-63 9.7 479-521 80.2
64-75 11.6 522-564 86.8
76-89 13.7 565-607 93.4
90-105 16.2 608-32767 100.0

Related parameters:

AXUN

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MPC (Move Playback Continuous)

RV-1A, RV-2AJ

Function: No operation.

No operation. This command isn't available for these robottypes.

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.)

Function:

Moves to the specified position with specified interpolation.

Input Format

MPC [<interpolation>], [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning angle>]
[, [<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Interpolation>    Specify the interpolation mode to the destination position.


0: Joint interpolation (Default)
1: Linear interpolation
2: Circular interpolation
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B turning angle >    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default) L: Left
<A/B> Specify the structure flag of the robot. (Above or Below)
A: Above (Default) B: Below
<O/C> Specify open or close state of the hand 1.
O: Hand open (Default) C: Hand close

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g. specify 20.01 for 20.01 mm).
Alarm occurs if the specified coordinates exceed the robot's operational space.
The default coordinate value is zero.
Use the MPB command If the setting of speed, timer, or input/output are needed.
If you do not set any condition of speed, timer, or input/output in the teaching playback method, the MPC command is generated
at each step.
The order that the condition data specified with this command is executed is as follows.
1)Interpolation method 2)Speed 3)Movement to target position 4)Timer 5)Signal output (including hand control) 6)Signal input

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 299 of 562

wait

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.)

Function:

Moves to the specified position with specified interpolation.

Input Format

MPC [<interpolation>], [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning
angle>], [<C turning angle>], [, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [, [<O/C>]]

Term

<Interpolation>    Specify the interpolation mode to the destination position.


0: Joint interpolation (Default)
1: Linear interpolation
2: Circular interpolation
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B, C turning angle >    Specify the turning angle around X (A), Y (B), Z (C) axes in XYZ coordinates (degree) of the robot.
(0 for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default) L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default) B: Below
<N/F>    Specify the structure flag of the robot. (Nonflip or Flip)
N: Non flip (Default) F: Flip
<O/C>    Specify open or close state of the hand 1.
O: Hand open (Default) C: Hand close

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g. specify 20.01 for 20.01 mm).
Alarm occurs if the specified coordinates exceed the robot's operational space.
The default coordinate value is zero.
Use the MPB command If the setting of speed, timer, or input/output are needed.
If you do not set any condition of speed, timer, or input/output in the teaching playback method, the MPC command is generated
at each step.
The order that the condition data specified with this command is executed is as follows.
1)Interpolation method 2)Speed 3)Movement to target position 4)Timer 5)Signal output (including hand control) 6)Signal input
wait

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.) and with additional axis

Function:

Moves to the specified position with specified interpolation.

Input Format

MPC [<interpolation>], [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning angle>]
[, <First additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Interpolation>    Specify the interpolation mode to the destination position.


0: Joint interpolation (Default)
1: Linear interpolation
2: Circular interpolation
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B turning angle >    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<First additional axis> Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.
<Second additional axis> Specifies the moving position for Second additional axis (If omitted, value is the current position)
The unit is determined by the additional axes parameter AXUN.
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (Default) L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default) B: Below
<O/C>    Specify open or close state of the hand 1.
O: Hand open (Default) C: Hand close

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 300 of 562

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the additional axes parameter AXUN.
The linear interpolation is specified for the <interpolation>, the speed of the additional axis will be converted from the speed of
the joint interpolation (%) (the control of the robot will continue to function as usual). The relationship between linear
interpolation and joint interpolation is shown in the explanation for the MPB command.

Related parameters:

additional axes parameter AXUN

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.) and with additional axis

Function:

Moves to the specified position with specified interpolation.

Input Format

MPC [<interpolation>], [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning
angle>], [<C turning angle>] [, <First additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [, [<O/C>]]

Term

<Interpolation>   
Specify the interpolation mode to the destination position.
0: Joint interpolation (Default)
1: Linear interpolation
2: Circular interpolation

<X, Y, Z coordinate>   
Specify the location (mm) in XYZ coordinates of the robot. (0 for default)

<A, B, C turning angle > Specify the turning angle around X (A), Y (B), Z (C) axes in XYZ coordinates (degree) of the robot.
(0 for default)
<First additional axis>
Specifies the moving position for First additional axis (If omitted, value is the current position)
The unit is determined by the parameter, AXUN.

<Second additional axis>


Specifies the moving position for Second additional axis (If omitted, value is the current position)
The unit is determined by the additional axes parameter AXUN.

<R/L>    Specify the structure flag of the robot. (Right or Left)


R: Right (Default) L: Left
<A/B>    Specify the structure flag of the robot. (Above or Below)
A: Above (Default) B: Below
<N/F> Specify the structure flag of the robot. (Nonflip or Flip)
N: Non flip (Default) F: Flip
<O/C>    Specify open or close state of the hand 1.
O: Hand open (Default) C: Hand close

Explanation

The additional axis will also move if the position includes additional axis data.
If the additional axis is omitted, only the robot will move.
The coordinate values of nonexistent additional axes will be ignored.
The unit for the additional axis is specified in the additional axes parameter AXUN
The linear interpolation is specified for the <interpolation>, the speed of the additional axis will be converted from the speed of
the joint interpolation (%) (the control of the robot will continue to function as usual). The relationship between linear
interpolation and joint interpolation is shown in the explanation for the MPB command.

Related parameters:

additional axes parameter AXUN

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 301 of 562

MR (Move R)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves the tip of hand through the predefined intermediate positions in circular interpolation.

Input Format

MR <position number (a) > , <position number (b)>, <position number (c)> [, [< O/C >]]

Term

<Position number>    Specify the positions on the circle.


1 <= position number <= 999
<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

 Moves the tip of hand through specified positions from (a) via (b) to (c) drawing an arc.
The moving speed of circular interpolation is decided by the SP or SD command. (The tip of hand at constant speed.) Since the
locus accuracy depends on the speed of circular interpolation, set the moving speed lower if you need high accuracy.
The open or close state of the hand does not change before and after the movement.
If the starting position (a) is different from the current position, the robot moves to the starting position by linear interpolation.
If the circular interpolation is interrupted by the stop signal and restarted by the start signal, the robot moves the remaining arc.
If the tip of hand is kept away from the stopping position by JOG operation in the above case, the robot moves to the stopping
position by joint interpolation then moves the remaining arc.
Alarm takes place if the specified position has not been predefined or exceeds the robot's operational space. The robot moves by
linear interpolation if three positions (a), (b) and (c) are located on a straight line or if two of three positions are the same.
If the moving direction of each joint changes greatly at the beginning of circular interpolation, alarm may occur. Set speed lower
or set timer at the beginning in this case.
The drawing direction and the locus of the arc depend on the order of the specified positions.

Sample program (MOVEMASTER Command)

10 SP 8 'Set speed to 8.
20 MO 1 'Moves to position 1.
30 MR 10,20,30 'Moves to position 10 by linear interpolation. Moves the arc determined by position
10, 20, 30 by circular interpolation.
40 MS 3 'Moves to position 3 by linear interpolation.
50 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Using circular interpolation, moves the tip of the hand through previously specified intermediate positions.

Input Format

MR <position number (a) > , <position number (b)>, <position number (c)> [, [< O/C >]]

Term

<Position number>     Specify the positions on the circle.


1 <= position number <= 999
<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

Moves the tip of the hand through specified positions to make a circular arc beginning with (a) the start point, going through (b)
the transit point, and finishing at (c) the end point.
The additional axis also moves to the start point if the end point has movement components for the additional axis.
The additional axis will not move to the transit point from the start point if there are movement components for the additional
axis at the transit point. (It will move directly to the end point.)
When the robot moves in response to the additional axis movements (travel axis, etc.), the tip of the locus of the hand tip will
not from a circular arc.

Sample program (MOVEMASTER Command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 302 of 562

10 SP 8 'Set speed to 8.
20 MO 1 'Moves to position 1.
30 MR 10,20,30 'Moves to position 10 by linear interpolation. Moves the arc determined by position
10, 20, 30 by circular interpolation.
40 MS 3 'Moves to position 3 by linear interpolation.
50 ED 'Ends program.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MRA (Move R A)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves to the specified position in circular interpolation.

Input Format

MRA <Position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position.


1 <= position number <= 999
<O/C>   Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

 Moves the tip of hand on the arc which is defined by the former and the latter positions of the MRA commands. The tip of hand is
decided by the tool length currently established. (see TL command).
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
Alarm takes place if the specified position has not been predefined.
If the MRA command does not continue more than three, it becomes similar to the MC command. The following command,
however, can be executed between the MRA command.
SD, SP, TI, OVR, OB, OC, OD, GC and GO
If the execution of the MRA command is interrupted and the tip of hand is kept away from the stopping position by JOG
operation, the robot moves, when restarted, to the stopping position by linear interpolation then moves the remaining arc.

Sample program (MOVEMASTER Command)

10 MRA 1,O 'Defines the arc with positions 1, 2, 3. Moves to position 1 by linear interpolation.
20 MRA 2,O 'Moves to position 2 by circular interpolation.
30 MRA 3,C 'Moves to position 3 by circular interpolation.
40 TI 3 'Timer 0.3 second.
50 MRA 4 'Moves to position 4 by circular interpolation.
60 MRA 5 'Moves to position 5 by circular interpolation.
70 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Moves to the specified position in circular interpolation.

Input Format

MRA <Position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position.


1 <= position number <= 999
<O/C>   Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 303 of 562

O: Hand open
C: Hand close

Explanation

If there are less than 3 consecutive MRA commands, they will be executed identically to MC commands (movement by linear
interpolation). However, the following commands can be described between MRA commands: (They will be by circular
interpolation) SD, SP, TI, OVR, OC, OD, GC and GO, ADL
The additional axis also moves if movement components exist for the additional axis.
When the robot moves in response to the additional axis movements (travel axis, etc.), the tip of the locus of the hand tip will
not form a circular arc.

Sample program (MOVEMASTER Command)

10 MRA 1,O 'Generation of a circle by combining positions 1,2, and 3. Move to position 1 by linear
interpolation.
20 MRA 2,O 'Moves to position 2 by circular interpolation.
30 MRA 3,C 'Moves to position 3 by circular interpolation.
40 TI 3 'Timer 0.3 second.
50 MRA 4 'Moves to position 4 by circular interpolation.
60 MRA 5 'Moves to position 5 by circular interpolation.
70 ED 'Ends program.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MS (Move Straight)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Moves the tip of hand to the specified position. (Linear interpolation)

Input Format

MS <Position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<O/C>    Specify open or close state of hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

Moves the tip of hand to the specified position by linear interpolation. The tip of the hand is decided by the tool length currently
established. (See the TL command.)
Alarm occurs before or during movement if the destination or movement path goes beyond the robot's operational space.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
The moving speed is decided by the SP or SD commands. (The tip of hand at constant speed.)
Use the MC command to move continuously through several positions by linear interpolation.

Sample program (MOVEMASTER Command)

10 SP 15 'Sets speed to 15.


20 MO 1 'Moves to position 1 by joint interpolation.
30 MS 5 'Moves to position 5 by linear interpolation.
40 MS 6 'Moves to position 6 by linear interpolation.
50 MS 7 'Moves to position 7 by linear interpolation.
60 MS 8 'Moves to position 8 by linear interpolation.
70 MS 5 'Moves to position 5 by linear interpolation.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 304 of 562

Function:

Moves the tip of hand to the specified position. (Linear interpolation)

Input Format

MS <Position number> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<O/C>    Specify open or close state of hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

The additional axis also moves if movement components exist for the additional axis.
When the robot moves in response to the additional axis movements (travel axis, etc.), the tip of the locus of the hand tip will
not be straight.

Sample program (MOVEMASTER Command)

10 SP 15 'Sets speed to 15.


20 MO 1 'Moves to position 1 by joint interpolation.
30 MS 5 'Moves to position 5 by linear interpolation.
40 MS 6 'Moves to position 6 by linear interpolation.
50 MS 7 'Moves to position 7 by linear interpolation.
60 MS 8 'Moves to position 8 by linear interpolation.
70 MS 9 'Moves to position 9 by linear interpolation.

RV-M1

Function:

Moves the robot to a specified position number through the specified number of intermediate points on a straight line. (Linear
interpolation)

Input Format

MS <Position number>, <No. of intermediate points> [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 629
< No. of intermediate points >     Specify the number of intermediate points
1 <= No. of intermediate points <= 99
<O/C> Specify open or close state of hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

The number of intermediate points between the current position and the specified position number is calculated by equally
dividing the distance of travel and position angle (pitch/roll angle) between the two positions (the number of divisions equaling
the number of intermediate points plus 1). Acceleration and deceleration during the movement are omitted.
The more intermediate points, the smoother the straight line for the movement path, but the more time is required for
calculating before the robot starts moving (99 intermediate points require about 2.4 seconds). It is therefore recommended that
the number of intermediate points is specified according to the distance of travel and the required path accuracy.
If any of the intermediate points specified excess the robots operational space, the robot stops in mid-motion and error mode II is
caused. The hand end velocity during movement changes in accordance with the attitude.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
Moves the tip of hand to the specified position by linear interpolation. The tip of the hand is decided by the tool length currently
established. (See the TL command.)
Error mode II occurs before or during movement if the specified position has not been predefined.
The moving speed is decided by the SP or SD commands. (The tip of hand at constant speed.)
Use the MC command to move continuously through several positions by linear interpolation.
Certain positions of the robot may cause oscillations. In such cases, keep the speed low. (The speed should be set to SP5 or
lower. 50 mm/second max.)

Sample program (MOVEMASTER Command)

10 SP 15 'Sets speed to 15.


20 MO 1 'Moves to position 1 by joint interpolation.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 305 of 562

30 MS 5, 3, C 'Moves to position 5 by linear interpolation with 3 intermediate points


80 ED 'End of program
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MT (Move Tool)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves the tip of hand to a position away from the specified position by the distance as specified in the tool direction. (Joint
interpolation)

Input Format

MT <position number>, [<travel distance>] [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<Travel distance>    Specify the distance in tool direction from the specified position to the destination point. (Zero for
default)
-3276.80 <= travel distance <= 3276.70
<O/C> Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

The least increment of the distance is 0.01 mm.


When the distance is positive, the tip of hand advances in the tool direction. When the distance is negative, the tip of hand
retracts in the tool direction.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
Alarm occurs when the MT command is executed if the specified position has not been predefined or if the destination exceeds
the robot's operational space.

Sample program (MOVEMASTER Command)

10 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.
20 MS 1 'Moves to position 1.
30 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.

RV-M2

Function:

Moves the tip of hand to a position away from the specified position by the distance as specified in the tool direction. (Joint
interpolation)

Input Format

MT <position number>, [<travel distance>] [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<Travel distance>    Specify the distance in tool direction from the specified position to the destination point. (Zero for
default)
-3276.80 <= travel distance <= 3276.70
<O/C> Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

The least increment of the distance is 0.01 mm.


When the distance is positive, the tip of hand advances in the tool direction. When the distance is negative, the tip of hand
retracts in the tool direction.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 306 of 562

Alarm occurs when the MT command is executed if the specified position has not been predefined or if the destination exceeds
the robot's operational space.

Sample program (MOVEMASTER Command)

10 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.
20 MS 1 'Moves to position 1.
30 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.

RV-M1

Function:

Moves the tip of hand to a position away from the specified position by the distance as specified in the tool direction. (Joint
interpolation)

Input Format

MT <position number>, [<travel distance>] [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 629
<Travel distance>    Specify the distance in tool direction from the specified position to the destination point. (Zero for
default)
-3276.80 <= travel distance <= 3276.70
<O/C> Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

Explanation

The least increment of the distance is 0.1 mm.


When the distance is positive, the tip of hand advances in the tool direction. When the distance is negative, the tip of hand
retracts in the tool direction.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
Alarm occurs when the MT command is executed if the specified position has not been predefined or if the destination exceeds
the robot's operational space.

Sample program (MOVEMASTER Command)

10 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.
20 MS 1 'Moves to position 1.
30 MT 1,-100 'Moves to the point away from the position 1 by 100 mm.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MTS (Move Tool Straight)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves the tip of hand to a position away from the specified position by the distance as specified in the tool direction. (Linear
interpolation)

Input Format

MTS < position number>, [<travel distance>] [, [<O/C>]]

Term

<Position number>    Specify the destination position number in integer value.


1 <= position number <= 999
<Travel distance>    Specify the distance in tool direction from the specified position to the destination point. (Zero for
default)
-3276.80 <= travel distance <= 3276.70
<O/C>    Specify open or close state of the hand. (If omitted, the hand state of the position is valid.)
O: Hand open
C: Hand close

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 307 of 562

Explanation

The least increment of the distance is 0.01 mm.


When the distance is positive, the tip of hand advances in the tool direction. When the distance is negative, the tip of hand
retracts in the tool direction.
If the open or close state of the hand has been specified, the robot moves after executing the hand control.
Alarm occurs when the MT command is executed if the specified position has not been predefined or if the destination exceeds
the robot's operational space.

Sample program (MOVEMASTER Command)

10 MTS 1,-100,O 'Moves to the point away from the position 1 by 100 mm with hand opened. Moves
straight.
20 MS 1 'Moves to position 1.
30 MTS 1,-100,C 'Moves to the point away from the position 1 by 100 mm with hand closed. Moves
straight.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
MUL (Multiply)

RV-EN-Robot (RV-E4N, RV-E5NJ, etc.)

Function:

Multiplies the internal register value and operation value, and stores the result in the internal register.

Input Format

MUL <Operation data>

Term

<Operation data>    Describes the data to be operated as a numeric value or counter No. with @.
-32768 <= numeric value (decimal) <= 32767
&8000 <= numeric value (hexadecimal) <= &7FFF
@1 <= Counter No. <= @99

Explanation

Designate the operation data setting as a numeric value or counter No.


When designating with a numeric value, use a decimal or hexadecimal value. When using a hexadecimal, add a "&" to the head of
the operation data.
When setting with a counter No. add a "@" to the head of the counter No.
The contents of the set counter No. will be used as the operation data.
The operation results are stored in the internal register, so operation, comparison and reading, etc., of the operation results can
be carried out with the related commands.
(Refer to SUB, ADD, DIV, EQ, NE, LG, SM, CL and DR, OR commands)

Sample program (MOVEMASTER Command)

10 CP 1 'Stores counter No. 1 value in internal register


20 MUL @2 'Multiplies internal register value by counter No. 2 value
30 CL 3 'Sets internal register value in counter No. 3 (Counter No. 3 = counter No. 1 x counter
No. 2)
40 CP 1 'Stores counter No. 1 value in internal register
50 MUL 5 'Multiplies internal register value by 5
60 CL 4 'Sets internal register value in counter No. 4 (Counter No. 4 = counter No. 1 x 5)

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 308 of 562

COSIMIR® · Movemaster Command


 
N * (Number)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Select the specified program.

Input Format

N <program name>

Term

<Program name>    Specify the robot program name. (Less than 8 characters)
Possible letter used:Digits (0-9)
Characters (A - Z)
Symbols (! @ # $ % ^ & ( ) _ | { } - )
Impossible letter used:* + , . / : ; = ? [ \ ] '
Special specification: When you specified only numeric value, is handled for number.
Need to enclose program name with " " in the case of character used.

Explanation

Select the specified program. The program selected here becomes an object of the implementation, modification and operation.
The program selected once remains till other program number is selected afresh. (Even if the power turns OFF, the program
number remains unchanged.)
You can confirm the current program number using the QN command from the personal computer.
Program 1 is selected at product line shipping.
The following name is identified as the same.
An example:
Handled as the same.1,01,001,00000001 (Only numeric value)
Handled as not the same.1,1 A, A0 _ 001 (Includes characters)
The letters that controller can indicate to the LED are 0-9, A - Z
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS #1 'Opens the RS-232C communication file in BASIC.


20 PRINT #1, "N10" 'Selects the program 10.
30 PRINT #1, "10 MO 1" 'Implementation of program. (Line 10)
40 PRINT #1, "20 MS 2" 'Implementation of program. (Line 20)
50 PRINT #1, "30 ED" 'Implementation of program. (Line 30)
60 END 'Ends

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
NE (If Not Equal)

RV-A, RH-AH, RP-AH, RV-EN

Function:

This compares the value of the internal register with a specified value. If not equal, the program will jump. The character string
register and details of a specified character string are compared. If not equal, the program will jump.

Input Format

NE <compared value/character string number>, <branching line number>

Term

<Compared value>   
Specify the value that the internal register compares contents with.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 309 of 562

-32768 <= compared value (decimal) <= 32767


& 8000 <= compared value (hexadecimal) <= &7FFF
<Character string number>    Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99
<Branching line number>   Specify the line number to which the program jumps when the comparison result is not equal.
1 <= branching line number <= 9999

Explanation

<When compared value is specified>


Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value does not equal to the compared value (i.e. when the condition is met), the program jumps to the
specified line. Otherwise (i.e. when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

<When character string number is specified>

The conditions will jump depending on the data input from an external source or the number of characters in a specified
character string.
If the number of characters in the character string register is not equal to the details of a specified character string (when the
conditions are established), the program will jump to the specified line number. If not (when conditions are not established), the
next line will be executed.
By executing an INP command, the data input from an external device will be set in the character string register. The details of
the character string number will be set by executing a CP command. Thus, when executing condition jumping, one of these
commands must be executed first.
If the specified line number is not registered, an alarm will occur when jumping.

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 NE 80,100 'Jumps to line 100 if the data does not equal 80.
30 ED 'Ends the program if above condition is not met.
100 MO 7 'Moves to position 7.
110 OPN 1,1 'Opens the RS-232C port.
120 INP 1, ,2 'Reads the data of character string register from the RS-232C port.
130 NE $2,200 'Jumps to line 200 if the data not equals character string number 2.
:
200 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E3J)

Function:

This compares the value of the internal register with a specified value. If not equal, the program will jump.

Input Format

NE <compared value>, <branching line number>

Term

<Compared value>    Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
& 8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number>    Specify the line number to which the program jumps when the comparison result is not equal.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value does not equal to the compared value (i.e. when the condition is met), the program jumps to the
specified line. Otherwise (i.e. when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 NE 80,100 'Jumps to line 100 if the data does not equal 80.
30 ED 'Ends the program if above condition is not met.
100 MO 7 'Moves to position 7.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 310 of 562

RV-M2

Function:

This compares the value of the internal register with a specified value. If not equal, the program will jump.

Input Format

NE <compared value>, <branching line number>

Term

<Compared value>    Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
& 8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number>    Specify the line number to which the program jumps when the comparison result is not equal.
1 <= branching line number <= 3584

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value does not equal to the compared value (i.e. when the condition is met), the program jumps to the
specified line. Otherwise (i.e. when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID and IN) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 NE 80,100 'Jumps to line 100 if the data does not equal 80.
30 ED 'Ends the program if above condition is not met.
100 MO 7 'Moves to position 7.

RV-M1

Function:

This compares the value of the internal register with a specified value. If not equal, the program will jump.

Input Format

NE <compared value>, <branching line number>

Term

<Compared value>    Specify the value that the internal register compares contents with.
-32768 <= compared value (decimal) <= 32767
& 8000 <= compared value (hexadecimal) <= &7FFF
<Branching line number>    Specify the line number to which the program jumps when the comparison result is not equal.
1 <= branching line number <= 2048

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value does not equal to the compared value (i.e. when the condition is met), the program jumps to the
specified line. Otherwise (i.e. when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (See ID and IN) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 NE 80,100 'Jumps to line 100 if the data does not equal 80.
30 ED 'Ends the program if above condition is not met.
100 MO 7 'Moves to position 7.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 311 of 562

NR (Nest Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

NR [<Axis number>]

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-M2

Function

Reads the number of limit pulses of any axis after origin setting (using RS232C)

Input Format

NR [<Axis number>]

Term

<Axis number>    Specifies the axis number


1 <= axis number <= 5

Explanation

Outputs the number of limit pulses of the specified axis from the RS232C port after origin setting. The limit pulses are required
to check the limit switch installation state of each axis during maintenance and inspection.
The output format is ASCII coded:
Output format:
Number of limit pulses for the specified axis 0D (hexadecimal)
The limit pulse checking operation may also be performed from the teaching box. See your manual for more information.
the number of limit pulses indicated is the result of the most recent origin setting. Therefore, the number of limit pulses read
after setting the origin again may be slightly different from the previous value.
Error mode II occurs if the axis exceeds the specified range.

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1


20 INPUT "GELENKNUMMER =" ; J
30 PRINT #1"NR" + STR$(J) 'Read number of limit pulses
40 LINE INPUT #1, A$
50 PRINT A$
60 END
RUN

250                   'Number of limit pulses

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
NT (Nest)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Carry out origin setting. (The robot moves to the user-defined origin.)

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 312 of 562

NT

Explanation

The moving sequence of each joint is fixed beforehand. Origin setting of the shoulder, the elbow and the twist joint is first
executed, which is followed by that of the waist, the pitch, and the roll joint.
Note.: 5-axis robots don't have the twist joint.
If the arm can interfere with the object surrounding the robot, use the teaching box to move it to a safe location before origin
setting.
You can change the moving sequence of the origin setting by the parameter UNG, and also can change the attitude by the
parameter UOG (see the parameters for the RV-E2 and RV-E3J and the RV-EN series). The parameter UOG can be set with the
teaching box operation, too. (See "HE" command.)
The NT command is not required in the usual operation.

Relating Parameters

The sequential order of user origin setting can be changed by the following parameter.
Parameter UNG:Sequential order
2,1,1,1,2,2 (Default)
The attitude of user origin setting can be changed by the following parameter.
Parameter UOG:User origin attitude (degree)
Default:
6-axis robots (e. g. RV-E4N/E4NM/E4NC): -160.00,-45.00,50.00,-160.00,-120.00,-200.00
5-axis robots (e. g. RV-E5NJ/E5NJM/E5NJC) : -160.00,-45.00,0.00,0.00,-120.00,-200.00
To find the change operation, refer to your manual.

Sample program (MOVEMASTER Command)

10 NT 'Executes origin setting.


20 MO 1 'Moves to position 1.
30 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Carry out origin setting. (The robot moves to the user-defined origin.)

Input Format

NT [< Process type>]

Terms:

< Process type >    Sets the processing type of the origin designation.
0: Robot moves to the user-defined origin (If omitted)
1: Origin designation for the First additional axis is executed.
2: Origin designation for the Second additional axis is executed.

Explanation

This command will be unprocessed if the additional axis is using the absolute value method.
If the additional axis is using the incremental method, every time the power is turned ON, and every time after the emergency
stop input is canceled, use this command to designate the origin. (You can also use T/B‚s origin designation or I/O‚s OGE
command.)

Relating Parameters

Use the parameters and additional axes parameters below for determining the sequence of user-defined origin designations:
Parameter UNG:
Sequential order for origin designation
2,1,1,1,2,2 (Default value)
Use the parameter below for changing the position of the user defined origin designations:
Parameter UOG:
Specified origin
6-axis robots (e. g. RV-E4N/E4NM/E4NC):
-160.00,-45.00,50.00,-160.00,-120.00,-200.00 (Default values)
5-axis robots (e. g. RV-E5NJ/E5NJM/E5NJC) :
-160.00,-45.00,0.00,0.00,-120.00,-200.00 (Default values)
Parameter AXOP:
Zero point position for the additional axis
0.00, 0.00 (Default value)

Relating Language

HE

Sample program (MOVEMASTER Command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 313 of 562

10 NT 'Executes origin setting.


20 NT 1 'Execute the origin designation for the first additional axis 1
30 MO 1 'Moves to position 1.
40 ED 'Ends program.

RV-M2

Function:

Carry out origin setting. (The robot moves to the user-defined origin.)

Input Format

NT

Explanation

Used to return the robot to mechanical origin immediately after the power is switched on. Must be executed before teaching and
before a program is executed.
The functionality of the NT command depends on the position of bit 4 of switch SW1 in the drive unit side door. Usually set bit 4
to the lower position. See your manual for further information.
The moving sequence of each joint is fixed beforehand. Origin setting of the J2, J3 and J4 axes is first executed, which is
followed by that of the J1 and J5 joint. If the arm can interfere with the object surrounding the robot, use the teaching box to
move it to a safe location before origin setting.
When the hand holds a workpiece, care must be taken to prevent personal injury because the hand opens as soon as the origin
setting operation is initiated. The hand open/close condition depends on the setting of bit 3 of switch SW1 in the drive unit side
door. (Set to the lower position for ordinary open/close operation and to the upper position for reverse open/close operation.)
Ordinarily, origin setting may be executed only once after the power is switched on. If, after origin setting, the robot has been
stopped by emergency stop operation during re-execution, it returns to the power-on state and the origin setting operation must
therefore be performed again.

Sample program (MOVEMASTER Command)

10 NT 'Executes origin setting.


20 MO 1 'Moves to position 1.
30 ED 'Ends program.

RV-M1

Function:

Carry out origin setting. (The robot moves to the user-defined origin.)

Input Format

NT

Explanation

This command causes the robot to return to the origin, which must be performed immediately after the power is turned ON.
Execution of this command is necessary before any move command can be executed. Origin setting is performed automatically by
the limit switches and phase-Z of encoders provided in each axis.
The functionality of the NT command depends on the position of bit 4 of switch SW1 in the drive unit side door. Usually set bit 4
to the lower position. See your manual for further information.
The moving sequence of each joint is fixed beforehand. Origin setting of the J2, J3 and J4 axes is first executed, which is
followed by that of the J1 and J5 joint. If the arm can interfere with the object surrounding the robot, use the teaching box to
move it to a safe location before origin setting.
When the hand holds a workpiece, care must be taken to prevent personal injury because the hand opens as soon as the origin
setting operation is initiated.
Do not touch the limit switches and robot body until origin setting completes.

Sample program (MOVEMASTER Command)

10 NT 'Executes origin setting.


20 MO 1 'Moves to position 1.
30 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
NW * (New)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 314 of 562

Function:

Deletes the specified program and position data.

Input Format

NW

Explanation

Deletes all positions and counters of the specified program. Common positions (901-999) and common counters (91-99), however,
are not deleted.
Origin setting, internal register, tool length, speed setting, pallet setting, and hand setting remain unchanged even if the NW
command is executed.
The NW command can not be executed in the program with line number. (Only direct execution is possible.)
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
30 PRINT #1, "NW" 'Transmit command "NW"
60 END 'Ends program.

RV-M2, RV-M1

Function:

Deletes all program and position data.

Input Format

NW

Explanation

Deletes all programs and position data stored in the drive unit RAM.
The command does not, however, delete the reference position data in the Cartesian coordinate system.
The NW command can not be executed in the program with line number. (Only direct execution is possible.)
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 LPRINT , "NW" 'Delete all programs and position data


©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
NX (Next)

Function:

Specifies the range of a loop in a program executed by the RC command.

Input Format

NX

Explanation

Used in combination with the RC command to specify the range of a loop in a program executed by the RC command.
Alarm occurs if there is no corresponding "RC" command specified.

Sample program

See the RC command.


©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OB (Output Bit)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 315 of 562

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Sets the output state of the specified bit through an external output port.

Input Format

OB [<+/->] <output bit number>

Term

<+/->    Set ON or OFF state of the specified bit.


+:Bit ON
-: Bit OFF
<Bit number>    Specify the bit number of external output.
0 <= bit number <= 32767

Explanation

Set "+" to switch on the specified bit and "-" to switch off the specified bit.
All bits other than the specified one are not affected by this command. The output state of the specified bit is retained until a
new setting is made by the OB or OD command.
If you specify the special bit in the parameters OT1-OT3 (see the parameters for the RV-E2 and RV-E3J and the RV-EN series)of
the external output, alarm occurs because of the conflict of signals.
For the pneumatic hand, you can specify open or close state of hand 1 and 2 by the OB command. Refer to the table below.
(Ordinary, use the GC or GO command.) For the motor-operated hand, these settings are not possible.

Notice: GR1-GR4 shows connector number of hand output cable in the robot arm.

Hand Open/Close GR1 GR2 GR3 GR4

Output bit Output bit Output bit Output bit


900 901 902 903
Hand Open (GO 0) ON OFF
1
Close (GC 0) OFF ON
Hand Open (GO 0) ON OFF
2
Close (GC 1) OFF ON

Sample program (MOVEMASTER Command)

10 OD &FFFF 'Turns the bits (0-15) of external output into ON entirely.


20 OB -10 'Turns only bit 10 to OFF.
30 ED 'Ends program.

RV-M2

Function:

Sets the output state of the specified bit through an external output port.

Input Format

OB [<+/->] <output bit number>

Term

<+/->    Set ON or OFF state of the specified bit.


+:Bit ON
-: Bit OFF
<Bit number>    Specify the bit number of external output.
0 <= bit number <= 15

Explanation

Set "+" to switch on the specified bit and "-" to switch off the specified bit.
All bits other than the specified one are not affected by this command. The output state of the specified bit is retained until a
new setting is made by the OB or OD command.
If no bit number is specified, it defaults to bit 0.

Sample program (MOVEMASTER Command)

10 OD &FFFF 'Turns the bits (0-15) of external output into ON entirely.


20 OB -10 'Turns only bit 10 to OFF.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 316 of 562

30 ED 'Ends program.

RV-M1

Function:

Sets the output state of the specified bit through an external output port.

Input Format

OB [<+/->] <output bit number>

Term

<+/->    Set ON or OFF state of the specified bit.


+:Bit ON
-: Bit OFF
<Bit number>    Specify the bit number of external output.
0 <= bit number <= 7 (15)
Figure in () is for type A16 or B16 I/O card.

Explanation

Set "+" to switch on the specified bit and "-" to switch off the specified bit.
All bits other than the specified one are not affected by this command. The output state of the specified bit is retained until a
new setting is made by the OB, OD or OT command.
If no bit number is specified, it defaults to bit 0.

Sample program (MOVEMASTER Command)

10 OD &FF 'Turns the bits (0-8) of external output into ON entirely.


20 OB -4 'Turns only bit 4 to OFF.
30 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OC (Output Counter)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Outputs the specified counter value unconditionally through the output port.

Input Format

OC <counter number> [, [<output bit>] [, [<bit width>]]]

Term

<Counter number>    Specify the counter number to be output.


1 <= counter number <= 99
<Output bit number>    Specify the reference bit number of output data
0 <= bit number <= 32767 (0 for default)
<Bit width>    Specify bit width of output data.
1 <= bit width <= 16 (16 for default)

Explanation

Outputs the specified counter value unconditionally through the output port. The output data retains after that.
Even if the OC command is executed, the value of the specified counter and the internal register remain intact.
You can specify the range of output signal by setting the bit width of the OC command.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 PRINT #1,"SC 5,&0008" 'Set value 8 to counter 5
30 PRINT #1,"OC5" 'Outputs the value of the counter 5 unconditionally to output port.
40 END 'Ends program.

RV-M2, RV-M1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 317 of 562

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OD (Output Direct)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Outputs the specified data unconditionally through the output port.

Input Format

OD <output data> [, [<output bit number>] [, [<bit width>]]]

Term

<Output data>    Specified output data.


-32768 <= output data (decimal) <= 32767
& 8000 <= output data (hexadecimal) <= & 7FFF
<Output bit number>    Specify the reference bit number of output data.
0 <= bit number <= 32767 (0 for default)
<Bit width>    Specify the bit width of output data.
1 <= bit width <= 16 (16 for default)

Explanation

Outputs a signal (parallel data) unconditionally through the output port to external equipment such as a programmable
controller. The output data retains after that.
Output data is defined either in decimal or hexadecimal. The data defined in hexadecimal must be headed by "&".
For information on connections, see your manual.
You can specify the range of output signal by setting the bit width of the OD command.
If you specify the special bit in the parameters OT1-OT3 (see the parameters for the RV-E2 and RV-E3J and the RV-EN series) of
the external output, alarm occurs because of the conflict of signals. (If you want to reset output signal with factory default
setting, execute "OD 0,0,13 " causing the output bit from 0 to 12 to OFF.)

Sample program (MOVEMASTER Command)

10 OD &FFFF 'Sets the output port of 16 bits width from bit 0 to ON.
20 OD &FFFF,10 'Sets the output port of 16 bits width from bit 10 to ON.
30 OD &FFFF,10,15 'Sets the output port of 15 bits width from bit 10 to ON.
40 ED 'Ends program.

RV-M2

Function:

Outputs the specified data unconditionally through the output port.

Input Format

OD <output data>

Term

<Output data>    Specified output data.


-32768 <= output data (decimal) <= 32767
& 8000 <= output data (hexadecimal) <= & 7FFF

Explanation

Outputs a signal (parallel data) unconditionally through the output port to external equipment such as a programmable
controller. The output data retains after that.
Output data is defined either in decimal or hexadecimal. The data defined in hexadecimal must be headed by "&".
For information on connections, see your manual.

Sample program (MOVEMASTER Command)

10 OD &FFFF 'Sets all external output port bits (16 bits) to ON.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 318 of 562

40 ED 'Ends program.

RV-M1

Function:

Outputs the specified data unconditionally through the output port.

Input Format

OD <output data>

Term

<Output data>    Specified output data.


0 (-32767) <= output data (decimal) <= 255 (+32767)
&0 (& 8000) <= output data (hexadecimal) <= &FF (& 7FFF)
Figure in () is for type A16 or B16 I/O card.

Explanation

Outputs a signal (parallel data) unconditionally through the output port to external equipment such as a programmable
controller. The output data retains after that.
Output data is defined either in decimal or hexadecimal. The data defined in hexadecimal must be headed by "&".
For information on connections, see your manual.

Sample program (MOVEMASTER Command)

10 OD &FF 'Sets all external output port bits (8 bits) to ON.


40 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OG (Origin)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Moves to the user-defined origin. (Joint interpolation)

Input Format

OG

Explanation

Moves to the user-defined origin specified by the parameter UOG by joint interpolation.
The attitude of the robot, after executing the OG command, is the same as the attitude after executing the NT command. The
parameter UOG (see the parameters for the RV-E2 and RV-E3J and the RV-EN series), which defines the moving sequence of origin
setting, does not effect the OG command.
The parameter UOG can be set with the teaching box operation, too. See your manual for further information.

Relating Parameters

The attitude of user origin setting can be changed by the following parameter.
Parameter UOG
User origin attitude
Default 6-axis: -160.00, -45.00, 50.00, -160.00, -120.00, -200.00
Default 5-axis: -160.00, -45.00, 0.00, 0.00, -120.00, -200.00
To find the change operation, refer to your manual.

Sample program (MOVEMASTER Command

10 NT 'Executes the origin setting.


20 MO 2 'Moves to position 2.
30 OG 'Moves to origin.
40 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 319 of 562

Moves to the user-defined origin. (Joint interpolation)

Input Format

OG

Explanation

Moves to the user-defined origin specified in the parameter UOG, using joint interpolation. The additional axis will move to the
origin specified in the additional axes parameter AXOP.

Relating Parameters

Use the parameter below for changing the position of the user defined origin designations:
Parameter name UOG
Specified origin
Default 6-axis: -160.00, -45.00, 50.00, -160.00, -120.00, -200.00 (Default values)
Default 5-axis: -160.00, -45.00, 0.00, 0.00, -120.00, -200.00 (Default values)
Parameter name AXOP
Origin position for the additional axis
0.00, 0.00 (Default value)

Relating Language

NT

Sample program (MOVEMASTER Command)

10 NT 'Executes the origin setting.


20 MO 2 'Moves to position 2.
30 OG 'Moves to origin.
40 ED 'Ends program.

RV-M2

Function:

Moves to the mechanical reference position for origin setting. (Articulated interpolation)

Input Format

OG

Explanation

Moves the robot to its mechanical origin which has been defined by the NT command or the (NST) (ENT) operation from the
teaching box.
The attitude of the robot, after executing the OG command, is the same as the attitude after executing the NT command.
Error mode II occurs if the OG command is executed before origin setting

Sample program (MOVEMASTER Command)

10 NT 'Executes the origin setting.


20 MO 2 'Moves to position 2.
30 OG 'Moves to origin.

RV-M1

Function:

Moves to the reference position in the Cartesian coordinate system.

Input Format

OG

Explanation

Moves the robot to its reference position in the Cartesian coordinate system established by the HO command or the (P.S) (0)
operation from the teaching box.
If the reference position is yet to be defined, this command moves the robot to a position as determined by tentative data stored
in the system ROM.
Error mode II occurs if the OG command is executed before origin setting

Sample program (MOVEMASTER Command)

10 NT 'Executes the origin setting.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 320 of 562

20 MO 2 'Moves to position 2.
30 OG 'Moves to origin.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OPN (Open)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Opens communication channel and specify input/output device.

Input Format

OPN <channel number>, <device number>

Term

<Channel number>    Specify input/output channel number.


0 <= channel number <= 2
<Device number>    Specify input/output device number.
1: Standard RS-232C
2: Standard RS-422

Explanation

The corresponding relation of the channel number and input/output devices is specified, and the channel is opened.
Up to three channels can be opened simultaneously. However, multiple <channel numbers> cannot be set in the same
<input/output device number>.
The counter, position and character string data can be read in with the INP command.

Sample program (MOVEMASTER Command)

10 OPN 1,1 'The standard RS-232-C is opened. (Channel number 1 is assigned.)


20 INP 1,1,1 'The position data is read from RS-232-C.
30 INP 1,1,0 'The counter data is read from RS-232-C.
40 INP 1,$1,2 'The character string data is read from RS-232-C.

RV-E-Robot (RV-E2, RV-E3J)

Opens communication channel and specify input/output device.

Input Format

OPN <channel number>, <device number>

Term

<Channel number>    Specify input/output channel number.


0 <= channel number <= 4
<Device number>    Specify input/output device number.
0: RS-422
1: RS-232C
2: RS-232C-1 (option)
3: RS-232C-2 (option)

Explanation

The corresponding relation of the channel number and input/output devices is specified, and the channel is opened.
Up to three channels can be opened simultaneously. However, multiple <channel numbers> cannot be set in the same
<input/output device number>.
The counter, position and character string data can be read in with the INP command.

Sample program (MOVEMASTER Command)

10 OPN 1,1 'The standard RS-232-C is opened. (Channel number 1 is assigned.)


20 INP 1,1,1 'The position data is read from RS-232-C.
30 INP 1,1,0 'The counter data is read from RS-232-C.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 321 of 562

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OR (Or)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

ORs the specified data and the internal register data.

Input Format

OR <operation data>

Term

<Operation data >    Specify the data to be operated.


-32768 <= operation data (decimal) <= 32767
& 8000 <= operation data (hexadecimal) <= &7FFF
@1 <= Counter number <= @99

Explanation

Specify the data to be operated in decimal or hexadecimal. Any hexadecimal value must be headed by "&".
The operation result is stored into the internal register and can be changed, compared or read by relevant commands.
(See the ADD, SUB, MUL, DIV, EQ, NE, LG, SM, CL, DR, AN and XO commands)
Execution of the OR command after the input commands (ID or IN) allows to be set to the required bits of the parallel input data
fetched from the external device.

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from external input port.


20 OR &FFF0 'Sets 1 to all bits except lower order 4 bits.
30 EQ &FFFF,100 'If the above data are all bit 1, jumps to line 100.
40 ED Ends program.
:
100 MO 10 'Moves to position 10.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OT (Output)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

OT <Output data>

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-M2

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 322 of 562

Function:

Outputs the specified data synchronously through the output port (using the control signal lines).

Input Format

OT <Output data>

Term

<Output data>     Specified output data.


-32768 <= output data (decimal) <= 32767
& 8000 <= output data (hexadecimal) <= & 7FFF

Explanation

Outputs a signal (parallel data) synchronously through the output port to external equipment such as a programmable controller.
At this time, the control signal lines (RDY and Ack signals) must have been connected to the external equipment. The data output
to the external equipment is retained.
Output data is defined either in decimal or hexadecimal. The data defined in hexadecimal must be headed by "&".
For information on connections, see your manual.

Sample program (MOVEMASTER Command)

10 LPRINT "OT &FFFF" 'Sets all external output port bits (16 bits) to ON.

RV-M1

Function:

Outputs the specified data synchronously through the output port (using the control signal lines).

Input Format

OT <Output data>

Term

<Output data>     Specified output data.


0 (-32768) <= output data (decimal) <= 255 (+32767)
&0 (& 8000) <= output data (hexadecimal) <= &FF (& 7FFF)
Figure in () is for type A16 or B16 I/O card.

Explanation

Outputs a signal (parallel data) synchronously through the output port to external equipment such as a programmable controller.
At this time, the control signal lines (RDY and Ack signals) must have been connected to the external equipment. The data output
to the external equipment is retained.
Output data is defined either in decimal or hexadecimal. The data defined in hexadecimal must be headed by "&".
For information on connections, see your manual.

Sample program (MOVEMASTER Command)

10 LPRINT "OT &FF" ' Sets all external output port bits (8 bits) to ON.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
OVR (Override)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Specify program override.

Input Format

OVR <specified override>

Term

<Specified override>    Specify override value. ( % )


1 <= specified override <= 200

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 323 of 562

Explanation

Specifies the ratio of working speed of the robot.


The OVR command is effective for every interpolation mode, i.e. joint interpolation, linear interpolation and circular
interpolation.
The actual speed in the program eventually becomes the following.
- Joint interpolation speed = playback override X OVR command setting value X SP command setting value.
- Linear interpolation speed = playback override X OVR command setting value X SP or SD command setting value.
- Here, the playback override can be specified by means of the starting display of teaching box or the external input signal. The
override specified by the OVR command is called program override.
The initial value of program override is 100 %.
The override value once specified in the program is effective till new value is set or the program ends.
Alarm occurs at the execution of the OVR command if the value 0 is set to the specified override.
As the acceleration and deceleration distance required for movement are preset, when the specified speed and
acceleration/deceleration are set, if the movement distance is small, the set speed may not be reached.

Sample program (MOVEMASTER Command)

10 SP 30 'Sets working speed 30 (100 %).


20 OVR 80 'Sets override 80 %.
30 MO 2 'Moves to position 2.
40 ED 'Ends program.

If the playback override is specified to 50 % in the above example, the actual override is as follows;
Joint interpolation speed = 50 X 80 X 100 (%) = 40 ( % )
The robot moves to position 2 with the speed of 40 % of maximum value.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Specify program override.

Input Format

OVR <specified override> [, <Valid devices>]

Terms

<Specified override>    Specify override value. ( % )


1 <= specified override <= 200
<Valid devices> Specifies the devices where the specified override will be valid.
0: Robot (When omitted)
1: First additional axis
2: Second additional axis

Explanation

This command determines the ratio of the movement speed between the robot and the additional axis.
The actual speed used in the program will be as follows:
- Robot
Joint interpolation speed
= Playback override x Set value of the OVR command x Set value of (SP).
Linear interpolation speed
= Playback override x Set value of the OVR command x Set value of (SP,SD).
- Additional axis
Speed of additional axis
= Playback override x Set value of the OVR command x Set value of (SP).
Here, the playback override can be specified by means of the starting display of the teaching box or the external input signal.
The override specified by the OVR command is called a "program override„.
If a non-existing device is specified , no processing will be done.

Sample program (MOVEMASTER Command)

10 SP 30 'Sets working speed 30 (100 %).


20 OVR 80,1 'Sets the override in the First additional axis to 80%
30 MO 1 'Moves to position 1.
40 ED 'Ends program.

Note: If you set the playback override to 50% in the above example, the real specified override will be as follows:
Real specified override = 50/100 x 80/100 x 100 (%) = 40 (%)
First additional axis will move to position 1 at 40% of the maximum program execution speed.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 324 of 562

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PA (Pallet Assign)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Defines the number of grid points in the column and row directions for the specified pallet.

Input Format

PA <pallet number>, <number of column grid points>, <number of row grid points>

Term

<Pallet number>   Specify number of pallet using.


1 <= pallet number <= 9
<Number of column grid points >   Set grid points of column of pallet.
1 <= number of column grid points <= 32767
<Number of row grid points>    Set grid points of row of pallet.
1 <= number of row grid points <= 32767

Explanation

The PA command must be executed before the pallet calculation command (see the PT command) is executed.
The number of grid points is equivalent to that of the actual workpieces arranged on the pallet. For example, with a pallet
holding 15 workpieces (3 x 5), the numbers of column and row grid points are 3 and 5, respectively.
The column and row directions are decided by the directions of the terminating positions, respectively. (See the PT command)

Sample program (MOVEMASTER Command)

10 PA 5,20,30 'Defines the pallet 5 as the pallet holding 20 x 30 grid points.


20 SC 51,15 'Sets value 15 to counter 51. (column points)
30 SC 52,25 'Sets value 25 to counter 52. (row points)
40 PT 5 'Sets the calculated coordinates value of grid point to position 5.
50 MO 5 'Moves to position 5. (The grid position)
60 ED 'Ends program.

RV-M1

Function:

Defines the number of grid points in the column and row directions for the specified pallet.

Input Format

PA <pallet number>, <number of column grid points>, <number of row grid points>

Term

<Pallet number>   Specify number of pallet using.


1 <= pallet number <= 9
<Number of column grid points >   Set grid points of column of pallet.
1 <= number of column grid points <= 255
<Number of row grid points>    Set grid points of row of pallet.
1 <= number of row grid points <= 255

Explanation

The PA command must be executed before the pallet calculation command (see the PT command) is executed.
The number of grid points is equivalent to that of the actual workpieces arranged on the pallet. For example, with a pallet
holding 15 workpieces (3 x 5), the numbers of column and row grid points are 3 and 5, respectively.
The column and row directions are decided by the directions of the terminating positions, respectively. (See the PT command)

Sample program (MOVEMASTER Command)

10 PA 5,20,30 'Defines the pallet 5 as the pallet holding 20 x 30 grid points.


20 SC 51,15 'Sets value 15 to counter 51. (column points)
30 SC 52,25 'Sets value 25 to counter 52. (row points)
40 PT 5 'Sets the calculated coordinates value of grid point to position 5.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 325 of 562

50 MO 5 'Moves to position 5. (The grid position)


60 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PC * (Position Clear)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Clears the data of the specified position(s).

Input Format

PC <position number (a)> [, [<position number (b)>]]

Term

<Position number >    Specify position number deleting.


1 <= position number (a), (b) <= 999
Position number (a) <= position number (b)

Explanation

Deletes all position data between positions (a) and (b). (Position (b) included)
If the position number (a) is greater than the position number (b), alarm occur.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer in BASIC.
20 PRINT #1, "MO 10" 'Moves to position 10.
30 PRINT #1, "MO 11" 'Moves to position 11.
40 PRINT #1, "MO 12" 'Moves to position 12.
50 PRINT #1, "PC 11" 'Delete the position 11.
60 PRINT 31, "DP" 'Moves to position 10.
70 END 'Ends program.

RV-M2

Function:

Clears the data of the specified position(s).

Input Format

PC <position number (a)> [, [<position number (b)>]]

Term

<Position number >    Specify position number deleting.


1 <= position number (a), (b) <= 999
Position number (a) <= position number (b)

Explanation

Deletes all position data between positions (a) and (b). (Position (b) included)
If the position (b) is not specified, only the data of position (a) is cleared.
Note that the reference position data for origin setting is cleared if any position number is not specified or 0 is defined, with bit
4 of switch SW1 in the drive units side door located in the upper position. At this time, the robot must be set to the origin setting
reference position once again by the HO command or by the (P.S) (0) operation from the teaching box.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :9600, e, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 PRINT #1, "MO 10" 'Moves to position 10.
30 PRINT #1, "MO 11" 'Moves to position 11.
40 PRINT #1, "MO 12" 'Moves to position 12.
50 PRINT #1, "PC 11" 'Delete the position 11.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 326 of 562

60 PRINT 31, "DP" 'Moves to position 10.


70 END 'Ends program.

RV-M1

Function:

Clears the data of the specified position(s).

Input Format

PC <position number (a)> [, [<position number (b)>]]

Term

<Position number >    Specify position number deleting.


1 <= position number (a), (b) <= 629
Position number (a) <= position number (b)

Explanation

Deletes all position data between positions (a) and (b). (Position (b) included)
If the position (b) is not specified, only the data of position (a) is cleared.
Note that the reference position data for origin setting is cleared if any position number is not specified or 0 is defined, with bit
4 of switch SW1 in the drive units side door located in the upper position. At this time, the robot must be set to the origin setting
reference position once again by the HO command or by the (P.S) (0) operation from the teaching box.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :9600, e, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 PRINT #1, "MO 10" 'Moves to position 10.
30 PRINT #1, "MO 11" 'Moves to position 11.
40 PRINT #1, "MO 12" 'Moves to position 12.
50 PRINT #1, "PC 11" 'Delete the position 11.
60 PRINT 31, "DP" 'Moves to position 10.
70 END 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PD (Position Define)

RV-A, RV-E-Robot with 5 axes (RV-2AJ, RV-E3J, RV-E5NM, etc.)

Function:

Defines the coordinates (location and angle) of the specified position.

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning angle>]
[, [<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 999
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B turning angle>    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (default)
L: Left
<A/B>   Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 327 of 562

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g. specify 20.01 for 20.01 mm).
Alarm does not occur even if the specified coordinates exceed the robot's operational space. The PD command, combined with the
SF and the MA command, can define the amount for moving.

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,40,30,R,A,O 'Defines the location and angle of position 10.


40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-A, RV-E-Robot with 6 axes (RV-1A, RV-E2, RV-E4N, etc.)

Function:

Defines the coordinates (location and angle) of the specified position.

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning
angle>] , [<C turning angle>], [, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [, [<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 999
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B,C turning angle>    Specify the turning angle (degree) of roll (A) and pitch (B)and twist (C) joints in XYZ coordinates
of the robot. (0 for default)
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (default)
L: Left
<A/B>   Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<N/F>    Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

The least increment of the coordinate value is 0.01 mm or 0.01 degree (e.g. specify 20.01 for 20.01 mm).
Alarm does not occur even if the specified coordinates exceed the robot's operational space. The PD command, combined with
the SF and the MA command, can define the amount for moving.

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,50,40,30,R,A,N,O 'Defines the location and angle of position 10.


40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-E-Robot with 5 axes (RV-E3J, RV-E5NM, etc.) and with additional axis

Function:

Sets the coordinate values of a position for a specified number to a specified value (location and posture)

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning angle>]
[, <First additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>]]] [, [<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 999
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B turning angle>    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, coordinate value is not
specified)
The unit is determined by the additional axes parameter AXUN.
<Second additional axis>   
Specifies the moving position for Second additional axis (If omitted, coordinate value is not

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 328 of 562

specified)
The unit is determined by the additional axes parameter AXUN.
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (default)
L: Left
<A/B>   Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

If the coordinate values of an additional axis are omitted, it will not be defined.
The unit for the additional axis is specified in the additional axes parameter AXUN.

Related Parameters

additional axes parameter AXUN

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,50,40,100,0 'Set the position and additional axis in position 10.


40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-E-Robot with 6 axes(RV-E2, RV-E4N, etc.) and with additional axis

Function:

Sets the coordinate values of a position for a specified number to a specified value (location and posture)

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<A turning angle>], [<B turning
angle>] , [<C turning angle>] [, <First additional axis> [, <Second additional axis>]] [, [<R/L>] [, [<A/B>] [, [<N/F>]]]] [, [<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 999
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<A, B, C turning angle>    Specify the turning angle (degree) of roll (A) and pitch (B)and twist (C) joints in XYZ coordinates
of the robot. (0 for default)
<First additional axis>    Specifies the moving position for First additional axis (If omitted, coordinate value is not
specified)
The unit is determined by the additional axes parameter AXUN.
<Second additional axis>    Specifies the moving position for Second additional axis (If omitted, coordinate value is not
specified)
The unit is determined by the additional axes parameter AXUN.
<R/L>    Specify the structure flag of the robot. (Right or Left)
R: Right (default)
L: Left
<A/B>   Specify the structure flag of the robot. (Above or Below)
A: Above (Default)
B: Below
<N/F>    Specify the structure flag of the robot. (Non flip or Flip)
N: Non flip (Default)
F: Flip
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

If the coordinate values of an additional axis are omitted, it will not be defined.
The unit for the additional axis is specified in the additional axes parameter AXUN.

Related Parameters

additional axes parameter AXUN

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,50,40,30,100,0 'Set the position and additional axis in position 10.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 329 of 562

40 MO 10 'Moves to position 10.


50 ED 'Ends program.

RV-M2

Function:

Defines the coordinates (location and angle) of the specified position.

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<Pitch angle>], [<Roll angle>] [,
[<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 999
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<Roll/Pitch angle>    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

The least increment of the coordinate value is 0.1 mm or 0.1 degree (e.g. specify 20.1 for 20.1 mm).
Alarm does not occur even if the specified coordinates exceed the robot's operational space. The PD command, combined with
the SF and the MA command, can define the amount for moving.
Any coordinate value defaults to 0.
When the open/close state of the hand (O: Open, C: Close) is not specified, it is defined by the grip flag GF command.
The PD command can only define a robot position when the coordinates of the end of the hand as determined by the tool
command are located ahead of the Z-axis (i. e. the direction the robot faces).

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,50,40,C 'Defines the location and angle of position 10.


40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-M2 with additional axis

Function:

Defines the coordinates (position and angle) of the specified position.

Input Format

PD <Position number>, [<X-axis coordinate value>], [<Y-axis coordinate value>], [<Z-axis coordinate value>], [<Pitch angle>], [<Roll
angle>], [<Locomotive coordinate>], [<O/C>]

Where, 1 <= Position number <= 999

Sample Input

PD 10, 0, 380, 300, -70, -40, 150, C

Explanation

The least input increment of the coordinate values is 0.1mm or 0.1 degree (e.g. specify 20.1 for 20.1 mm).
No error occurs if the defined coordinates exceed the robot‚s operational space. This allows you to define a position representing
an incremental movement when the command is used in combination with the other command, e.g. SF , MA
Any coordinate value defaults to 0.
When the open/close state of the hand (O: Open, C: Close) has not been specified, it is defined by the grip flag GF command.
The PD command can only define a robot position when the coordinates of the end of the hand as determined by the tool
command are located ahead of the Z-axis (i. e. the direction the robot faces).

Sample Program

100 LPRINT "PD 10, 0, 550, 430, -50, -40, 300, C"
110 LPRINT "PD 20, 0, 0, 20, 0, 0, 0"
120 LPRINT "SF 10, 20"
130 LPRINT "MO 10"

* In the above example, line number 100 defines position 10, at which the hand is closed, while line number 110 defines position 20.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 330 of 562

Line number 120 then redefines position 10 as a position being shifted 20mm in the Z-axis as determined by position 20. Line number
130 moves the robot to the new position 10.

RV-M1

Function:

Defines the coordinates (location and angle) of the specified position.

Input Format

PD <Position number>, [<X coordinate value>], [<Y coordinate value>], [<Z coordinate value>], [<Pitch angle>], [<Roll angle>] [,
[<O/C>]]

Term

<Position number>    Specify position number defining.


1 <= position number <= 629
<X, Y, Z coordinate>    Specify the location (mm) in XYZ coordinates of the robot. (0 for default)
<Roll/Pitch angle>    Specify the turning angle around roll(A), pitch(B) axes in XYZ coordinates (degree) of the robot. (0
for default)
<O/C>   Specify open or close state of hand 1.
O: Hand 1 open
C: Hand 1 close

Explanation

The least increment of the coordinate value is 0.1 mm or 0.1 degree (e.g. specify 20.01 for 20.01 mm).
Alarm does not occur even if the specified coordinates exceed the robot's operational space. The PD command, combined with
the SF and the MA command, can define the amount for moving.
Any coordinate value defaults to 0.
When the open/close state of the hand (O: Open, C: Close) is not specified, it is defined by the grip flag GF command.
The PD command can only define a robot position when the coordinates of the end of the hand as determined by the tool
command are located ahead of the Z-axis (i. e. the direction the robot faces).

Sample program (MOVEMASTER Command)

10 PD 10,50,320,70,50,40,C 'Defines the location and angle of position 10.


40 MO 10 'Moves to position 10.
50 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PL (Position Load)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Replaces position (a) by position (b).

Input Format

PL <position number (a)>, <position number (b)>

Term

<Position number (a) >    Specify the position number. (Destination)


1 <= position number (a) <= 999
<Position number (b)>    Specify the position number. (Source)
1 <= position number (b) <= 999

Explanation

After execution, the PL command causes the coordinates of position (a) to be equivalent to those of position (b) and the old
coordinates of position (a) to be cleared.
After execution, the PL command also assigns the hand state at position (b) to that at position (a).
Alarm occurs if position (b) is not defined.
A new position is created if the position (a) is not defined.

Sample program (MOVEMASTER Command)

10 HE 2 'Sets the current coordinates and hand state to position 2.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 331 of 562

20 PL 3,2 'Replaces the coordinates of position 3 by position 2.


30 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Substitute the coordinate values of a specified position number (a) with coordinate values that have been entered in another postition
(b)

Input Format

PL <position number (a)>, <position number (b)>

Term

<Position number (a) >    Specify the position number. (Destination)


1 <= position number (a) <= 999
<Position number (b)>    Specify the position number. (Source)
1 <= position number (b) <= 999

Explanation

The table below shows how the existence/nonexistence of position data for the additional axis determines the contents position
number (a) after the PL command is executed.

Pattern 1 Pattern 2 Pattern 3


Position (a) Robot Exists Exists Exists
Position (a) Additional axis Doesn‚t exist Exists Exists
Position (b) Robot Exists Exists Exists
Position (b) Additional axis Exists Doesn‚t exist Exists
PL (a),(b) Robot (a) <- (b) (a) <- (b) (a) <- (b)
PL (a),(b) Additional axis (a) <- (b) Doesn‚t exist (a) <- (b)

Sample program (MOVEMASTER Command)

10 PD 3, 50,.320, 70, 50, 40, 30 '6 axis: Set position 3 (without position data for the additional
axis)
10 PD 3, 50,.320, 70, 50, 40 '5 axis: Set position 3 (without position data for the additional
axis)
20 HE 2 'Set the current position in position 2 (including the position data
for the additional axis)
30 PL 3,2 'Copy position 2 onto position 3 (Corresponds to "Pattern 1" in the
table above.)
40 ED 'End program.

RV-M1

Function:

Replaces position (a) by position (b).

Input Format

PL <position number (a)>, <position number (b)>

Term

<Position number (a) >    Specify the position number. (Destination)


1 <= position number (a) <= 629
<Position number (b)>    Specify the position number. (Source)
1 <= position number (b) <= 629

Explanation

After execution, the PL command causes the coordinates of position (a) to be equivalent to those of position (b) and the old
coordinates of position (a) to be cleared.
After execution, the PL command also assigns the hand state at position (b) to that at position (a).
Alarm occurs if position (b) is not defined.
A new position is created if the position (a) is not defined.

Sample program (MOVEMASTER Command)

10 HE 2 'Sets the current coordinates and hand state to position 2.


20 PL 3,2 'Replaces the coordinates of position 3 by position 2.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 332 of 562

30 ED 'End program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PMR (Parameter Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads contents of parameter specified.

Input Format

PMR ["<parameter name>"]

Term

<Parameter name >    Specify parameter name.


Only defined parameter names are valid. (Defined order for default)

Explanation

Outputs the specified parameters (see the parameters for the RV-E2 and RV-E3J and the RV-EN series) from RS-232C port.
The output format:
Parameter name, contents
When you omitted parameter name, a parameter defined next is output. (Parameters are defined in alphabetical order. )If the
last parameter is read out, only carriage return (Hex. 0D) is output.
When you specify a parameter that does not exist, contents of next parameter specifying in alphabetical order is outpu

Sample program (BASIC)

20 OPEN "COM1 :E83" AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
30 INPUT "Parameter name is" ;J$ 'Inputs the parameter name.
40 PRINT #1,"PMR"+CHR$(&H22)+J$+CHR$(&H22) 'Transmits the PMR command followed by the parameter name.
40 LINE INPUT #1,A$ 'Saves the received data to A $.
50 PRINT A$ 'Displays the contents of A $.
60 END 'Ends program.
RUN 'Run the program.
Parameter name is ? ADL 'Enter the parameter name.
ADL,0.20,0.20 'Outputs the contents of ADL

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PMW (Parameter Write)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Renews the contents of the specified parameter.

Input Format

PMW "<parameter name>", "<parameter contents>"

Term

<Parameter name>     Specify the parameter name changing contents.


<Parameter contents>   Specify the contents that you want to change to.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 333 of 562

Explanation

Outputs the contents of the specified parameter through the RS-232C port.
When you specified the parameter that does not exist, no operation is executed.
For information on parameters, see the list of all parameters (for the RV-E2 and RV-E3J and the RV-EN series)
The specified parameter becomes effective after having turned off and on the power supply. Give attention that even if you have
changed the contents of the parameter, the old contents is still effective until the power supply is turned on again.

Sample program (MOVEMASTER Command)

PMW "ADL" , "0.40,0.40" 'Sets the contents of parameter ADL 0.40,0.40

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PR (Position Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the coordinates of the specified position and the open/close state of the hand. (Using RS-232C)

Input Format

PR [<position number>]

Term

<Position number>    Specify the position number that you want to read.
0 <= position number <= 999
(If omitted, the current position number is valid.)

Explanation

Outputs the coordinates of the specified position and the open/close state of the hand through the RS-232C port. If the position
number is omitted or equals 0, only the current position number is output .
The data is ASCII coded as follows; The least increment is 0.01 mm or 0.01 degree.
Output format
6-axis type:X, Y, Z coordinate value, A, B,C turning angle degree, R/L, A/B,N/F,O/C
5-axis type:X, Y, Z coordinate value, A, B turning angle degree, R/L, A/B,O/C
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If you read the position that is not used in the program and not defined yet, "zero" is output with each coordinate.
6-axis type:0,0,0,0,0,0
5-axis type:0,0,0,0,0
If you read the position that is already used in the program but not defined yet, "0.00" is output with each coordinate.
6-axis type:0.00,0.00,0.00,0.00,0.00,0.00
5-axis type:0.00,0.00,0.00,0.00,0.00
If you specify "zero" to the position number or omit it, you can identify the current position number when an alarm occurs in
executing moving command.

Sample program (BASIC)

(1) 6 -axis type

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the
personal computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to
read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the
position number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.00,+380.00,300.00,-70.00,
'Outputs the contents of the position.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 334 of 562

50.00,40.00,R,A,N,C

(2)5-axis type

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position
number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.00,+380.00,300.00,
'Outputs the contents of the position.
50.00,40.00,R,A,C

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Reads the open/close state of the hand, and the posture and coordinate values of a specified position. (For the RS-232-C)

Input Format

PR [<position number>]

Term

<Position number>    Specify the position number that you want to read.
0 <= position number <= 999
(If omitted, the current position number is valid.)

Explanation

The output configuration is as shown below, and is output in ASCII code entirely.
The least increment for the output is 0.01mm or 0.01 deg.
Output configuration:
X,Y,Z, A,B,C, First additional axis, Second additional axis, R/L, A/B, N/F, O/C (6 axis)
X,Y,Z, A,B, First additional axis, Second additional axis, R/L, A/B, O/C (5 axis)
An example of an output configuration is as follows:
for 6 axis:
- First additional axis and Second additional axis are non-existent or undefined:
X,Y,Z, A,B,C, R,A,N,O
- First additional axis exists, Second additional axis is non-existent or undefined:
X,Y,Z, A,B,C, First additional axis, +0.00, R,A,N,O
- First additional axis and Second additional axis exist:
X,Y,Z, A,B,C, First additional axis, Second additional axis, R,A,N,O
- First additional axis is non-existent or undefined, Second additional axis exists:
X,Y,Z, A,B,C, + 0.00 , Second additional axis, R,A,N,O
for 5 axis:
- First additional axis and Second additional axis are non-existent or undefined:
X,Y,Z, A,B, R,A,O
- First additional axis exists, Second additional axis is non-existent or undefined:
X,Y,Z, A,B, First additional axis, +0.00, R,A,O
- First additional axis and Second additional axis exist:
X,Y,Z, A,B, First additional axis, Second additional axis, R,A,O
- First additional axis is non-existent or undefined, Second additional axis exists:
X,Y,Z, A,B, + 0.00 , Second additional axis, R,A,O

Sample program (BASIC)

(1) 6 -axis type

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15  'Enter the position number.
+10.00,+380.00,300.00,-70.00,50.00,40.00,
'Outputs the contents of the position.
+100.00,+200.00,R,A,N,C

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 335 of 562

(2)5-axis type

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position
number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.00,+380.00,300.00,-70.00,
'Outputs the contents of the position.
50.00,100.00,200.00,R,A,C

RV-M2

Function:

Reads the coordinates of the specified position and the open/close state of the hand. (Using RS-232C)

Input Format

PR <Position number>

Term

<Position number>    Specify the position number that you want to read.
0 <= position number <= 999

Explanation

Outputs the coordinates of the specified position and the open/close state of the hand through the RS-232C port. If the position
number is omitted or equals 0, only the current position number is output .
The data is ASCII coded as follows; The least increment is 0.1 mm or 0.1 degree.
Output format
X, Y, Z coordinate value, A, B turning angle degree, O/C
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If you read the position that is not used in the program and not defined yet, "zero" is output with each coordinate.
0,0,0,0,0,0

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position
number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.0,+380.0,+300.0,-50.0,
'Outputs the contents of the position.
-40.0,C

RV-M2 with additional axis

Function:

Reads the coordinates of the specified position and the open/close state of the hand. (Using RS-232C)

Input Format

PR <Position number>

Where, 1 <= Position number <=999

Sample Input

PR 5

Explanation

This command causes the coordinates of a specified position and the open/close state of the hand to be output from the RS232C

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 336 of 562

port.
he data is output in ASCII as indicated below. The least output increment is 0.1mm or 0.1degree (e.g. 20.1 is displayed for
20.1mm).
Output format: X-axis coordinate, Y-axis coordinate, Z-axis coordinate, pitch angle, roll angle, Locomotive coordinate, 0 or C 0D
(Hex)
The hand open/close state is then output as 0 for open and C for close.
The delimiter of the data is a comma (,: Hex. 2C) and the terminator is a carriage return (CR, Hex. 0D). If the data is to be
received by a personal computer, it is necessary to handle the entire data string up to hex. 0D. The BASIC equivalent to this is
the LINE INPUT statement.
When an undefined position is read, 0‚s are returned (0, 0, 0, 0, 0, 0).

Sample Program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position
number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.0,+380.0,+300.0,-70.0
'Outputs the contents of the position.
,-40.0, 250,C

RV-M1

Function:

Reads the coordinates of the specified position. (Using RS-232C)

Input Format

PR <Position number>

Term

<Position number>    Specify the position number that you want to read.
0 <= position number <= 629

Explanation

Outputs the coordinates of the specified position through the RS-232C port. If the position number is omitted or equals 0, only
the current position number is output .
The data is ASCII coded as follows; The least increment is 0.1 mm or 0.1 degree
Output format
X, Y, Z coordinate value, pitch angle, roll angle
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If you read the position that is not used in the program and not defined yet, "zero" is output with each coordinate.
0,0,0,0,0,0

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Position number is"; P 'Inputs the position number that you want to read
30 PRINT #1,"PR"+STR$(P) 'Transmits the PR command followed by the position
number.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the contents to the screen.
60 END 'Ends program.
RUN 'Run the program.
Position number is ? 15 'Enter the position number.
+10.0,+380.0,+300.0,-50.0
'Outputs the contents of the position.
,-40.0
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PRN * (Print)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 337 of 562

RV-A, RH-AH, RP-AH, RV-EN

Function:

The counter number setting value, position number coordinate value or the character string number data is transmitted from the
personal computer in regard to the INP command. (Using RS-232-C)

Input Format

PRN <counter value> | <position coordinates>| "<character string data>"

Term

<Counter value>    Specify the counter value setting to a counter.


-32768 <= Counter value (decimal) <= 32767
& 8000 <= Counter value (hexadecimal) <= & 7FFF
<Position coordinates>    Specify the coordinates value setting to a position. Specify the following coordinates similar to the PD
command.
(See the PD command)
(1) 6-axis type
<X, Y, Z coordinates>, <A, B, C turning angle>, <R/L>, <A/B>, <N/F>, <O/C>
(2) 5-axis type
<X, Y, Z coordinates>, <A, B turning angle>, <R/L>, <A/B>,<O/C>
<Character string data>    Specify the character string to be set.
1 <= Character string data <= 120 (number of characters)
Usable characters:
numerals (0 to 9),
alphabetic characters(A to Z),
symbols (!@#, etc.)
Unusable characters: *+,./;:[]\'

Explanation

Transmits the setting value of counter, the coordinates value of position or the character strings from the personal computer
through the RS-232C port responding to the INP command in the program.
The robot becomes wait condition in the INP command till the date is transmitted from personal computer by executing the PRN
command.
You can execute the PRN command prior to the INP command during the execution of the program.
When transmitting character string data, enclose the character string in double quotations (").
* This command can only be executed directly. It cannot be used in a program.

Sample program

<Personal computer program>

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Counter data is" ;J 'Enter the setting value of counter from the personal
computer.
30 PRINT #1,"PRN"+STR$ (J) 'Transmits the setting value of counter.
40 PRINT #1,"PRN 100,0,0,0,0,0" 'Transmits the coordinates value of position.
50 END 'Ends program.

<Robot program>

10 OPN 2,1 'Opens the RS-232C port.


20 IN 2,1,0 'Reads the data from RS-232C port to counter 1.
30 IN 'Add 1 to counter 1.
50 MO 5 'Moves to position 5.

RV-E-Robot (RV-E2, RV-E3J)

Function:

The counter number setting value or position number coordinate value is transmitted from the personal computer in regard to the INP
command. (Using RS-232-C)

Input Format

PRN <counter value> | <position coordinates>

Term

<Counter value>    Specify the counter value setting to a counter.


-32768 <= Counter value (decimal) <= 32767
& 8000 <= Counter value (hexadecimal) <= & 7FFF
<Position coordinates>    Specify the coordinates value setting to a position. Specify the following coordinates similar to the PD

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 338 of 562

command.
(See the PD command)
(1) 6-axis type
<X, Y, Z coordinates>, <A, B, C turning angle>, <R/L>, <A/B>, <N/F>, <O/C>
(2) 5-axis type
<X, Y, Z coordinates>, <A, B turning angle>, <R/L>, <A/B>,<O/C>

Explanation

Transmits the setting value of counter or the coordinates value of position from the personal computer through the RS-232C port
responding to the INP command in the program.
The robot becomes wait condition in the INP command till the date is transmitted from personal computer by executing the PRN
command.
You can execute the PRN command prior to the INP command during the execution of the program.
* This command can only be executed directly. It cannot be used in a program.

Sample program

<Personal computer program>

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Counter data is" ;J 'Enter the setting value of counter from the personal
computer.
30 PRINT #1,"PRN"+STR$ (J) 'Transmits the setting value of counter.
40 PRINT #1,"PRN 100,0,0,0,0,0" 'Transmits the coordinates value of position.
50 END 'Ends program.

<Robot program>

10 OPN 2,1 'Opens the RS-232C port.


20 IN 2,1,0 'Reads the data from RS-232C port to counter 1.
30 IN 2,5,1 'Reads the data from RS-232C port to counter 5.
30 IC1 'Add 1 to counter 1.
50 MO 5 'Moves to position 5.

RV-E-Robot (RV-E2, RV-E3J) with additional axis

Function:

Transmits either the setting value of the counter or the coordinate values of a position in regard to the INP command. (For the RS-232-
C)

Input Format

PRN <counter value> | <position coordinates>

Term

<Counter value>    Specify the counter value setting to a counter.


-32768 <= Counter value (decimal) <= 32767
& 8000 <= Counter value (hexadecimal) <= & 7FFF
<Position coordinates>    Specify the coordinates value setting to a position. Specify the following coordinates similar to the PD
command.
(See the PD command)
(1) 6-axis type
<X, Y, Z coordinates>, <A, B, C turning angle>, <First additional axis>, <Second additional axis>, <R/L>,
<A/B>, <N/F>, <O/C>
(2) 5-axis type
<X, Y, Z coordinates>, <A, B turning angle>, <First additional axis>, <Second additional axis>, <R/L>,
<A/B>,<O/C>

Explanation

If the coordinate values of the additional axis are omitted for the additional axis system, nothing will be specified.

Sample program

<Personal computer program>

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 INPUT "Counter data is" ;J 'Enter the setting value of counter from the personal
computer.
30 PRINT #1,"PRN"+STR$ (J) 'Transmits the setting value of counter.
40 PRINT #1,"PRN 100,0,0,0,0,0,100,0,R,A,N" '(6-axis) Transmits the coordinates value of position.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 339 of 562

40 PRINT #1,"PRN 100,0,0,0,0,100,0,R,A" '(5-axis) Transmits the coordinates value of position.


50 END 'Ends program.

<Robot program>

10 OPN 2,1 'Opens the RS-232C port.


20 IN 2,1,0 'Reads the data from RS-232C port to counter 1.
30 IN 2,5,1 'Reads the data from RS-232C port to counter 5.
30 IC1 'Add 1 to counter 1.
50 MO 5 'Moves to position 5.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PT (Pallet)

Function:

Calculates the coordinates of a grid point on the specified pallet and sets the coordinates value to the specified position.

Input Format

PT <pallet number>

Term

<Pallet number>    Specify the number of pallet using.


1 <= pallet number <= 9

Explanation

Calculates the coordinates of a grid point on the specified pallet and sets the coordinates to the position which number is
corresponding to the specified pallet number. Before the PT command is executed, the pallet definition command (PA) must be
executed for the pallet to be used. After the PT command has been executed, the position data previously defined for the target
position is cleared.
In order for the PT command to be executed, the pallet positions (grid points at four corners of the pallet) must be properly
defined which identify a particular pallet and the pallet counters (column and row) be properly set that specify a particular grid
point on the pallet. If the pallet positions and pallet counters are properly defined, therefore, execution of the PT command
allows the coordinates of a grid point to be defined as the position number equivalent to the pallet number. The following is a
listing of a combination of pallet positions and counters corresponding to each pallet number.
Alarm occurs if the pallet position have not been defined and the pallet counters have not been set or have been set to have
values exceeding those defined by the PA command. Alarm does not occur, however, even when the coordinates obtained for the
grid point exceed the robot's operational space.

Pallet number 1 2 3 4 5 6 7 8 9
Pallet reference point 10 20 30 40 50 60 70 80 90
Pallet column 11 21 31 41 51 61 71 81 91
terminating position
Pallet row terminating 12 22 32 42 52 62 72 82 92
position
Pallet corner position 13 23 33 43 53 63 73 83 93
opposite to reference
Pallet column counter 11 21 31 41 51 61 71 81 91
Pallet row counter 12 22 32 42 52 62 72 82 92
Pallet grid position 1 2 3 4 5 6 7 8 9

The open or close state of the hand at the target grid point is the same as that in the pallet reference position.
When executing the PT command, the tool length of the hand to be used must be properly defined by the TL command. The
robot must be taught through the pallet positions (four corners) using the predefined correct tool length.
Pay attention when you use pallet nine because the counters (91,92) of pallet nine are common counters among programs and
other program may use these counters.

Sample program (Movemaster command)

Suppose there is a pallet on which a total of 24 workpieces are arranged, 4 in the column direction and 6 in the row direction. Then
have the system compute the coordinates of the workpiece placed in the grid position (2,4), i.e. the second grid in the column direction
and the fourth grid in the row direction, and get the robot hand to reach that position. Assume that pallet 7 is used.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 340 of 562

You must teach the positions at four corners (70,71,72,73) in advance.

10 TL 200 'Sets the tool length equivalent to the hand using.


20 PA 7,4,6 'Sets the pallet number and the grid points of column and row.
30 SC 71,2 'Sets the number of grid point in column direction.
40 SC 72,4 'Sets the number of grid point in row direction.
50 PT 7 'Allows the coordinates of the target grid point to be set to position 7.
60 MO 7 'Moves to position 7.
70 ED 'Ends program.

©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PW (Pulse Wait)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Waits for in-position of servomotor about all joints till it becomes within the specified value.

Input Format

PW <positioning pulse>

Term

<Positioning pulse >    Specify the judgment pulse number of in-position.


1 <= positioning pulse <= 10000

Explanation

Waits for in-position of servomotor about all joints till it becomes within the specified value.
If you need the positioning of high accuracy when chucking a workpiece at a position, set small value for positioning pulse. If you
need the positioning of low accuracy, set large value. If you set small value to the positioning pulse, the robot waits for
positioning having the same effect as the TI command is executed.
If you set small value to the positioning pulse when the handling workpiece is relatively heavy or the robot is moving at high
speed, it may take a longer time to position than usual.
Initial value of positioning pulse is 10000 pulse.
When the setting value exceeds the above limit, alarm occurs.

Sample program (MOVEMASTER Command)

10 PW 100 'Waits for the positioning pulse becoming within 100 pulses.
20 MO 1 'Moves to position 1.
30 GC 'Closes hand.
40 ED 'Ends program.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
PX (Position Exchange)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Exchanges the coordinates of the specified position for those of another specified position.

Input Format

PX <position number (a) >, <position number (b) >

Term

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 341 of 562

<Position number>    Specify the position number exchanging.


1 <= position number (a), (b) <= 999

Explanation

After the PX command is executed, the coordinates of position (a) are exchanged for those of position (b)
The open or close state of the hand at position (a) is also exchanged for that at position (b).
Alarm occurs if positions (a) and (b) have not been predefined.

Sample program (MOVEMASTER Command)

10 HE 2 'Define the current position to position 2


20 MJ 20,30,10,0,0,0 'Drives each joint by the specified amount.
30 GO 'Opens the hand.
40 HE 3 'Define the current position to position 3.
50 PX 2,3 'Exchanges the coordinates value of position 2 for those of position 3.
60 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Exchanges each coordinate value of a specified position with those of another specified position.

Input Format

PX <position number (a) >, <position number (b) >

Term

<Position number>    Specify the position number exchanging.


1 <= position number (a), (b) <= 999

Explanation

The position data for the additional axis are also exchanged.
Position data for additional axis will be exchanged even if one side does not include such data.

Sample program (MOVEMASTER Command)

10 PD 3,50,320,70,50,40,30 '(6-axis) Set position 3 (without additional axis data)


10 PD 3,50,320,70,50,40 '(5-axis) Set position 3 (without additional axis data)
20 HE 2 'Set position 2 with the current position (Including the position data for
the additional axis)
30 PX 2,3 'Exchange the coordinate values, posture, and additional axis position
data of position 2 with those of position 3. The position data for the
additional axis will disappear in position 2.
60 ED 'End program

RV-M1

Function:

Exchanges the coordinates of the specified position for those of another specified position.

Input Format

PX <position number (a) >, <position number (b) >

Term

<Position number>    Specify the position number exchanging.


1 <= position number (a), (b) <= 629

Explanation

After the PX command is executed, the coordinates of position (a) are exchanged for those of position (b)
The open or close state of the hand at position (a) is also exchanged for that at position (b).
Alarm occurs if positions (a) and (b) have not been predefined.

Sample program (MOVEMASTER Command)

10 HE 2 'Define the current position to position 2


20 MJ 20,30,10,0,0,0 'Drives each joint by the specified amount.
30 GO 'Opens the hand.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 342 of 562

40 HE 3 'Define the current position to position 3.


50 PX 2,3 'Exchanges the coordinates value of position 2 for those of position 3.
60 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
QN (Question Number)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the program name or the program information.

Input Format

QN [<Program name>]

Term

<Program name>    Specify the robot program name to be read. (Max. 8 characters)
Possible letter used:Digits (0-9)
Characters (A - Z)
Symbols ((! @ # $ % ^ & ( ) _ | { } -)
Impossible letters used:* + , . / : ; = ? [ \ ] '
Special specification:
When you specified only numeric value, the program name is handled for number.
Need to enclose program name with " " in the case of character used.

Explanation

Outputs the selected program name or the selected program information through the RS-232C port. If you omitted the program
name, the selected program name is turned over and if you specified it, the information about the program is turned over.
The output format is ASCII coded as follows;
- The program number format: "N" followed by "Program name"
- The program information format: Used number of steps, used number of positions, 
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.used
number of counters

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"QN" 'Transmits the QN command.
30 LINE INPUT #1,A$ 'Saves the received data to A$.
40 PRINT "Selected program is " : A $ 'Displays the contents of A$ to the screen.
60 END 'Ends.
RUN 'Run the program.
Selected program is N10 'Outputs the program name.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
RC (Repeat Cycle)

Function:

Repeats the loop specified by the NX command the specified number of times.

Input Format

RC <number of repeated cycles>

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 343 of 562

Term

<Number of repeated cycles>    Specify the number of times repeating.


1 <= number of repeated cycles (decimal) <= 32767
& 0001 <= number of repeated cycles (hexadecimal) <= & 7FFF

Explanation

Used with the NX command to cause the loop specified by the NX command to be executed the specified number of times and
causes the line number following NX to be subsequently executed.
To incorporate another loop (between RC and NX) into the existing loop is called "nesting". Up to 9 nesting levels are possible.

Sample program (MOVEMASTER Command)

10 MO 1 'Moves to position 1.
20 RC 3 'Repeats loop delimited by NX three times
30 MO 2 'Moves to position 2.
40 MO 3 'Moves to position 3. Loop.
50 MO 4 'Moves to position 4.
60 NX 'Delimits the loop.
70 MO 5 'Moves to position 5.
80 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
RN * (Run)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Executes the specified part of commands in a program.

Input Format

RN [<start line number> [, <end line number> [, program name]]]

Term

<Start line number>    Specify the line number beginning.


1 <= start line number <= 9999 (The top line for default)
<End line number>    Specify the line number ending.
1 <= end line number <= 9999
(The last line or ED command line for default)
<Program name>    Specify the program name. (Max. 8 characters)
Possible letter used:Digits (0-9)
Characters (A - Z)
Symbols (! @ # $ % ^ & ( ) _ | { } - )
Impossible letter used:* + , . / : ; = ? [ \ ] '
Special specification:
When you specified only numeric value, the program name is handled for number.
Need to enclose program name with " " in the case of characters used.

Explanation

Runs the program starting with the specified starting line and ending with the line one ahead the specified ending line.
If the program is to continue, restart with the ending line.
If the teaching box is connected, the line number being executed is shown on its display.
You can select the program by appointing the <program name>. In this case, the specified program becomes the target program
and the program starts from the specified line.
If you describe the RN command with line number in a program, no operation is executed.
When the RN command is executed, the contents of the counter remain intact (not initialized).
The following name is identified as the same.
An example:
Handled as the same. 1,01,001,00000001 (Only numeric value)
Handled as not the same.1,1 A, A0 _ 001 (Includes characters)
The letters that controller can indicate to the LED are 0-9, A ` Z (simplified).
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file


20 PRINT #1,"RN 100,,2" 'from the personal computer in BASIC. Executes the program 2 from line

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 344 of 562

100.
30 END 'Ends program.

RV-M2

Function:

Executes the specified part of commands in a program.

Input Format

RN [<start line number> [, <end line number>]]

Term

<Start line number>    Specify the line number beginning.


1 <= start line number <= 3584 (The top line for default)
<End line number>    Specify the line number ending.
1 <= end line number <= 3584
(The last line or ED command line for default)

Explanation

Runs the program starting with the specified starting line and ending with the line one ahead the specified ending line.
If the program is to continue, restart with the ending line.
If the teaching box is connected, the line number being executed is shown on its display.
If the starting line number is not specified, the program starts with the first line.
When the RN command is executed, the contents of the counter remain intact (not initialized).
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 LPRINT "100 MO 10"


20 LPRINT "110 MO 12"
30 LPRINT "120 GC"
40 LPRINT "130 MO 17"
50 LPRINT "140 ED"
60 LPRINT "RN 100" 'Runs program starting with line number 100

RV-M1

Function:

RN [<start line number> [, <end line number>]]

Term

<Start line number>    Specify the line number beginning.


1 <= start line number <= 2048 (The top line for default)
<End line number>    Specify the line number ending.
1 <= end line number <= 2048
(The last line or ED command line for default)

Explanation

Runs the program starting with the specified starting line and ending with the line one ahead the specified ending line.
If the program is to continue, restart with the ending line.
If the teaching box is connected, the line number being executed is shown on its display.
If the starting line number is not specified, the program starts with the first line.
When the RN command is executed, the contents of the counter remain intact (not initialized).
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 LPRINT "100 MO 10"


20 LPRINT "110 MO 12"
30 LPRINT "120 GC"
40 LPRINT "130 MO 17"
50 LPRINT "140 ED"
60 LPRINT "RN 100" 'Runs program starting with line number 100
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 345 of 562

 
RS * (Reset)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Resets the program and error condition.

Input Format

RS [<reset number>]

Term

<Reset number>    Specify the contents of reset.


Reset contents
0: Cancels alarm and resets program. (Default)
1: Makes all counters undefined condition.
2: Resets the battery timer.
3: Deletes all programs and all positions.
(The same as the NW command.)
4: Resets the origin setting condition.

Explanation

Resets alarm condition in alarm mode, switching servo from OFF to ON and causing the program to return to its beginning.
If any of the axes has exceeded its software limit, the alarm cannot be reset.
The outputs remain unchanged by resetting any alarms.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from personal computer in BASIC.
20 PRINT #1,"MO 1000" 'Alarm occurs because of the wrong value.
30 PRINT #1,"MO 1000" 'Cancels the alarm.
40 END 'Ends program.

RV-M2

Function:

Resets the program and error condition.

Input Format

RS  

Explanation

Resets an error in error mode I (hardware error), switching servo from OFF to ON and causing the program to return to its
beginning. If any of the axes has exceeded its software limit, the alarm cannot be reset.
Also resets an error condition in error mode II (software error), causing the error to be reset and the program to return to its
beginning.
The counter values and outputs remain unchanged by resetting any error.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 LPRINT "MO 1000" 'Causes error mode II (defined value greater than 999)
20 LPRINT "RS" 'Resets error

RV-M1

Function:

Resets the program and error condition.

Input Format

RS  

Explanation

This command resets the program causing it to return to its beginning.


Also resets an error condition in error mode II (software error), causing the error to be reset and the program to return to its
beginning. Note, however, that error mode I (hardware error) cannot be reset by this command. To reset error mode I, turn

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 346 of 562

power OFF.
The counter values and outputs remain unchanged by resetting any error.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC)

10 LPRINT "MO 1000" 'Causes error mode II (defined value greater than 629)
20 LPRINT "RS" 'Resets error

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
RT (Return)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Completes a subroutine and returns to the main program.

Input Format

RT [<Line number>]

Term

<Line number>    Specify the line number to jump.


1 <= line number <= 9999
(If omitted, returns to the next line of the GS command.)

Explanation

Completes the subroutine called by the GS command and returns to the main program.
Alarm occurs if the corresponding "GS" command is not specified.
If you specify the line number, the program jumps to the specified line number after returning to the main routine.

Sample program

see the GS command.

RV-M2, RV-M1

Function:

Completes a subroutine and returns to the main program.

Input Format

RT

Explanation

Completes the subroutine called by the GS command and returns to the main program.
Alarm occurs if the corresponding "GS" command is not specified.

Sample program

see the GS command.


©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SC (Set Counter)

RV-A, RH-AH, RP-AH, RV-EN

Function:

A specified value is set in the specified counter or character string.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 347 of 562

Input Format

SC <counter number/character string number>, [<counter set value/character string set value>]

Term

<Counter number>    Specify the number of counter setting.


1 <= counter number <= 99
<Character string number>    Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99
<Counter set value> Specify the value of counter setting.(0 for default)
-32768 <= set value (decimal) <= 32767
& 8000 <= set value (hexadecimal) <= & 7FFF
<Character string set value>    Specify the character string to be set.
Usable characters:numerals (0 to 9),
alphabetic characters(A to Z),
symbols (!@#, etc.)
Unusable characters: "
Number of characters:
Within 120 characters including line number and SC command.

Explanation

<When counter number is specified>


All counters are factory-set to zero.
Used to count the number of workpieces and job sequences and to set the number of grid points in the pallet.
The contents of the counter can be changed, compared or read by the relevant command. (Refer to the IC, INP, DC, CP, CR, CL,
AN, OR and XO commands.)
The counter set value remains unchanged when the RS, NW or ED command is executed.
The contents of the counter are battery backed after the power is switched off.
<When a character string number is specified>
Enclose the set character string with double quotations ("").
Example: When setting the character string ABC, set "ABC".
If the set character string is omitted, the details of the character string number will be blank. Thus, the details of the character
string number can be deleted.
Operation, comparison and reading of the character string are possible with the related commands. (Refer to the CP, CR, CL, EQ,
NE, LG, SM, INP commands.)
The value of the set character string will not change even if the RS, NW or ED command is executed. The value will be held by
the battery even when the power is turned OFF.

Sample program (MOVEMASTER Command)

10 SC 21,10 'Set value 10 to counter 21.


20 IC21 'Add 1 to counter 21.
30 CP 21 'Set value of counter 21 to the internal register.
40 DR 'Outputs the value of the internal register through RS-232C port.
50 SC $5,"OK" 'Set character string "OK" in character string number 5
60 CP $5 'Set details of character string number 5 in the character string register
70 EQ $10,200 'Jumps to line 200 if the data equals character string number 10.

RV-E-Robot (RV-E2, RV-E3J), RV-M2

Function:

A specified value is set in the specified counter.

Input Format

SC <counter number>, [<counter set value/

Term

<Counter number>    Specify the number of counter setting.


1 <= counter number <= 99
<Counter set value> Specify the value of counter setting.(0 for default)
-32768 <= set value (decimal) <= 32767
& 8000 <= set value (hexadecimal) <= & 7FFF

Explanation

All counters are factory-set to zero.


Used to count the number of workpieces and job sequences and to set the number of grid points in the pallet.
The contents of the counter can be changed, compared or read by the relevant command. (Refer to the IC, INP, DC, CP, CR, CL,
AN, OR and XO commands.)
The counter set value remains unchanged when the RS, NW or ED command is executed.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 348 of 562

The contents of the counter are battery backed after the power is switched off.

Sample program (MOVEMASTER Command)

10 SC 21,10 'Set value 10 to counter 21.


20 IC21 'Add 1 to counter 21.
30 CP 21 'Set value of counter 21 to the internal register.
40 DR 'Outputs the value of the internal register through RS-232C port.
50 ED 'End of program

RV-M1

Function:

A specified value is set in the specified counter.

Input Format

SC <counter number>, [<counter set value>]

Term

<Counter number>    Specify the number of counter setting.


1 <= counter number <= 99
<Counter set value> Specify the value of counter setting.(0 for default)
-32768 <= set value (decimal) <= 32767
& 8000 <= set value (hexadecimal) <= & 7FFF

Explanation

All counters are factory-set to zero.


Used to count the number of workpieces and job sequences and to set the number of grid points in the pallet.
The contents of the counter can be changed, compared or read by the relevant command. (Refer to the IC, INP, DC, CP, CR, CL,
AN, OR and XO commands.)
The counter set value remains unchanged when the RS, NW or ED command is executed.

Sample program (MOVEMASTER Command)

10 SC 21,10 'Set value 10 to counter 21.


20 IC21 'Add 1 to counter 21.
30 CP 21 'Set value of counter 21 to the internal register.
40 DR 'Outputs the value of the internal register through RS-232C port.
50 ED 'End of program
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SD (Speed Define)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Defines the moving velocity, first order time constant, acceleration/deceleration time, and continuous path setting.

Input Format

SD <moving speed> [, <first order time constant> [, <acceleration time>, <deceleration time> [, <CNT setting>]]]

Term

<Moving speed>    Set moving speed at linear or circular interpolation.


0.01 <= moving speed <= 650.00 (mm/sec)
<First order time constant>    1 <= first order time constant <= 300 (millisecond)
<Acceleration time>    Set acceleration time to the maximum speed.
0 <= acceleration time <= 2000 (millisecond)
<Deceleration time>    Set deceleration time from the maximum speed.
0 <= deceleration time <= 2000 (millisecond)
<CNT setting>    Specify the enable or disable state of continuous path mode.
0: Disable 1: Enable

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 349 of 562

The least input increment of the moving speed is 0.01 mm/second or 0.01 degree/second (e.g., specify 20.05 for 20.05 mm/second).
The least input increment of the first order time constant is 1 millisecond.

Allows the moving speed (or angular speed) of the tip of hand for linear or circular interpolation to be defined in smaller increments
than the SP command.
Setting a large value to the first order time constant makes the robot operation slower and smoother.
The speed set by the SD command is effective until a new value is set by the SD or SP command. If you omit the first order time
constant and the acceleration/deceleration time, the predefined values continue to be effective.
During linear or circular interpolation, a certain moving speed of the SD command may cause alarm in excess of the maximum speed
of the corresponding joint. In this case, set the speed to a lower value.
At power on, the moving speed is initialized to SP 12, H (63.3 mm/second).
By enabling the CNT setting, the robot moves continuously without acceleration and deceleration until the SD or SP command
disables the CNT setting. (Path motion) However, the robot accelerates and decelerates at a starting and at a stopping point as well
as when a timer or an input command is executed during the path motion.
The acceleration time is the maximum time for the robot to reach to the maximum speed. Accordingly, when the moving speed does
not reach to the maximum speed, the actual acceleration time becomes smaller than the specified value. (The situation is the same
for the deceleration time.)
As the acceleration and deceleration distance required for movement are preset, when the specified speed and
acceleration/deceleration are set, if the movement distance is small, the set speed may not be reached.
If the acceleration/deceleration time is less than 200msec, an overspeed or overload alarm may occur. Depending on the load
conditions, the life of the mechanical parts may be shortened, so keep the time at 200msec or more when possible.

CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot
motion locus will change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the
peripheral devices, invalidate CNT or shorten the acceleration/deceleration time.

Sample program (MOVEMASTER Command)

10 SP 15 'Set the moving speed to 15.


20 MS 1 'Moves to position 1 by linear interpolation. (SP 15)
30 SD 100 'Set the moving speed to 100mm/sec.
40 MS 2 'Moves to position 2 by linear interpolation. (100 mm/sec)
50 MO 3 'Moves to position 3 by joint interpolation. (SP 15)
60 MS 4 'Moves to position 4 by linear interpolation. (100 mm/sec)
70 ED 'Ends program.

RV-M2

Function:

Defines the moving velocity and first order time constant of the end of the hand for linear interpolation.

Input Format

SD <moving speed> [, <first order time constant> ]

Term

<Moving speed>    Set moving speed at linear or circular interpolation.


0.01 <= moving speed <= 500.00 (mm/sec)
<First order time constant>    1 <= first order time constant <= 300 (millisecond)
(Default: 80 milliseconds)

Explanation

The least input increment of the moving speed is 0.1 mm/second or 0.1 degree/second (e.g., specify 20.5 for 20.5 mm/second).
The least input increment of the first order time constant is 1 millisecond.
Allows the moving speed (or angular speed) of the tip of hand for linear or circular interpolation to be defined in smaller
increments than the SP command.
Setting a large value to the first order time constant makes the robot operation slower and smoother. When the robot turns a
corner by the MC command, the SD command causes the path to be nearer to the inside. When the first order time constant is
not specified, it defaults to 80 msec.
The speed set by the SD command is effective until a new value is set by the SD or SP command. If you omit the first order time
constant the predefined values continue to be effective.
During linear or circular interpolation, a certain moving speed of the SD command may cause error mode II in excess of the
maximum speed of the corresponding joint. In this case, set the speed to a lower value.
The moving velocity of the articulated interpolation command is not determined by the value of the SD command but by that of
the SP command.
At power on, the moving speed is initialized to SP 8, H.

Sample program (MOVEMASTER Command)

10 SP 15 'Set the moving speed to 15.


20 MS 1 'Moves to position 1 by linear interpolation. (SP 15)
30 SD 100 'Set the moving speed to 100mm/sec.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 350 of 562

40 MS 2 'Moves to position 2 by linear interpolation. (100 mm/sec)


50 MO 3 'Moves to position 3 by joint interpolation. (SP 15)
60 MS 4 'Moves to position 4 by linear interpolation. (100 mm/sec)
70 ED 'Ends program.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SF (Shift)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

Adds each coordinate value of position (b) to each coordinate value of position (a) and defines it again as a new position.

Input Format

SF <position number (a)>, <position number (b)>

Term

<Position number>    Specify the position number.


1 <= position number (a), (b) <= 999

Explanation

The hand open or close state of position (a), as well as the structural flag (R/L, A/B, N/F), is not affected by the SF command.
Alarm occurs if the position (a) and/or (b) have not been predefined.
Does not effect any robot motion.

Sample program (MOVEMASTER Command) 5-axis type

10 PD 20,0,0,20,0,0,0 'Set the location and the attitude of position 20.


20 HE 10 'Set the current position to position 10.
30 SF 10,20 'To the Z-coordinate of position 10, the Z-coordinate of position 20 (20 mm) is
added.
40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Adds each of the coordinate values of position (a) to corresponding coordinate values of position (b) and reenters the data.

Input Format

SF <position number (a)>, <position number (b)>

Term

<Position number>    Specify the position number.


1 <= position number (a), (b) <= 999

Explanation

The table below shows how the existence/nonexistence of position data for the additional axis determines the contents of
position number (a) after the SF command is executed.

Pattern 1 Pattern 2 Pattern 3


Position (a) Robot Exists Exists Exists
Position (a) Additional Doesn‚t exist Exists Exists
axis
Position (b) Robot Exists Exists Exists
Position (b) Additional Exists Doesn‚t exist Exists

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 351 of 562

axis
SF (a),(b) Robot (a) <- (a) + (b) (a) <- (a) + (b) (a) <- (a) + (b)
SF (a),(b) Additional (a) <- (b) (a) <- (a) (a) <- (a) + (b)
axis

Sample program (MOVEMASTER Command) 6-axis type

10 PD 20,0,0,20,0,0,0 'Set position 20 (Without position data for the additional axis)
20 HE 10 'Set the current position to position 10.
30 SF 10,20 'Move position 10 only by the amount of position 20 (Z direction 20mm) Re-register the coordinate
values to the shifted position (Corresponds to "Pattern 2„ in the table above)
40 MO 10 'Moves to position 10.
50 ED 'Ends program.

RV-M1

Function:

Adds each coordinate value of position (b) to each coordinate value of position (a) and defines it again as a new position.

Input Format

SF <position number (a)>, <position number (b)>

Term

<Position number>    Specify the position number.


1 <= position number (a), (b) <= 629

Explanation

The hand open or close state of position (a), as well as the structural flag (R/L, A/B, N/F), is not affected by the SF command.
Alarm occurs if the position (a) and/or (b) have not been predefined.
Does not effect any robot motion.

Sample program (MOVEMASTER Command)

10 PD 20,0,0,20,0,0,0 'Set the location and the attitude of position 20.


20 HE 10 'Set the current position to position 10.
30 SF 10,20 'To the Z-coordinate of position 10, the Z-coordinate of position 20 (20 mm) is
added.
40 MO 10 'Moves to position 10.
50 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SL (Set Limit)

RV-M2 with additional axis

Function

Limits the moving range of the Locomotive.

Input Format

SL <Travel range (mm)>

Where, 0 < travel range (mm) <= 800, 1200, 2000 (mm)
The maximum value (800, 1200 or 2000mm) depends on the Locomotive unit used.

Sample Input

SL 600

Explanation

The least input increment of the distance traveled is 0.1mm. (Example: Specify 600.1 for 600.1mm.)
Changing the parameter allows the operating range to be limited by the software. Note that the operating range is referenced
from the origin.
Error mode II occurs it the defined value is outside the moving range (800mm, 1200mm or 2000mm) of the Locomotive unit used.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 352 of 562

Sample Program

10 LPRINT "100 NT"


20 LPRINT "110 SL 500"
30 LPRINT "120 ML 80"
40 LPRINT "130 GT 120"

* The above program example returns the robot to the origin, defines the Locomotive operating range (500mm), and repeats an
independent operation (80mm positive movement) of the Locomotive. Error mode II occurs when the destination position exceeds
the above operating range.

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

SL

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SM (If Smaller)

RV-A, RH-AH, RP-AH, RV-EN

Function:

This compares the value of the internal register with a specified value. If smaller, the program will jump. The character string register
and the numbers of characters in a specified character string are compared. If the character string register is smaller, the program will
jump.

Input Format

SM <compared value/character string number>, <branching line number>

Term

<Compared value>    Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
<Character string number>    Specify character string number in numerical value which "$" is added to the head.
$1 <= character string number <= $99
<Branching line number>    Specify the line number to which the program jumps.
1 <= branching line number <= 9999

Explanation

<When counter number is specified>


Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is smaller than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence. Alarm occurs at a jump if the
specified line number does not exist.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".
<When character string number is specified>
The conditions will jump depending on the data input from an external source or the number of characters in a specified
character string.
If the number of characters in the character string register is smaller than the number of characters in a specified character
string (when the conditions are established), the program will jump to the specified line number. If the number is larger (when
conditions are not established), the next line will be executed. If the specified line number is not registered, an alarm will occur
when jumping.
By executing an INP command, the data input from an external device will be set in the character string register. The details of
the character string number will be set by executing a CP command. Thus, when executing condition jumping, one of these
commands must be executed first.

Sample program (MOVEMASTER Command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 353 of 562

10 ID 'Fetches the data from the external input port.


20 SM 10,100 'If the input data is smaller than 10, jumps to line 100.
30 MS 1 'Moves to position 1 by linear interpolation.
40 ED 'Ends program.
100 MO 10 'Moves to position 10.
140 OPN 1,1 'Opens the RS-232C port.
150 INP 1, ,2 'Reads the data of character string register from the RS-232C port.
160 SM $5,200 'Jumps to line 200 if the data smaller than character string number 10.
:
200 MO 2 'Moves to position 2.

RV-E-Robot (RV-E2, RV-E3J)

Function:

This compares the value of the internal register with a specified value. If smaller, the program will jump.

Input Format

SM <compared value>, <branching line number>

Term

<Compared value>    Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
<Branching line number>    Specify the line number to which the program jumps.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is smaller than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence. Alarm occurs at a jump if the
specified line number does not exist.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches the data from the external input port.


20 SM 10,100 'If the input data is smaller than 10, jumps to line 100.
30 MS 1 'Moves to position 1 by linear interpolation.
40 ED 'Ends program.
100 MO 10 'Moves to position 10.

RV-M2

Function:

This compares the value of the internal register with a specified value. If smaller, the program will jump.

Input Format

SM <compared value>, <branching line number>

Term

<Compared value>    Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
<Branching line number>    Specify the line number to which the program jumps.
1 <= branching line number <= 3584

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is smaller than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence. Alarm occurs at a jump if the
specified line number does not exist.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 354 of 562

The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches the data from the external input port.


20 SM 10,100 'If the input data is smaller than 10, jumps to line 100.
:
40 ED 'Ends program.
100 MO 10 'Moves to position 10.

RV-M1

Function:

This compares the value of the internal register with a specified value. If smaller, the program will jump.

Input Format

SM <compared value>, <branching line number>

Term

<Compared value>    Specify the value compared with the internal register.
-32768 <= Compared value (decimal) <= 32767
& 8000 <= Compared value (hexadecimal) <= & 7FFF
<Branching line number>    Specify the line number to which the program jumps.
1 <= branching line number <= 2048

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
If the internal register value is smaller than the compared value (i.e., when the condition is met), the program jumps to the
specified line. Otherwise (i.e., when the condition is not met), the program continues in sequence. Alarm occurs at a jump if the
specified line number does not exist.
A value can be loaded into the internal register by executing the input command (See ID) for the external input data or by
executing the compare counter command (See CP) for the counter data. Accordingly when you carry out conditional branching,
need to execute either of the above commands beforehand.
The compared value may be defined either in decimal or hexadecimal. A hexadecimal value must be headed by "&".

Sample program (MOVEMASTER Command)

10 ID 'Fetches the data from the external input port.


20 SM 10,100 'If the input data is smaller than 10, jumps to line 100.
:
40 ED 'Ends program.
100 MO 10 'Moves to position 10.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SP (Speed)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Sets the operating speed, acceleration or deceleration time and the continuous path setting.

Input Format

SP <speed level> [, <H/L> [, <CNT setting>]]

Term

<Speed level>    Set moving speed.


0 <= speed level <= 30
<H/L>    Set acceleration/deceleration level.
H: High acceleration/deceleration (Max. 0.2 second)
L: Low acceleration/deceleration (Max. 0.4 second)
<CNT setting>    Specify the enable/disable state of the continuous path mode.
0: Disable 1: Enable

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 355 of 562

Sets the operating speed in 31 steps and acceleration/deceleration time upon start and stop in 2 levels.
The speed level is predetermined as a ratio to the maximum rpm of each joint for joint interpolation and as a ratio to the maximum
speed of the tip of hand (650 mm/second) for linear interpolation.
The acceleration/deceleration time may be selected from among H or L. The acceleration time is the maximum time for the robot
to reach to the maximum speed. Therefore, when the moving speed does not reach to the maximum speed, the actual acceleration
time becomes smaller than the specified value.
The acceleration/deceleration distance required for movement is predetermined according to the specified speed and the set speed
may not be reached if the distance of travel is small.
For linear interpolation, the tip of hand, determined by the tool command, is moved at constant speed. In this case, alarm may
result from any of the joints exceeding its maximum speed. If the motion of the position angle (6-axis type: A,B,C angle, 5-axis type:
A,B angle) is greater than the motion of the distance (X, Y, Z), the robot moves in reference to the position angular speed.
The SD command allows the speed to be defined in smaller increments.
Once set, the speed and acceleration/deceleration time remain valid until new values are set. The default values are SP 12, H. The
most recent acceleration/deceleration time remains valid when it is not specified.
By enabling the CNT setting, the robot moves continuously without acceleration and deceleration until the SD or SP command
disables the CNT setting. (Path motion) However, the robot accelerates and decelerates at a starting and at a stopping point as well
as when a timer or a input command is executed during the path motion.
The default state when the power is turned ON is set to SP12, H.
The speed and acceleration/deceleration set once is valid until set again. If H/L is omitted, the previous setting value will continue
to be valid. (If the SD command is executed, that setting value will be valid.

The relation between the speed level and the moving speed:

SP Joint Linear
interpolation interpolation
[%] [mm/s]
0 0,1 0,2
1 0,4 2,7
2 0,6 3,8
3 0,8 5,3
4 1,1 7,3
5 1,5 9,8
6 2,0 13,3
7 2,7 17,8
8 3,7 23,8
9 4,9 31,7
10 6,5 42,4
11 8,2 53,1
12 9,7 63,3
13 11,6 75,3
14 13,7 89,2
15 16,2 105,2
16 19,0 123,7
17 22,2 144,5
18 25,9 168,1
19 29,8 193,8
20 34,2 222,0
21 40,7 264,8
22 47,3 307,6
23 53,9 350,4
24 60,5 393,2
25 67,1 436,0
26 73,7 478,8
27 80,2 521,6
28 86,8 564,4
29 93,4 607,2
30 100,0 650,0

Note:

The robot moves in reference to the position angular speed in the case of the amount (6-axis type: A, B, C turning angle, 5-axis type: A,B
turning angle) >= the amount (X, Y, Z distance) in linear and circular interpolation. ( The angular speed in degree/second is equivalent to
the distance speed in mm/second divided by the value 2.12.)

The fat printed line in the table above is the initial value when the power is turned on.

CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus
will change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the peripheral devices,
invalidate CNT or shorten the acceleration/deceleration time.

Sample program (MOVEMASTER Command)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 356 of 562

10 SP 3 'Sets the moving speed to 8.


20 MO 5 'Moves to position 5.
30 SP 6 'Sets the moving speed to 10
40 MS 7 'Moves to position 7 by linear interpolation.
50 ED 'Ends program.

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Sets the operating speed of the robot and the additional axis, and the acceleration/deceleration time.

Input Format

SP <speed level> [, <H/L> [, <CNT setting>]]

Term

<Speed level>    Set moving speed.


0 <= speed level <= 30
<H/L>    Set acceleration/deceleration level.
H: High acceleration/deceleration (Max. 0.2 second)
L: Low acceleration/deceleration (Max. 0.4 second)
<CNT setting>    Specify the enable/disable state for the CNT setting.
0: Disable     1 and higher: Enable:

Explanation

The specification of the speed level is expressed as a ratio of the maximum speed of each axis, in the case for joint interpolation,
and as a ratio of the maximum speed (650mm/sec) of hand tip, in the case for linear interpolation. For the additional axis, it is
expressed as a ratio of the maximum speed of each axis.
The specification for acceleration/deceleration is also valid for the additional axis.
By validating the CNT setting, you can omit acceleration/deceleration between consecutive movement commands until next
invalidated. (Path motion) However, the robot accelerates and decelerates at start points and end points, as well as when
something like a timer or input wait signal is inserted between movement commands. Also, acceleration/deceleration is executed
even when the additional axis is moving.

Sample program (MOVEMASTER Command)

10 SP 3 'Sets the moving speed to 8.


20 MO 5 'Moves to position 5.
30 SP 6 'Sets the moving speed to 10
40 MS 7 'Moves to position 7 by linear interpolation.
50 ED 'Ends program.

RV-M2

Function:

Sets the operating speed and the acceleration/deceleration time for the robot.

Input Format

SP <speed level> [, <H/L> ]

Term

<Speed level>    Set moving speed.


0 <= speed level <= 20
<H/L>    Set acceleration/deceleration level.
H: High acceleration/deceleration (Max. 0.2 second)
L: Low acceleration/deceleration (Max. 0.4 second)

Explanation

Sets the operating speed in 21 steps and acceleration/deceleration time upon start and stop in 2 levels.
The speed level is predetermined as a ratio to the maximum rpm of each joint for joint interpolation and as a ratio to the
maximum speed of the tip of hand (222 mm/second) or to the maximum position angular velocity (222 mm/second) for linear
interpolation.
The acceleration/deceleration time may be selected from among H, max. 0.2 seconds, or L, max. 0.4 seconds (for articulated
interpolation only). The acceleration time is the maximum time for the robot to reach to the maximum speed. Therefore, when
the moving speed does not reach to the maximum speed, the actual acceleration time becomes smaller than the specified value.
The acceleration/deceleration distance required for movement is predetermined according to the specified speed and the set
speed may not be reached if the distance of travel is small.
For linear interpolation, the tip of hand, determined by the tool command, is moved at constant speed. In this case, error mode
II may result from any of the joints exceeding its maximum speed. If the motion of the position angle (wrist pitch, roll) is greater

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 357 of 562

than the motion of the distance (X, Y, Z), the robot moves in reference to the position angular speed. (The speed of the end of
the hand is made lower.)
The SD command allows the speed to be defined in smaller increments.
Once set, the speed and acceleration/deceleration time remain valid until new values are set. The default values are SP 8, H.
The most recent acceleration/deceleration time remains valid when it is not specified.
If the speed parameter is not specified, it defaults to 0.

Relationship between speed parameters and velocity:

SP Joint Velocity
interpolation [mm/s]
[%]
0 0,1 0,2
1 1,2 2,7
2 1,7 3,8
3 2,4 5,3
4 3,3 7,3
5 4,4 9,8
6 6,0 13,3
7 8,0 17,8
8 10,7 23,8
9 14,3 31,7
10 19,0 42,2
11 23,9 53,1
12 28,5 63,3
13 33,9 75,3
14 40,2 89,2
15 47,4 105,2
16 55,7 123,7
17 65,1 144,5
18 75,7 168,1
19 87,3 193,8
20 100,0 222,0

Note:

The robot moves according to the angular velocity (°/sec.) if the motion of the position angle (wrist pitch, roll) >= that of the distance
(X, Y, Z)

The fat printed line in the table above is the initial value when the power is turned on.

Sample program (MOVEMASTER Command)

10 SP 3 'Sets the moving speed to 8.


20 MO 5 'Moves to position 5.
30 SP 6 'Sets the moving speed to 10
40 MO 7 'Moves to position 7.
50 ED 'Ends program.

RV-M1

Function:

Sets the operating speed and the acceleration/deceleration time for the robot.

Input Format

SP <speed level> [, <H/L> ]

Term

<Speed level>    Set moving speed.


0 <= speed level <= 9
<H/L>    Set acceleration/deceleration level.
H: High acceleration/deceleration
L: Low acceleration/deceleration

Explanation

This command sets the operating velocity and the acceleration/deceleration time upon starting and stopping. The velocity is
variable in 10 steps, 9 being the maximum speed and 0 the minimum. Acceleration/deceleration time may be selected from
among H or L. The acceleration time is 0.35 seconds for H and 0.5 seconds for L, while deceleration time is 0.4 seconds for H and
0.6 seconds for L. When H is selected, the acceleration and deceleration are constant from SP0 to SP9. When L is selected, the
acceleration and deceleration times are constant from SP0 to SP9.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 358 of 562

When two or more axes of motion are involved, this command sets the operating velocity of the joint having the greatest number
of motor pulses.
The acceleration/deceleration distance required for movement is predetermined according to the specified speed and the set
speed may not be reached if the distance of travel is small.
Error mode I may be caused if a high speed and H time are set to effect a backward motion or when the robots load capacity is
large. In such cases, set a low speed and L time.
Once set, the speed and acceleration/deceleration time remain valid until new values are set. The default values are SP 4, L.
The most recent acceleration/deceleration time remains valid when it is not specified.
If the speed parameter is not specified, it defaults to 0.

Sample program (MOVEMASTER Command)

10 SP 3 'Sets the moving speed to 8.


20 MO 5 'Moves to position 5.
30 SP 6, L 'Sets the moving speed to 10 and time to L
40 MO 7 'Moves to position 7.
50 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
STR * (Step Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the contents of the specified step number, or the stopping step number. (Using RS-232C )

Input Format

STR [<step number>]

Term

<Step number>    Specify the step number reading.


0 <= step number <= 9999

Explanation

Outputs the contents of the specified step number, or the stopping step number through the RS-232C port.
The output format is ASCII coded as follows;
<In the case of teaching playback method>
: (colon), program command
<In the case of Movemaster command method>
Line number, program command
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
If you specify the undefined step number, the hexadecimal 0D is returned over.
If the step number is not specified or zero is specified, the current stopping line number is read.
In the above case, the command STR allows you to confirm the step number by a personal computer when alarm occurs.
* This command can only be executed directly. It cannot be used in a program.

Sample program (BASIC) 6-axis type

10 OPEN "COM1:E83"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 INPUT "Reading step is " : J $ 'Enters the step number that you want to read.
30 PRINT #1,"STR"+J$ 'Transmits "STR" + "step number" to the controller.
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the data on the screen.
60 END 'Ends program.
RUN 'Run the BASIC program.
Reading step is ? 2 'Enters the step number.

:MPC 0,227.85,371.92,581.68,-60.71,102.83,30.85,R,A,N,C
'Outputs the contents of the step.

Sample program (BASIC) 5-axis type

10 OPEN "COM1:E83"AS#1 'Opens the RS-232C communication file from the personal computer in
BASIC.
20 INPUT "Reading step is " : J $ 'Enters the step number that you want to read.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 359 of 562

30 PRINT #1,"STR"+J$ 'Transmits "STR" + "step number" to the controller.


40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT A$ 'Displays the data on the screen.
60 END 'Ends program.
RUN 'Run the BASIC program.
Reading step is ? 2 'Enters the step number.

:MPC 0,227.85,371.92,581.68,102.83,30.85,R,A,C
'Outputs the contents of the step.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
SUB (Subtract)

RV-A, RH-AH, RP-AH, RV-EN

Function:

Subtracts the direct value or the contents of the specified counter from the internal register value.

Input Format

SUB <Operation data>

Term

<Operation data>    Describes the data to be operated as a numeric value or counter No. with @.
-32768 <= numeric value (decimal) <= 32767
&8000 <= numeric value (hexadecimal) <= &7FFF
@1 <= Counter No. <= @99

Explanation

Designate the operation data setting as a numeric value or counter No.


When designating with a numeric value, use a decimal or hexadecimal value. When using a hexadecimal, add a "&" to the head of
the operation data.
When setting with a counter No. add a "@" to the head of the counter No.
The contents of the set counter No. will be used as the operation data.
The operation results are stored in the internal register, so operation, comparison and reading, etc., of the operation results can
be carried out with the related commands.
(Refer to ADD, MUL, DIV, EQ, NE, LG, SM, CL and DR, OR commands)

Sample program (MOVEMASTER Command)

10 CP 1 'Stores counter No. 1 value in internal register


20 SUB @2 'Subtracts counter No. 2 value from internal register value
30 CL 3 'Sets internal register value in counter No. 3 (Counter No. 3 = counter No. 1 -
counter No. 2)
40 CP 1 'Stores counter No. 1 value in internal register
50 SUB 5 'Subtracts 15 from internal register value
60 CL 4 'Sets internal register value in counter No. 4 (Counter No. 4 = counter No. 1-5)

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TB (Test Bit)

RV-E-Robot (RV-E2, RV-E4N, etc.)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 360 of 562

Function:

Causes a jump to occur in accordance with the specified bit value in the internal register.

Input Format

TB [<+/->] <bit number>, <branching line number>

Term

<+/->    Set the condition that compares bit.


+: The bit is ON.
-:The bit is OFF.
<Bit number>    Specify the bit number of the internal register.
0 <= bit number <= 15
<Branching line number>    Specify the line number to which the program jump.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
The program jumps to the specified line number if the specified bit in the internal register is on or off (i.e., when the condition
is met). Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (see ID) for the external input data or by
executing the compare counter command (see CP) for the counter data. It is therefore necessary to execute either of the above
commands beforehand so that a conditional jump can occur.
Alarm occurs at a jump if the specified line number is not predefined

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from the external input port.


20 TB +1,100 'If the bit number 1 of input data is ON, then jumps to line number
100.
30 MS 1 'Moves to position 1 by linear interpolation.
40 ED 'Ends program.
:
100 MO 10 'Moves to position 10.

RV-M2

Function:

Causes a jump to occur in accordance with the specified bit value in the internal register.

Input Format

TB [<+/->] <bit number>, <branching line number>

Term

<+/->    Set the condition that compares bit.


+: The bit is ON.
-:The bit is OFF.
<Bit number>    Specify the bit number of the internal register.
0 <= bit number <= 17
<Branching line number>    Specify the line number to which the program jump.
1 <= branching line number <= 3584

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
The program jumps to the specified line number if the specified bit in the internal register is on or off (i.e., when the condition
is met). Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (see ID and IN) for the external input data or by
executing the compare counter command (see CP) for the counter data. It is therefore necessary to execute either of the above
commands be
forehand so that a conditional jump can occur.
Alarm occurs at a jump if the specified line number is not predefined

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from the external input port.


20 TB +1,100 'If the bit number 1 of input data is ON, then jumps to line number 100.
30 MS 1 'Moves to position 1 by linear interpolation.
40 ED 'Ends program.
:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 361 of 562

100 MO 10 'Moves to position 10.

RV-M1

Function:

Causes a jump to occur in accordance with the specified bit value in the internal register.

Input Format

TB [<+/->] <bit number>, <branching line number>

Term

<+/->    Set the condition that compares bit.


+: The bit is ON.
-:The bit is OFF.
<Bit number>    Specify the bit number of the internal register.
0 <= bit number <= 7 (15)
Figure in () is for type A16 or B16 I/O card
<Branching line number>    Specify the line number to which the program jump.
1 <= branching line number <= 2048

Explanation

Causes a jump to occur conditionally in accordance with the external input data or the internal counter value.
The program jumps to the specified line number if the specified bit in the internal register is on or off (i.e., when the condition
is met). Otherwise (i.e., when the condition is not met), the program continues in sequence.
A value can be loaded into the internal register by executing the input command (see ID and IN) for the external input data or by
executing the compare counter command (see CP) for the counter data. It is therefore necessary to execute either of the above
commands be
Alarm occurs at a jump if the specified line number is not predefined

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from the external input port.


20 TB +1,100 'If the bit number 1 of input data is ON, then jumps to line number 100.
30 MS 1 'Moves to position 1 by linear interpolation.
40 ED 'Ends program.
:
100 MO 10 'Moves to position 10.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TBD (Test Bit Direct)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Causes a jump to occur in accordance with the specified bit value in the external input.

Input Format

TBD [<+/->] <input bit number>, <branching line number>

Term

<+/->    Set the condition that compares bit.


+: The bit is ON
-: The bit is OFF
<Input bit number>    Specify the bit number of general input.
0 <= input bit number <= 32767
<Branching line number>    Specify the line number to which the program jumps.
1 <= branching line number <= 9999

Explanation

Causes a jump to occur conditionally in accordance with the external input data directly.
The program jumps to the specified line number if the specified bit in the external input is on or off (i.e., when the condition is
met). Otherwise (i.e., when the condition is not met), the program continues in sequence
It is not necessary to execute the input command (ID) beforehand, and the internal register remains intact after the execution of

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 362 of 562

TBD command.
Alarm occurs if the specified line number is not predefined.

Sample program (MOVEMASTER Command)

10 TBD +19,100 'If the bit 19 of the external input is ON, then jumps to line number 100.
20 MS 1 'Moves to position 1 by linear interpolation.
30 ED 'Ends program.
:
100 MO 10 'Moves to position 10.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TI (Timer)

Function:

Halts the motion for the specified length of time.

Input Format

TI <timer counter>

Term

<Timer counter>    Set the period of timer.


0 <= timer counter <= 32767(0.1 sec)

Explanation

Causes the robot to halt its motion for the specified counter value X 0.1 second. (Max. 3276.7 seconds)
Used to introduce a time delay before and after the hand is opened or closed for gripping a workpiece.
The default value is zero.

Sample program (MOVEMASTER Command)

10 MO 1,O 'Moves to position 1.


20 TI 5 'Wait for 0.5 second.
30 GC 'Closes hand.
40 TI 10 'Wait for 1.0 second.
50 MO 2 'Moves to position 2.
60 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TL (Tool)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Establishes the distance between the hand mounting surface and the tip of hand.

Input Format

TL [<tool length>]

Term

<Tool length>    Set the distance from the hand mounting surface to the tip of hand.
0 <= tool length <= 300.00 (mm) (0 for default)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 363 of 562

Explanation

The least input increment of the tool length is 0.01 mm (e.g., specify 200.05 for 200.05 mm).
Once established, the tool length remains valid until a new value is set (battery backed when the power is switched off). When
the tool length has been changed, the current position is also changed accordingly, which, however, does not involve any robot
motion. (Initial tool length is 123 mm.)
Since the point defined by the TL command is the basis for calculation of the current position, XYZ jogging and commands
involving the XYZ coordinates system, the accurate tool length must be established according to the tool being used.
Whenever a program is to be run, the same tool length as that established during teaching must be set at the beginning of the
program.
The current value can be read from the RS-232-C by executing the WT command.

CAUTION

When changing the tool length, accurately input the value so that the setting value is not mistaken.

CAUTION

If the original teaching point is moved to after changing the tool length, the robot movement posture will change.
Take special care to prevent interference with the periphery.

CAUTION

Even if the tool length is input accurately, the required precision may not be achieved due to the actual dimension
precision and the installation posture precision, etc.

CAUTION

When using the 5-axis robot, always describe "0" for the axes other than the Z axis. If other values are set, vibration or
an alarm may occur during the operation.

Sample program (MOVEMASTER Command)

10 TL 120 'Sets the tool length to 120 mm.


20 HE 1 'Define the current position to position 1.
30 TL 100 'Changes the tool length to 100 mm.
40 MO 1 'Moves to position 1 advancing 20 mm in the tool direction.
50 ED 'Ends program.

RV-M2

Function:

Establishes the distance between the hand mounting surface and the tip of hand.

Input Format

TL [<tool length>]

Term

<Tool length>    Set the distance from the hand mounting surface to the tip of hand.
0 <= tool length <= 300.00 (mm) (0 for default)

Explanation

The least input increment of the tool length is 0.1 mm (e.g., specify 200.5 for 200.5 mm).
Once established, the tool length remains valid until a new value is set (battery backed when the power is switched off). When
the tool length has been changed, the current position is also changed accordingly, which, however, does not involve any robot
motion. (Initial tool length is 123 mm.)
Since the point defined by the TL command is the basis for calculation of the current position, XYZ jogging and commands
involving the XYZ coordinates system, the accurate tool length must be established according to the tool being used.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 364 of 562

Whenever a program is to be run, the same tool length as that established during teaching must be set at the beginning of the
program.
The current value can be read from the RS-232-C by executing the WT command.

Sample program (MOVEMASTER Command)

10 TL 120 'Sets the tool length to 120 mm.


20 HE 1 'Define the current position to position 1.
30 TL 100 'Changes the tool length to 100 mm.
40 MO 1 'Moves to position 1 advancing 20 mm in the tool direction.
50 ED 'Ends program.

RV-M1

Function:

Establishes the distance between the hand mounting surface and the tip of hand.

Input Format

TL [<tool length>]

Term

<Tool length>    Set the distance from the hand mounting surface to the tip of hand.
0 <= tool length <= 300.00 (mm) (0 for default)

Explanation

The least input increment of the tool length is 0.1 mm (e.g., specify 200.5 for 200.5 mm).
Once established, the tool length remains valid until a new value is set (battery backed when the power is switched off). When
the tool length has been changed, the current position is also changed accordingly, which, however, does not involve any robot
motion. (Initial tool length is 107 mm.)
Since the point defined by the TL command is the basis for calculation of the current position, XYZ jogging and commands
involving the XYZ coordinates system, the accurate tool length must be established according to the tool being used.
Whenever a program is to be run, the same tool length as that established during teaching must be set at the beginning of the
program.

Sample program (MOVEMASTER Command)

10 TL 120 'Sets the tool length to 120 mm.


20 HE 1 'Define the current position to position 1.
30 TL 100 'Changes the tool length to 100 mm.
40 MO 1 'Moves to position 1 advancing 20 mm in the tool direction.
50 ED 'Ends program.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TLM (Tool Matrix)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The tool conversion is carried out.

Input Format

TLM <Tool length X>, <Tool length Y>, <Tool length Z>, <A rotation>, <B rotation>, <C rotation>

Term

<Tool length X>    Describe the X axis direction tool length at the tool coordinate system. Unit: mm
<Tool length Y>    Describe the Y axis direction tool length at the tool coordinate system. Unit: mm
<Tool length Z>    Describe the Z axis direction tool length at the tool coordinate system. Unit: mm
<A rotation>    Describe the X axis rotation angle at the tool coordinate system. Unit: degrees
<B rotation>    Describe the Y axis rotation angle at the tool coordinate system. Unit: degrees
<C rotation>    Describe the Z axis rotation angle at the tool coordinate system. Unit: degrees

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 365 of 562

The minimum setting unit for the tool length is either 0.01mm or 0.01 degrees.
The set tool length will keep the previous value until reset. This value is also held by the battery when the power is turned OFF.
When the tool length is changed, the current position will change accordingly. However, the robot will not operate according to
this.
The point on the tool coordinate system set with this command will be the control target for the position data operation,
Cartesian system operation command and orthogonal jog operation. Thus, set an accurate value that matches the tool (hand,
etc.) being used.
Only the <Tool length Z> is valid for the 5-axis robot.
The current setting value can be read from RS-232-C by executing the WTM command.

CAUTION

When changing the tool length, accurately input the value so that the setting value is not mistaken.

CAUTION

If the original teaching point is moved to after changing the tool length, the robot movement posture will change.
Take special care to prevent interference with the periphery.

CAUTION

Even if the tool length is input accurately, the required precision may not be achieved due to the actual dimension
precision and the installation posture precision, etc.

Sample program (MOVEMASTER Command)

10 TLM 0,0,100,0,0,0 'Change tool length to Z=100mm


20 HE 1 'Register current position in position 1
20 TLM -50,0,100,0,0,0 'Change tool length to X=-50mm
30 MS 1 'Move to position 1 (Move to a position +50mm away from the current position
in the tool coordinate systems X axis direction.)

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
TR * (Transfer)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function: No operation

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

TR

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-M2, RV-M1

Function:

Transfers the program and position data stored in EPROM to the drive unit RAM.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 366 of 562

Input Format

TR

Explanation

This command causes the contents of the EPROM installed in the user socket inside the drive unit side door to be transferred to
the RAM. Once the command has been executed, the old program and position data stored in RAM are all cleared.
The command execution indicator LED (EXECUTE) lights up instantaneously when the data is being transferred.
When bit 4 of SW 1 located inside the drive unit side door is in the upper position (ON), the command also causes the Cartesian
coordinate system reference position data in EPROM to be read into RAM. This transfer of data does not take place when bit 4 is
in the lower position (OFF) and the position data in RAM remains valid.
* This command can only be executed directly. It cannot be used in a program.

Sample program

10 LPRINT "TR"
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
VR (Version Read)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the software version of the system ROM. (Using RS-232C)

Input Format

VR

Explanation

Outputs the software version of the system ROM mounted in the controller through the RS-232C port.
The output format is ASCII coded. (Example: "RV-E2 Ver. A1")
The denotation of the software version is the following.
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC) for the RV-E2

10 OPEN "COM1 :E83"AS#1 Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"VR" 'Transmits the VR command.
30 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Software version is " : A $; 'Displays the data on the screen.
60 END 'Ends program.
RUN 'Run the program.
Software version is RV-E2 Ver. A1 'Outputs the version name.

RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
WH (Where)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the coordinates of the current position and the open or close state of the hand. (Using RS-232C)

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 367 of 562

WH

Explanation

Causes the coordinates of the current position of the tip of hand, as determined by the tool length (see the TL command), and
the hand open or close state to be output through the RS-232C port.
The output format is ASCII coded as indicated below. The least output increment is 0.01 mm or 0.01 degree. (e.g., 20.01 for
20.01 mm)
Output format:
6-axis type: X, Y, Z coordinate value, A, B, C turning angle, R/L, A/B, N/F, O/C (structural flag)
5-axis type: X, Y, Z coordinate value, A, B turning angle, R/L, A/B, O/C (structural flag)
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC) 6-axis type

(1)-axis type

10 OPEN "COM1 :E83"; 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00


'Displays the value of the current position.
+380.00,300.00,-70.00,50.00,+40.00, R, A, N, C

Sample program (BASIC) 5-axis type

10 OPEN "COM1 :E83" 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00, 'Displays the value of the current


position.
+380.00,300.00,+50.00,+40.00, R, A, C

RV-E-Robot (RV-E2, RV-E4N, etc.) with additional axis

Function:

Loads the open/close state of the hand, and the posture and coordinate values of a specified position.

Input Format

WH

Explanation

The output configuration is as shown below, and is output in ASCII code entirely.
The least increment for the output is 0.01mm or 0.01deg.
(
Example: 20.01mm is displayed as 20.01)
Output configuration:
X,Y,Z A,B,C, First additional axis, Second additional axis, R/L, A/B, N/F, O/C (6-axis-type)
X,Y,Z A,B, First additional axis, Second additional axis, R/L, A/B, O/C (5-axis-type)
An example of an output configuration is as follows:
For 6-axis-type
- First additional axis and Second additional axis are non-existent or undefined:
X, Y, Z, A, B, C, R, A, N, O
- First additional axis exists, Second additional axis is non-existent or undefined:
X, Y, Z, A, B, C, First additional axis, +0.00, R, A, N, O
- First additional axis and Second additional axis exist:
X, Y, Z, A, B, C, First additional axis, Second additional axis, R, A, N, O
- First additional axis is non-existent or undefined, Second additional axis exists:
X, Y, Z, A, B, C, +0.00, Second additional axis, R, A, N, O
For 5-axis-type
- First additional axis and Second additional axis are non-existent or undefined:
X, Y, Z, A, B, R, A, O
- First additional axis exists, Second additional axis is non-existent or undefined:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 368 of 562

X, Y, Z, A, B, First additional axis, +0.00, R, A, O


- First additional axis and Second additional axis exist:
X, Y, Z, A, B, First additional axis, Second additional axis, R, A, O
- First additional axis is non-existent or undefined, Second additional axis exists:
X, Y, Z, A, B, +0.00, Second additional axis, R, A, O
If there is a movement command immediately preceding this command, the position will be along the path of the movement,
since this command will be executed even if the additional axis is still moving.
If the next command is specified to be executed before the additional axis has completed operation, when the WH command is
executed, a position along the path of the additional axis may be loaded. (Refer to the WRM command)

Related language:

WRM

Sample program (BASIC) 6-axis type

10 OPEN "COM1 :E83" 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00,                     'Displays the value of the current position.

+380.00,300.00,-70.00,50.00,+40.00, +100, 200, R, A, N, C

Sample program (BASIC) 5-axis type

10 OPEN "COM1 :E83" 'Opens the RS-232C communication file from the personal
computer in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00,                      'Displays the value of the current position.

+380.00,300.00,+70.00,+50.00, 100, 200, R, A, C

RV-M2, RV-M1

Function:

Reads the coordinates of the current position and the open or close state of the hand. (Using RS-232C)

Input Format

WH

Explanation

Causes the coordinates of the current position of the tip of hand, as determined by the tool length (see the TL command), and
the hand open or close state to be output through the RS-232C port.
The output format is ASCII coded as indicated below. The least output increment is 0.1 mm or 0.1 degree. (e.g., 20.1 for 20.1
mm)
Output format:
5-axis type: X, Y, Z coordinate value, pitch angle, roll angle, O/C (structural flag)
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer
in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00,                  'Displays the value of the current position.

+380.00,300.00,+50.00,+40.00, C

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 369 of 562

RV-M2 with additional axis

Function:

Reads the coordinates of the current position and the open or close state of the hand. (Using RS-232C)

Input Format

WH

Explanation

This command causes the coordinates of the current position of the hand end, as determined by the tool length (see the TL
command) currently being established, to be output from the RS232C port.
The data is output in ASCII as indicated below. The least output increment is 0.1 mm or 0.1 degree. (e.g., 20.1 for 20.1 mm)
Output format:
X, Y, Z coordinate value, pitch angle, roll angle, Locomotive coordinate, O or C 0D (Hex)
The delimiter of the data is a comma (,: Hex. 2C) and the terminator is a carriage return (CR, Hex. 0D). If the data is to be
received by a personal computer, it is necessary to handle the entire data string up to hex. 0D. The BASIC equivalent to this is
the LINE INPUT# statement.

Sample Program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1 'Opens the RS-232C communication file from the personal computer
in BASIC.
20 PRINT #1,"WH" 'Transmits the command "WH".
40 LINE INPUT #1,A$ 'Saves the received data to A$.
50 PRINT "Current coordinates are " : A $ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.

Current coordinates are +10.00,                  'Displays the value of the current position.

+380.00,300.00,+50.00,+40.00, 200, C
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
WR * (Write)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function

No operation. Prepared to keep the compatibility with the MOVEMASTER M2 series. Only registration is possible.

Input Format

WR

Explanation

This command is prepared for keeping the compatibility with the MOVEMASTER M2 series and has no effect on the program.

RV-M2

Function:

Writes the generated program and position data into EPROM.

Input Format

WR

Explanation

This command causes the program and position data generated in the drive unit RAM to be written into the EPROM installed in
the user socket inside the drive unit side door. The destination EPROM must have previously been erased before executing the
command.
 While the data is being written into the EPROM, the command execution indicator LED (EXECUTE) on the drive unit front panel
stays lit. It is switched off as soon as all data has been written (which takes about 3 minutes and 40 seconds).
Error mode II is caused if the EPROM has not been erased or a write error occurs.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 370 of 562

* This command can only be executed directly. It cannot be used in a program.

Sample program

10 LPRINT "TR"

RV-M1

Function:

Writes the generated program and position data into EPROM.

Input Format

WR

Explanation

This command causes the program and position data generated in the drive unit RAM to be written into the EPROM installed in
the user socket inside the drive unit side door. The destination EPROM must have previously been erased before executing the
command.
  While the data is being written into the EPROM, the command execution indicator LED (EXECUTE) on the drive unit front panel
stays lit. It is switched off as soon as all data has been written (which takes about 3 minutes and 40 seconds).
Error mode II is caused if the EPROM has not been erased or a write error occurs.
* This command can only be executed directly. It cannot be used in a program.

Sample program

10 LPRINT "TR"
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
WRM * (Wait Robot Motion)

RV-A, RH-AH, RP-AH, RV-EN, RV-E with additional axis

Function:

Specifies the movement of the robot when the additional axis is moving.

Input Format

WRM [<Movement specification>]

Term

<Movement specification>

Specifies execution/wait for the interpolation of the next command when the additional axis is moving.
0: Wait (When omitted)
1: Execute

Explanation

(1) Once the movement specification is set to 1, thereafter, whenever interpolation begins towards a position that is defined
only for the robot, interpolation will start even though the additional axis is still moving

(2) Once the movement specification is set to 0, thereafter, whenever interpolation begins towards a position that is defined
only for the robot, if the additional axis is still moving, interpolation will not start until it has stopped.

(3) The initial status when the power is turned ON is movement specification: 0.

(4) If the next objective position for interpolation is a position that is defined for both the robot and the additional axis,
even though the movement specification is set to 1, the next interpolation will not be executed until the movement of the
additional axis has stopped.

(5) If the Continue function is used for the movement of the additional axis, set WRM to 0 (default value). If WRM is set to 1,
the Continue function for the additional axis will not work.

Sample program (MOVEMASTER Command)

10 WRM 0 'During interpolation for the robot only, if the additional axis is moving, wait
20 MO 1 'Move to position 1 by joint interpolation (additional axis also moves)
30 MO 2 'Move to position 2 by joint interpolation for robot only and wait for movement of

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 371 of 562

the additional axis stop


40 WRM 1 'If using interpolation for robot only, execute it even if the additional axis is
still moving
50 MO 3 'Move to position 3 by joint interpolation (additional axis also moves)
60 MO 4 'Even if the additional axis is still moving, move to position 4 by joint
interpolation for robot only.
70 MO 3 'Move to position 3 by joint interpolation (additional axis also moves)
80 OB +0 'Execute, even if the additional axis is still moving

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series without any additional axis.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
WT (What Tool)

RV-A, RH-AH, RP-AH, RV-EN, RV-E

Function:

Reads the tool length currently being established. (Using RS-232C)

Input Format

WT

Explanation

Causes the tool length currently being established (by the TL command) to be output through the RS-232C port.
The data is output in ASCII coded decimal. The least output increment is 0.01 mm (e.g., 105.07 is displayed for 105.07 mm).
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
All robot motions are based on the established tool length. If a wrong tool length has been defined, the robot may interfere with
a surrounding object. When the tool length is unknown, therefore, check the tool length using the WT command before starting
the robot.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C communication file from the personal computer in BASIC.
20 PRINT #1,"WT" 'Transmits the command "WT".
40 LINE INPUT #1,A$ 'Saves the received data to A $.
50 PRINT "TOOL=" A$ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.
TOOL=105.7 'Outputs the tool length.

RV-M2

Function:

Reads the tool length currently being established. (Using RS-232C)

Input Format

WT

Explanation

Causes the tool length currently being established (by the TL command) to be output through the RS-232C port.
The data is output in ASCII coded decimal. The least output increment is 0.01 mm (e.g., 105.07 is displayed for 105.07 mm).
Because the terminator of the output data is carriage return (Hex.0D), it is necessary to handle serial data strings up to
hexadecimal 0D in receiving a message by a personal computer. "LINE INPUT #" statement is equivalent to this in BASIC.
All robot motions are based on the established tool length. If a wrong tool length has been defined, the robot may interfere with
a surrounding object. When the tool length is unknown, therefore, check the tool length using the WT command before starting
the robot.

Sample program (BASIC)

10 OPEN "COM1 :9600, E, 7, 2"AS#1


'Opens the RS-232C communication file from the personal computer in

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 372 of 562

BASIC.
20 PRINT #1,"WT" 'Transmits the command "WT".
40 LINE INPUT #1,A$ 'Saves the received data to A $.
50 PRINT "TOOL=" A$ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.
TOOL=105.7 'Outputs the tool length.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
WTM (What Tool Matrix)

RV-A, RH-AH, RP-AH, RV-EN

Function:

The currently set tool length (X, Y, Z< A, B, C) is read out using RS-232-C.

Input Format

WTM

Explanation

This command outputs the current tool length set with the TLM command (refer to the TLM command) from the RS-232-C port.
The output format is a decimal ASCII format. The minimum output unit is 0.01mm.
(Example: When the data is 105.07mm, 105.07 will display.)
The data end code (terminator) is the carriage return (CR: hexadecimal OD), so when receiving the data with a personal
computer, etc., the series of data up to the hexadecimal OD must be handled as the data train. With the general BASIC language,
"LINE INPUT#" is equivalent to this.
The robot movement is all carried out according to the tool length set at that time. If an incorrect tool length is set, the robot
could interfere with peripheral objects. Thus, if the tool length is unknown, confirm the tool length with this command before
operating the robot.

Sample program (BASIC)

10 OPEN "COM1 :E83"AS#1 'Opens the RS-232C with personal computer BASIC.
20 PRINT #1,"WTM" 'Transmits the command "WTM".
40 LINE INPUT #1,A$ 'Saves the received data to A $.
50 PRINT "TLM=" A$ 'Displays the contents of A$ on the screen.
60 END 'Ends.
RUN 'Run the program.
TLM=105.7 'Outputs (Display) tool length.

RV-E-Robot (RV-E2, RV-E3J), RV-M2, RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-E, RV-M1 and RV-M2 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
XO (Exclusive Or)

RV-A, RH-AH, RP-AH, RV-EN, RV-E, RV-M2

Function:

EXCLUSIVE ORs the specified data and the internal register data.

Input Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 373 of 562

XO <operation data>

Term

<Operation data>    Specify the data to be operated.


-32768 <= operation data (decimal) <= 32767
& 8000 <= operation data (hexadecimal) <= & 7FFF
@ <= counter number <= @99

Explanation

Specify the data to be operated in decimal or hexadecimal. Any hexadecimal value must be headed by "&".
The operation result is stored into the internal register and can be changed, compared or read by relevant commands. (See the
EQ, NE, LG, SM, CL, DR, AN and OR commands)
Execution of the XO command after the input command (ID or IN) allows the required bits of the parallel input data fetched from
the external device to be flipped to their opposite settings.

Sample program (MOVEMASTER Command)

10 ID 'Fetches data from the external input port.


20 AN &000F 'Fetches only lower 4 bits.
30 XO &000F 'Flips data of 4 lower bits to their opposite settings.
40 CL 21 'Sets above data to counter 21.
50 EQ 10,200 'If the above data equals 10, then jumps to line 200.
60 ED 'Ends program.
:
200 MO 99 'Moves to position 99.

RV-M1

Function: No operation

No operation. This command is not available for the MOVEMASTER RV-M1 series.
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Overview of the parameters for RV-E2 and RV-E3J
For parameters of additional axes configurations see the overview of additional axes parameters

Parameter Para- Array Contents Default value Remarks

meter No.

name
Tool XTL 6 real Sets initial value of tool 0.0,0.0,123.0,
coordinates No. coordinate system (X, Y,
Z, A, B, C). Only Z 0.0,0.0,0.0
coordinate is changeable
for 5-axis robot.

Unit: mm, mm, mm, deg,


deg, deg
Base XBS 6 real Sets initial value of base 0.0, 0.0, 0.0,
coordinates No. coordinate system (X, Y,
Z, A, B, C). Only X, Y, Z 0.0, 0.0, 0.0
coordinates are
changeable for 5-axis
robot.

Unit: mm, mm, mm, deg,


deg, deg
Perpendicular PAR 6 real Sets overrun limits of XYZ -10000,10000, Default
area limit No. coordinate system for setting does
minus and plus direction -10000,10000, not exceed
(-X, +X, -Y, the limit.
-10000,10000
Joint area JAR 12 real Sets overrun limits of RV-E3J:
limit No. each joint coordinate
system for minus and plus -160.0, 160.0,
direction (-J1, +J1, -J2,
+J2, -J3, +J3, -J4, +J4, - -45.0, 135.0,
J5, +J5, -J6, +J6)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 374 of 562

Unit: deg. 0.0, 135.0,

-160.0, 160.0,

-120.0, 120.0,

-200.0, 200.0

RV-E2:

-160.0, 160.0,

-45, 135.00,

50.0, 170.00,

-160.0, 160.0,

-120.0, 120.0,

-200.0, 200.0
User-defined UAR 6 real Defines the area where 1.0, 0.0, 1.0, Default
area No. the robot outputs a 0.0, 1.0, 0.0 setting is
signal. out of the
setting area
Battery ALB 1 It sets the time period for 8760
application integer battery warning alarm.
warning clock
time (Warning alarm does not
occur in the case of a
negative number.)

Unit: Time
Automatic ATP 1 string Sets program name to be " " (No
program executed automatically setting)
execution when powered on.
Continue CTN 1 Sets whether the robot 0
Function integer continues to run from the
last execution
environment when
powered on. (Execution
step, Program inner
variable, I/O status, etc.)

0: Disable, 1: Enable
ON/OFF of BZR 1 Sets ON/OFF of buzzer 1
buzzer integer sound.

0: OFF, 1: ON
Arm length ARM 6 real It sets the arm length of 350.0, 250.0,
No. the robot. 250.0, 85.0,
0.0, 0.0
Automatic SPI 1 Sets initial level of 12
operation integer automatic operation
speed speed.

(Value of Movemaster
command SP command.)
External EOV 2 real Sets initial override of 100.0, 100.0
override No. automatic operation.

(External override,
Program override)

Unit: %
Jog speed JGJ 3 real Sets jog and step 0.1, 1.0, 20.0
control No. operation speed for joint
interpolation mode.

(Inching, low speed, high


speed)

Unit: deg, %, %
Jog speed JGP 3 real Sets jog and step 0.1, 1.5,
control No. operation speed for 100.0
linear and circular
interpolation mode.

(Inching, low speed, high

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 375 of 562

speed)

Unit: mm, mm/s, mm/s


Continuous CNT 1 real Sets whether robot 0
motion No. accelerates and
control decelerates at taught
position when moving.

0: Disable, 1: Enable
Accel. and ADL 2 real Sets acceleration and 0.2, 0.2
decel. Period No. deceleration periods for
reaching to maximum
speed.

Unit: seconds
Delay time TSR 1 real Sets first-order delay 20.0
constant No. time constant.

Unit: milliseconds
Pulse width PWI 1 real Sets accuracy of 10000
No. positioning.

Unit: pulse
Priority order CPR 5 It sets the priority order 0, 10, 30, 20,
of control integer of periphal devices. 20

(Controller, special I/O,


teaching box, standard
RS-232C, optional RS-
232C)
Grip control GCD 1 Sets the hand open/close 0, 1, 0, 1 See
integer normal reverse status. commands
GC, GO
The 1st hand
normal/reverse, the 1st
hand initial condition,
the 2nd hand
normal/reverse, the 2nd
hand initial condition.

Normal/reverse: 0 means
normal, 1 means reverse

Initial state: 0-3


The origin HOE 1 Sets enable/disable of 0 It becomes
point setting integer origin point setting. effective
permission just after
0: Disable, 1: Enable setting.

(Robot cannot execute


program when set to 1
The user- UOG 6 real Sets user-defined origin RV-E3J:
defined No. point.
origin point -160.0, -45.0,
(W, S, E, T, P, R)
0.0, 0.0,
Unit: deg.
-120.0, -200.0

RV-E2:

-160.0, -45.0,

50.0, -160.0,

-120.0, -200.0
Joint order of UNG 6 real Sets joint motion order to 2, 1, 1, 1, 2, It becomes
returning to No. return to the origin point. 2 effective
origin point just after
setting.
Wrist angle RCD 1 Selects wrist angle 0 RV-E5NJ
coordinate integer coordinate system for
selection control and display. RV-E5NJM

0: General angle RV-E5N-JC


(Maintains posture),
only
1: Joint angle (Varies

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 376 of 562

posture)
Stop input INB 1 Sets stop input for A type 0
type integer contact or B type
selection contact.

0: A type (Normally
open),

1: B type (Normally
closed)
Parallel I/O IN1 20 Sets function for input PI0,,,,PI1,,,,
input setting strings board.
IN2 ,,,, ,,,,
20 Sets function for first I/O
IN3 strings interface board. ,STA,STP

20 Sets function for second ,RST


strings I/O interface board.

Sets function for third


I/O interface board.
Parallel I/O OT1 16 Sets function for output ,,,, ,,,, ,,,,
output strings board.
setting OT2 ,RUN,WAI
16 Sets function for first I/O
OT3 strings interface board. ,ERR

16 Sets function for second


strings I/O interface board.

Sets function for third


I/O interface board.
Program start PST 1 Sets whether the external 0
mode integer program No. is read into
the robot at startup.

0: No (Present program)

1: Yes (Appointed
program)
The MOG 6 real It sets the mechanical RV-E3J:
mechanical No. stopper origin position.
stopper origin -168.0, -50.0,
(W, S, E, tee, P, R)
-5.0, 0.0,

-123.0, 0.0

RV-E2:

-168.0, -50.0,

47.0, -163.0,

-123.3, 0.0
©·2003·EFR·IRF·GERMANY

COSIMIR® · Movemaster Command


 
Overview of the parameters for additional axes of RV-E2 and RV-E3J
Parameter Para- Array Contents Default value Remarks

meter No.

name
Servo AXAP Integer Sets the additional axis 0,0
amplifier 2 servo amplifier that will
type be used (First additional
axis, Second additional
axis)

-1: Other

0: MR-H(Incremental
method)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 377 of 562

Mitsubishi

1: MR-H(Absolute value

method) Mitsubishi

2: MR-J Mitsubishi

3: SGD Yazkawa

4: NPSA-G NEC

5: MSD Matsushita
Electric

Industrial. Ltd.

For -1 (Other) setting,


the options for the
additional axis will not
function.

Servomotor AXMT Integer Sets the type of machine 0,0 Note 1)


type 2 for the additional axis
servomotor to be used.

(First additional axis,


Second additional axis)

Unit: rpm
Encoder AXEN Integer Sets the multiplier for the 2048,2048 Note 2)
resolution 2 encoder's pulse rate (1 to
32767)

Unit: rpm
Motor rated AXTR Integer Sets the servomotor's 3000,3000 Note 2)
speed 2 rated speed (1 to 32767)

(First additional axis,


Second additional axis)

Unit: rpm
Motor max. AXMR Integer Sets the servomotor's 4000,4000 Note 2)
speed 2 max. speed.

(First additional axis,


Second additional axis)

Unit: rpm
Gear ratio AXEG Integer Sets the servo amplifier's 4,4 Note 2)
2 electronic gear ratio.

(First additional axis,


Second additional axis)

1: Servo amplifier
electronic
gear ratio 1:1

4: Servo amplifier
electronic
gear ratio 4:1
Command AXCL Integer Sets the max. command 1,1 Note 2)
pulse 2 pulse frequency from the
frequency additional axis interface
board.

(First additional axis,


Second additional axis)

0: 400 kHz

1: 200 kHz
Origin AXOM Integer Sets the origin 0,0 Note 3)
designation 2 designation method
method Note 6)
(First additional axis,
Second additional axis)

0: Dog-type 1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 378 of 562

1: Dog-type 2

2: Data set type

Origin AXOS Integer Sets the movement speed 10,10 Note 3)


designation 2 (1 - 100) for origin
speed designation.

(First additional axis,


Second additional axis)

Unit: %
Origin AXOD Integer Sets the movement 0,0 Note 3)
designation 2 direction for origin
direction designation.

(First additional axis,


Second additional axis)

0: Command value -
direction

1: Command value +
direction
Origin AXOP Integer Sets all the origin 0.00, 0.00
position 2 position's position data
for the additional axis

(First additional axis,


Second additional axis)
Initial origin AXOG Integer Indicates whether the 0,0 Note 8)
designation 2 origin setting and the
execution first origin designation
existence have been executed after
the additional axis system
is structured.
Additional AXUN Integer Sets all the command 0,0
axis unit 2 units for the additional
axis.

(First additional axis,


Second additional axis)

0: deg

1: mm
Total speed AXGN Integer Sets the numerator (1 to 1,1
ratio 2 32767) for the percentage
numerator of the load movement
amount and motor speed

(First additional axis,


Second additional axis)
Total speed AXGD Integer Sets the denominator (1 10,10
ration 2 to 32767) for the
denominator percentage of the load
movement amount and
motor speed

(First additional axis,


Second additional axis)
Additional AXLM Real Sets the operation range -80000.00, Note 4)
axis Number for all the additional 80000.00,
operation 4 axes. -80000.00,
range 80000.00
Unit: Determined by
AXUN
The + AXCD Integer Sets the direction of the 1,1 Note 5)
direction of 2 motor's rotation when the
the motor's command value
direction increases.

(First additional axis,


Second additional axis)

0: Motor turns in a
clockwise
(CW) direction

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 379 of 562

1: Motor turns in a
counter-
clockwise (CCW) direction
Additional AXJR Real Sets the jog speed. 0.10, 1.00,
axis jog Number 20.00
speed 3 (Fixed quantity, Low,
High)

Unit: deg., %,%


Additional AXAD Real Sets the acceleration / 0.20. 0.20,
axis Number deceleration time (>= 0) 0.20, 0.20
acceleration/ 4 for stand alone additional
deceleration axis operations.
time
(First additional axis
increases, First additional
axis decreases, Second
additional axis increases,
Second additional axis
decreases)

Unit: sec.
Brake timer AXBT Integer Sets the brake timer time 300,300 Note 7)
time 2 (0 to 32767) for the Servo
ON/OFF.

(First additional axis,


Second additional axis)

Unit: msec.

Note 1: Please refer to section 7.2.2 "Servomotor type" in your manual.

Note 2: This parameter becomes valid when AXMT = -1.

Note 3: Refer to section 6.2 "ORIGIN SET (Origin setting) / ORIGIN (Origin designation)" in your manual.

Note 4: When setting the operation range for the servo amplifier, make it smaller than that value. Set it so that the lower limit <
upper limit.

Note 5: Viewed from the side of the servomotor, the clockwise is the CW direction and counterclockwise is the CCW direction.

Note 6: If you set the parameter AXAP and specify the incremental method for the amplifier, and specify the data set method for
the parameter AXOM, you will get an error.

Note 7: Refer to section 7.2.4 "Brake timer time" in your manual.

Note 8: If you change the additional axis system (change the amplifier or motor) or change the dog position, motor installation
position, or origin designation method, change the value to 0 before you execute the origin designation or the origin setting.
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 

MELFA-BASIC III
Overview

Introduction on MELFA-BASIC-III

Alphabetical overview of all MELFA-BASIC-III commands

MELFA-BASIC-III position and motion control commands

MELFA-BASIC-III program control commands

MELFA-BASIC-III hand control commands

MELFA-BASIC-III I/O control commands

MELFA-BASIC-III other commands

Introduction on SLIM

Alphabetical overview of SLIM commands

SLIM position and motion control commands

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 380 of 562

SLIM program control commands

SLIM hand control commands

SLIM I/O control commands

SLIM other commands

Overview of the parameters for the RV-EN series


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Introduction on MELFA-BASIC-III
An explanation of the individual commands for the MELFA-BASIC III and SLIM languages is provided in the following chapters:

MELFA-BASIC III command method

The JIS stipulated SLIM language can be used.

With the ample operation functions, a work program more advanced than the Movemaster command method can be created.

This method is upward compatible with the Mitsubishi N Series MELFA-BASIC II.

Format description method

Parts that have uppercase letters should be written as they are.

The contents of the arrow brackets (<>) should be described by the user. Follow the usage explanations for the individual commands
when making the entry.

The square brackets indicate that it may be omitted, if so needed.

The vertical bar (|) represents OR. For example, if <Line no. | label> is written, either the line no. or the label will be written.

Enter all commas (,), periods (.) , semicolons (;), and parentheses (), as they are. Here the various commands used to create a
program with the MELFA-BASIC III command method or Movemaster command method will be explained. The features of each
command method are as shown in the following chapters.

Commands that are marked with an * cannot be executed alone. They have to be used in connection with other commands.

Commands that are marked with an * * can be used in connection with other commands or stand alone.
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MELFA-BASIC III command groups
MELFA-BASIC-III position and motion control commands

MELFA-BASIC-III program control commands

MELFA-BASIC-III hand control commands

MELFA-BASIC-III I/O control commands

MELFA-BASIC-III other commands


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MELFA-BASIC-III position and motion control commands

These commands are concerned with the definition of positions and coordinates as well as the assignment of interpolation, speed,
timer, tool, palette, etc.

Command Function
ACL (Accelerate)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 381 of 562

ALIGN (Align)
BASE (Base)
CNT (Control)
DACL (Deceleration)
DEF PLT (Define pallet)
DLY (Delay)
FINE (Fine)
HRE * (Here)
JOVRD (J override)
MOV (Move)
MVC (Move C)
MVR (Move R)
MVR2 (Move R2)
MVS (Move S)
OADL (Optimum
Acceleration/Deceleration)
ORG (Origin)
OVRD (Override)
PLT * (Pallet)
SPD (Speed)
SV (Servo)
TOOL (Tool)
WTH * (With)
WTHIF * (With If)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MELFA-BASIC-III program control commands

These commands are concerned with conditional branching, repetitive operation, interrupting of signals, starting and stopping,
counter operation, etc.

Command Function
ACT (Act)
CALLP (Call P)
COM OFF (Communication
OFF)
COM ON (Communication
ON)
COM STOP (Communication
Stop)
DEF ACT (Define act)
END (End)
FOR NEXT (For Next)
FPRM (FPRM)
GOSUB (Go Subroutine)
GOTO (Go To)
HLT (Halt)
IF THEN ELSE (If Then Else)
ON COM (On
GOSUB Communication Go
Subroutine)
ON GOSUB (On Gosub)
ON GOTO (On Go To)
RETURN (Return)
SKIP ** (Skip)
STOP ** (Stop)
WHILE WEND (While End)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MELFA-BASIC-III hand control commands

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 382 of 562

These commands are concerned with opening/closing action of the hand.

Command Function
HND ** (Hand)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MELFA-BASIC I/O-III control commands

These commands are concerned with input/output control of external I/O. Both single and parallel bits can be handled enabling the
logical operation in the internal register.

Command Function
IN * (In)
OUT ** (Out)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Other commands in MELFA-BASIC-III

These commands are concerned with setting of parameters, selecting of programs, resetting of alarms, and describing of comments.

Command Function
CLOSE (Close)
DEF FN (Define function)
DIM (Dim)
INPUT# (Input)
OPEN (Open)
PRINT# (Print)
REM (Remarks)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Alphabetical Overview of MELFA-BASIC-III commands
Command Function
ACL (Accelerate)
ACT (Act)
ALIGN (Align)
BASE (Base)
CALLP (Call P)
CLOSE (Close)
CNT (Control)
COM OFF (Communication OFF)
COM ON (Communication ON)
COM STOP (Communication Stop)
DACL (Deceleration)
DEF ACT (Define act)
DEF FN (Define function)
DEF PLT (Define pallet)
DIM (Dim)
DLY (Delay)
END (End)
FINE (Fine)
FOR NEXT (For Next)
FPRM (FPRM)
GOSUB (Go Subroutine)
GOTO (Go To)
HLT (Halt)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 383 of 562

HND ** (Hand)
HRE * (Here)
IF THEN (If Then Else)
ELSE
IN * (In)
INPUT# (Input)
JOVRD (J override)
MOV (Move)
MVC (Move C)
MVR (Move R)
MVR2 (Move R2)
MVS (Move S)
OADL (Optimum
Acceleration/Deceleration)
ON COM (On Communication Go
GOSUB Subroutine)
ON (On Gosub)
GOSUB
ON GOTO (On Go To)
OPEN (Open)
ORG (Origin)
OUT ** (Out)
OVRD (Override)
PLT * (Pallet)
PRINT# (Print)
REM (Remarks)
RETURN (Return)
SKIP ** (Skip)
SPD (Speed)
STOP ** (Stop)
SV (Servo)
TOOL (Tool)
WHILE (While End)
WEND
WTH * (With)
WTHIF * (With If)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ACL (Accelerate)

Function:

Designates the robot acceleration rate.

Format

ACL <Acceleration time>

Terminology

<Acceleration time>   Designate the amount of time to go from zero speed to maximum speed: : Unit [seconds]
(Recommended range: 0.05 to 2.00)
When describing the acceleration time, always leave a space after the ACL command. If described as
ACL1, it will be a variable name declaration statement.

Explanation

When setting the acceleration time, if the load is light, designate a short time, and if heavy, designate a long time.
If the acceleration time is not set, the system default value, M_NACL will be used. The system default value sets the setting
value based on a light load according to the robot used.
Once the ACL command is executed, the changed value for the acceleration time will be applied until the execution of the
program has ended. Once the execution of the program is completed, the acceleration time will be reset to the system default
setting of M_NACL.
If the CNT setting is validated, the acceleration/deceleration during the continuing movement commands will be omitted until
the setting is invalidated.
Note that if a start/stop, timer or input signal wait command is issued between the movement commands,
acceleration/deceleration will take place.
I f the acceleration time is set to a value smaller than M_NACL in relation to the load, the speed over alarm may occur. In

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 384 of 562

addition, the life of the mechanical parts could be cut short because of the load conditions, so keep the value above M_NACL.
Set the deceleration time with the DACL command.
The locus path of the smooth movement while CNT is valid will differ according to the acceleration speed. To move smoothly at a
constant speed, set the acceleration and deceleration to the same value. CNT is valid in the default state.

  CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus
will change, so take care to prevent collisions with the peripheral devices.

If the robot might collide with the peripheral devices, invalidate CNT or shorten the acceleration/deceleration time.

Reference Program

10 ACL 0.2 'Designation of light load


20 MOV P1
30 ACL M_NACL 'Designation of standard load
40 MOV P2

Reference

DACL, CNT, Speed Setting Command, Robot Status Variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ACT (Act)

Function:

Designates the enable/disable status of the interrupt.

Format

ACT <Priority No.> = <Enable/disable>

Terminology

<Priority No.>   Either enables or disables the entire interrupt.


1 - 8: Designate the priority No. for the interrupt defined in the DEF ACT statement. When entering the
priority No., always leave a space (character) after the ACT command. If described as ACT1, it will be a
variable name declaration statement.
<Enable/disable>   To enable interrupts, choose 1, to disable them, choose 0.

Explanation

When the program starts, the status of <Priority No.> 0 is "enabled." When <Priority No.> 0 is "disabled," even if <Priority No.> 1
to 8 are set to "enabled," no interrupt will be enabled.
The statuses of <Priority No.> 1 to 8 are all "disabled" when the program starts.
An interrupt will occur only when all of the following conditions have been satisfied:
<Priority No.> 0 is set to "enabled."
The status of the DEF ACT statement has been defined.
When the <Priority No.> designated by DEF ACT is made valid by an ACT statement.
The return from an interrupt process should be done by describing either RETURN 0 or RETURN 1.
Even if the robot is in the middle of interpolation, an interrupt defined by a DEF ACT statement will be executed.
During an interrupt process, that <Priority No.> will be executed with the status as "disable."
A communications interrupt (COM) has a higher priority than an interrupt defined by a DEF ACT statement.
The relationship of priority rankings is as shown below:

Reference Program

10 DEF ACT 1,M_IN(1)=1 GOSUB *INTR 'Assign input signal 1 to the interrupt 1 condition
20 MOV P1
30 ACT 1=1 'Enable interrupt 1
40 MOV P2
50 ACT 1=0 'Disable interrupt 1
:
100 *INTR 'If input signal 1 changes to ON (to 1) while the
robot is moving from P1 to P2, it will stop.
110 HLT

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 385 of 562

120 RETURN 0

Reference

DEF ACT, RETURN


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ALIGN (Align)

Function:

Moves the hand by linear interpolation to the closest orthogonal posture possible in relationship to the current values of the posture
axes (A, B, C). (i.e. It aligns the hand.)

Format

ALIGN

Explanation

By executing this command, the posture can be changed without moving the position of the tip of the hand.
Executing the ALIGN command will move the hand to the closest orthogonal posture. "Orthogonal posture" refers to 0* , 90*, or
180*.

Reference Program

100 ALIGN

Reference

MOV
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
BASE (Base)

Function:

Designates the base conversion data.

Format

BASE <Base conversion data>

Terminology

<Base conversion data>   Designate the base conversion data in terms of a position operation expression.

Explanation

The X, Y, and Z components of the position data represent the amount of parallel movement from the origin of the world
coordinate system to the origin of the base coordinate system. The base conversion data can be changed only with the BASE
command. The components A, B, and C of the position data represent the amount that the base coordinate system is tilted in
relation to the world coordinate system.
X ... Distance to move parallel to X axis
Y ... Distance to move parallel to Y axis
Z ... Distance to move parallel to Z axis
A ... Angle to turn toward the X axis
B ... Angle to turn toward the Y axis
C ... Angle to turn toward the Z axis
From the perspective that the origin of the coordinates, which is the center of the coordinates on which they turn, is the normal
direction, the clockwise turn for A, B, and C is considered the normal turning direction.
The contents of the structural flag have no meaning.
The base coordinate system changed by the BASE command will keep the changes even after the power has been turned OFF.
The system's default value for this data is P_NBASE=(0,0,0,0,0,0) (0,0).
For the 5-axis robot, the A, B and C axes cannot be changed, so input"0"

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 386 of 562

  CAUTION

Always input the setting value accurately when carrying out base conversion. If the original teaching point is moved to after base
conversion, the robot motion posture will change, so take care to prevent interference with the periphery. Even if the base
conversion data is accurately input, the required accuracy may not be achieved due to the actual dimension accuracy and
installation posture accuracy, etc. When using the 5-axis robot, always describe "0" for the values other than the X, Y and Z axes.
If other settings are made, vibration may occur or an alarm

10 BASE (50,100,0,0,0,0) 'Input the conversion data as a constant


20 MVS P1
30 BASE P1 'Input the conversion data as 'a variable
40 MVS P1
50 BASE P_NBASE 'Reset the conversion data to the default values.

Reference

TOOL, Robot status variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
CALLP (Call P)

Function:

Executes a designated program. (Similar to the GOSUB command for programs.)

Format

CALLP "<Program name>" [, <Argument> [,<Argument>] ... ]

Terminology

<Program name>   Designate a program name by a character string constant or by a character string variable.
<Argument>   Designate variables that will be transferred to the program when it is called up. The maximum number of
variables that can be transferred to the program is 16.

Explanation

When an argument differs from one defined (FPRM) by the program being called up, an error will occur.
If the number of arguments differs from that in the program being called up by CALL P, an error will occur.
If a program is reset, the control will return to the head of the main program.
The definition statements (DEF, ACT, DEF FN, DEF PLT, DIM) executed in the program that issues the CALL P will not affect the
program being called up. When the program returns from the CALL P command, these will be validated again.
Speed and tool data are all valid.
Up to seven programs can be called up in one program. This number includes any additional programs called up in the
subprograms.

Reference Program

10 CALLP "P10" ,M1,P1,P2

Reference

END, FPRM
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
CLOSE (Close)

Function:

Closes the designated file.

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 387 of 562

CLOSE [[#] <File No.> [, [[#] <File No.> ... ]

Terminology

<File No.>   Designate the No. of the file to be closed.

Explanation

Designate the No. of the file to be closed. It is possible to designate several files.
If the file Nos. are omitted, all files that have been opened will be closed.
Once a file has been closed, the file No. that was used for it can be used again to open yet a different file.
If a file has been opened for input/output the CLOSE statement will sweep out the data in the buffer. Consequently, the output
processing for the file can be completed properly.
Once a file has been closed, input/output cannot be carried out.
Executing an END statement will also close a file.

Reference Program

10 OPEN "COM1:" AS #1 '"Open "COM1:" as file No. 1


20 PRINT 1,M1
100 INPUT# 1,M2
110 CLOSE #1 'Close file No. 1, "COM1:"
200 CLOSE 'Close all open files

Reference

END
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
CNT (Control)

Function:

Designates the control for smooth movement between interpolation motions.

Format

CNT <Valid/Invalid>

Terminology

<Valid/Invalid>   Designate the start and finish of smooth movement control.


Designate either 1 or 0. Valid is 1, invalid is 0.

Explanation

The default setting for CNT is valid, so the acceleration/deceleration between continuous movement commands are omitted.
(Smooth movement) Note that acceleration/deceleration will take place when starting, stopping, waiting for a timer or input
signal, or branching.
To change the default setting, invalidate parameter NCT (continuous locus setting). Refer to the parameter list " for details on
the parameters, and to your manual for details on changing the setting of the parameters.
During smooth movement control, the FINE validity designation and OADL (optimum acceleration/deceleration) will be
invalidated.
During smooth movement control, the designated speed may not be reached because priority is placed on eliminating speed
changes. Depending on the teach positions to be connected, an alarm may occur. In this case, lower the movement speed.
If smooth movement is carried out on paths with differing interpolation methods (joint interpolation, linear interpolation,
circular interpolation), an alarm may occur depending on the teach position. In this case, lower the movement speed
The locus path will differ during smooth movement depending on the movement speed and acceleration/deceleration speed.
Take special care to prevent the robot from interfering with the periphery when the movement speed has been changed.
Set the same value for the acceleration and deceleration when smooth operation is to be carried out at a constant speed A
constant speed will not be applied when the acceleration and deceleration speeds differ
If the movement distance of the movement command that is connected with smooth operation is short, constant speed will not
be applied. In this case, lengthen the movement distance, lower the movement speed or shorten the acceleration/deceleration.
The specifications and drawing when using smooth control are as shown below. (To move smoothly with linear interpolation
between the three taught points (P1, P2 and P3).)
Pattern CNT SPD ACL/DACL Movement condition
validity [mm/s] [s]
A invalid 500 0.2 CNT invalid
B valid 500 0.2 CNT valid
C valid 250 0.2 Movement speed is set to ½
D valid 100 0.2 Movement speed is set to 1/5

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 388 of 562

E valid 500 0.1 Acceleration/deceleration


speed is set to ½
F valid 500 0.4 Acceleration/deceleration
speed is set to double
 

  CAUTION

CNT is valid as the default setting If the movement speed or acceleration/deceleration speed is changed in this state the robot
movement path will change, so take care to prevent interference of the robot with the peripheral devices.

If interference may occur with the peripheral devices, invalidate CNT or shorten the acceleration/deceleration time.

Reference Program

10 CNT 0 'Invalidate CNT


20 MOV P1 'Move with acceleration/deceleration
30 CNT ,1 'Validate CNT
40 MVS P2 'Move with smooth movement
50 MVS P3 'Move with smooth movement
60 CNT 0 'Invalidate CNT

Reference

Movement related commands, speed related commands, acceleration/deceleration related commands, FINE, OADL
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
COM OFF (Communication OFF)

Function:

Designates "disable" for any interrupts from a communication line.

Format

COM [(<Communication line No.>)] OFF

Terminology

<Communication Line No.>   Describe 1, 2 or 3.

Explanation

If <Communication Line No.> is omitted, communication line No. 1 will be selected.


When COMMON OFF is executed, even if communications are attempted, the interrupt will not be generated.
For information on communication line Nos., refer to the page for OPEN.

Reference Program

10 COM(1) OFF 'Disable communication interrupt from communication line No. 1.

Reference

OPEN, COM_ON, COM STOP, ON COM GOSUB


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
COM ON (Communication ON)

Function:

Designates "enable" for interrupts coming from a communication line.

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 389 of 562

COM [(<Communication line No.>)] ON

Terminology

<Communication Line No.>   Describe 1, 2 or 3.

Explanation

If <Communication line No.> is omitted, communication line No. 1 will be selected.


For information on communication line Nos., refer to the page for OPEN.

Reference Program

10 COM(1) ON 'Enable communication interrupt from communication line No. 1.

Reference

OPEN, COM_OFF, COM STOP, ON COM GOSUB


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
COM STOP (Communication Stop)

Function:

Sets "stop" for the interrupts coming from a communication line.

Format

COM [(<Communication line No.>)] STOP

Terminology

<Communication Line No.>   Describe 1, 2 or 3.

Explanation

If <Communication line No.> is omitted, communication line 1 will be selected.


After COM STOP is executed, even if communication is attempted, the interrupt will not be generated. Note that the receiving
data and the fact of the interrupt will be recorded, and be executed the next time the line is reopened.
To reopen, use COM ON.
When reopened, if there is an interrupt during a STOP, after COM ON is executed, the interrupt will be immediately sent.
For information on communication line Nos., refer to the page for OPEN.

Reference Program

10 COM(1) STOP 'Stop the communication interrupts for communication line 1.

Reference

OPEN, COM_OFF, COM ON, ON COM GOSUB


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DACL (Deceleration)

Function:

Designates the robot deceleration speed.

Format

DACL <Deceleration time>

Terminology

<Deceleration time>    Designate the amount of time to decelerate from the maximum speed to zero. Unit: [Seconds]
(Recommended range: 0.05 to 2.0)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 390 of 562

Explanation

If the load is light, designate a short deceleration time, and if it is heavy, designate a long time.
If the deceleration time is not set, the system default value M_NDALC = 0.2 will be used. The system default value sets the
setting value based on a light load according to the robot used.
Once the DACL command is executed, the changed value for the deceleration time will be applied until the execution of the
program has ended or the program has been reset.
If the CNT setting is validated, the acceleration/deceleration during the continuing movement commands will be omitted until
the setting is invalidated. Note that if a start/stop, timer or input signal wait command is issued between the movement
commands, acceleration/deceleration will take place.
If the deceleration time is set to a value smaller than M_NDACL in relation to the load, the speed over alarm may occur. In
addition, the life of the mechanical parts could be cut short because of the load conditions, so keep the value above M_NDACL.
Set the acceleration time with the ACL command.
The locus path of the smooth movement while CNT is valid will differ according to the acceleration speed. To move smoothly at a
constant speed, set the acceleration and deceleration to the same value. CNT is valid in the default state.

  CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus
will change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the peripheral devices,
invalidate CNT or shorten the acceleration/deceleration time.

  CAUTION

If the robot is stopped during movement and a value larger than the recommended range is set for the deceleration time, the
robot may not stop immediately when the stop operation (operation from controller, teaching box or external signal, etc.) is
executed. In this case, set the deceleration time to a shorter setting, or press the [Emergency Stop] switch.

Reference Program

10 HND 1=1 'Open the hand


20 DACL 0.2 'Designate a light load
30 MOV P1 'Move to P1
40 HND 1=0 'Chuck the work
50 DACL M_NDACL 'Designate a standard load
60 MOV P2 'Move to P2

Reference

ACL, CNT, Speed Setting Commands, Robot Status Variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DEF ACT (Define act)

Function:

Defines the status of the interrupt and how it will be processed.

Format

DEF ACT <Priority No.>, <Expression>, <Process>

Terminology

<Priority No.>   This is the priority No. of the interrupt. It can be set with constant Nos. 1 to 8.
<Expression>   For the interrupt status, use the formats described below: (Refer to the syntax diagram)
<Numeric type data> <Comparison operator> <Numeric type data> or
<Numeric type data> <Logical operator> <Numeric type data>
<Numeric type data> refers to the following:
<Numeric type constant>| <Numeric variable>|<Numeric array variable>|<Component data>
<Process>   Refers to a GOTO statement or a GOSUB statement used to process an interrupt when it occurs.

Explanation

The priority level for the interrupts is decided by the <Priority No.>, and the priority level, from the highest ranges from 1 to 8.
There can be up to 8 settings for the interrupts. Use the <Priority No.> to differentiate them.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 391 of 562

When two interrupts have been defined with the same priority level, the one defined later is validated.
Since DEF ACT defines only the interrupt, always use the ACT command to designate the enable/disable status of the interrupt.
The communications interrupt (COM) has a higher priority level than any of the interrupts defined by DEF ACT.
DEF ACT definitions are valid only in the programs where they are defined. These are invalid when called up in a program by
CALL P. If necessary, the data in a subprogram may need to be redefined.
If an interrupt is generated when a GOTO command is designated by <Process> for a DEF ACT command, during execution of the
remaining program, the interrupt in progress will remain, and only interrupts of a higher level will be accepted. The interrupt in
progress for a GOTO statement can be canceled with the execution of an END statement.

Reference Program

10 DEF ACT 1,M_IN(17)=1 GOSUB 100 'Defines the subroutine at line 100 to be
the one to be called up when the status for
the general purpose input signal No. 17 is
ON.
20 DEF ACT 2,MFG1 AND MFG2 GOTO 200 'Defines the line 200 as the one to jump to
when the logic operation of AND applied to
MFG1 or MFG2 results in "true."

Reference

ACT, GOSUB, RETURN, Robot status variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DEF FN (Define function)

Function:

Defines a function and gives it name.

Format

DEF FN <Name> [(Dummy argument> [, <Dummy argument>] ... )] = <Function definition expression>

Terminology

<Name>   Describe an identifier character + character string.


<Dummy argument>   When a function has been called up, it is transferred to the function. It is
possible to describe all the variables, and up to 16 variables can be used.
<Function Definition Expression>   Describe the expression for what operation to use as a function.

Explanation

FN + <Name> becomes the name of the function. The function name can be up to 8 characters long.
Example:
Numeric typeFNMAX Identifier character: M
Character string typeFNCAME$ Identifier character
: C (Describe $ at the end of the name)
A function defined with DEF FN is called a user-defined function.
A function as long as one line can be described.
A user-defined function that has not been defined with DEF FN will cause an error before it is executed.
In <Function Definition Expression> built-in functions and user-defined functions that have already been defined can be used. In
this case, up to 16 levels of user-defined functions can be written.
If the variables used in <Function Definition Expression> are not located in <Dummy Argument>, then the value that the variable
has at that time will be used. Also, an error will occur if during execution, the number or type (numeric or character string) of
arguments differs from the number or type declared.
A user-defined function is valid only in the program where it is defined. It cannot be referenced by a CALLP command from
another program.

Reference Program

10 DEF FNMAVE(MA,MB)=(MA+MB)/2 'Defines FNMAVE to be used to find the average of two


numeric values.
20 MDATA1=20
30 MDATA2=30
40 MAVE=FNMAVE(MDATA1,MDATA2) '25, the average of 20 and 30, is substituted for the
numeric variable MAVE.

Reference

Variables, Array variables, Functions

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 392 of 562

COSIMIR® · MELFA-BASIC III


 
DEF PLT (Define pallet)

Function:

Defines the pallet. (3-point pallet, 4-point pallet)

Format

DEF PLT <Pallet No.>, <Start point>, <End point A>, <End point B>, [<Diagonal point>], <Quantity A>, <Quantity B>, <Assignment
direction>

Terminology

<Pallet No.>   This is the selection No. of the set pallet. (1 to 8)


<Start Point>   Refers to the pallet's start point. Position operation expressions can be used.
<End Point A>   One of the ending points for the pallet. Position operation expressions can be used.
<End Point B>   Another ending point for the pallet. Position operation expressions can be used.
<Diagonal Point> The diagonal point from the pallet's start point. Position operation expressions can be used.
<Quantity A>   The No. of workpieces from the pallet's start point to the end point A. Numeric operation
expressions can be used.
<Quantity B>   The No. of workpieces from the pallet's start point to the end point A. Numeric operation
expressions can be used.
<Assignment Direction>   Describe 1 or 2 for the direction of assignment for when the grid is divided and given numbers.
Numeric operation expressions can be used. (For the assignment direction, refer to the
explanation section.)

Explanation

A 3-point pallet or a 4-point pallet can be selected.


A 3-point pallet offers simplified teaching.
A 4-point pallet is effective for better precision.
The assignment direction is as follows:
Zigzag = 1, Same direction = 2
The command is valid only within the program being executed. The command is invalid in the program that calls up the command
from another program. If necessary, redefine.
Quantity A and B should be a non-zero positive number, while if are 0 or a negative number is assigned, an error will occur.
If <Quantity A> x <Quantity B> exceeds 32,767, an error will occur when motion starts.

Reference Program

10 DEF PLT 1,P1,P2,P3, ,4,3,1 '3-point pallet definition


20 DEF PLT 1,P1,P2,P3,P4,4,3,1 '4-point pallet definition

Reference

PLT, Movement commands


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DIM (Dim)

Function:

Declares the number of elements for an array variable.

Format

DIM <Variable name> (<Max. value of subscript>, [<Max. value of subscript>] ) [,<Variable name> (<Max. value of subscript> [, <Max.
value of subscript>])]

Terminology

<Variable Name>   Describes the name of the array variable.


<Max. Value of Subscript>   Describes in terms of constants, the number of elements in an array variable.

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 393 of 562

Both one-dimensional and two-dimensional arrays are allowed.


<Max. Value of Subscript> can be described with numeric constants from 1 to 999. Numeric operation expressions cannot be used.
If you try to use a subscript with a value that is larger than the maximum value for subscript as defined by the DIM command, an
error will occur when it is executed.
When the DIM statement is executed, the array variable will have the default values as shown below:
- For numeric array variables, the elements are all 0.
- For character string array variables, the elements are all null strings.
- For position array variables, all elements will be undefined data.
To use an array without a DIM statement, the specifications shown below will automatically be assigned to reserve space
- For one-dimensional arrays, DIM variable name (10).
- For two-dimensional arrays, DIM variable name (10, 10)
If the number of elements is a real number, the decimal numbers will automatically be rounded off to create an integer.
This command is valid only in the executed program. It will be invalid in a program that is called within a program. It must be
redefined when used in a subprogram.
When backing up the position array variable data declared with this command in an external memory device such as a personal
computer, the data must be copied to the normal variables once. The data cannot be backed up in the position array variable
state.

Reference Program

10 DIM PDATA(10) 'Defines the position array variable PDATA as one that can hold 10 elements.
20 DIM MDATA(2,3) 'Defines the 2-dimensional numeric array variable MDATA as one that can have 2x3
elements.

Reference

Array variables
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DLY (Delay)

Function:

When used as a single command:


At a designated time, it causes a wait.
When used as an additional pulse output:
Designates an output time for a pulse

Format

DLY <Time>

Terminology

<Time>   Describes the waiting time or the output time for the pulse output, in terms of a numeric operation expression. Unit:
[Seconds]
The minimum value that can be set is 0.05 seconds.

Explanation

This command is used to create delay times in programs, or to write in the OUT statement and set the pulse output time.
The pulse output will be executed simultaneously as the next command in the lines that follow.
Up to 4 pulse outputs can be issued simultaneously. Exceeding this, an error will occur when the program tries to execute it.
After the designated time has elapsed, the condition that existed just before the pulse output was issued will resume.
Within the designated time, if an END command, or the last line of the program is executed, or if an emergency stop is made to
stop the program, the signal output status will keep its current status.
The relation of the priority levels for other interrupts is as shown below:
COM> ACT> WTHIF (WTH) >Pulse output (Time setting ON)

Reference Program

10 DLY 30 'Wait for 30 seconds


20 M_OUT(17)=1 DLY 10.0 'Send the signal output to the general-purpose output signal 17 for 10
seconds.

Reference

Robot Status Variables, Substitution


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 394 of 562

 
END (End)

Function:

Designates the status for the completion of the interpolation command.

Format

END

Explanation

Several END statements can be described within one program.


An END statement in a program called up by a CALLP command will transfer control to the program that issued the CALL P
command.
Used in the host program, the command will close all files before closing.

Reference Program

100 END

Reference

CALLP, FPRM, GOSUB, RETURN


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
FINE (Fine)

Function:

Designates the status for the completion of the interpolation command.

Format

FINE <Valid/Invalid>

Terminology

<Valid/Invalid>   Set 1 for valid, and 0 for invalid. It is preset to 0.

Explanation

If FINE is validated, when the command is completed at the servo, it marks the completion of the interpolation command.
If FINE is validated, the interpolation command is completed after waiting for the completion of positioning by the servo.
During a program, the FINE command is invalidated until it is validated by the program. Once the FINE command is validated, it
will stay valid in the program until it is invalidated again.
The FINE command is invalidated after the program.
When CNTis valid, the FINE command will be ignored even if it is valid (i.e., it will be treated as invalid, but the status will be
kept).
When combining CNT commands and FINE commands, the results are shown in the motion specifications table below.
Pattern CNT valid/invalid FINE valid/invalid
Pattern A valid valid
Pattern B valid invalid
 
 

Reference Program

10 FINE 1
20 MOV P1
30 FINE 0
40 MOV P2

Reference

CNT,movement command
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 395 of 562

COSIMIR® · MELFA-BASIC III


 
FOR NEXT (For Next)

Function:

This command will continually repeat part of the program between the FOR statement and NEXT statement until the end conditions
are satisfied.

Format

FOR <Counter> = <Default value> TO <End value> [STEP <Increment>]


.
.
NEXT [<Counter 1> [, <Counter2>] ... ]

Terminology

<Counter>   Describes the numeric value data that represents the counter for the number of repetitions.
<Counter 1> <Counter 2> can also be used.
<Default Value>   Sets default value of the counter for the number of repetitions, in terms of a numeric operation expression.
<End Value>   Sets the end value of the counter for the number of repeats, in terms of a numeric operation expression.
<Increment>   Sets the value of the increments for the counter for the number of repetitions, in terms of a numeric operation
expression.

Explanation

The order of execution will be as shown below:


If the repeating process is not executed even once, one of the following situations has occurred:
- The counter's <Default Value> is greater than <End Value> and <Increment> is a positive number.
- The counter's <Default Value> is smaller than <End Value>, and <Increment> is a negative number.
If the FOR statement and NEXT statement contradict each other, an error will occur.
Note that when a FOR-NEXT exists in a nesting structure and it has the same end value, it is possible to use only 1 NEXT
statement. For example, line 50 and 60 in the example can be combined to be written "NEXT MY, MX" in one line.
When the NEXT statement corresponds to the closest FOR statement, the variable name in the NEXT statement can be omitted.
In the example, "MY" in line 50 and "MX" in line 60 can be omitted.
Program depth
- The FOR-NEXT process allows the control structure to go deep within the program.
- It is possible to use the FOR-NEXT statements between other FOR-NEXT statements.
- With each FOR-NEXT process, the control structure of the program becomes one level deeper.
In this system, it is possible for the control structure to have up to 16 levels within a program. Exceeding 16 levels will cause an
error during execution.

Reference Program

A program that adds the numbers 1 to 10

10 MSUM=0 'Set the total, MSUM, to its default value.


20 FOR MDATA=1 TO 10 STEP 1 'Set the numeric variable MDATA's default value, end value, and
increment. If MDATA's value exceeds 10, go to line 50.
30 MSUN=MSUN+MDATA 'Add MDATA to the numeric variable MSUM.
40 NEXT MDATA 'Go to line 20.
50 END 'End the program.

A program that puts the result of a product of two numbers into a 2-dimensional array variable

(Using FOR-NEXT as a nesting structure)

10 DIM MBOX(10,10) 'Reserve space for a 10x10 array.


20 FOR MX=1 TO 10 STEP 1 'Increase the counter by 1 from 1 to 10 for the numeric variable MX.
If 10 is exceeded, go to line 70. Step 1 can be omitted.
30 FOR MY=1 TO 10 STEP1 'Increase the counter by 1 from 1 to 10 for the numeric variable MX.
If 10 is exceeded, go to line 60. Step 1 can be omitted.
40 MBOX(MX,MY)=MX*MY 'Substitute the value of MX*MY for the array variable MBOX (MX, MY).
50 NEXT MY 'Return to line 30.
60 NEXT MX 'Return to line 20.
70 END 'End the program.

Reference

GOSUB, WHILE, END, Numeric operation expressions (Syntax diagram)


©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 396 of 562

COSIMIR® · MELFA-BASIC III


 
FPRM (FPRM)

Function:

Defines the order of the arguments, the type, and number for the main program that uses arguments in a subprogram (i.e., when
the host program uses another program with CALL P).

Format

FPRM <Dummy argument> [, <Dummy argument> ... ]

Terminology

<Dummy Argument>   The variable in the subprogram that is transferred to the main statement when executed.
All variables can be used. Up to 16 variables may be used.

Explanation

FPRM is unnecessary if there are no arguments in the subprogram that is called up.
If a variable used in a program is not in <Dummy Argument> the variable will use the value it currently holds.
If the type or number of arguments varies between the argument called up by the CALLP and the dummy argument defined by
FPRM, an error will occur.
FPRM can be used repeatedly in a subroutine. Each time it is executed, the argument will be substituted for the designated
variable (dummy argument).
Depths between programs
- The calling up of programs allows the level of the control structure between programs to go deeper.
- One calling up of a program results in the program structure becoming one level deeper.
It is possible for the control structure in a program to go as deep as 7 levels. If 7 levels are exceeded, an error will occur during
execution.

Reference Program

10 FPRM M1,P1,P2

Reference

CALLP, Variables, Array variables, Functions


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
GOSUB (Go Subroutine)

Function:

Calls up a designated line No. or line label where a subroutine exists.

Format

GOSUB <Call destination>

Terminology

<Call Destination>   Describes the line No. or label name

Explanation

A RETURN statement is used to return the program from the subroutine.


If the designated line No. or label name does not exist, or if these are not defined, an error will occur.
A variable in use can be used in a subroutine in the same way.
In the subroutine, if the END statement is executed, or if the last line of the program is executed, the program execution will be
completed.
Call Corresponding statement Process (Control)
destination
Subroutine RETURN statement Control moves to line after
the GOSUB statement
Subroutine END statement (or last line) Ends the program
 

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 397 of 562

100 GOSUB 1000


110 END
1000 MOV PD1
1010 MOV PD2
1020 RETURN

Reference

RETURN, END, GOTO, DEF ACT, ACT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
GOTO (Go To)

Function:

Unconditionally branches the program the program to a designated line No. or label.

Format

GOTO <Branch destination>

Terminology

<Branch Destination>   Describes the line No. or label.

Explanation

If a designated line No. or label is undefined or if two definitions exist, an error will occur.
The execution of the GOTO command does not affect the level of the control structure.

Reference Program

10 GOTO 100
20 GOTO *JUMP
100 *JUMP
110 MOV P1
120 END

Reference

IF THEN ELSE, GOSUB, DEF ACT, ACT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HLT (Halt)

Function:

Interrupts the execution of the program and movement of the robot, and stops.

Format

HLT

Explanation

Interrupts the execution of a program and brings the robot to a gradual stop.
To restart, start the O/P or issue the start signal from an external source. The program will be restarted at the next line after
the HLT statement. Note that if the HLT statement was in a conjunction, it will restart from the same line of the program where
it was interrupted.

Reference Program

10 MOV P1
20 HLT
30 MOV P2

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 398 of 562

:
100 IF M_IN(1)=1 THEN HLT

Reference

WTHIF, WTH, STOP, SKIP


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HND * *(Hand)

Function:

Commands the hand to open or close.

Format

HND<Hand No.> = <Open/Close>

Terminology

<Hand No.>   Select 1, 2 or 3.


Always leave a space after the hand number when using an HND command.
If described as HND1, it will be a variable name declaration statement.
<Open/close>   Designate either open or closed. 1 is open. 0 is closed.
Note that depending on the piping for the solenoid valves, this could be reversed.

Explanation

The hand is opened or closed by executing the HND statement or by changing the value of the robot status variable, M_HND ().
When the next interpolation command is not to be executed until the hand movements have been completed by the HND
statement or by the M_HND (), use the following method:
Use a DLY statement to wait for time
10 HND 1=0
20 DLY 0.5
30 MOV P1
Use the robot status variable, M_HNDCQ () to confirm the open/close status of the hand.
10 HND 1=0
20 IF M_HNDCQ(1)<>1 GOTO 20
30 MOV P1
The relation between the value in the parentheses in M_HNDCQ () and the value of the hand number is as shown below:
The pulse output cannot be used when opening and closing the hand with the robot status variable M_HND ( ).
Example:
M_HND(1)=1 DLY 0.5
Use the following type of program in this case.
10 M_HND(1)=1
20 DLY 0.5
30 M_HND(1)=O
    Return Value (Returns a 2-bit
state)
    0 1 2 3
M_HNDCQ(1) Hand check signal 0 1 0 1
1=
  Hand check signal 0 0 1 1
2=
M_HNDCQ(2) Hand check signal 0 1 0 1
3=
  Hand check signal 0 0 1 1
4=
M_HNDCQ(3) Hand check signal 0 1 0 1
5=
  Hand check signal 0 0 1 1
6=
 
* * Command can be used in connection with other commands or stand alone.

Related Parameters

The hand open/close state when the power is turned on or the GC command is executed can be changed with the parameters. Refer to
section "2.3.10 Maintenance screen operation (1) Setting the parameters" for details on changing the setting.

Parameter name GCD: Hand 1 forward/reverse setting, hand 1 default setting, hand 2 forward/reverse setting, hand 2 default setting,
hand 3 forward/reverse setting, hand 3 default setting, hand 4 forward/ reverse setting, hand 4 default setting (Hand 4 cannot be

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 399 of 562

used.)

Details of each setting value:

Forward/reverse setting: The open/close direction when opening or closing the hand is set.

Hand 1 (2, 3) forward/reverse 0 1


setting
Open/close direction Normal open/close Reverse open/close
 

Default setting: The output state of the output bits 900 and 901 (902 for hand 2, 904, 905 for hand 3) when the power is turned ON
is set.

Hand 1 (2, 3) default setting 0 1 2 3


Output bit 900 (902, 904, 0 1 0 1
906)
Output bit 901 (903, 905, 0 0 1 1
907)
 

Reference Program

10 HND 1=1 'Open hand 1.


20 HND 2=0 'Close hand 1.
30 MOV P1 WTH HND 1=1 'Move P1 and open hand 1. (Used as a conjunction with a move command.)

Reference

Robot Status Variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HRE *(Here)

Function:

Provides the current position (Cartesian coordinate value)

Format

HRE

Explanation

As an example of using HRE, it can be used to find the current position when an interrupt is generated during such times when
there is an ACT or COM interrupt generated when the robot is moving (such as when the touch sensor on the tip of the hand is
activated.)
Using the HRE statement alone will cause a syntax error.
10 HRE Syntax error
Even if the HRE statement is executed at the same position, when the base or tool coordinates are changed by the BASE and
TOOL commands, a different position will be used. Also, even if the HRE command is used to move the position, if the BASE and
TOOL commands are used to change the base or tool coordinates, the position will move to a different position than the one
entered.
* Command cannot be executed alone. It has to be used in connection with other commands.

Reference Program

10 P1=HRE 'Substitute the current position for P1.


20 MOV HRE+P1 'Move to the current position +P1, using joint operations.

Reference

Robot status variables, BASE, TOOL


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
IF THEN ELSE (If Then Else)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 400 of 562

Function:

Depending on the result of and expression, a process is selected and executed.

Format

IF <Expression> THEN <Process> [ELSE <Process>]

Terminology

<Expression>   Describe a numeric operation expression.


<Process>   Describe the command statements used in MELFA-BASIC III (except condition branch statements and repeat control
statements), line Nos. and label names.

Explanation

If the result of <Expression> is true, then the <Process> in the THEN statement is executed, and if false, then the <Process> in
the ELSE statement is executed.
Omit ELSE if not needed.
The following cannot be used for <Process>:
Type of the statement MELFA-BASIC III-command
Condition branch statement ON ... GOTO, ON ... GOSUB, IF ...
THEN ... ELSE
Repeat control statement FOR ... NEXT, WHILE ... WEND
Statements that cannot stand Commands with an asteriks (*), e. g.
alone WTH, WTHIF, IN, PLT
Definition and declaration DIM, DEF, FN, ON COM GOSUB
statements
Remark statements REM
 

Reference Program

100 IF MDATA>10 THEN 1000


110 IF MDATA>10 GOTO 1000 ELSE GOTO 2000
120 IF MDATA>10 THEN GOSUB 1000 ELSE GOTO 2000
130 IF MDATA>10 GOTO 1000 ELSE GOTO *WORK

Reference

ON GOSUB, ON GOTO, Numeric operation expressions (syntax diagram)


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
IN * (In)

Function:

Inputs a 1-bit signal from a general-purpose input address.

Format

IN <General-purpose signal input address>

Terminology

<General-Purpose Signal Input Address>   When using 1-bit signal, the integer addresses 0 to 32767 can be
used. 
Always leave a space after the end of the IN command when entering
the input address.
If described as IN1, it will be a variable name declaration statement.

Explanation

The signal is input via the general-purpose input port. The result can be used in numeric operation expressions for such matters
as making decisions and for making substitutions.
This command cannot be used on a standalone basis.
100 IN 17=0 Syntax error
The specifications are the same as for the robot status variable M_IN(). In addition, the specifications for M_INB() and M_INW are
as shown below.
* Command cannot be executed alone. It has to be used in connection with other commands.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 401 of 562

Reference Program

10 *TOP 'Label
20 IF IN 10=0 GOTO 20 'Wait until input signal 10 turns ON
30 IF M_IN(1)=0 GOTO 30 'Wait until input signal 1 turns ON
40 IF M1<>0 GOTO *TOP 'Jump to label (TOP) unless arithmetic variable M1 value is 0

Reference

OUT, Robot Status Variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
INPUT# (Input)

Function:

Inputs data from files (input devices)

Format

INPUT# <File No.>, <Input data name> [, <Input data name>] ...

Terminology

<File No.>   Describes file Nos. 1 to 8.


Corresponds to the file No. created with the OPEN command.
<Input Data Name>   Describes the variable name that contains the data to be input. All variables can be described.

Explanation

The data is input from files (or input devices) whose file Nos. have been opened by the OPEN statement, and is substituted for
the variable.
The type of data input and the type of variable that is substituting it must be the same.
When describing multiple variable names, use a comma (,) between variable names as delimiters.
When the INPUT statement is executed, the status will be "standby for input. " The input data will be substituted for the
variables at the same time as the carriage return (CR and LF) are input.
Inputting only a carriage return will cause an error.
An error will occur if the type or number of variables varies, or if the data formats are different.
Example: When character strings, numeric values, and positions coexist.
10 INPUT# 1,C1$,M1,P1
"MELFA",125.75,"(300.00,200.00,500.00,180.00,0.00,180.00)(7,0)"
"MELFA" is substituted in C1, 125.75 in M1, and
(300.00,200.00,500.00,180.00,0.00,180.00) (7,0) in P1.

Reference Program

10 OPEN "COM:" AS 1 'Assign the personal computer to file No. 1.


20 INPUT# 1,MDATA 'When data is input from the keyboard, input that value to the numeric
variable, MDATA.

Reference

OPEN, PRINT#
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
JOVRD (J override)

Function:

Designates the only override that is valid during the robot's joint movements.

Format

JOVRD <Designated override>

Terminology

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 402 of 562

<Designated override>   Describes the override as a real number. Unit: [%] (Recommended range: 1 to 100.0) A numeric
operation expression can also be described.

Explanation

The JOVRD command is valid only during joint interpolation.


The actual designated overrides are: remote override x program override (OVRD) x Joint override (JOVRD), and the JOVRD
command can change only the joint movement override.
100% is considered the robot's maximum ability. Normally, 100% of the system default value (M_NOVRD) is designated.
During the program, the designated override that is used is the system default value, until the JOVRD command is executed.
Once the JOVRD command has been executed, the designated override will be used until the next JOVRD command is executed.
If the distance moved is short, the designated override may not be reached.
If an override exceeds the ability of the robot, an alarm might occur during execution. Designate the override value from
between 0 and 100%.

  CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus
will change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the peripheral devices,
invalidate CNT or shorten the acceleration/deceleration time.

Reference Program

10 JOVRD 50
20 MOV P1
30 JOVRD M_NJOVRD 'Set the default value

Reference

OVRD, SPD, Movement Commands, Robot Status Variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
(Label) *

Function:

This indicates the jump site.

Format

* <Label Name>

Terminology

<Label Name>   Describe a character string that starts with an alphabetic character. Up to 8 characters can be used. (Up to 9
characters including *.)

Explanation

An error will not occur even if this is not referred to during the program.
If the same label is defined several times in the same program, an error will occur at the execution.

Reference Program

100 * SUB1

Reference

GOTO, GOSUB, Label


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MOV (Move)

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 403 of 562

Using joint interpolation motion, moves [the hand] from the current position to the destination position.

Format

MOV <Destination position> [, <Close distance>] [<Conjunction conditions>]

Terminology

<Destination Position>   This is the final position for joint movement. Describe a movement position statement.
<Close Distance>   If this value is designated, the actual destination position will be a distance on the tool
coordinate axis in the Z-axis direction separated by a designated amount.
<Conjunction Conditions>   Conjunctions WTH and WTHIF can be used.

Explanation

Joint interpolation motion is a kind of motion mode by which the robot moves from the current position to the destination
position, with the joints starting and stopping simultaneously.
The movement speed is decided by the remote override, the OVRD command and the JOVRD command.(The SPD command has no
effect here.)
When the destination position is outside the motion space of the robot, or when speed is excessive, an error will occur.
Once the execution has been interrupted and once operations have restarted after jog operations, it will start moving from that
position in relationship to the movement position.

Reference Program

10 MOV P1
20 MOV J1
30 MOV (PLT1,10),-100.0 WTH M_OUT(17)=1
40 MOV P4+P5,-50.0 WTHIF M_IN(18)=1,M_OUT(20)=1

Reference

Movement Commands, WTH, WTHIF, FINE, CNT, Movement Positions


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MVC (Move C)

Function:

Carries out 3D circular interpolation in the order of start point, transit point 1, transit point 2 and start point.

Format

MVC <Start point>, <Transit point 1>, <Transit point 2> [<Additional condition>]

Terminology

<Start point>   The start point and end point for a circle. Describe a position operation expression or joint
operation expression.
<Transit point 1>   Transit point 1 for a circular arc. Describe a position operation expression or joint operation
expression.
<Transit point 2>   Transit point 2 for a circular arc. Describe a position operation expression or joint operation
expression.
<Additional condition>   Describe a WTH conjunction or a WTHIF conjunction.

Explanation

In circular interpolation motion, a circle is formed with the 3 given points, and the circumference is moved. (360 degrees)
The movement speed is decided by the O/P override, the OVRD command and the SPD command. (The JOVRD command has no
effect here.)
When the destination position is outside the motion space of the robot, or when speed is excessive, an error will occur.
The posture during circular interpolation does not change.
The movement speed is determined by the amount of change in the position.
If the current position does not agree with the start point, the robot will automatically move to start point by linear
interpolation.
Once the execution has been interrupted and once jog operations have been restarted, it will start moving in relation to the
position where it was interrupted, by linear interpolation.

Reference Program

10 MVC P1,P2,P3

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 404 of 562

20 MVC P1,J2,P3
30 MVC P1,P2,P3 WTH M_OUT(17)=1
40 MVC P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1

Reference

Movement Commands, WTH, WTHIF, FINE, CNT, Movement Positions


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MVR (Move R)

Function:

Carries out 3-dimensional circular interpolation motion from the start point to the end point via transit points.

Format

MVR <Start point>, <Transit point>, <End point> [<Additional condition>]

Terminology

<Start Point>   Start point for the circular arc. Describe a position operation expression or joint operation
expression.
<Transit Point>   Transit point for the circular arc. Describe a position operation expression or joint operation
expression.
<End Point>   End point for the circular arc. Describe a position operation expression or joint operation
expression.
<Additional Condition>   Describes WTH and WTHIF conjunctions.

Explanation

In circular interpolation motion, a circle is formed with 3 given points, and the circumference is moved.
The movement speed is decided by the remote override, the OVRD command and the SPD command. (The JOVRD command has
no effect here.)
When the destination position is outside the motion space of the robot, or when speed is excessive, an error will occur.
The posture becomes an interpolation from the start point to end point and the posture during circular interpolation does not
change.
The movement speed is determined by the relationship between the amount of change in the position and the amount of change
in posture.
If the current position is different from the start point, the robot will automatically move to start point by linear interpolation.
Of the 3 designated points, if any points coincide with the other, or if 3 points are on a straight line, the 3 points will be treated
as a straight line, and linear interpolation motion will take place. No error will occur.

Reference Program

10 MVR P1,P2,P3
20 MVR P1,J2,P3
30 MVR P1,P2,P3 WTH M_OUT(17)=1
40 MVR P3,PLT 1,5,P4 WTHIF M_IN(20)=1,M_OUT(21)=1

Reference

Movement Commands, WTH, WTHIF, FINE, CNT, Movement Positions


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MVR2 (Move R2)

Function:

Carries out 3-dimensional circular interpolation motion from the start point to the end point on the circular arc composing the start
point, end point, and reference points.

The direction of movement is in a direction that does not pass through the reference points.

Format

MVR2 <Start point>, <End point>, <Reference point> [<Additional condition>]

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 405 of 562

Terminology

<Start point>   Start point for the circular arc. Describe a position operation expression or joint operation
expression.
<End point>   End point for the circular arc. Describe a position operation expression or joint operation
expression.
<Reference point>  Reference point for a circular arc. Describe a position operation expression or joint operation
expression.
<Additional condition>   Describes WTH and WTHIF conjunctions.

Explanation

In circular interpolation motion, an arc is formed with 3 given points, and then movement is made across that arc.
The movement speed is decided by the remote override, the OVRD command and the SPD command. (The JOVRD command has
no effect here.)
When the destination position is outside the motion space of the robot, or when speed is excessive, an error will occur.
The posture becomes an interpolation from the start point to end point and the posture of the reference point has no effect
here.
The movement speed is determined by the relationship between the amount of change in the position and the amount of change
in posture.
If the current position is different from the start point, the robot will automatically move to start point by linear interpolation.
Once the execution has been interrupted and once it restarts after jog operations, it will start moving in relation to the position
where it was interrupted, by linear interpolation. After that, the remaining circular interpolations will restart.
  Of the 3 designated points, if any points coincide with the other, or if 3 points are on a straight line, the 3 points will be treated
as a straight line, and linear interpolation motion will take place. No error will occur.

Reference Program

10 MVR2 P1,P2,P3
20 MVR2 P1,J2,P3
30 MVR2 P1,P2,P3 WTH M_OUT(17)=1
40 MVR2 P3,PLT 1,5,P4 WTHIF M_IN(20)=1,M_OUT(21)=1

Reference

Movement Commands, WTH, WTHIF, FINE, CNT, Movement Positions

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MVS (Move S)

Function:

Carries out linear interpolation motion from the current position to the destination position.

Format

MVS <Destination position> [, <Close distance>] [<Additional condition>]

Terminology

<Destination Position>   The final position for the linear interpolation. Describes movement position statements.
<Close Distance>   If this value is designated, the actual destination position will be a distance on the tool coordinate
axis in the Z-axis direction separated by a designated amount. When a positive value is set, the
movement will take place toward the flange (hand advance), and when this is a negative value,
the movement will take place in the opposite direction (hand retract).
<Additional condition>   Describe a WTH conjunction or a WTHIF conjunction.
<Separation Distance>   If this value is designated, the movement will take place from the current position to a
destination position on the tool coordinate axis in the Z-axis direction separated by a designated
amount. When a positive value is set, the movement will take place toward the flange (hand
advance), and when this is a negative value, the movement will take place in the opposite
direction (hand retract).

Explanation

Linear interpolation motion is a type of motion where the robot moves from its current position to the destination position so
that the locus of the control points is in a straight line.
The movement speed is decided by the remote override, the OVRD command and the SPD command. (The JOVRD command has
no effect here.)
When the destination position is outside the motion space of the robot, or when speed is excessive, an error will occur.
The posture becomes an interpolation from the start point to end point.
The movement speed is determined by the relationship between the amount of change in the position and the amount of change

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 406 of 562

in posture. Once the execution has been interrupted and once it restarts after jog operations, it will start moving in relation to
the position where it was interrupted. Note that when restarting with commands that reference the current position, such as
MVS, 100, the movement will be for the remaining distance.

Reference Program

10 MVS P1
20 MVS J1
30 MVS (PLT1,10),-100.0 WTH M_OUT(17)=1
40 MVS P4+P5,-50.0 WTHIF M_IN(18)=1,M_OUT(20)=1
50 MVS ,-50

Reference

Movement Commands, WTH, WTHIF, FINE, CNT, Movement Positions


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
OADL (Optimum Acceleration/Deceleration)

Function:

Sets the optimum acceleration/deceleration time according to the designated robot hand's load state.

Format

OADL <Switch> [, <Standard load> [, <Maximum load>, <Hand No.>]]

Terminology

<Switch>   Describe whether the optimum acceleration/deceleration is ON or OFF.


<Standard Load>   Describe the load for when the hand is open. (Hand weight) Unit: Kg
When omitted, the optimum acceleration/deceleration will be calculated with the load state set in the
hand tip load setting parameter HNDB. (Default value: 2kg)
<Maximum Load>   Describe the load for when the hand is closed.
If omitted, the acceleration/deceleration setting will not change when the hand is opened or closed.
<Hand No.>   Describe the hand No. targeted for the optimal acceleration/deceleration setting.
1 < Hand No. < 3 If omitted, the acceleration/deceleration setting will not change when the hand is opened
or closed.

Explanation

One hand No. can be set in one program.


Confirm the values set for the following parameters before using this command.
GDIR (Mechanical installation direction designation)
The installation direction of the robot is designated. This does not need to be changed when using the standard (floor mounted)
is used.
HNDM (Hand tip load setting)
The hand tip load is designated. This value is used when the <Standard Load> setting is omitted in this command.
HNDG (Hand tip specific gravity setting)
The hand tip specific gravity position is designated with the tool coordinate system.
Refer to your manual for details on changing the setting, and to the parameter list for details on the parameters.
Normally, the standard load is applied when the hand is opened, and the maximum load is applied when closed. However, the
reverse settings can be used by setting the hand setting parameter GCD to reverse open/close.
During the optimum acceleration/deceleration, the acceleration/deceleration time setting command will be invalid even when
executed. (This command has the priority).
Once the optimum acceleration/deceleration starts, it will be valid until the optimum acceleration/deceleration end (OADL 0) is
executed, the program is reset, or the power is turned OFF.

Reference Program

10 OADL 1,2,3,1 'Calculate the optimum acceleration/deceleration for opening/closing hand 1 with a
standard load of 2 Kg and maximum load of 3 Kg.
15 HND 1=1
20 MOV P1
30 MOV P2
35 HND 1=0
40 MOV P3
50 OADL 0 'End optimum acceleration/deceleration.
60 END

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 407 of 562

COSIMIR® · MELFA-BASIC III


 
ON COM GOSUB (On Communication Go Subroutine)

Function:

Defines the starting line for a branching subroutine when there is an interrupt coming from a designated communication line.

Format

ON COM[(<Communication line No.>)] GOSUB <Call destination>

Terminology

<Communication Line No.>   Describe the number 1 or 2.


<Call Destination>   Describe the line No. and label name.

Explanation

If the communication line No. is omitted, the default value of 1 will be used.
If COM (1) and COM (2) are issued simultaneously, COM (1) will have priority.
If a communication interrupt is generated while the robot is moving, the robot will stop. It is possible to use COM STOP to stop
the interrupt, and prevent the robot from stopping.
The relationship between the interrupts regarding the priority level is shown below:
COM > ACT > WTHIF (WTH) > Pulse substitution
To actually validate the interrupt, execute the COM ON command after this command.

Reference Program

10 ON COM(2) GOSUB 1000 'When there is an interrupt on the communication line from
communication line No. 2, carry out the process at line 1000.
20 ON COM GOSUB * RECV 'When there is an interrupt on the communication line from
communication line No. 1, carry out the process at label RECV.

Reference

COM ON, COM OFF, COM STOP, OPEN


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ON GOSUB (On Gosub)

Function:

Calls up a subroutine using a designated value that corresponds to a line No or label.

Format

ON <Expression> GOSUB [<Call destination>] [, [<Call destination>]] ...

Terminology

<Expression>   Designate the line No. that is a given number of lines away or the label to branch to, using a numeric
operation expression.
<Call Destination>   Describe the line No. or the label No.

Explanation

The value of <Expression> determines whether a line No. is called up or a label is called up for a subroutine.
For example, if the value of <Expression> is 2, the second item described is the one called up.
The line No. or the label can be up to one line (up to 127 characters).
When a line No. or label that is called up does not exist, or when there are two definitions, an error will occur.
When the value of <Expression> is a real number, before the branching occurs, the value is converted into an integer by rounding
it off.
When the value is 0, or when it exceeds the number of line Nos. or labels, the control will be transferred to the next line.
When the value is a negative number, or when it exceeds 127, an error will occur during execution.
If the line No. or label refers to an omitted section, an error will occur during execution.
Value of <Expression> Process <Control>
Real number Value is converted to an Integer by
rounding it up for branching

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 408 of 562

When 0, or when the value Control reverts to the next line


exceeds the number of lines or
labels
Negative number or 127 is ERROR
exceeded
Line number or label is omitted ERROR

Reference Program

100 ON MDATA GOSUB 1000, *SUBPR 'When the value of the numeric variable MDATA is 1, go to
line 1000, if it is 2, go to the label, *SUBPR

Reference

RETURN, END, ON GOTO, GOSUB, IF THEN ELSE


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ON GOTO (On go to)

Function:

Branches to the line with the line No. or label that corresponds to a designated value.

Format

ON <Expression> GOTO [<Branch destination>] [, [<Branch destination>]] ...

Terminology

<Expression> Designate the line No. that is a given number of lines away or the label to branch to, using a numeric
operation expression.
<Branch Destination>   Describe the line No. or the label No.

Explanation

The value of <Expression> determines whether a line No. is called up or a label is called up for a subroutine.
For example, if the value of <Expression> is 2, the second item described is the one called up.
The line No. or the label can be up to one line (up to 127 characters).
When a line No. or label that is called up does not exist, or when there are two definitions, an error will occur.
When the value of <Expression> is a real number, before the branching occurs, the value is converted into an integer by rounding
it.
When the value is 0, or when it exceeds the number of line Nos. or labels, the control will be transferred to the next line.
When the value is a negative number, or when it exceeds 127, an error will occur during execution.
If the line No. or label refers to an omitted section, an error will occur during execution.
Value of <Expression> Process <Control>
Real number Value is converted to an Integer by
rounding it up for branching
When 0, or when the value Control reverts to the next line
exceeds the number of lines or
labels
Negative number or 127 is ERROR
exceeded
Line number or label is omitted ERROR

Reference Program

100 ON MDATA GOTO 1000, * SUBPR 'When the value of the numeric variable MDATA is 1, go to
line 1000, if it is 2, go to the label, *SUBPR.

Reference

GOTO, ON GOSUB, IF THEN ELSE


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
OPEN (Open)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 409 of 562

Function:

Opens a file.

Format

OPEN "<File descriptor>" [FOR <Mode>] AS [#] <File No.>

Terminology

<File Descriptor>   Describe a file name (including communication lines).


To open a communication line use "<Filename>:"
When not using a communications line, use "<Filename>"
<Mode>   Designate the method to access a file.
This can be omitted when using a communication line.
Omitted = random mode
Always use this mode when using communication lines.
INPUT = input mode
Inputs from an existing file.
OUTPUT: OUTPUT=output mode (new file)
Creates a new file and outputs it there.
APPEND: APPEND=Output mode (existing file)
Appends output to the end of an existing file.

File Descriptor File name Access method


File Max. 8 characters INPUT, PRINT, APPEND
Communication COM 1:, COM 2:, Omitted = random mode
line file COM 3: only
<File No.>   Describe a definition using 1 to 8.
Use in an INPUT/PRINT statement.

Explanation

Designate the file number, using the numbers 1 to 8 in the quotation marks " " to describe the
file.
A communication line is handled as a file.
When using a communication line, use the table below for the file names: In addition, since
option slot uses channel 2, the internal device numbers are designated below:
Communication Hardware device name Internal device number
file
COM 1 Standard RS-232-C  
COM 2 Standard RS-422  
COM 3 Option slot 1 0: RS-422, 1: RS-232-C
COM 4 Option slot 2 0: RS-422, 1: RS-232-C
COM 5 Option slot 3 0: RS-422, 1: RS-232-C
Examples are shown below on how to use the communication line files of the option slot, and the
internal device numbers.
COM3:0The RS-232-C line of option slot 1.
COM4: The RS-232-C line of option slot 2.
COM5:1The RS-422 line of option slot 3.
To change settings, such as communication speed, change the parameters.
To close, use END or CLOSE.

Reference Program

10 OPEN "COM1: " AS #1


20 INPUT #1,C$
30 PRINT #1,"HELLO"
40 CLOSE
50 END

Reference

INPUT, PRINT, COM ON, COM OFF, COM STOP, ON COM GOSUB
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ORG (Origin)

Function:

The origin is set.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 410 of 562

Format

ORG [<Additional axis No.>]

Terminology

<Additional Axis No.>   Describe 1 or 2 for the additional axis No.

Explanation

If no additional axis No. is designated, the robot will be moved to the evasion point position (P-SAFE) with joint interpolation.
If the additional axis No. is designated, the origin of the target additional axis will be set. Note that if the additional axis is an
absolute value type, the process will not be carried out.

Reference Program

10 ORG 'Move robot arm to evasion point position


20 ORG 1 'Set origin of addition axis 1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
OUT ** (Out)

Function:

Outputs a 1-bit signal to a general-purpose output address.

Format

OUT <General-purpose output address> = <Input/Output signal value> [<Option>]

Terminology

<General-Purpose Output Address>   For a 1-bit signal, use 1 to 80.


Always a space after the end of the OUT command when writing the output
address.
If described as OUT1, it will be a variable name declaration statement.
<Input/Output Signal Value>   For a 1-bit signal, use 1 or 0.
<Option>   DLY  seconds
Continue the changes of a designated signal for a certain period of time, as
designated in the DLY statement. Since the count time will be conducted in
the background, the program will continue to execute the next line and
beyond.

Explanation

A signal is output via the general purpose output port.


Even if the emergency stop is input, or the END statement is executed, or even if the program is reset, the status of the output
signal will not change.
The specifications are the same as for the robot status variable M_OUT (). In addition, the specifications for M_OUTB () and
M_OUTW are as shown below:
* * Command can be used in connection with other commands or stand alone.

Reference Program

10 OUT 10=0
20 OUT 10=1 DLY 3.0

Reference

IN, Robot Status Variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
OVRD (Override)

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 411 of 562

Designates an override that affects the entire program.

Format

OVRD <Designated override>

Terminology

<Designated override> Designate the override with a real number. Unit: [%] (Recommended range: 1 to 100.0) A numeric
operation expression can also be described.

Explanation

The OVRD command is valid regardless of the type of interpolation.


The designated override = remote override x program override (OVRD) x joint override (JOVRD)
or = remote override x program override (OVRD) x Linear designated speed (SPD)
Accordingly, the OVRD command changes only the program override.
100% is considered the robot's maximum ability. Normally, 100% of the system default value (M_NOVRD) is designated.
During the program, the designated override used until the OVRD command is executed, is the system default value. Once the
OVRD command has been executed, the designated override will be used, until the next OVRD command is executed.
If the distance moved is short, the designated override may not be reached.
A value not within the range can be designated for the override, but if the robot ability is exceeded during the execution, an
alarm will occur.

Reference Program

10 OVRD 50
20 MOV P1

  CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus will
change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the peripheral devices,
invalidate CNT or shorten the acceleration/deceleration time.

30 MVS P2
40 OVRD M_NOVRD 'Set the default value

Reference

JOVRD, SPD, Movement commands, Robot status variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
PLT * (Pallet)

Function:

Calculates the position of grid in the pallet.

Format

PLT <Pallet No.> <Numeric operation expression>

Terminology

<Pallet No.> Select a pallet No. between 1 and 8 that has already been defined with a DEF
PLT command.
<Numeric Operation Expression>   Sets the grid No. for the selected pallet.

Explanation

The position of grid of a pallet defined by the DEF PLT statement is operated.
The pallet Nos. are from 1 to 8, and up to 8 can be defined at once.
Note that the position of the grid may vary because of the designated direction in the pallet definition.
If a grid No. is designated that exceeds the largest grid No. defined in the pallet definition statement, an error will occur during
execution.
* Command cannot be executed alone. It has to be used in connection with other commands.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 412 of 562

Reference Program

10 M1=0
20 DEF PLT 1,P10,P11,P12,P13,8,8,1
30 P1=PLT 1,5
40 M1=M1+1
50 MOV (PLT 1,M1),-50

Reference

DEF PLT, Movement Command


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
PRINT# (Print)

Function:

Outputs data into a file (or output device)

Format

PRINT# <File No.> [, [<Expression>;] ... [<Expression> [;]]]

Terminology

<File No.>   Described with numbers 1 to 8.


Corresponds to the control No. assigned by the OPEN command.
<Expression>   Describes numeric operation expressions, position operation expressions and character string expressions.

Explanation

If <Expression> is not described, then a carriage return will be output.


If <File No.> is omitted, the default value of 1 will be used.
Output format of data (reference)
The output space for the value for <Expression> and for the character string is in units of 10 characters. When outputting
multiple values, use a comma between each <Expression> as a delimiter.
If a semicolon (;) is used at the head of each space unit, it will output after the item that was last displayed.
The carriage will always be returned after the PRINT statement.
Example
When described as
10 M1=123.5
20 P1=(350.0,10.0,520.0,177.0,15.0,179.0)(7,0)
1.)
30 PRINT# 1,"OUTPUT TEST",M1,P1 is described,
OUTPUT TEST 123.5 (350.0,10.0,520.0,177.0,15.0,179.0)(7,0) is output.
2.)
30 PRINT# 1,"OUTPUT TEST";M1;P1 is described,
OUTPUT TEST 123.5(350.0,10.0,520.0,177.0,15.0,179.0)(7,0) is output.
If a comma or semicolon is inserted after a <Expression>, the carriage return will not be issued, and instead, printing will
continue on the same line. If not inserted, the carriage return will be output.
3)
30 PRINT# 1,"OUTPUT TEST",
40 PRINT# 1,M1;
50 PRINT# 1,P1 When described as...
OUTPUT TEST
123.5
(130.5,-117.2,55.1,16.2)(1,0) @
...will be output.

Reference Program

10 MDATA=150 'Substitute 150 for the numeric variable MDATA.


10 PRINT# 1,"***PRINT TEST***" 'Outputs the character string "***PRINT TEST****."
20 PRINT# 'Issue a carriage return
30 PRINT# 1,"MDATA=",MDATA 'Output the character string "MDATA" followed by the value of
MDATA, (150).
40 PRINT# 'Issue a carriage return
50 PRINT# 1,"****************" 'Outputs the character string "**************."
60 END 'End the program.

The output result is shown below.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 413 of 562

***PRINT TEST***
MDATA=150
****************

Reference

OPEN, INPUT
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
REM (Remarks)

Function:

Uses the following character strings as comments.

Format

REM [<Comment>]

Terminology

<Comment>   Describe a user-selected character string.


Descriptions can be made in the range of position lines.

Explanation

REM can be abbreviated to be a single quotation mark (') or a slash (/).

Reference Program

10 REM ***MAIN PROGRAM***


20 ' ***MAIN PROGRAM***
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
RETURN (Return)

Function:

When returning from a normal subroutine:

Returns to the next line after the GOSUB.

When returning from an interrupt processing subroutine:

Returns either to the line where the interrupt was generated, or to the next line.

Format

When returning from a normal subroutine:


RETURN
When returning from an interrupt processing subroutine:
RETURN <Return designation No.>

Terminology

<Return Designation No.>   Designate the line where control will return to after an interrupt has been generated and
processed.
0 ... Return control to the line where the interrupt was generated.
1 ... Return control to the next line after the line where the interrupt was issued.

Explanation

Returns control back from a subroutine called up by a GOSUB statement.


(The control structure of the program becomes one level lighter.)
When there is a RETURN command in a normal subroutine with a return-to designation number, and when there is a RETURN
command in an interrupt-processing subroutine with no return-to destination number, an error will occur.
If a RETURN command is executed when no GO SUB command has been executed, an error will occur.
If there is a contradiction of the level within the program's control structure between the GOSUB and RETURN commands, an

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 414 of 562

error will occur upon execution.

Reference Program

100 RETURN
:
200 RETURN 0
:
300 RETURN 1

Reference

GOSUB, ON GOSUB, END


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SKIP ** (Skip)

Function:

Transfers control of the program to the next line.

Format

SKIP

Explanation

This command can be described alone, or be described with other commands using the conjunctions WTH and WTHIF.
If described alone, when the SKIP command is executed, the control will be transferred to the next line.
When described with WTH or with WTHIF, the execution of that line is interrupted, and control is automatically transferred to
the next line. (Restarting is unnecessary).
* * Command can be used in connection with other commands or stand alone.

Reference Program

10 SKIP 'Transfer control to the next line (This is the same


process as for when comments are described.)
20 MOV P1 WTHIF M_IN(17)=0,SKIP 'While moving in joint interpolation to a position
designated by the variable P1, if the input signal (M_IN
(17) ) turns ON, interrupt the robot's interpolation
movements and skip that command.

Reference

STOP, HLT, WTH, WTHIF


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SPD (Speed)

Function:

Designates the speed for the robot's linear and circular movements.

Format

SPD <Designated speed>

Terminology

<Designated Speed>   Designate the speed as a real number. Unit: [mm/s]


(Recommended range: 1 to 650)

Explanation

The SPD command is valid only for the robot's linear and circular movements.
The actual designated override is =O/P override x program override (OVRD) x joint override (JOVRD)
or =O/P override x program override (OVRD) x linear designated speed (SPD)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 415 of 562

Accordingly, the SPD command can change only the linear designated speed.
Normally, the system default value (M_NSPD) for the designated speed is set to 63.3 mm/s.
During a program, the designated speed used in a program before the SPD command is issued, is the system default value. Once
an SPD command has been executed, that designated speed will be used until another SPD command is executed.
If the movement distance is short, the designated speed might not be reached.
The speed can be set to outside the recommended range, but if the robot's ability is exceeded during execution, an alarm will
occur.

  CAUTION

CNT is valid in the default state. If the motion speed, acceleration or deceleration is changed in this state, the robot motion locus will
change, so take care to prevent collisions with the peripheral devices. If the robot might collide with the peripheral devices,
invalidate CNT or shorten the acceleration/deceleration time.

Reference Program

10 SPD 100
20 MVS P1
30 SPD M_NSPD 'Sets the initial value

Reference

ACL, DACL, CNT, OVRD, JOVRD, Movement command, Robot status variable
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
STOP ** (Stop)

Function:

Interrupts the execution of a program and stops the movement of the robot.

Note that background processing will not stop.

Format

STOP

Explanation

The execution is interrupted.


To restart, use O/P restart or send a start signal remotely. (The program will restart execution from the line after the STOP
statement. Note that if the STOP is used with a conjunction, execution will restart from the line where interrupted. )
* * Command can be used in connection with other commands or stand alone.

Reference Program

10 MOV P1
20 STOP
30 MOV P2

Reference

END, HLT, WTH, WTHIF


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Substitute

Function:

The results of an operation are substituted in a variable or array variable.

Format 1

<Variable Name> = <Expression 1>

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 416 of 562

Format 2 (For pulse substitution)

<Variable Name> = <Expression 1> DLY <Expression 2>

Terminology

<Variable Name>   Describe the name of the variable where the value is to be substituted.
(Refer to the syntax diagram for the types of variables.)
<Expression 1>   Substitution value. Describe an arithmetic operation expression.
<Expression 2> Pulse timer. Describe an arithmetic operation expression.

Explanation

When using this additionally for the pulse output, the pulse will be executed in parallel with the execution of the commands on
the following lines.
After the designated time has passed, the state will return to that before the pulse output.
If the END command or program's last line is executed during the designated time, or if the program execution is stopped due to
an emergency stop, etc., the output state will be held. (The output state during the interrupt can be selected with the system
parameters if it is to be return to the state before the pulse output in the same manner as after the designated time has passed.)
The relationship between the interrupts regarding the priority order is shown below.
COM > ACT > WTHIF ( WTH) > Pulse substitution

Reference Program

10 P100=P1+P2 –2
20 M_OUT(17)=1 DLY 10.0

Reference

DLY, Syntax diagram


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SV (Servo)

Function:

Sets the servo ON/OFF and brake ON/OFF state of a designated axis.

Format

SV <Servo status> [, <Axis designation>]

Terminology

<Servo Status>   Describe the servo ON/OFF, brake ON/OFF status.


0: Normal servo OFF state (servo OFF, brake ON)
1: Normal servo ON status (servo ON, brake OFF)
2: Servo free state (servo OFF, brake OFF)
<Axis Designation>   Designate the axis to designate the servo state as a bit pattern.

Explanation

When set to the servo free state, any axis that may drop under its own weight will not enter the servo free state even if so
designated.
Only the roll axis can be designated for the RV-E4N/E4NM/E4NC/E5NJ/34NJM/34NJC.
To set to the normal servo ON/OFF state, a random axis can be set. (Multiple axes can be designated.)
Example:
To set the waist, shoulder and elbow axes to the normal servo OFF state.
SV 1 &B111
If a normal servo ON axis exists, the movement command can be executed.
Note that in this case, the servo ON output signal SVA will be output.
If an interpolation command is executed in the servo free state or single axis servo OFF state, the servo free completion
operation will be required. If the servo is turned ON for all axes before the servo free completion operation, the speed over
alarm or excessive error alarm may occur. To carry out the servo free completion operation, execute SV 0, and then turn the
servo OFF for all axes.

  CAUTION

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 417 of 562

If an interrupt is applied during interpolation in the servo free state or servo OFF (excluding all axes) state, use the servo ON
operation (operation from controller, teaching box or external input signal, etc.). If the servo is turned ON, the axis (R axis) that
was in the free state may suddenly move to the teaching point or an alarm could occur.

When interrupted, always turn the servo OFF for all axes once, reset the program and retract the robot with jog feed.

Reference Program

10 MOV P1 'Move to P1
20 SV 2,&B100000 'Set roll axis in servo free state
30 MVSP1,-20 'Advance hand 20 mm from P1
40 SV 0,&B100000 'Set roll axis in normal servo ON state. (CAUTION *1)
50 MVSP1 'Return to P1
60 END

*1) The roll axis is in the servo free state, so the interpolation will end before the P1 position is reached (roll axis). The joint data
(roll axis) displayed on the T/B will differ from the actual robot position until the servo free completion operation (all axes servo
OFF) is carried out. ***** will display for all Cartesian data. This also applies if interpolation is carried out during single axis servo
OFF.
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
TOOL (Tool)

Function:

Designates the tool conversion data.

Format

TOOL <Tool conversion data>

Explanation

The tool conversion data can be changed only by the execution of the tool command.
Until a TOOL command is executed, the system's default value (P_NTOOL) will be used.
Once a TOOL command has been issued, the designated tool conversion data will be used until the next TOOL command is
executed.
Only the Z axis can be changed for the 5-axis robot. Input "0" for the other axes.

  CAUTION

Always input the setting value accurately when changing the tool data.

  CAUTION

If the original teaching point is moved to after the tool data is changed, the robot motion posture will change, so take care to
prevent interference with the periphery.

  CAUTION

Even if the tool conversion data is accurately input, the required accuracy may not be achieved due to the actual dimension
accuracy and installation posture accuracy, etc.

  CAUTION

When using the 5-axis robot, always describe "0" for the values other than the Z axis. If other settings are made, vibration may
occur or an alarm may occur.

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 418 of 562

10 TOOL P1
20 MVS P1
30 TOOL P_NTOOL

Reference

BASE, Robot Status Variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
WHILE WEND (While End)

Function:

The program between the WHILE statement and WEND statement is repeated until the loop conditions are satisfied.

Format

WHILE<Loop condition>
.
.
WEND

Terminology

<Loop Condition>   Describe a numeric operation expression. (Refer to the syntax diagram)

Explanation

The program between the WHILE statement and WEND statement is repeated.
If the result of <Expression> is true (not 0), then the control moves to the line following the WHILE statement and the process is
repeated.
If the result of <Expression> is false (is 0), then the control moves to the line following the WEND statement.
Flow of WHILE~WEND control
Correspondence of WHILE statement and WEND statement
The WHILE statement and WEND statement must always correspond.
If a WEND statement that does not correspond to the WHILE statement is executed, an error may occur. If an END statement is
executed during WHILE~WEND, or if the program's last line is executed, the program execution will end at that line.
Program depth
The WHILE~WEND control has a function to deepen the program control structure.
A separate WHILE~WEND or FOR~NEXT statement can be described between the WHILE statement and WEND statement.
A set of WHILE~WEND will deepen the program control structure by one level.
In this system, the program control structure can be as deep as 16 levels. If 16 levels are exceeded, an error will occur.

Reference Program

20 WHILE (MDATA>=-5) AND (MDATA<=5) 'Repeat the process while the numeric variable
MDATA value is between -5 and +5, and when the
range is exceeded, move the control to the line
after the WEND statement.
30 MDATA=-(MDATA+1) 'Add 1 to MDATA and reverse the sign
40 PRINT# 1, MDATA 'Output the MDATA value
50 WEND 'Return to the WHILE statement (line 20)
60 END 'End the program
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
WTH * (With)

Function:

A process is unconditionally added to the interpolation motion.

Format

WTH <Process>

Terminology

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 419 of 562

<Process>   Describe the added process. The commands that can be described are as follow.
<Numeric type data B>  [Substitute, signal modifier command (refer to syntax diagram)]
<Substitution operator>   AHLT statement
<Numeric type data A>   BSTOP statement
CSKIP statement
DHND statement
EOUT statement

Explanation

This command can only be used to describe the additional command for the movement command.
An error will occur if the WTH command is used alone.
The process will be executed simultaneously with the start of motion.
The relationship between the interrupts regarding the priority order is shown below.
COM > ACT > WTHIF ( WTH) > Pulse substitution
* Command cannot be executed alone. It has to be used in connection with other commands.

Reference Program

10 MOV P1 WTH M_OUT(17)=1 DLY M1+2


20 MOV P2 WTH M_HND(1)=0

Reference

Movement Command, WTHIF, Substitute, Syntax Diagram


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
WTHIF * (With If)

Function:

A process is conditionally added to the interpolation motion.

Format

WTHIF <Additional command>, <Process>

Terminology

<Additional Command>   Describe the condition for adding the process. (Same as ACT condition expression)
<Process>   Describe the process to be added with the additional conditions are established. (Same as WTH)
The commands that can be described as a process are as follow. (Refer to syntax diagram.)
<Numeric type data B> [Substitute, signal modifier command (refer to syntax diagram)]
<Substitution operator> HLT statement
<Numeric type data A> STOP statement
SKIP statement
HND statement
OUT statement

Explanation

This command can only be used to describe the additional command with conditions for the movement command.
An error will occur if the WTHIF command is used alone.
The condition monitor will be start simultaneously with the start of motion.
The condition monitor will be processed in the background.
The relationship between the interrupts regarding the priority order is shown below.
COM > ACT > WTHIF ( WTH) > Pulse substitution
* Command cannot be executed alone. It has to be used in connection with other commands.

Reference Program

10 MOV P1 WTHIF M_IN(17)=1,HLT


20 MVS P2 WTHIF M_RSPD>200,M_OUT(17)=1 DLY M1+2

Reference

Movement Command, WTH, Substitute, Syntax Diagram

Substitute
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 420 of 562

COSIMIR® · MELFA-BASIC III


 
Introduction on SLIM
The outline of the "Industrial Robot Program Language SLIM (JISB8439-1992)" will be described in this section. (Reference: Industrial
Robot Language "SLIM", Japan Industrial Standards Committee.)

SLIM (Standard Language for Industrial Manipulators" is a robot language created over ten years by university personnel and
engineers who create and use the robot language on the front lines. These persons met in June 1994 at the Japan Robot Committee,
Japan Industrial Robot Engineering Meeting to create this language. SLIM was created based on the programming language BASIC
used in commonly for personal computers. As this is an expanded version of the language, there are motion control statements and
input/output control statements characteristic to the robot. Refer to JIS B 8439-1992 for details on each command.
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SLIM position and motion control commands

These commands are concerned with the definition of positions and coordinates as well as the assignment of interpolation, speed,
timer, tool, palette, etc.

Command Function
ACCEL (Accelerate)
DELAY (Delay)
DRIVE (Drive)
GOHOME (Go Home)
JSPEED (J Speed)
MOVE (Move)
SPEED (Speed)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SLIM program control commands

These commands are concerned with conditional branching, repetitive operation, interrupting of signals, starting and stopping,
counter operation, etc.

Command Function
HALT (Halt)
HOLD (Hold)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SLIM hand control commands

These commands are concerned with opening/closing action of the hand.

Command Function
CHANGE (Change)
GRASP (Grasp)
HAND (Hand)
RELEASE (Release)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SLIM I/O control commands

These commands are concerned with input/output control of external I/O. Both single and parallel bits can be handled enabling the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 421 of 562

logical operation in the internal register.

Command Function
DEFIO (Define I/O)
IN (Input)
IOBLOCK (I/O Block)
OUT (Output)
RESET (Reset)
SET (Set)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Other commands in SLIM

These commands are concerned with setting of parameters, selecting of programs, resetting of alarms, and describing of comments.

Command Function
DEFINT (Define Integer)
DEFJNT (Define Joint)
DEFPOS (Define Position)
INPUT (Input)
PRINT (Print)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Alphabetical overview of SLIM commands
Command Function
ACCEL (Accelerate)
CHANGE (Change)
DEFINT (Define Integer)
DEFIO (Define I/O)
DEFJNT (Define Joint)
DEFPOS (Define Position)
DELAY (Delay)
DRIVE (Drive)
GOHOME (Go Home)
GRASP (Grasp)
HALT (Halt)
HAND (Hand)
HOLD (Hold)
IN (Input)
INPUT (Input)
IOBLOCK (I/O Block)
JSPEED (J Speed)
MOVE (Move)
OUT (Output)
PRINT (Print)
RELEASE (Release)
RESET (Reset)
SET (Set)
SPEED (Speed)
WAIT (Wait)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
ACCEL (Accelerate)

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 422 of 562

Designates the acceleration and deceleration speeds.

Format

ACCEL <Acceleration> [, <Deceleration>]

Terminology

<Acceleration> <Deceleration>   Designate the acceleration/deceleration command time. Unit: [msec]


(Recommended range: 50 to 2000).

Explanation

The minimum acceleration setting unit is 1 msec.


The default acceleration/deceleration speed is 200 msec respectively when the power is turned ON.
Once the acceleration/deceleration is set, it is valid until it is set again.
The acceleration/deceleration is the time used to reach the maximum speed during linear interpolation, and refers to the
acceleration when starting.
Thus, if the movement speed does not reach the maximum speed, the actual acceleration/deceleration time will be shorter than
the set value.
The acceleration and deceleration distance required for movement is predetermined according to the acceleration/deceleration
setting. Thus, if the movement distance is short, the set speed may not be reached.
If the acceleration/deceleration speed is less than 200 msec, a speed over alarm or overload alarm may occur. The life of the
mechanical parts may also be shortened due to the load conditions, so keep the setting within the recommended range and
above 200 msec.

  CAUTION

If the robot is stopped during movement and a value larger than the recommended range is set for the deceleration time, the
robot may not stop immediately when the stop operation (operation from controller, teaching box or external signal, etc.) is
executed. In this case, set the deceleration time to a shorter setting, or press the [Emergency Stop] switch.

Reference Program

10 ACCEL 400,400 'Set both the acceleration and deceleration times to 0.4 sec.

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
CHANGE (Change)

Function:

Declares to change the hand to that indicated with the hand variable name.

Format

CHANGE <Hand variable name>

Terminology

<Hand Variable Name>   Designate the hand variable name declared with the HAND statement.

Explanation

This command is used to notify that the hand has been changed, and is not a command that automatically changes the hand. To automatically
change the hand, a subroutine continuing inputs and outputs must be created.

Reference Program

10 HAND HANDW = 2 'Declare hand 2 as hand variable HANDW (Hand 1 is used as the
standard.)
100 CHANGE HANDW 'Change the hand used to HANDW (hand 2)

Reference

HAND, RELEASE, GRASP

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 423 of 562

COSIMIR® · MELFA-BASIC III


 
DEFINT (Define Integer)

Function:

Declares the arithmetic variable.

Format

DEFINT <Arithmetic variable name> [, <Arithmetic variable name>] ...

Terminology

<Arithmetic Variable Name>   Designate the variable name.


(Refer to section "3.2.1.9 Variables (2) Arithmetic variables".)

Explanation

Up to 8 characters can be used in the variable name. Refer to your manual for the characters that can be used.
When designating multiple variable names, the maximum number of characters that can be set on one line (123 characters
including the command) can be set.
The declared variable will follow the rules given in your manual.
The declared variable can be used in the same manner as the M variables.
The variable will be reset to 0 when the program is reset.
This is a MELFA-BASIC III additional command.

Reference Program

10 DEFINT WORK 'Declare WORK as the arithmetic variable name


20 WORK = 100 'Substitute 100 in WORK
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DEFIO (Define I/O)

Function:

Declare the I/O variable.

Format

DEFIO <I/O variable name> = <Type designation>, <Input/Output bit No.> [, <Mask information>]

Terminology

<I/O Variable Name>   Designate the variable name.


<Type Designation>   Designate BIT, BYTE, WORD or INTEGER.
<Input/Output Bit No.>   Designate the input or output bit No.
<Mask Information>   Designate this item when only a specific signal is to be validated.

Explanation

Up to 8 characters can be used in the variable name. Refer to your manual for the characters that can be used.
When the mask information is designated, only a specific signal will be validated.

Statement example:

At the 20th line, mask processing is carried out with hexadecimal 0F, so Nos. 107 to 110 are valid and Nos. 111 to 114 are invalid.

InvalidValid

00001111

114 No. 107 (Input/output bit No.)

Reference Program

10 DEFIO PORT1 = BIT,0 'Assign the BIT type I/O variable declaration input/output
bit No. 0 to PORT 1.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 424 of 562

20 DEFIO PORT2 = BYTE,107,&H0F 'Assign the BIT type I/O variable declaration input/output
bit No. 107 to PORT 2. Designate the mask information as
hexadecimal 0F.

Reference

SET, RESET
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DEFJNT (Define Joint)

Function:

Declare a joint variable.

Format

DEFJNT <Joint variable name> [, <Joint variable name>] ...

Terminology

<Joint Variable Name>   Designate the variable name. (Refer to section "3.2.1.9 Variables (5) Joint variables".)

Explanation

Up to 8 characters can be used in the variable name. Refer to your manual for the characters that can be used.
When designating multiple variable names, the maximum number of characters that can be set on one line (123 characters
including the command) can be set.
The declared variable will follow the rules given in your manual.
The declared variable can be used in the same manner as the J variables.
This is a MELFA-BASIC III additional command.

Reference Program

10 DEFJNT SAFE 'Declare SAFE as the joint variable


20 MOV SAFE 'Move to SAFE
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DEFPOS (Define Position)

Function:

Declare a position variable.

Format

DEFPOS <Position variable name> [, <Position variable name>] ...

Terminology

<Position Variable Name>   Designate the variable name. (Refer to section "3.2.1.9 Variables (4) Position variables".)

Explanation

Up to 8 characters can be used in the variable name. Refer to your manual for the characters that can be used.
When designating multiple variable names, the maximum number of characters that can be set on one line (123 characters
including the command) can be set.
The declared variable will follow the rules given in your manual.
The declared variable can be used in the same manner as the P variables.

Reference Program

10 DEFPOS WORKSET 'Declare WORKSET as the position variable


20 MOV WORKSET 'Move to WORKSET
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 425 of 562

COSIMIR® · MELFA-BASIC III


 
DELAY (Delay)

Function:

Execution of the program is delayed for the designated time.

Format

DELAY <Wait time>

Terminology

<Wait Time> Unit: [msec]

Explanation

This command is used to wait for the designated time to pass so as to time the input and output. This is the same function as the
MELFA-BASIC III DLY command. Note that the unit is different. (DLY unit: [sec].)

Reference Program

100 OUT IO1 = 1 'Output 1 to I/O variable IO1


110 DELAY 500 'Wait 0.4 sec. (For example, the time for the peripheral device to start moving,
etc.)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
DRIVE (Drive)

Function:

Each axis is directly controlled.

Format

DRIVE (<Axis No.>, <Rotation angle or translation amount>) [, (<Axis No.>, <Rotation angle or translation amount>)] ...

Terminology

<Axis No.> Designate the No. of the axis to be controlled.


<Rotation Angle or Translation Amount>   Designate the control amount.
Rotation amount for rotary axis. (Unit is radians.)
Translation amount of translation axis. (Unit is mm.)

Explanation

When using a rotary axis, designate the No. of the axis to be rotated, and designate the rotation angle value in a pair of
parentheses.
When using a translation axis that carries out translational movement, designate the translation amount.
The axis designation order is random. Designate only the required axes. This is the same as the Movemaster command DJ.

Reference Program

100 DRIVE (5,10DEG),(3,10DEG) 'Rotate axis 3 and axis 5 by 10 degrees each


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
GOHOME (Go Home)

Function:

The robot is moved from the current position to the home position.

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 426 of 562

GOHOME

Explanation

The robot will move with joint interpolation to the user-designated origin. This is the same as the Movemaster command OG.

Reference Program

10 MOVE P,P1
:
100 *RESET
110 GOHOME
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
GRASP (Grasp)

Function:

Designate to close the hand.

Format

GRASP [<Hand variable name>]

Terminology

<Hand Variable Name>   Designate the hand variable name declared with the HAND statement.

Explanation

If the hand variable name is omitted, hand 1 will be closed.

Reference Program

10 HAND WHAND = 1 'Declare hand 1 as the hand variable WHAND.


:
100 GRASP WHAND 'Close WHAND

Reference

HAND, RELEASE, CHANGE


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HALT (Halt)

Function:

The program execution is halted.

Format

HALT [<Expression>]

Terminology

<Expression>  Describe the expression or character string to be output to the console.

 Explanation

The console here refers to the RS-232-C channel on the front of the controller.
This is the same as the MELFA-BASIC II END command.

Reference Program

100 HALT
200 HALT "END OF ASSEMBLED" 'Output the cause of the halt as a character string

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 427 of 562

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HAND (Hand)

Function:

Declare the hand variable.

Format

HAND <Hand variable name> = <Hand No.>

Terminology

<Hand Variable Name>   Designate the variable name.


<Hand No.> Set 1 for hand 1 and 2 for hand 2.

Explanation

Up to 8 characters can be used in the variable name. Refer to section "3.2.1.5 Types of characters" for the characters that can be
used.)

Reference Program

10 HAND WHAND = 1 'Declare hand 1 as hand variable WHAND


100 RELEASE WHAND 'Open WHAND

Reference

RELEASE, GRASP, CHANGE


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
HOLD (Hold)

Function:

Temporarily stop the program execution.

Format

HOLD [<Expression>]

Terminology

<Expression> Describe the expression or character string to be output to the console.

Explanation

When restarted, the program will be executed from the statement following HOLD.
The console here refers to the RS-232-C channel on the front of the controller. This is the same as the MELFA-BASIC III HLT
command.

Reference Program

100 HOLD 4*IO2+2*IO1+IO0 'Operate the I/O variable value and output
200 HOLD "STOP BY ASSEMBLE ERROR!" 'Output the cause of the stop as a character
string
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
IN (Input)

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 428 of 562

Input the data from the port address designated with the I/O variable name.

Format

IN <Arithmetic variable> = <I/O variable>

Terminology

<Arithmetic Variable>     Designate the variable name declared with the DEFINT command.
<I/O Variable> Designate the variable name declared with the DEFIO command.

Explanation

The I/O variable cannot be used in a relational expression, so substitute the value once in an arithmetic variable, and then use
that arithmetic variable in the relational expression such as the IF statement.

Reference Program

10 DEFIO LIMITSW1 = BIT,&H0FF4 'Declare the I/O variable LIMITSW1


20 DEFINT ILSW1 'Declare the arithmetic variable ILSW1
100 IN ILSW1 = LIMITSW1 'Read the I/O variable LIMITSW1 value from the external
source, and substitute in the arithmetic variable ILSW1
110 IF ILSW1 = 0 THEN GOTO 200 'Conditionally branch according to the arithmetic variable
ILSW1 value

Reference

DEFIO

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
INPUT (Input)

Function:

Data is input from the console.

Format

INPUT <Arithmetic variable> [, <Arithmetic variable>] ...


<Character string variable> [, <Character string variable>] ...
<Position variable> [, <Position variable>] ...
<Position variable with No.>[, <Position variable with No.>] ...

Terminology

<Arithmetic Variable> Designate the declared arithmetic variable.


Input the value from the console.

 
<Character String Variable>    Designate the character string variable.
Input the character string from the console.
(The double quotations are not required.)
<Position Variable> <Position Variable with Number> Designate the declared position variable.
Input the variable according to the following format from the console. Refer to section
"3.2.1.9 Variables (4) Position Variables" for the meaning of the format.
(X, Y, Z, A, B, C) (FL1, FL2)

Explanation

When designating multiple variable names, the maximum number of characters that can be set on one line (127 characters
including the command) can be set.
The data is input to the designated variable from an external source while the program is being executed. In this case, the
console is the RS-232-C on the front of the controller.
When the INPUT statement is executed, the program will wait for an input from the console. When the data is input, the program
will execute the next line.
When multiple variables are designated and the No. of input data items does not satisfy the No. of variables, the program will
request an input after the INPUT statement.
When multiple variables are designated, use a comma (,) between the input data as a delimiter.

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 429 of 562

10 DEFPOS WORKSET 'Declare WORKSET as the position variable


100 INPUT WORKSET 'Input the position data from the console to WORKSET
110 MOVE P,WORKSET 'Move to WORKSET
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
IOBLOCK (I/O Block)

Function:

While the robot is executing a movement command in the range enclosed by IOBLOCK ON and IOBLOCK OFF, the multiple I/O
commands that follow the movement command will be executed in parallel.

Format

IOBLOCK ON
.
.
IOBLOCK OFF

Explanation

The movement motion and I/O process can be executed in parallel or simultaneously.
In the range enclosed by the IOBLOCK ON/OFF, parallel execution of the I/O process will be repeated at each MOVE statement.
(Refer to the [Reference Program].)
Nesting has no meaning with this command.

Reference Program

100 IOBLOCK ON 'Validate I/O parallel execution


110 MOVE P,P001 'Output 1 to IO1 and IO2 while moving to P001
120 SET IO1
130 SET IO2
140 MOVE P,P002 'After moving to P001, output 0 to IO2 while moving to P002
150 RESET IO2
160 '************ '(Parallel execution is cut off at this line)
170 SET IO3 'After moving to P002, output 1 to IO3
180 IOBLOCK OFF 'Invalidate the I/O parallel execution
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
JSPEED (J Speed)

Function:

Designates the axis motion speed.

Format

JSPEED <Designated override>

Terminology

<Designated Override>   Describe with a numeric operation expression. Unit: [%]


(Recommended range: 1 to 100.0)

Explanation

Designate the speed (percentage in respect to maximum speed) to be applied when moving with an axis unit using the DRIVE
statement.
This command cannot be designated to an axis unit.
Once this command is designated, the value is valid until designated again.
The designated override can be set to outside the recommended range, but if the robot's ability is exceeded during execution, an
alarm will occur.
The syntax meaning is the same as MELFA-BASIC III JOVRD.

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 430 of 562

10 JSPEED 100 'Designate the axis motion speed to 100%


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
MOVE (Move)

Function:

The robot is moved from the current position to the position indicated with <Position>

Format

MOVE <Interpolation designation>, [@ [<Positioning accuracy>]] <Position>


[, [@ [<Positioning accuracy>]] <Position>] ...
[, <Motion option>] ...
[, <Continue option>] ...

Terminology

<Interpolation Designation>   L: Linear interpolation, C: Circular interpolation, P: Joint interpolation (PTP interpolation)
<Positioning Accuracy> 1 * Positioning accuracy (class) * 10000
<Position> For cartesian, the unit is [mm/s], for joint, the unit is [%].
HAND = 1: Open, 0: Close (Valid for the currently selected hand.)
TIME = Unit [sec.]
* The motion option can be abbreviated.
SPEED: S, HAND: H, TIME: T
When called from the controller, this will be displayed in the abbreviated state
<Continue Option> CONT

Explanation

Positioning accuracy:
This assures that the tool tip (control point) enters the sphere created using the position as the center at the designated
accuracy.
The larger the value after @ is, the higher the accuracy will be. If @ is not described, the highest positioning accuracy will be
applied. If only @ is described, the roughest positioning accuracy will be applied. A variable cannot be used.
The positioning accuracy (class) used in this system is defined as shown below. (The default value is class 1.) Refer to the
explanation on the PW command in Chapter 3 Explanation of Commands in the Reference Manual for details on the positioning
pulse.
Positioning accuracy Positioning pulse
Class 1 10000 (Default value)
- -
Class 5000 5000
- -
Class 10000 1
 
Motion option SPEED (movement speed):
This command is used to change the speed, and is valid only in this MOVE statement. In this case, the value designated with the
SPEED statement will be invalid. For example, this is used only when the part pick up operation is to be carried out slowly.
Motion option HAND (Hand operation):
This is used when the hand is to be opened or closed during movement. The hand can be opened during movement and the work
piece grasped immediately after positioning, allowing the time to be reduced.
Motion operation TIME (Movement time):
The time to move to the target position is designated. If the designated time exceeds the robot's maximum speed, the designated
time will be ignored, and the robot will move at the maximum speed.
Continue option CONT:
This is used to continue and execute the next MOVE statement without stopping at the target position even when this MOVE
statement is completed. Thus, the MOVE statement used for CONT must always be a MOVE statement.

Reference Program

10 MOVE L,*+(0,0,45.6) 'Move 45.6 mm in Z direction from current position with linear
interpolation
20 MOVE L,P1,P2,P3 'Move in the order of P1 to P3 from current position with linear
interpolation
30 MOVE C,P1,P2 'Move over a circle that connects the current position, P1 and P2
40 MOVE L,@5P001 'The positioning accuracy at the position P001 is class 5
50 MOVE L,P001,SPEED = 100 'Move at a speed of 100 mm/s to position P001 with linear
interpolation (50 MOVE L,P001,S = 100)
60 MOVE L,P001,HAND = 0 'Open the hand while moving to position P001 with linear
interpolation
70 MOVE L,P001,TIME = 3 'Move to position P001 with linear interpolation in three seconds

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 431 of 562

100 MOVE C,P1,P2,CONT 'Use the CONT operation and designate not to stop at the break in
the circular interpolation
110 MOVE C,P3,P4,CONT
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
OUT (Output)

Function:

Output the data to the port address designated with the I/O variable name.

Format

OUT <I/O variable> = <Arithmetic variable>

Terminology

<I/O Variable> Designate the variable name declared with the DEFIO command
<Arithmetic Variable>    Refer to section "3.2.14 Expressions and Variables"

Explanation

The syntax meaning is the same as the IN command

Reference Program

10 DEFIO OPORT = BYTE 'Declare OPORT as a BYTE type I/O variable


100 OUT OPORT = 1 'Output 1 to the I/O variable OPORT
110 OUT OPORT = WORK+10 'Output a value obtained by adding 10 to the arithmetic variable
WORK to the I/O variable OPORT

Reference

DEFIO
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
PRINT (Print)

Function:

Output the data to the console. ";" and "." can be used as print delimiters.

Format

PRINT <Expression> [, <Expression>] ...


<Expression> [; <Expression>] ...

Terminology

<Expression> Designate an arithmetic expression, character string or variable


<Print Delimiter>   "," (comma) Data is output with an interval between the expressions
";" (semicolon) The expressions are continuously output

Explanation

The designated expression is output to an external source while the program is being executed. In this case, the console is the
RS-232-C on the front of the controller.
When an arithmetic expression is designated, the operated results will be output.
When a variable name is designated, the variable value will be output.
Designate the character string in " (double quotations). Refer to the [Reference Program].
The carriage will always be returned at the end of the PRINT statement.

Reference Program

100 PRINT 2*IO1+IO0 'Operate the I/O variable value and output the results
200 PRINT "WORK=";WK 'Output the variable WK value after the character string WORK

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 432 of 562

300 PRINT P001 'Output the position variable P001 data

The output results will be as shown below.


2
WORK=10
(100,100,50,0,0,0)(0,0)
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
RELEASE (Release)

Function:

Designates to open the hand.

Format

RELEASE [<Hand variable name>]

Terminology

<Hand Variable Name>   Designate the hand variable name declared with the HAND statement

Explanation

If the hand variable name is omitted, hand 1 will be opened

Reference Program

10 HAND WHAND = 1 'Declare hand 1 as the hand variable WHAND


:
100 RELEASE WHAND 'Open WHAND

Reference

HAND, GRASP, CHANGE


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
RESET (Reset)

Function:

The BIT type I/O variable bit output is set to 0.

Format

RESET <I/O variable>

Terminology

<I/O Variable>   Designate the variable name declared with the DEFIO command. When ALL is designated, the outputs of all BIT type
I/O variables will be set to 0

Explanation

The syntax meaning is the same as the SET command

Reference Program

10 DEFIO IO1 = BIT,1 'Declare the I/O variable IO1 as the input/output No. 1 BIT type
20 DEFIO IO2 = BIT,2 'Declare the I/O variable IO2 as the input/output No. 1 BIT type
:
100 RESET IO1 'Output 0 to the I/O variable IO1
110 RESET ALL 'Simultaneously set I/O variables I01 and IO2 to 0

Reference

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 433 of 562

DEFIO, SET
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SET (Set)

Function:

The BIT type I/O variable bit output is set to 1.

Format

SET <I/O variable> [, <Pulse output time>]

Terminology

<I/O Variable> Designate the variable name declared with the DEFIO command. When ALL is designated, the outputs
of all BIT type I/O variables will be set to 1
<Pulse Output Time>   Designate the pulse output time. Unit: [ms]

Explanation

This is used to output a bit type such as an interlock.


For the pulse type output, designate a pulse output time. In this case, the data will be output only during the designated time.
If all parts defined with the BIT type I/O variable are to be set to 1 such as when initializing the system, set ALL for the <I/O
Variable>. Note that ALL can be used only for the BIT type I/O variables.

Reference Program

10 DEFIO IO1 = BIT,1 'Declare the I/O variable IO1 as the input/output No. 1 BIT type
20 DEFIO IO2 = BIT,2 'Declare the I/O variable IO2 as the input/output No. 1 BIT type
:
100 SET IO1 'Output 1 to the I/O variable IO1
110 SET IO2,10 'Output pulse 1 for 10 ms to the I/O variable IO2
120 SET ALL 'Simultaneously set I/O variables I01 and IO2 to 1

Reference

DEFIO, RESET
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
SPEED (Speed)

Function:

Designate the movement seed of the robot tip.

Format

SPEED <Designated speed>

Terminology

<Designated Speed>    Describe a numeric operation expression. Unit: [mm/s] (Recommended range: 1 to 650)

Explanation

The syntax meaning is the same as the MELFA-BASIC III SPD command.
Once this command is designated, it will be valid until designated again.
The designated speed can be set to outside the recommended range, but if the robot's ability is exceeded during execution, an
alarm will occur.

Reference Program

10 SPEED 100 'Designate movement speed to 100 mm/s


20 MOVE P,P1 'Move to P1 with above speed
30 SPEED M_NSPD
'Designate movement speed to system default value (M_NSPD) With the system

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 434 of 562

default value (M_NSPD), the maximum value within the robot's ability will be
set
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
WAIT (Wait)

Function:

The I/O port coupled to the I/O variable is monitored, and execution of the program is delayed until the relational expression is
established.

Format

WAIT <Relational expression> [, <Timeout time>]

Terminology

<Timeout Time>   Unit: [msec]

Explanation

This command will wait until the relational expression is satisfied. A timeout time is set to prevent unlimited stopping.
When a timeout time is designated, this command will not interpret whether the delay time was stopped due to the satisfaction
of the relational expression or whether it was stopped due to the timeout. In this case, use a procedure as shown in the
[Reference Program].

Reference Program

10 DEFIO PORT3 = BYTE,1 'Declare PORT 3 as the input/output No. 1


BYTE type I/O variable
50 WAIT PORT3 = 2 'Wait for PORT 3 to reach 2
100 WAIT PORT3 = 2,60 'Wait 60 seconds for PORT 3 to reach 2
110 IN SW2 = PORT3 'Substitute the PORT 3 value in the
arithmetic variable SW2
120 IF SW2 = 2 THEN *ZOKOO ELSE *TIMEOUT 'If the SW2 value is 2, determine that it is
correct, and jump to next line. If not,
determine that it is an error, and jump to
line 300
130 *ZOKOO 'Continue the execution
300 *TIMEOUT 'Stop the execution
310 HOLD
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC III


 
Overview of the Parameters for the RV-EN series
Parameter Para- Array Contents Default value Remarks

meter name No.


Tool XTL 6 real Sets initial value of 0.0,0.0,123.0,  
coordinates No. tool coordinate
system (X, Y, Z, A, 0.0,0.0,0.0
B, C). Only Z
coordinate is
changeable for 5-
axis robot.

Unit: mm, mm,


mm, deg, deg, deg
Base XBS 6 real Sets initial value of 0.0, 0.0, 0.0,  
coordinates No. base coordinate
system (X, Y, Z, A, 0.0, 0.0, 0.0
B, C). Only X, Y, Z
coordinates are
changeable for 5-
axis robot.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 435 of 562

Unit: mm, mm,


mm, deg, deg, deg
Perpendicular PAR 6 real Sets overrun limits -10000,10000, Default
area limit No. of XYZ coordinate setting
system for minus -10000,10000, does not
and plus direction exceed the
(-X, +X, -Y, -10000,10000 limit.
Joint area limit JAR 12 real Sets overrun limits For 6 axis  
No. of each joint robot:
coordinate system
for minus and plus -160.0, 160.0,
direction (-J1, +J1,
-J2, +J2, -J3, +J3, - -45, 135.00,
J4, +J4, -J5, +J5, -
J6, +J6) 0.0, 135.00,

Unit: deg. -160.0, 160.0,

-120.0, 120.0,

-200.0, 200.0

For 5-axis
robot:

-160.0, 160.0,

-45, 135.00,

50.0, 170.00,

-160.0, 160.0,

-120.0, 120.0,

-200.0, 200.0
User-defined UAR 6 real Defines the area 1.0, 0.0, 1.0, Default
area No. where the robot 0.0, 1.0, 0.0 setting is
outputs a signal. out of the
setting
area
Used language RLNG 1 The language to be 1  
integer used is selected.

0: Movemaster
command (teaching
playback)

1: MELFA-BASIC III
Automatic ATP 1 string Sets program name " " (No  
program to be executed setting)
execution automatically when
powered on.
Continue CTN 1 Sets whether the 0  
Function integer robot continues to
run from the last
execution
environment when
powered on.
(Execution step,
Program inner
variable, I/O
status, etc.)

0: Disable, 1:
Enable
ON/OFF of BZR 1 Sets ON/OFF of 1  
buzzer integer buzzer sound.

0: OFF, 1: ON
Automatic SPI 1 Sets initial level of 12  
operation integer automatic
speed operation speed.

(Value of
Movemaster
command SP
command.)
External EOV 2 real Sets initial override 100.0, 100.0  

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 436 of 562

override No. of automatic


operation.

(External override,
Program override)

Unit: %
Jog speed JGJ 3 real Sets jog and step 0.1, 1.0, 13.0  
control No. operation speed for
joint interpolation
mode.

(Inching, low
speed, high speed)

Unit: deg, %, %
Jog speed JGP 3 real Sets jog and step 0.1, 1.5,  
control No. operation speed for 100.0
linear and circular
interpolation mode.

(Inching, low
speed, high speed)

Unit: mm, mm/s,


mm/s
Jog mode JMOD 1 The jog mode to be 0  
integer applied when the
power is turned ON
is designated.

0: Joint, 1:
Cartesian, 2: Tool
Continuous CNT 1 real Sets whether robot 0  
motion control No. accelerates and
decelerates at
taught position
when moving.

0: Disable, 1:
Enable
Accel. and ADL 2 real Sets acceleration 0.2, 0.2  
decel. Period No. and deceleration
periods for
reaching to
maximum speed.

Unit: seconds
Delay time TSR 1 real Sets first-order 20.0  
constant No. delay time
constant.

Unit: milliseconds
Pulse width PWI 1 real Sets accuracy of 10000  
No. positioning.

Unit: pulse
Grip control GCD 1 Sets the hand 0, 1, 0, 1, 0, See
integer open/close normal 1, 0, 1 commands
reverse status. GC, GO

The 1st hand


normal/reverse,
the 1st hand initial
condition, the 2nd
hand
normal/reverse,
the 2nd hand initial
condition, the 3rd
hand
normal/reverse,
the 3rd hand initial
condition, the 4th
hand
normal/reverse,
the 4th hand initial
condition.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 437 of 562

Normal/reverse: 0
means normal, 1
means reverse

Initial state: 0-3


The origin HOE 1 Sets enable/disable 0 It becomes
point setting integer of origin point effective
permission setting. just after
setting.
0: Disable, 1:
Enable

(Robot cannot
execute program
when set to 1
The user- UOG 6 real Sets user-defined 0.0,0.0,  
defined origin No. origin point.
point 90.0,0.0,
(W, S, E, T, P, R)
90.0,0.0
Unit: deg.
Joint order of UNG 6 real Sets joint motion 2, 1, 1, 1, 2, It becomes
returning to No. order to return to 2 effective
origin point the origin point. just after
setting.
Wrist angle RCD 1 Selects wrist angle 0 RV-E5NJ
coordinate integer coordinate system
selection for control and RV-E5NJM
display.
RV-E5N-JC
0: General angle
(Maintains only
posture),

1: Joint angle
(Varies posture)
Stop input type INB 1 Sets stop input for 0  
selection integer A type contact or B
type contact.

0: A type (Normally
open),

1: B type (Normally
closed)
Parallel I/O IN1 20 Sets function for PI0,,,,PI1,,,,  
input setting strings input board.
IN2 ,,,, ,,,,
20 Sets function for
IN3 strings first I/O interface ,STA,STP
board.
20 ,RST
strings Sets function for
second I/O
interface board.

Sets function for


third I/O interface
board.
Parallel I/O OT1 16 Sets function for ,,,, ,,,, ,,,,  
output setting strings output board.
OT2 ,RUN,WAI
16 Sets function for
OT3 strings first I/O interface ,ERR
board.
16
strings Sets function for
second I/O
interface board.

Sets function for


third I/O interface
board.
Program start PST 1 Sets whether the 0  
mode integer external program
No. is read into the
robot at startup.

0: No (Present

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 438 of 562

program)

1: Yes (Appointed
program)
Communication CMO 7 Sets communication 2, 8, E, 2, 0, When set
mode integers mode of RS232C M to "0:
interface. auto", the
robot sends
Baud rate (1: the same
19200, 2: 9600, 3: code as the
4800, 4: 2400, 5: receiving
1200, 6: 600), Data code from
bit (7, 8), Parity bit the
(E: even, O: odd, external
N: none), Stop bit equipment.
(1, 2), End code (0: (The
auto, 1: CR+LF, 2: default
CR), Com.way (M: setting is
no protocol) "CR")
Mechanical GDIR 4 real the mechanical 0, 0.0, 0.0,  
installation No. installation 0.0
direction direction in respect
to the optimum
acceleration /
deceleration time
setting command
OADL is set.

If the mechanical
installation
direction is "3:
Special
installation", set
the weight in the X,
Y and Z axis
directions at the
robot base
coordinate system.

(Mechanical
installation
direction, X axis
direction weight, Y
axis direction
weight, Z axis
direction weight.)

The details of each


element are as
shown below.

1: Mechanical
installation
direction (0:
Standard (floor
installation), 1:
Wall hung, 2:
Ceiling suspended,
3: Special
installation)

2: X axis direction
weight (Weight
applied on X axis
direction) Unit:
kgf/mm

3: Y axis direction
weight (Weight
applied on Y axis
direction) Unit:
kgf/mm

4: Z axis direction
weight (Weight
applied on Z axis
direction) Unit:
kgf/mm
Hand tip load HNDM 1 real The hand tip load is 2.0  
No. set for when the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 439 of 562

load is omitted in
the optimum
acceleration /
deceleration time
setting command
(OADL). Unit: kg
Hand tip HNDG 3 real The hand tip 0.0, 0.0, 0.1  
specific gravity No. specific gravity
position position at X, Y and
Z in the tool
coordinate system
is set in respect to
the optimum
acceleration /
deceleration time
setting command
(OADL). Unit: mm
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

MELFA-BASIC IV
Overview

Introduction on MELFA-BASIC-IV

Alphabetical overview of all MELFA-BASIC-IV commands

MELFA-BASIC-IV position and motion control commands

MELFA-BASIC-IV program control commands

MELFA-BASIC-IV hand control commands

MELFA-BASIC-IV I/O control commands

MELFA-BASIC-IV other commands

Overview of the parameters for the NARC Controler

Alphabetical overview of the MELFA-BASIC IV Robot Status Variables

Overview of the MELFA-BASIC IV Built-in Functions

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
Introduction on MELFA-BASIC-IV
An explanation of the individual commands for the MELFA-BASIC IV language is provided in the following chapters:

MELFA-BASIC IV command method

With the ample operation functions, a work program more advanced than the Movemaster command method can be created.

Format description method

Parts that have uppercase letters should be written as they are.

The contents of the arrow brackets (<>) should be described by the user. Follow the usage explanations for the individual commands
when making the entry.

The square brackets indicate that it may be omitted, if so needed.

The vertical bar (|) represents OR. For example, if <Line no. | label> is written, either the line no. or the label will be written.

Enter all commas (,), periods (.) , semicolons (;), and parentheses (), as they are. Here the various commands used to create a
program with the MELFA-BASIC III command method or Movemaster command method will be explained. The features of each
command method are as shown in the following chapters.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 440 of 562

Commands that are marked with an * cannot be executed alone. They have to be used in connection with other commands.

Commands that are marked with an * * can be used in connection with other commands or stand alone.
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MELFA-BASIC-IV program control commands
These commands are concerned with conditional branching, repetitive operation, interrupting of signals, starting and stopping,
counter operation, etc.

Command Function
ACT (Act)
CALLP (Call P)
COM OFF (Communication OFF)
COM ON (Communication ON)
COM STOP (Communication Stop)
DEF ACT (Define act)
END (End)
FOR NEXT (For Next)
FPRM (FPRM)
GOSUB (Go Subroutine)
GOTO (Go To)
HLT (Halt)
IF THEN ELSE (If Then Else)
ON COM GOSUB (On Communication Go Subroutine)
ON GOSUB (On Gosub)
ON GOTO (On Go To)
PRIORITY  (Priority)
RESET ERR  (Reset Error)
RETURN (Return)
SKIP (Skip)
WAIT (Wait)
WHILE WEND (While End)
XCLR (X Clear)
XLOAD (X Load)
XRST (X Reset)
XRUN (X Run)
XSTP (X Stop)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MELFA-BASIC-IV position and motion control commands
These commands are concerned with the definition of positions and coordinates as well as the assignment of interpolation, speed,
timer, tool, palette, etc.

Command Function
ACCEL (Accelerate)
BASE (Base)
CMP JNT (Composition Joint)
CMP POS (Composure Posture)
CMP TOOL (Composition Tool)
CMP OFF (Composition OFF)
CMPG (Composure Gain)
CNT (Control)
DEF JNT (Define Joint)
DEF PLT (Define pallet)
DEF POS (Define Position)
DLY (Delay)
FINE (Fine)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 441 of 562

JOVRD (J override)
JRC (Joint Roll Change)
MOV (Move)
MVA  (Move Arch)
MVC (Move C)
MVR (Move R)
MVR2 (Move R2)
MVR3 (Move R3)
MVS (Move S)
OADL (Optimum Acceleration/Deceleration)
OVRD (Override)
PLT (Pallet)
SERVO (Servo)
SPD (Speed)
TOOL (Tool)
TORQ (Torque)
WTH (With)
WTHIF (With If)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MELFA-BASIC-IV hand control commands
These commands are concerned with opening/closing action of the hand.

Command Function
HCLOSE (Hand Close)
HOPEN (Hand Open)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MELFA-BASIC I/O-IV control commands
These commands are concerned with input/output control of external I/O. Both single and parallel bits can be handled enabling the
logical operation in the internal register.

Command Function
DEF IO (Define IO)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
Other commands in MELFA-BASIC-IV
These commands are concerned with setting of parameters, selecting of programs, resetting of alarms, and describing of comments.

Command Function
CLOSE (Close)
CLR (Clear)
DEF ARCH  (Define Arch)
DEF CHAR (Define Character)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 442 of 562

DEF DOUBLE (Define Double)


DEF FLOAT (Define Float)
DEF FN (Define Function)
DEF INTE (Define Integer)
DIM (Dim)
INPUT (Input)
OPEN (Open)
PRINT (Print)
REM (Remarks)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
Alphabetical Overview of MELFA-BASIC-IV commands
Command Function
ACCEL (Accelerate)
ACT (Act)
BASE (Base)
CALLP (Call P)
CHRSRCH (Character search)
CLOSE (Close)
CLR (Clear)
CMP JNT (Composition Joint)
CMP POS (Composure Posture)
CMP TOOL (Composition Tool)
CMP OFF (Composition OFF)
CMPG (Composure Gain)
CNT (Control)
COM OFF (Communication OFF)
COM ON (Communication ON)
COM STOP (Communication Stop)
DEF ACT (Define Act)
DEF ARCH  (Define Arch)
DEF CHAR (Define Character)
DEF DOUBLE (Define Double)
DEF FLOAT (Define Float)
DEF FN (Define Function)
DEF INTE (Define Integer)
DEF IO (Define IO)
DEF JNT (Define Joint)
DEF PLT (Define Pallet)
DEF POS (Define Position)
DIM (Dim)
DLY (Delay)
END (End)
ERROR (Error)
FINE (Fine)
FOR NEXT (For Next)
FPRM (FPRM)
GETM (Get Mechanism)
GOSUB (Go Subroutine)
GOTO (Go To)
HCLOSE (Hand Close)
HLT (Halt)
HOPEN (Hand Open)
IF THEN ELSE (If Then Else)
INPUT (Input)
JOVRD (J Override)
JRC (Joint Roll Change)
Label (Label)
LOADSET (Load Set)
MOV (Move)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 443 of 562

MVA (Move Arch)


MVC (Move C)
MVR (Move R)
MVR2 (Move R2)
MVR3 (Move R3)
MVS (Move S)
OADL (Optimum Acceleration/Deceleration)
ON COM GOSUB  (On Communication Go Subroutine)
ON GOSUB (On Gosub)
ON GOTO (On Go To)
OPEN (Open)
OVRD (Override)
PLT (Pallet)
PREC (Precision)
PRINT (Print)
PRIORITY  (Priority)
RELM (Release Mechanism)
REM (Remarks)
RESET ERR  (Reset Error)
RETURN (Return)
SELECT CASE (Select Case)
SERVO (Servo)
SKIP (Skip)
SPD (Speed)
TOOL (Tool)
TORQ (Torque)
WAIT (Wait)
WHILE WEND (While End)
WTH (With)
WTHIF (With If)
XCLR (X Clear)
XLOAD (X Load)
XRST (X Reset)
XRUN (X Run)
XSTP (X Stop)
Substitute  (Substitute)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
ACCEL (Accelerate)
 

Function:

Designate the robot's acceleration and deceleration speeds as a percentage (%).

Format

ACCEL [<Acceleration rate>],[ <Deceleration rate>]

Controller software version G2 or later:


ACCEL  [<Acceleration rate>] [, <Deceleration rate>]
          ,[<Acceleration rate when moving upward>], [<Deceleration rate when moving upward>]
          ,[<Acceleration rate when moving downward>], [<Deceleration rate when moving
downward>]

Terminology

<Acceleration/Deceleration>   1 to 100. Designate the


acceleration/deceleration to reach the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 444 of 562

maximum speed from speed 0 as a


percentage. This can be described as a
constant or variable. A default value of
100 is set if the argument is omitted. A
value of 100 corresponds to the
maximum rate of
acceleration/deceleration. Unit: mn
<Acceleration/ Deceleration rate when moving upward> Specify the acceleration/deceleration
rate when moving upward in an arch
motion due to the MVA instruction. A
default value of 100 is set if the
argument is omitted. It is possible to
specify the argument either by a
constant or variable.
<Acceleration/ Deceleration rate when moving downward> Specify the acceleration/deceleration
rate when moving downward in an arch
motion due to the MVA instruction. A
default value of 100 is set if the
argument is omitted. It is possible to
specify the argument either by a
constant or variable.
 

Explanation

The maximum acceleration/deceleration is determined according to the robot being used. Set
the corresponding percentage. The system default value is 100,100.
The acceleration percentage changed with this command is reset to the system default value
when the program is reset or the END statement executed.
The smooth operation when CNT is valid will have a different locus according to the
acceleration speed or operation speed. To move smoothly at a constant speed, set the
acceleration and deceleration to the same value. CNT is invalid in the default state.
If the optimum acceleration/deceleration control is active (OADL ON), the setting of the
ACCEL instruction is ignored.
 

Reference Program

10 ACCEL 50,100 'Heavy load designation (when acceleration /


deceleration is 0.2 seconds, the
acceleration will be 0.4, and the
deceleration will be 0.2 seconds)
20 MOV P1
30 ACCEL 100,100 'Standard load designation
40 MOV P2
50 DEF ARCH 1,10,10,25,25,1,0,0
60 ACCEL 100,100,20,20,20,20 'Specify the override value to 20 when
moving upward or downward due to the MVA
instruction
70 MVA P3,1
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
ACT (Act)
 

Function:

Designates the enable/disable status of the interrupt.


 

Format

ACT <Priority No.> = <enable/disable>


 

Terminology

<Priority No.>  
0: Either enables or disables the entire interrupt.
1 to 8: Designate the priority No. for the interrupt defined in the DEF ACT
statement. When entering the priority No., always leave a space (character)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 445 of 562

after the ACT command. If described as ACT1, it will be a variable name


declaration statement.
<enable/disable>     1: Allows interrupts, 0: Prohibits interrupts
 

Explanation

When the program starts, the status of <Priority No.> 0 is "enabled." When <Priority No.> 0 is
"disabled," even if <Priority No.> 1 to 8 are set to "enabled," no interrupt will be enabled.
The statuses of <Priority No.> 1 to 8 are all "disabled" when the program starts.
An interrupt will occur only when all of the following conditions have been satisfied:
<Priority No.> 0 is set to "enabled."
The status of the DEF ACT statement has been defined.
When the <Priority No.> designated by DEF ACT is made valid by an ACT statement.
The return from an interrupt process should be done by describing either RETURN 0 or
RETURN 1.
Even if the robot is in the middle of interpolation, an interrupt defined by a DEF ACT
statement will be executed.
During an interrupt process, that <Priority No.> will be executed with the status as "disable."
A communications interrupt (COM) has a higher priority than an interrupt defined by a DEF
ACT statement.
The relationship of priority rankings is as shown below:
COM > ACT > WTHIF (WTH) > Pulse substitution
 

Reference Program

10 DEF ACT 1,M_IN(1)=1 GOSUB *INTR 'Assign input signal 1 to the


interrupt 1 condition
20 MOV P1
30 ACT 1=1 'Enable interrupt 1
40 MOV P2
50 ACT 1=0 'Disable interrupt 1
:
100 *INTR 'If input signal 1 changes to ON (to
1) while the robot is moving from P1
to P2, it will stop.
110 HLT 'Stop
120 RETURN 0
 

Reference

DEF ACT, RETURN


 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
BASE (Base)
 

Function:

Designates the base conversion data.


 

Format

BASE <Base conversion data>


 

Terminology

<Base conversion data>    Designate the base conversion data in terms of a


position operation expression.
 

Explanation

The X, Y, and Z components of the position data represent the amount of parallel movement
from the origin of the world coordinate system to the origin of the base coordinate system.
The base conversion data can be changed only with the BASE command. The components A,
B, and C of the position data represent the amount that the base coordinate system is tilted
in relation to the world coordinate system.
X ... Distance to move parallel to X axis
Y ... Distance to move parallel to Y axis

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 446 of 562

Z ... Distance to move parallel to Z axis


A ... Angle to turn toward the X axis
B ... Angle to turn toward the Y axis
C ... Angle to turn toward the Z axis
L 1 .. Movement amount of additional axis 1
L 2 .. Movement amount of additional axis 2
For A. B and C. the clockwise direction looking from the front of the origin of the coordinate,
used as the center of rotation, is the forward rotation direction.
The contents of the structural flag have no meaning.
The base coordinate system changed by the BASE command will keep the changes even after
the power has been turned OFF.
The system's default value for this data is P_NBASE=(0,0,0,0,0,0) (0,0). This is calculated with
the 6-axis three dimensional regardless of the mechanism structure.
 

Reference Program

10 BASE (50,100,0,0,0,0,0,0) 'Input the conversion data as a


constant
20 MVS P1
30 BASE P2 'Input the conversion data as a
variable
40 MVS P1
50 BASE P_NBASE 'Reset the conversion data to the
default values.
 

Reference

TOOL, Robot status variables


 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CALLP (Call P)
 

Function:

Executes the designated program. (Program call version of GOSUB)


 

Format

CALLP "<Program name>" [, <Argument> [,<Argument>] ... ]


 

Terminology

<Program name>    Designate the program name with a character string constant or character
string variable.
<Argument>    Designate the variable to be transferred to the program when the program is
called up. Up to 16 variables can be transferred.
 

Explanation

If the argument differs from the type of argument defined (FPRM) in the CALLP called
program, an error will occur. If the number of arguments differs from the CALLP called
program, an error will occur when execution is started. When the program is reset, the
control will return to the head of the main program (program in which host program does not
exist.)
The definition statements (DEF ACT, DEF FN, DEF PLT, DIM) executed in the CALLP calling
program are invalid in the CALLP called program. These will be validated again when the
program returns from CALLP.
The speed and tool data are all valid.
Up to seven programs can be called out from one program. This number of programs includes
when a program is called from the subprogram.
A file already opened and executed cannot be called from another slot and used. It can be
called repeatedly from the same slot.
A program cannot call itself out.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 447 of 562

A host program cannot be called.


The argument is received with the FPRM command by the receiving program.
The results calculated with the CALLP called program cannot be substituted in the argument
variable and used in the CALLP calling program. In this case, use external variables to transfer
the value.
 

Reference Program

10 CALLP "P10" ,M1,P1,P2 '"P10" Program side


program  "p10"
10 FPRM M1, P1, P2
 

Reference

END, FPRM

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CHRSRCH (Character search)
 

Function:

Searches the character string out of the character array

Format

CHRSRCH  <Character string array variable>,<Character string>,<Search


result storage destination>

Terminology

<Character string array variable>


Specify the character string array to be searched.

<Character string>
Specify the character string to be searched.

<Search result storage destination> The number of the element for which the character string to be
searched is found, is set
 

Explanation

Specified character string is searched from the character string array variables, and the
element number of the completely matched character string array is set in <search result
storage destination>. Partially matched character strings are not searched. Even if CHRSRCH
C1$(1), "ROBO", M1 are described in the above statement example, the matched character
string is not searched.
the character string to be searched is not found, 0 is set in <search result storage
destination>.
Character string search is performed sequentially beginning with element number 1, and the
element number found first is set. Even if CHRSRCH C1$(3), "MELFA", M2 are described in the
above statement example, 2 is set in M2. (The same character string is set in C1$(2) and C1
$(6).)
The <character string array variable> that can be searched is the one-dimensional array only.
If a two-dimensional or higher array is specified as a variable, an error will occur at the time
of execution.
 

Reference Program

10 DIM C1$(10)

20 C1$(1)="ABCDEFG"      

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 448 of 562

30 C1$(2)="MELFA"
40 C1$(3)="BCDF"
50 C1$(4)="ABD"
60 C1$(5)="XYZ"
70 C1$(6)="MELFA"
80 C1$(7)="CDF"
90 C1$(8)="ROBOT"
100 C1$(9)="FFF"
110 C1$(10)="BCD"
120 CHRSRCH C1$(1), "ROBOT", M1 ' 8 is set in M1 
130  CHRSRCH C1$(1), "MELFA", M2          ' 2 is set in M2
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CLOSE (Close)
 

Function:

Closes the designated file.


 

Format

CLOSE [[#] <File No.> [, [[#] <File No.> ... ]


 

Terminology

<File No.>    Designate the No. of the file to be closed.


 

Explanation

If a file has been opened for input/output the CLOSE statement will sweep out the data in the
buffer. Consequently, the output processing for the file can be completed properly.
Executing an END statement will also close a file.
 

Reference Program

10 OPEN "COM1:" AS #1 'Open "COM1:" as file No. 1


20 PRINT #1,M1
: :
100 INPUT #1,M2
110 CLOSE #1 'Close file No. 1, "COM1:"
: :
200 CLOSE 'Close all open files
 

Reference

END

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 449 of 562

 
CLR (Clear)
 

Function:

Clears the general-purpose output signals, local variables in program, and global variables
between programs.
 

Format

CLR <Type>
 

Terminology

<Type>    0 All steps 1 to 3 below are executed.


1 The general-purpose output signals are cleared based on the output reset pattern.
The output reset pattern is designated with parameters ORST0 to ORST224.
(0: OFF, 1: ON, *:Hold)
2 All local numeric variables and numeric array variables used in the program are cleared
to zero.
3 All global numeric variables and numeric array variables used between programs are
cleared to zero.
 

Explanation

Either a constant or variable can be used for <Type>.


 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
CMP JNT (Composition Joint)
 

Function:

Start the soft control mode (compliance mode) of the specified axis in the JOINT
coordinates system. Note: The available robot type is limited such as RH-nAH. 
 

Format

CMP JNT, <Axis designation>


 

Terminology

<Axis designation>    Specify the axis to be controlled in a pliable manner with the bit pattern. 1 :
Enable, 0 : Disable &B00000000 This corresponds to axis 87654321.
 

Explanation

It is possible to control each of the robot's axes in the joint coordinate system in a pliable
manner. For exam-ple, if using a horizontal multi-joint robot to insert pins in a workpiece by
moving the robot's hand up and down, it is possible to insert the pins more smoothly by
employing pliable control of the J1 and J2 axes (see the statement example above).
The degree of compliance can be specified by the CMPG instruction, which sets the spring
constant. If the robot is of the RH-AH type, specify 0.0 for the horizontal axes J1 and J2 to
make the robot behave equiv-alently to a servo free system (the spring constant is zero).
(Note that the vertical axes cannot be made to behave equivalently to a servo free system
even if 0.0 is set for them. Also, be careful not to let these axes reach a position beyond the
movement limit or where the amount of diversion becomes too large.) Note that 4) and 5)
below do not function if this servo-free equivalent behavior is in use.
The soft state is maintained even after the robot program execution is stopped. To cancel the
soft status, execute the CMP OFF command or turn OFF the power.
When pressing in the soft state, the robot cannot move to positions that exceed the operation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 450 of 562

limit of each joint axis.


If the amount of difference between the original target position and the actual robot position
becomes greater than 200 mm by pushing the hand, etc., the robot will not move any further
and the operation shifts to the next line of the program.
It is not possible to use CMP JNT, CMP POS, and CMP TOOL at the same time. In other words,
an error occurs if the CMP POS or CMP TOOL instruction is executed while the CMP JNT
instruction is being performed. Cancel the CMP JNT instruction once using the CMP OFF
instruction to execute these instructions.
Be aware that the position of the robot may change if the servo status is switched on while
this instruction is active.
It is possible to perform jog operations while the robot is in compliance mode. However, the
setting of the com-pliance mode cannot be canceled by the T/B; in order to do so, execute
this instruction in a program or exe-cute it directly via the program edit screen of the T/B.
To change the axis specification, cancel the compliance mode with the CMP OFF instruction
first, and then execute the CMP JNT instruction again.
 

Reference Program

10 MOV P1
20 CMPG 0.0,0.0,1.0,1.0, , , 'Set softness
30 CMP JNT,&B11 'The J1 and J2 axes are put in the state
where they are controlled in a playable
manner.
40 MOV P2
50 HOPEN 1
60 MOV P1
70 CMP OFF 'Return to normal state
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CMP OFF (Composition OFF)
 

Function:

Release the soft control mode (compliance mode). 


Note: The available robot type is limited such as RV-4A. Refer to "Available robot type".
 

Format

CMP OFF
 

Reference Program

Moves to in front of the


10 MOV P1
part insertion position.
20 CMPG 0.5,0.5,1.0,0.5,0.5,,, Set softness.
The X, Y, A, and B axes are
put in the state where they
30 CMP TOOL, &B011011
are controlled in a pliable
manner.
Moves to the part insertion
40 MVS P2
position.
Instructs to close the chuck
50 M_OUT(10)=1
for positioning.
Waits for the completion of
60 DLY 1.0
chuck closing.(1 sec.)
70 HOPEN 1 Open the hand.
Retreats 100 mm in the Z
80 MVS, -100 direction of the TOOL
coordinate system.
90 CMP OFF Return to normal state.
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 451 of 562

This instruction cancels the compliance mode started by the CMP TOOL, CMP POS, or CMP JNT
instruction.
In order to cancel jog operations in the compliance mode, either execute this instruction in a
program or execute it directly via the program edit screen of the T/B.
 
Available robot type
 
RV-20A
RV-4A/5AJ series
RV-1A/2AJ
RV-2A/3AJ series
RH-5AH/10AH/15AH series
 
Reference
CMPG,  CMP JNT, CMP POS, CMP TOOL

 
 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CMP POS (Composure Posture)
 

Function:

Designates which axis to softly move the robot in the orthogonal coordinate system.

Note: Excluding model RP-*


 

Format

CMP POS, <Axis designation>


 

Terminology

<Axis designation>    Designate axis to move softly with a bit pattern.


00000000 ... from low-order bit X, Y, Z, ... C, L1, L2
 

Explanation

The robot can be moved softly with the orthogonal coordinate system.
For example, when inserting a pin in the vertical direction, if the X, Y, A and B axes are set to
soft operation, the pin can be inserted smoothly.
The degree of softness can be designated with the CMPG command.
The soft state is maintained even after the robot program execution is stopped until the CMP
OFF is executed or until power is turned ON again after being turned OFF.
When pressing in the soft state, the robot cannot move to positions that exceed the operation
limit of each joint axis.
If the deviation between the actual robot position and the target position is larger than the
parameter designated value NMPCDIST due to pressing, etc., the robot will stop. Note that
the robot will not stop while the program is running.
If the CMP POS command is executed while the CMP TOOL command is functioning, an error
will occur. Cancel the CMP OFF command before executing the CMP POS command.
If the servo turns from OFF to ON while this command is active, the robot position could
change.
Jogging is possible in the soft state.
 

Reference Program

10 MOV P1
20 CMPG 0.5,0.5,1.0,0.5,0.5 'Set softness
30 CMP POS, &B00011011 'Enter soft state
40 MVS P2
50 M_OUT(10)=1
60 MVS P1
70 CMP OFF 'Return to normal state

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 452 of 562

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CMP TOOL (Composition Tool)
 

Function:

Designates which axis to softly move the robot in the tool coordinate system.

Note: Excluding model RP-*


 

Format

CMP TOOL, <Axis designation>


 

Terminology

<Axis designation>    Designate axis to move softly with a bit pattern.


00000000 ... from low-order bit X, Y, Z, ... C, L1, L2
 

Explanation

The robot can be moved softly with the tool coordinate system.
For example, when inserting a pin in the tool coordinate Z axis direction, if the X, Y, A and B
axes are set to soft operation, the pin can be inserted smoothly.
The degree of softness can be designated with the CMPG command.
The soft state is maintained even after the robot program execution is stopped until the CMP
OFF is executed or until power is turned ON again after being turned OFF.
When pressing in the soft state, the robot cannot move to positions that exceed the operation
limit of each joint axis.
If the deviation between the actual robot position and the target position is larger than the
parameter designated value NMPCDIST due to pressing, etc., the robot will stop. Note that
the robot will not stop while the program is running.
If the CMP POS command is executed while CMP TOOL command is functioning, an error will
occur. Cancel the CMP OFF command before executing the CMP TOOL command.
If the servo turns from OFF to ON while this command is active, the robot position could
change.
Jogging is possible in the soft state.
 

Reference Program

10 MOV P1
20 CMPG 0.5,0.5,1.0,0.5,0.5 'Set softness
30 CMP TOOL, &B00011011 'Enter soft state
40 MVS P2
50 M_OUT(10)=1
60 MVS P1
70 CMP OFF 'Return to normal state
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CMPG (Composition Gain)
 

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 453 of 562

Designates the robots's softness.

Note: Excluding model RP-*


 

Format

CMP POS, CMP TOOL:

CMPG [<X axis gain>], [<Y axis gain>], [<Z axis gain>], [<A axis gain>],[<B axis gain>],[<C axis
gain>], [<L1 axis gain>], [<L2 axis gain>]
 

CMP JNT:

CMPG [<J1 axis gain>], [<J2 axis gain>], [<J3 axis gain>], [<J4 axis gain>],[<J5 axis gain>],[<J6 axis
gain>], [<J7 axis gain>], [<J8 axis gain>]
 

Terminology

<X to L2 axis gain>    The softness can be set for each axis.
1.0 is the normal state, and 0.0 is the softest state.
If the value is omitted, the current setting value will be applied.
<J1 to J8 axis gain> s.o.
 

Explanation

The softness can be designated in each axis units.


The soft state will not be entered unless validated with the CMP POS or CMP TOOL command.
A spring-like force will be generated in the proportion to the deviation of the command
position and actual position. CMPG designates that spring constant.
The deviation of the command position and actual position can be read with M_CMPDST. The
success/failure of pin insertion can be checked using this variable.
If a small gain is set, and the soft state is entered with the the CMP POS and CMP TOOL
commands, the robot position could drop. Set the softness state gradually while checking it.
If this command is executed in the soft state, the softness can be changed during the
operation.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CNT (Continuous)
 

Function:

Designates continuous operation control for interpolation operations.

Format

CNT <Continuous operation mode/acceleration/deceleration operation mode>][, <Numeric value 1


> ] [Numeric value 2>]
 

Terminology

<valid/invalid>    Designate the continuous operation or acceleration/deceleration operation


mode. Designate either 1 or 0. 1 is continuous operation, and 0 is
acceleration/deceleration operation.
<Numeric value 1>    Designate the neighborhood distance for starting the orbit change with a mm
unit.
<Numeric value 2>    Designate the neighborhood distance for ending the orbit change with a mm
unit.
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 454 of 562

To make the change start position and end position both less than the designated value, one
is changed with a distance shorter than the designated value.
The CNT default value is "CNT0".
If numeric value 1 and numeric value 2 are omitted, these will be connected with the default
setting value.
If numeric value 2 is omitted, the same value as numeric value 1 will be applied.
The FINE valid designation is invalid for smooth operation.
If the numeric value designation is reduced, the operation time may take longer than when
CNT is invalid.
 

Reference Program

10 CNT 0 'Invalidate CNT


20 MVS P1 'Operate with acceleration/deceleration
30 CNT 1 'Validate CNT (default setting value)
40 MVS P2 'Execute with smooth operation
50 CNT 1, 100, 200 'Start distance 100mm. end position 200mm
60 MVS P3 'Execute with smooth operation
70 CNT 1, 300 'Start distance 300mm, end position 300mm
80 MOV P4 'Execute with smooth operation
90 CNT 0 'Invalidate CNT
100 MOV P5

Reference

Movement related commands, speed related commands, acceleration/deceleration related commands, FINE, OADL

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
COM OFF (Communication OFF)
 

Function:

Designates "disable" for any interrupts from a communication line.


 

Format

COM [(<Communication line No.>)] OFF


 

Terminology

<Communication Line No.>    Describe 1, 2 or 3.


 

Explanation

When COMMON OFF is executed, even if communications are attempted, the interrupt will

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 455 of 562

not be generated.
For information on communication line Nos., refer to the page for OPEN.
 

Reference Program

10 COM(1) OFF 'Disable communication interrupt from communication line


No. 1.
 

Reference

OPEN, COM_ON, COM STOP, ON COM GOSUB


 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
COM ON (Communication ON)
 

Function:

Designates "enable" for interrupts coming from a communication line.


 

Format

COM [(<Communication line No.>)] ON


 

Terminology

<Communication Line No.>    Describe 1, 2 or 3.


 

Explanation

For information on communication line Nos., refer to the page for OPEN.
 

Reference Program

10 COM(1) ON 'Enable communication interrupt from communication line No.


1.
 

Reference

OPEN, COM_OFF, COM STOP, ON COM GOSUB

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
COM STOP (Communication Stop)
 

Function:

Sets "stop" for the interrupts coming from a communication line.


 

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 456 of 562

COM [(<Communication line No.>)] STOP


 

Terminology

<Communication Line No.>    Describe 1, 2 or 3.


 

Explanation

After COM STOP is executed, even if communication is attempted, the interrupt will not be
generated. Note that the receiving data and the fact of the interrupt will be recorded, and be
executed the next time the line is reopened.
 

Reference Program

10 COM(1) STOP 'Stop the communication interrupts for communication line


1.
 

Reference

OPEN, COM_OFF, COM ON, ON COM GOSUB

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
DEF ACT (Define act)
 

Function:

Defines the status of the interrupt and how it will be processed.


 

Format

DEF ACT <Priority No.>, <Expression> <Process> [, <Type>]


 

Terminology

<Priority No.>    This is the priority No. of the interrupt. It can be set with constant Nos. 1 to 8.
<Expression>    For the interrupt status, use the formats described below: (Refer to the syntax
diagram)
<Numeric type data> <Comparison operator> <Numeric type data> or
<Numeric type data> <Logical operator> <Numeric type data>
<Numeric type data> refers to the following:
<Numeric type constant>| <Numeric variable>|<Numeric array
variable>|<Component data>
<Process>    Refers to a GOTO statement or a GOSUB statement used to process an interrupt
when it occurs.
<Type> When omitted: Stop type 1
The robot stops at the stop position, assuming 100% execution of the external
override.
If the external override is small, the time required for the robot to stop becomes
longer, but it will always stop at the same position.
S : Stop type 2 (only for software version E3 or later) The robot decelerates and
stops in the shortest time and distance possible, independently of the external
override.
L : Execution complete stop The interrupt processing is performed after the robot
has moved to the target position (the line being executed is completed).
 

Explanation

The priority level for the interrupts is decided by the <Priority No.>, and the priority level,
from the highest ranges from 1 to 8.
There can be up to 8 settings for the interrupts. Use the <Priority No.> to differentiate them.
When two interrupts have been defined with the same priority level, the one defined later is

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 457 of 562

validated.
Since DEF ACT defines only the interrupt, always use the ACT command to designate the
enable/disable status of the interrupt.
The communications interrupt (COM) has a higher priority level than any of the interrupts
defined by DEF ACT.
DEF ACT definitions are valid only in the programs where they are defined. These are invalid
when called up in a program by CALL P. If necessary, the data in a subprogram may need to
be redefined.
If an interrupt is generated when a GOTO command is designated by <Process> for a DEF ACT
command, during execution of the remaining program, the interrupt in progress will remain,
and only interrupts of a higher level will be accepted. The interrupt in progress for a GOTO
statement can be canceled with the execution of an END statement.

Reference Program

10 DEF ACT 1,M_IN(10)=1 GOSUB 100 'Defines the subroutine at line


100 to be the one to be called up
when the status for the general
purpose input signal No.17 is ON.
20 DEF ACT 2,MFG1 AND MFG2 GOTO 200 'Defines the line 200 as the one
to jump to when the logic
operation of AND applied to MFG1
or MFG2 results in "true".
30 DEF ACT 3,M_TIMER(1)>10.5 GOSUB 300 'When 10.5 seconds pass, the
program jumps to the line 300
subroutine.
100 M_TIMER(1)=0
110 ACT 3=1
 

Reference

ACT, GOSUB, RETURN, Robot status variables


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
DEF ARCH (Define arch)
 

Function:

This instruction defines an arch shape for the arch motion movement corresponding to the MVA
instruction.
 

Format

This function is available for controller software version G2 or later.

DEF ARCH <Arch number>,                                                                           


[<upward movement increment>] [<downward movement increment >] [<Upward
evasion increment>], [<downward evasion increment>], [<interpolation type>],
[<interpolation type 1>, <interpolation type 2>]

Terminology

<Arch number> Arch motion movement pattern number. Specify  


a number from 1 to 4 using a constant or a
variable.  
<Upward movement increment>  
<Downward movement increment >
 
<Upward evasion increment>
 
<Downward evasion increment>
   

 
<Interpolation type> Interpolation type for upward and downward  
movements. Linear/joint = 1/0
<Interpolation type 1> Detour/short cut = 1/0  

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 458 of 562

<Interpolation type 2> 3- axis XYZ/ Equivalent rotation = 1/0 Explanation

If the MVA instruction is executed without the DEF ARCH instruction, the robot
moves according to the arch shape specified by the parameters.
Used to change the increments in a program, etc. [Related instructions]
 
 

Reference Program

10 DEF ARCH 1,5,5,20,20


20 MVA P1,1 'Performs the arch motion movement defined in the shape definition in
line 10.
30 MVA P2,2 'The robot moves according to the default values specified by the
parameters.
 

Reference

ACCEL (Accelerate), OVRD (Override),MVS (Move S)

            

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEF CHAR (Define Character)
 

Function:

Declares a character string variable

Format

DEF CHAR <Character string position variable name> [, <Character string variable name >] ...
 

Terminology

<Character string variable name>    Designate the variable name.


 

Explanation

The variable name can have up to eight characters. Refer to the "Types of characters that can
be used" for the characters that can be used.
When designating multiple variable names, the maximum value (123 characters including
command) can be set on one line.
The declared variable follows the "Character string variable„ rules.
After declaration, the variable can be used in the same manner as the C variable.
 

Reference Program

10 DEF CHAR MESSAGE


'Declare MESSAGE as a character string variable.
20 MESSAGE = "WORKSET"
'Substitute "WORKSET" in the MESSAGE variable.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 459 of 562

 
DEF FN (Define Function)
 

Function:

Defines a function and gives it name.


 

Format

DEF FN <Name> [(Dummy argument> [, <Dummy argument>] ... )] = <Function definition


expression>
 

Terminology

<Name>    Describe an identifier character + character string.


<Dummy argument>    When a function has been called up, it is transferred to
the function. It is possible to describe all the variables,
and up to 16 variables can be used.
<Function Definition Expression>    Describe the expression for what operation to use as a
function.
 

Explanation

FN + <Name> becomes the name of the function. The function name can be up to 8
characters long.
Example:
Numeric typeFNMAX Identifier character: M
Character string typeFNCAME$ Identifier character:
C (Describe $ at the end of the name)
A function defined with DEF FN is called a user-defined function. A function as long as one
line can be described.
Built-in functions and user-defined functions that have already been defined can be used in
the function definition expression. In this case, up to 16 levels of user-defined functions can
be written.
If the variables used in <Function Definition Expression> are not located in <Dummy
Argument>, then the value that the variable has at that time will be used. Also, an error will
occur if during execution, the number or argument type (numeric value or character string) of
arguments differs from the number or type declared.
A user-defined function is valid only in the program where it is defined. It cannot be used by
a CALLP designation program.
 

Reference Program

10 DEF FNMAVE(MA,MB)=(MA+MB)/2 'Defines FNMAVE to be used to find the


average of two numeric values.
20 MDATA1=20
30 MDATA2=30
40 MAVE=FNMAVE(MDATA1,MDATA2) '25, the average of 20 and 30, is
substituted for the numeric variable
MAVE.
 

Reference

Variables, Array variables, Functions

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEF INTE/FLOAT/DOUBLE (Define Integer/Float/Double)
 

Function:

Declares the arithmetic variable.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 460 of 562

Format

DEF INTE <Arithmetic variable name> [, <Arithmetic variable name>] ...


DEF FLOAT <Arithmetic variable name> [, <Arithmetic variable name>] ...
DEF DOUBLE <Arithmetic variable name> [, <Arithmetic variable name>] ...
Terminology

<Arithmetic Variable Name>    Designate the variable name.


Explanation

The variable name can have up to eight characters. Refer to the "Types of characters that can
be used" for the characters that can be used.
When designating multiple variable names, the maximum value (123 characters including
command) can be set on one line.
The variable declared with INT will be an integer type. (-32768 ~ +32767)
The variable declared with FLOAT will be a single-precision type. (+/- 1.70141E+38)
The variable declared with DOUBLE will be a double-precision type. (+/-
1.701411834604692E+308)
Reference Program

10 DEF INTE WORK 'Declare WORK as an arithmetic variable name.


20 WORK = 100 'Substitute the value 100 in WORK.
 
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEF IO (Define IO)
 

Function:

Declares an input/output variable.

Format

DEF IO Input/Output variable name> = <Type designation>, <Input/Output bit No.> [, <Mask
information>]
 

Terminology

<Input/Output Variable Name>    Designate the variable name.


<Type Designation>    Designate BIT, BYTE, WORD or INTEGER.
<Input/Output Bit No.>    Designate the input or output bit No.
<Mask Information>    Designate when only a specific signal is to be validated.
 

Explanation

The variable name can have up to eight characters. Refer to the „Types of characters that
can be used„ for the characters that can be used.
When mask information is designated, onIy the specified signal will be validated.
Example: For the 2Oth line, mask processing is carried out with hexadecimal 0F, so Nos. 107
to 110 will be validated, and Nos. 111 to 114 will be invalidated (always 0).
InvalidValid
00001111
No.114 No. 107 (Input/output bit No.)
 

Reference Program

10 DEF IO PORT1 = BIT,6 'Assign the input/output variable named


PORT1 to the input/output bit No. 6 with the
BIT type.
20 DEF IO PORT2 = BYTE,8,&H0F
'Assign the input/output variable named

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 461 of 562

PORT2 to the input/output bit No. 8 with the


BYTE type, and designate the mask
information as hexadecimal 0F.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEF JNT (Define Joint)
 

Function:

Declares a joint variable.

Format

DEF JNT <Joint variable name> [, <Joint variable name>] ...


 

Terminology

<Joint Variable Name>    Designate the variable name.


 

Explanation

The variable name can have up to eight characters. Refer to the "Types of characters that can
be used" for the characters that can be used. The declared variable follows the "Joint
variable" rules. After declaration, the variable can be used in the same manner as the J
variable.
 

Reference Program

10 DEF JNT SAFE 'Declare SAFE as the joint variable


20 MOV SAFE 'Move to SAFE
 
 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
DEF PLT (Define Pallet)
 

Function:

Defines the pallet. (3-point pallet, 4-point pallet)


 

Format

DEF PLT <Pallet No.>, <Start point>, <End point A>, <End point B>, [<Diagonal point>], <Quantity
A>, <Quantity B>, <Assignment direction>
 

Terminology

<Pallet No.>    This is the selection No. of the set pallet. (1 to 8)


<Start Point>    Refers to the pallet's start point. Position operation expressions can be
described.
<End Point A>    One of the ending points for the pallet. Transit point of arc for arc
pallet. Position operation expressions can be described.
<End Point B>   
Another ending point for the pallet. Transit point of arc for arc pallet.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 462 of 562

Position operation expressions can be described.


<Diagonal Point>    The diagonal point from the pallet's start point. Insignificant for arc
pallet. Position operation expressions can be described.
<Quantity A>    The No. of workpieces from the pallet's start point to the end point A.
The No. of workpieces between the pallet start point and arc end point
when using an arc pallet. Numeric operation expressions can be
described.
<Quantity B>    The No. of workpieces from the pallet's start point to the end point A.
Insignificant for an arc pallet. (0, etc., must be designated.) Numeric
operation expressions can be described.
<Assignment Direction>    Describe 1, 2 or 3 for the direction of assignment for when the grid is
divided and given numbers.
Numeric operation expressions can be used. (Refer to the explanation
section for details on the assignment direction.)
 

Explanation

A 3-point pallet or a 4-point pallet can be selected.


- A 3-point pallet offers simplified teaching.
- A 4-point pallet is effective for better precision.
The assignment direction is as follows.
Zigzag = 1 , Same direction = 2, Arc pallet = 3
The command is valid onIy within the program being executed. The command is invalid in the
program that calls up the command from another program. If necessary, redefine.
Quantity A and B should be a non-zero positive number, while if 0 or a negative number is
assigned, an error will occur.
If Quantity A x Quantity B exceeds 32,767, an error will occur when operation starts.
The value of quantity B is insignificant for the arc pallet, but it must not be omitted. The
diagonal point will be insignificant even when designated.
 

Reference Program

10 DEF PLT 1,P1,P2,P3, ,4,3,1 '3-point pallet definition


20 DEF PLT 1,P1,P2,P3,P4,4,3,1 '4-point pallet definition
 

Reference

PLT, Movement commands


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEF POS (Define Position)
 

Function:

Declares a position variable.


 

Format

DEF POS <Position variable name> [, <Position variable name>] ...


 

Terminology

<Position Variable Name>    Designate the variable name.


 

Explanation

The variable name can have up to eight characters. Refer to the "Types of characters that can
be used" for the characters that can be used.
When designating multiple variable names, the maximum value (123 characters including
command) can be set on one line.
The declared variable follows the "Position variable" rules.
After declaration, the variable can be used in the same manner as the P variable.
 

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 463 of 562

10 DEF POS WORKSET 'Declare WORKSET as the position


variable.
20 MOV P1 'For XYZ type position variables starting
with P, the definition of "DEF POS" is
not required.
30 WORKSET=(250,460,100,0,0,-90,0,0)(0,0) 'Define WORKSET
40 MOV WORKSET 'Move to WORKSET
 

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DIM (Dim)
 

Function:

Declares the quantity of elements in the array variable. (Arrays up to the third dimension
are possible.)

Format

DIM <Variable name> (<Max. value of subscript>, [<Max. value of subscript>] ) [,<Variable name>
(<Max. value of subscript> [, <Max. value of subscript>])]
 

Terminology

<Variable Name>    Describe the name of the array variable.


<Max. Value of Subscript>    Describe in terms of constants, the number of elements in an array
variable.
 

Explanation

A one-dimensional, two-dimensional or three-dimensional array can be used.


<Max. Value of Subscript> can be described with numeric constants from 1 to 999. Numeric
operation expressions cannot be used.
If a subscript with a value larger than the maximum value defined with DlM is used, an error
will occur at the execution.
When the DlM statement is executed, the array variable does not have a default value, and
instead is non-specified.
An array cannot be used without the DlM statement. If the number of elements is a real
number, the decimal numbers will automatically be rounded off to create an integer.
The command is valid onIy within the program being executed. The command is invalid in the
program that calls up the command from another program.
This command must be redefined when used in a subprogram. A value (teachable) can be
directly set or read from the position array variable data declared with this command.
 

Reference Program

10 DIM PDATA(10) 'Defines the position array variable PDATA having ten
elements.
20 DIM MDATA(2,3) 'Defines the two-dimensional numeric array variable
MDATA having 2x3 elements.
 

Reference

Array variables

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 464 of 562

 
DLY (Delay)
 

Function

When used as a single command: At a designated time, it causes a wait.

When used as an additional pulse output: Designates an output time for a pulse

Format

When used as a single command

DLY <Time>
When used as an additional pulse output

<command> DLY <Time>


 

Terminology

<Time>    Describes the waiting time or the output time for the pulse output, in terms of a numeric
operation expression. Unit: [Seconds]
The minimum value that can be set is 0.05 seconds.
 

Explanation

This command is used to create delay times in programs, or to write in the OUT statement
and set the pulse output time.
The pulse output will be executed simultaneously as the next command in the lines that
follow.
Up to 4 pulse outputs can be issued simultaneously. Exceeding this, an error will occur when
the program tries to execute it.
After the designated time has elapsed, the condition that existed just before the pulse output
was issued will resume.
Within the designated time, if an END command, or the last line of the program is executed,
or if an emergency stop is made to stop the program, the signal output status will keep its
current status.
The relation of the priority levels for other interrupts is as shown below:
COM> ACT> WTHIF (WTH) >Pulse output (Time setting ON)
 

Reference Program

10 DLY 30 'Wait for 30 seconds


20 M_OUT(17)=1 DLY 10.0 'Send the signal output to the general-purpose
output signal 17 for 10 seconds.
 

Reference

Robot Status Variables, Substitute


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
END (End)
 

Function:

Ends the program execution.

Format

END
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 465 of 562

Explanation

Several END statements can be described within one program.


The END statement does not need to be described at the end of the program. Used in the host
program, the command will close all files before closing.
An END statement in a program called up by a CALLP command will transfer control to the
program that issued the CALL P command.
Used in the host program, the command will close all files before closing.
At program END; the SPD, ACCEL, OADL, JOVRD, OVRD, FINE, and CNT settings will be
initialized.
 

Reference Program

100 END
 

Reference

CALLP, FPRM, GOSUB, RETURN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
ERROR (Error)
 

Function:

Generates an error in the user program.


 

Format

ERROR <Error no.>


 

Terminology

<Error no.>    Either a constant or a numeric operation expression can be set. Designate the No.
within the range of 9000 to 9299.
 

Explanation

It is possible to generate any error in the 9000's number range by executing this instruction.
If a LOW level or HIGH level error is generated, the program is paused. Lines after the ERROR
instruction are not executed. A CAUTION error does not pause a program; the next line and
onward are executed. The action of system by error number is shown in the Table below.
It is possible to create up to 20 error messages using parameters UER1 to UER20.
A system error occurs if a value outside the error number range shown in Table below is
specified.
It is also possible to variable as an 'error-number'.
 
Error no. System behavior
9000 - 9099 The program execution is stopped, and the servo power is shut
(H level error) off.
The error state is reset when error reset is input.
9100 - 9199 The program execution is stopped.
(L level error) The error state is reset when error reset is input.
9200 - 9299 The program execution is continued.
(CAUTION) The error output turns OFF with error reset.
 

Reference Program

Generate the error 9000

100 ERROR 9000


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 466 of 562

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
FINE (Fine)
 

Function:

Designates the positioning end conditions for interpolation when not in smooth operation
control.
 

Format

FINE <Invalid/No. of pulses> [, <Axis No.>]


 

Terminology

<No. of pulses>    Designate the positioning pulses. This will be invalid to when set to 0. The
default value is 0.
<Axis No.>    Designate the axis No. to which the positioning pulses are to be designated. The
positioning pulses will be applied on all axes when omitted.
 

Explanation

FINE is invalid in the program until the FINE command is executed. Once FINE is validated, it
remains valid until invalidated.
FINE is invalidated at the end of the program.
When the CNT valid state (in smooth operation control) is entered, the FINE command will be
ignored even if it is valid (i.e., it will be treated as invalid, but the status will be kept).
 

Reference Program

10 FINE 300 'Designate 300 for the positioning pulses.


20 MOV P1
30 FINE 100,2 'Change the 2nd axis positioning pulses to 100.
40 MOV P2
50 FINE 0 'Invalidate the positioning pulse designation.
60 MOV P3
70 FINE 100 'Designate 100 for the positioning pulses.
80 MOV P4
 

Reference

CNT,movement command

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
FOR NEXT (For Next)
 

Function:

Repeatedly executes the program between the FOR statement and NEXT statement until

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 467 of 562

the end conditions are satisfied.


 

Format

FOR <Counter> = <Default value> TO <End value> [STEP <Increment>]


.
.
NEXT [<Counter 1> [, <Counter2>] ... ]
 

Terminology

<Counter>    Describes the numeric value data that represents the counter for the number of
repetitions.
Same for <Counter 1> and <Counter 2>.
<Default Value>    Sets default value of the counter for the number of repetitions as a numeric
operation expression.
<End Value>    Set the end value of the counter for the number of repeats as a numeric
operation expression.
<Increment>    Sets the value of the increments for the counter for the number of repetitions as
a numeric operation expression.
 

Explanation

Program depth
- It is possible to describe FOR-NEXT statements between other FOR-NEXT statements.
- With each FOR-NEXT process, the control structure of the program becomes one level
deeper.
In this system, it is possible for the control structure to have up to 16 levels within a program.
Exceeding 16 levels will cause an error during execution.
 

Reference Program

A program that adds the numbers 1 to 10

10 MSUM=0 'Initialize the total MSUM.


20 FOR M1=1 TO 10 STEP 1 'Increase the counter by 1 from 1 to 10 for the
numeric variable M1. If 10 is exceeded, go to
line 50. Step 1 can be omitted.
30 MSUM=MSUM+M1 'Add M1 value to numeric variable MSUM.
40 NEXT M1 'Return to line 20.
50 END 'End the program.
 

A program that puts the result of a product of two numbers into a 2-dimensional array variable
(Using FOR-NEXT as a nesting structure)

10 DIM MBOX(10,10) 'Reserve space for a 10 x 10 array.


20 FOR M1=1 TO 10 STEP 1 'Increase the counter by 1 from 1 to 10 for the
numeric variable M1. If 10 is exceeded, transfer
control to line 70. Step 1 can be omitted.
30 FOR M2=1 TO 10 STEP 1 'Increase the counter by 1 from 1 to 10 for the
numeric variable M2. If 10 is exceeded, transfer
control to line 60. Step 1 can be omitted.
40 MBOX(M1,M2)=M1*M2 'Substitute the value of M1*M2 for the array
variable MBOX (M1, M2).
50 NEXT M2 'Return to line 30.
60 NEXT M1 'Return to line 20.
70 END 'End the program.
 

Cases in which the repeated control is not executed are shown below.

- The counter's <Default Value> is greater than <End Value> and <Increment> is a positive number.

- The counter's <Default Value> is smaller than <End Value>, and <Increment> is a negative number.

If the FOR statement and NEXT statement contradict each other, an error will occur.

Note that when the FOR and NEXT statements are in a nesting structure and have the same end
value, the statement can be described with one NEXT statement. For example, line 50 and 60 in
the example can be combined to be written "NEXT M2, M1" in one line.

When the NEXT statement corresponds to the closest FOR statement, the variable name in the
NEXT statement can be omitted. In the example, "M2" in line 50 and "M1" in line 60 can be omitted.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 468 of 562

 
 

Reference

GOSUB, WHILE, END, Numeric operation expressions (Syntax diagram)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
FPRM (FPRM)
 

Function:

Defines the order of the arguments, the type, and number for the main program that uses
arguments in a subprogram (i.e., when the host program uses another program with CALLP).
 

Format

FPRM <Dummy argument> [, <Dummy argument> ... ]


 

Terminology

<Dummy Argument>    The variable in the subprogram that is transferred to the main statement
when executed.
All variables can be used. Up to 16 variables may be used.
 

Explanation

FPRM is unnecessary if there are no arguments in the subprogram that is called up.
If a variable used in a program is not in <Dummy Argument> the variable will use the value it
currently holds.
Depths between programs
- The calling up of programs allows the level of the control structure between programs to go
deeper.
- One calling up of a program results in the program structure becoming one level deeper.
It is possible for the control structure in a program to go as deep as 7 levels. If 7 levels are
exceeded, an error will occur during execution.
The calculation results in the subprogram cannot be transferred to the host program using
temporary arguments. In this case, transfer the results using external variables.
 

Reference Program

10 FPRM M1,P1,P2
 

Reference

CALLP, Variables, Array variables, Functions

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
GETM (Get Mechanism)
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 469 of 562

Function:

Acquires the mechanism resource for the designated mechanism No.


 

Format

GETM <Mechanism no.>


 

Terminology

<Mechanism no.>    1 to 3, Specify this argument by using a numeric value or variable.


The standard system‚s robot arm is assigned to mechanism 1.
 

Explanation

If the mechanism‚s resource is not acquired with GETM, the movement commands of motor
power ON/OFF commands cannot be executed..
GETM cannot be commanded to a mechanism for which GETM has already been executed.
If the argument is omitted from the system status variable requiring the mechanism
designation, the currently acquired mechanism will be designated.
Main slot (slot 1) acquires mechanism 1 in the default state.
If the program is stopped, RELM will be executed automatically by the system. When the
program is restarted, GETM will be executed automatically.
 

Reference Program

10 GETM 1 'Acquire mechanism 1 resource


20 SERVO ON 'Turn mechanism 1 servo ON
30 MOV P1
40 MVS P2
45 P3=P_CURR 'Substitute P3 in mechanism 1 current position.
50 SERVO OFF 'Turn mechanism 1 servo OFF.
60 RELM 'Release mechanism 1 resource.
70 END
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
GOSUB (Go Subroutine)
 

Function:

Calls up the subroutine at the designated line No. or line label.


 

Format

GOSUB <Call destination>


 

Terminology

<Call Destination>    Describes the line No. or label name.


 

Explanation

When calling a subroutine in the base program, use a label name starting with "L_". Note that
if the same label is found in the local program, the local program's routine will be executed.
 

Reference Program

For a line number

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 470 of 562

100 GOSUB 1000


110 END
1000 MOV P1
1010 RETURN ' Be sure to use the RETURN instruction to return
For a label

100 GOSUB *LBL


110 END
1000 * LBL
1010 MOV P1
1010 RETURN ' Be sure to use the RETURN instruction to return
 

Reference

RETURN, END, GOTO, DEF ACT, ACT

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
GOTO (Go To)
 

Function:

Unconditionally branches to a designated line No. or label.


 

Format

GOTO <Branch destination>


 

Terminology

<Branch Destination>    Describes the line No. or label name.


 

Explanation

GOTO cannot be commanded to a label in the base program. Thus, even if the designated
label name is in the base program, the no skip destination error will occur.
 

Reference Program

100 GOTO 500 'Branch to line 500


:
500 MOV P1 'Move to Position P1
:
700 GOTO *LABLE 'Branch to the Subprogram LABLE
:
900 *LABLE 'Define „LABLE“ as a branchmark
 

Reference

IF THEN ELSE, GOSUB, DEF ACT, ACT


 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 471 of 562

 
HLT (Halt)
 

Function:

Interrupts the execution of the program and movement of the robot, and stops.

Format

HLT
 

Explanation

Interrupts the execution of a program and decelerates the robot to a stop. The system will
enter the waiting state.
To restart, start the O/P or issue the start signal from an external source. The program will
be restarted at the next line after the HLT statement.
Note that if the HLT statement is an appended statement, the operation will restart from the
same line of the program where it was interrupted.
 

Reference

WTHIF, WTH, SKIP

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
HOPEN/HCLOSE (Hand Open/Close)
 

Function:

Commands the hand to open or close.

Format

HOPEN <Hand No.> [, <Starting grasp force>, <Holding grasp force>, <Starting grasp force holding
time>]
HCLOSE <Hand No.>
 

Terminology

<Hand No.>    Select a numeric value between 1 and 8.


<Starting grasp forcer>    This parameter is valid for the motorized hand, and invalid
for any other type of hand.
Set the required grasping force for starting the hand
open/close.
Set the grasping force as a step between 0 and 63 (63 =
3.5kgf).
The default value is 63. When omitted, the previous setting
value will be applied.
<Holding grasp force>    This parameter is valid for the motorized hand, and invalid
for any other type of hand.
Set the required grasping force for holding the hand open /
close.
Set the grasping force as a step between 0 and 63 (63 =
3.5kgf).
The default value is 63. When omitted. the previous setting
value will be applied.
<Starting grasp force holding timer>    This parameter is valid for the motorized hand.
Set the time to hold the starting grasping force as a value
from 0.00 (sec.).
The default value is 0.3 sec.
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 472 of 562

Explanation

The operation (single/double) of each hand is set with parameter HANDTYPE.


The status of the hand output signal when the power is turned ON is set with parameter
HANDINIT.
The hand input signal can be confirmed with the robot status variable M-HNDCQ ("Hand input
number"). The signal can also be confirmed with the input signals No.900 to 907 (when there
is one mechanism).
10 HCLOSE 1
20 IF M_HNDCQ(1)<>1 THEN GOTO 20
30 MOV P1
There are related parameters. Refer to "1.6 Functions set with parameters" on page 33 of this
manual.
 
 

Reference Program

10 HOPEN 1 'Open hand 1.


20 HCLOSE 2 'Close hand 2.
 

Reference

Robot Status Variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
IF THEN ELSE (If Then Else)
 

Function:

A process is selected and executed according to the results of an expression.


 

Format

IF <Expression> THEN <Process> [ELSE <Process>]


 

Terminology

<Expression>    Describe the expression targeted for comparison as a comparison operation


expression or logic operation expression.
<Process>    Describe the process following THEN for when the comparison results are true, and
the process following ELSE for when the comparison results are false.
 

Reference Program

100 IF M1>10 THEN 1000


110 IF M1>10 THEN GOTO 1000 ELSE GOTO 2000
 

Reference

ON GOSUB, ON GOTO, Numeric operation expressions (syntax diagram)

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
INPUT # (Input)
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 473 of 562

Function:

Inputs data from a file (input device). All data uses the ASCII format.

Format

INPUT # <File No.>, <Input data name> [, <Input data name>] ...
 

Terminology

<File No.>    Describe a number between 1 and 8.


This corresponds to the file No. assigned with the OPEN command.
<Input Data Name>    Describe the variable name for saving the input data. All variables can be
described.
 

Explanation

Data is input from file (input device) having the file No. opened with the OPEN statement,
and is substituted in the variable. If the OPEN statement has not been executed, an error will
occur.
The type of data input and the type of variable that is substituting it must be the same.
When describing multiple variable names, use a comma (,) between variable names as
delimiters.
When the INPUT statement is executed, the status will be "standby for input". The input data
will be substituted for the variables at the same time as the carriage return (CR and LF) are
input.
If multiple elements are input due to the number of arguments in the INPUT statement,
reading will continue to the next INPUT statement. When the END or CLOSE statement is
executed, the data saved in the buffer will be erased.
Example: To input both a character string, numeric value and position.
10 INPUT# 1,C1$,M1,P1
PRN MELFA,125.75,(130.5,-117.2,55.1,16.2,0,0)(1,0)
MELFA is substituted in C1$, 125.75 in M1, and (130.5, -117.2,55.1,16.2,0,0)(1,0) in P1.
 

Reference Program

10 OPEN "COM1:" AS #1 'Assign RS-232-C for file No. 1.


20 INPUT# 1,M1 'When data is input from the keyboard, that value
will be input in the numeric variable M1
 

Reference

OPEN, PRINT

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
JOVRD (J Override)
 

Function:

Designates the override that is valid only during the robot‚s joint movements.

Format

JOVRD <Designated override>


 

Terminology

<Designated override>     Describes the override as a real number. A numeric operation


expression can also be described. Unit: [%] (Recommended range: 1 to
100.0)
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 474 of 562

The JOVRD command is valid only during joint interpolation.


The actual override is = (Operation panel (T/B) override setting value) x (Program override
(OVRD command)) x (Joint override (JOVRD command)). The JOVRD command changes only
the override for the joint interpolation movement.
The 100% <Designate override> is the maximum capacity of the robot. Normally. the system
default value (M_NOVRD) is set to 100%. The value is reset to the default value when the END
statement is executed or the program is reset.
 

Reference Program

10 JOVRD 50
20 MOV P1
30 JOVRD M_NJOVRD 'Set the default value
 

Reference

OVRD, SPD, Movement commands, Robot status variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
JRC (Joint Roll Change)
 

Function:

Robot arm's J6 axis: The current position is rewritten to a position obtained by adding ± 360
degrees to the current joint position of the J6 axis.

User-defined axis (additional axis, user-defined mechanism): The current position is rewritten to a
position obtained by adding or subtracting a value designated in the parameters to the current joint
position of the designated axis. Either a joint axis or linear axis can be used.
The origin can also be reset at the current position.
 

Format

JRC <[+]1/-1/0>[,<Axis No.>] ...


 

Terminology

<+1>   The current joint angle of the designated axis is incremented by the amount designated
in parameter JRCQTT. (The sign can be omitted)
For the robot arm's J6 axis, the value is fixed to 360 degrees.
<-1>   The current joint angle of the designated axis is decremented by the amount
designated in parameter JRCQTT. 
For the robot arm's J6 axis, the value is fixed to 360 degrees.
<0> The origin for the designated axis is reset at the value designated in parameter
JRCORG. This can be used only for the user-defined axis.
<Axis No.>   The target axis is specified with the number. The default axis is J6 of robot arm.
 

Related parameters

JRCEXE    Set whether to enable/disable the JRC execution


Execution disabled = 0 (default value) / execution enabled = 1
JRCQTT    Designate the amount to move (1 deg./1mm unit) when incrementing or decrementing
with the JRC command. in additional axis or user-defined mechanism.
The value is fixed to 360 degrees for the JRC target axis on the robot arm
JRCORG Designate the origin for executing JRC 0. in additional axis or user-defined mechanism.
 

Explanation

The current joint angle of the designated axis is incremented/decremented by the designated
amount with the JRC 1/-1 command.
The origin for the designated axis is reset with the JRC 0 command.
The joint angle will change, but the robot will not move.
When using this command, change the movement range of the target axis beforehand so that
it does not leave the movement range when the command is executed. The range can be
changed by changing the - side and + side value of the corresponding axis in the joint

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 475 of 562

movement range parameter "MEJAR". Set the movement range for the rotating axis of -2340
deg. to 2340 deg.
If the designated axis is omitted, the priority axis will be the target. The priority axis is the
rotating axis (J6 axis) at the end robot.
If the designated axis is omitted when a priority axis does not exist (robot incapable of JRC),
or id the designated axis is not target for JRC, an error will occur when the command is
executed.
If the origin is not set, an error will occur when the command is executed.
The robot is stopped while the JRC command is executed. Even if CNT is validated, the
interpolation connection will not be continuous when this command is executed.
The following parameter must be set before using the JRC command.
- Set JRCEXE to 1. (JRC execution enabled)
- Change the movement range of the target axis with MEJAR
- Set the position change amount during the JRC 1/-1 execution with JRCQTT. (Only for the
additional axis or user-defined mechanism)
- Set the origin position for executing JRC 0 with JRCORG. (Only for the additional axis or
user-defined mechanism)
When parameter JRCEXE is set to 0, no process will take place even if JRc command is
executed.
If the movement amount designated with parameter JRCQTT is not within the pulse data 0 to
MAX., an error will occur during the initialization. Here, MAX is 2^(Number of encoder bits +
15) - 1. For example, with a 13-bit encoder (8192 pulses), this will be MAX. = 2^(13  15) - 1 =
0x0fffffff, and for a 14-bit encoder (16384 pulse), this will be MAX. = 2^(14 + 15) - 1 =
0x1fffffff.
The movement amount to pulse data conversion is as follows:
For rotating axis:
Pulse data = movement amount (deg.)/360 * gear ratio denominator/gear ratio numerator *
Number of encoder pulses
For linear axis:
Pulse data = movement amount (mm)/360 * gear ratio denominator/gear ratio numerator *
Number of encoder pulses
The origin data will change when JRC is executed, so the default origin data will be unusable.
If the controller needs to be initialized due to a version upgrade, etc., the parameters must
be backed up beforehand in the original state.
Step return operation is not possible with the JRC command.
 

Reference Program

10 Mov P1 'Moves to P1
20 JRC 1 'Increases J6 axis by 360°
30 MOV P1 'Moves to P1
 
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
* (Label)
 

Function:

This indicates the jump site.

Format

* <Label Name>
 

Terminology

<Label Name>    Describe a character string that starts with an alphabetic character.
Up to 8 characters can be used. (Up to 9 characters including *.)
 

Explanation

An error will not occur even if this is not referred to during the program.
If the same label is defined several times in the same program, an error will occur at the
execution.
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 476 of 562

Reference Program

100 * SUB1
 

Reference

GOTO, GOSUB, Label

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
LOADSET (Load Set)
 

Function:

Designates the hand and workpiece conditions for carrying out optimum acceleration/deceleration.

Format

LOADSET <Hand condition No.>, <Workpiece condition No.>


 

Terminology

<Hand condition No.>    Designate the hand condition (HNDDAT 1 to 8) No. for which the
weight and size are designated.
<Workpiece condition No.>    Designate the workpiece condition (WRKDAT 1 to 8) No. for which
the weight and size are designated.
 

Explanation

Set the hand conditions and workpiece conditions used for optimum acceleration /
deceleration. This is used when setting the optimum acceleration / deceleration for
workpiece types having different weights.
The maximum load is set for the hand when the program execution starts.
Set the weight, size (X, Y, Z) and center of gravity position (X, Y, Z) as the hand conditions in
parameter (HNDDAT 1 to 8).
Set the weight, size (X, Y, Z) and center of gravity position (X, Y, Z) as the workpiece
conditions in parameter (WRKDAT 1 to 8).
The hand conditions and workpiece conditions changed when this command is executed are
reset to the system default value when the program is reset and when the END statement is
executed.
As the system default values, the hand conditions are set to the rated load, and the
workpiece conditions are set to none (0kg).
Refer to "OADL (Optimal Acceleration)" on page 130 for details on the optimum acceleration /
deceleration.
 

Reference Program

5 OADL ON
10 LOADSET 1,1 'Hand 1 and workpiece 1 conditions
20 MOV P1
30 MOV P2
40 LOADSET 1,2 'Hand 1 and workpiece 2 conditions
50 MOV P1
60 MOV P2
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 477 of 562

MOV (Move)
 

Function:

Using joint interpolation operation, moves from the current position to the destination position.

Format

MOV <Target Position> [,<Close Distance>][ Type <Constants_1>,<Constants_2>] [<Appended


conditions>]
 

Terminology

<Movement Target Position>    This is the final position for interpolation operation. Describe a
movement position statement.
<Close Distance>    If this value is designated, the actual movement target position
will be a position separated by the designated distance in the
tool coordinate system Z axis direction (+/- direction).
<Constants_1> 1/0: Detour/short cut.The default Value is 1(detour).
<Constants_2> Invalid (Specify 0).
<Appended conditions>    The WTH and WTHIF statements can be used.
 

Explanation

The joint angle differences of each axis are evenly interpolated at the starting point and
endpoint positions. This means that the path of the tip cannot be guaranteed.
By using the WTH and WTHIF statement, the signal output timing and motion can be
synchronized.
The numeric constant 1 for the TYPE designates the posture interpolation amount.
Detour refers to the operating exactly according to the teaching posture. Short cut operation
may take place depending on the teaching posture.
Short cut operation refers to posture interpolation between the start point and end point in
the direction with less motion.
The detour/short cut designation is significant when the posture axis has a motion range of
180 deg. or more.
Even if short cut is designated, if the target position is outside the motion range, the axis may
move with the detour in the reverse direction.
The TYPE numeric constant 2 setting is insignificant for joint interpolation.
This instruction cannot be used in a constantly executed program.
 

Reference Program

10 MOV P1 TYPE 1,0


20 MOV J1
30 MOV (PLT 1,10),100.0 WTH M_OUT(17)=1
40 MOV P4+P5,50.0 TYPE 0.0 WTHIF M_IN(18)=1,M_OUT(20)=1
 

Reference

Movement commands, WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVA (Move Arch)
 

Function:

This instruction moves the robot from the current position to the target position with an arch movement (arch interpolation).

Format

This function is available for controller software version G2 or later

MVA <Target Position>[,<Arch Number>]


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 478 of 562

Terminology

<Target Position> Final position of interpolation movement. This position may be specified
using a position type variable and constant, or a joint variable.
<Arch Number>   A number defined by the DEF ARCH instruction (1 to 4). If the argument
is omitted, 1 is set as the default value.
 

Explanation

The robot moves upward along the Z-axis direction from the current position, then moves to a
position above the target position, and finally moves downward, reaching the target position.
This so-called arch motion movement is performed with one instruction.
If the MVA instruction is executed without the DEF ARCH  instruction, the robot moves with
the arch shape configuration set in the parameters. Refer to DEF ARCH  for a detailed
description about the parameters.
The interpolation form, type and other items are also defined by the DEF ARCH instruction.
This instruction cannot be used in a constantly executed program. 
If paused during execution of a MVA instruction and restarted after jog feed, the robot
returns to the interrupted position and restarts the MVA instruction. 
 

Reference Program

10 DEF ARCH 1,5,5,20,20 'Defines the arch shape


configuration
20 OVRD 100,20,20 'Specifies override
30 ACCEL 100,100,50,50,50,50 'Specifies acceleration/
deceleration rate.
40 MVA P1,1 'Performs the arch motion movement
according to the defined in line 10
40 MVA P2,2 'Moves the robot according to the
default values registers
 

Reference

DEF ARCH (Define Arche), ACCEL (Accelerate), OVRD (Override), Movement commands
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVC (Move C)
 

Function:

Carries out 3D circular interpolation in the order of start point, transit point 1, transit point 2 and start point.

Format

MVC <Start point>, <Transit point 1>, <Transit point 2> [<Additional condition>]
 

Terminology

<Start point>    The start point and end point for a circle. Describe a position operation
expression or joint operation expression.
<Transit point 1>    Transit point 1 for a circular arc. Describe a position operation
expression or joint operation expression.
<Transit point 2>    Transit point 2 for a circular arc. Describe a position operation
expression or joint operation expression.
<Additional condition>    Describe a WTH conjunction or a WTHIF conjunction.
 

Explanation

In circular interpolation motion, a circle is formed with the 3 given points, and the
circumference is moved. (360 degrees)
The posture during circular interpolation does not change.
If the current position does not agree with the start point, the robot will automatically move
to start point by linear interpolation.
Once the execution has been interrupted and once jog operations have been restarted, it will
start moving in relation to the position where it was interrupted, by linear interpolation.
This instruction cannot be used in a constantly executed program.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 479 of 562

Reference Program

10 MVC P1,P2,P3
20 MVC P1,J2,P3
30 MVC P1,P2,P3 WTH M_OUT(17)=1
40 MVC P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1
 

Reference

Movement commands, WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVR (Move R)
 

Function:

Carries out 3-dimensional circular interpolation movement from the start point to the end point via transit points.

Format

MVR <Start point>, <Transit point>, <End point> [ TYPE <Constants_1>,<Constants_2>]  [<Appended
Condition>]
 

Terminology

<Start Point>    Start point for the circular arc. Describe a position operation
expression or joint operation expression.
<Transit Point>    Transit point for the circular arc. Describe a position operation
expression or joint operation expression.
<End Point>    End point for the circular arc. Describe a position operation expression
or joint operation expression.
<Constants_1> Detour/short cut = 1/0.The default value is 0.
<Constants_2> 3-axis XYZ/Equivalent rotation = 1/0. The default value is 0.
<Appended Condition>    The WTH and WTHIF conjunctions.
 

Explanation

In circular interpolation motion, a circle is formed with three given points, and robot moves
along the circumference.
The posture is interpolation from the start point to the end point; the transit point posture
has no effect.
If the current position and start point do not match, the robot will automatically move with
linear interpolation (3-axis orthogonal interpolation) to the start point.
If the execution is stopped, the robot is moved with jog, and then the execution is restarted,
the robot will move with joint interpolation to the position where execution was stopped, and
then the remaining circular interpolation will restart.
If the start point and end point structure flags differ for an interpolation method other than
3-axis orthogonal interpolation, an error will occur at the execution.
Of the three designated points, if any points coincide with the other, or if three points are on
a straight line, linear interpolation will take place from the start point to the end point. An
error will not occur.
If 3-axis orthogonal is designated for the numeric constant 2, the numeric constant 1 will be
invalidated, and the robot will move with the taught posture.
Numeric constant 2 designates the posture interpolation type. 3-axis orthogonal is used when
carrying out interpolation on the (X, Y, Z, J4, J5, J6) coordinate system, and the robot is to
move near a particular point.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 480 of 562

This instruction cannot be used in a constantly executed program.


 

Reference Program

10 MVR P1,P2,P3
20 MVR P1,J2,P3
30 MVR P1,P2,P3 WTH M_OUT(17)=1
40 MVR P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1
 

Reference

Movement commands WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVR2 (Move R2)
 

Function:

Carries out 3-dimensional circular interpolation motion from the start point to the end point on the
arc composed of the start point, end point, and reference points.The direction of movement is in a
direction that does not pass through the reference points.
 

Format

MVR2 <Start point>, <End point>, <Reference point> [ TYPE  <Constants_1>,


<Constants_2>] [<Appended Condition>]
 

Terminology

<Start Point>    Start point for the circular arc. Describe a position operation
expression or joint operation expression.
<End Point>    End point for the circular arc. Describe a position operation expression
or joint operation expression.
<Reference Point>    Reference point for a circular arc. Describe a position operation
expression or joint operation expression.
<Constants_1> Detour/short cut = 1/0, The default value is 0.
<Constants_2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0.
<Appended Condition>    The WTH and WTHIF statements can be used.
 

Explanation

In circular interpolation motion, a circle is formed with three given points, and robot moves
along the circumference.
The posture is interpolation from the start point to the end point; the transit point posture
has no effect.
If the current position and start point do not match, the robot will automatically move with
linear interpolation (3-axis orthogonal interpolation) to the start point.
If the execution is stopped, the robot is moved with jog, and then the execution is restarted,
the robot will move with joint interpolation to the position where execution was stopped, and
then the remaining circular interpolation will restart.
The direction of movement is in a direction that does not pass through the reference points.
If the start point and end point structure flags differ for an interpolation method other than
3-axis orthogonal interpolation, an error will occur at the execution.
Of the three designated points, if any points coincide with the other, or if three points are on
a straight line, linear interpolation will take place from the start point to the end point. An

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 481 of 562

error will not occur.


If 3-axis orthogonal is designated for the numeric constant 2, the numeric constant 1 will be
invalidated, and the robot will move with the taught posture.
Numeric constant 2 designates the posture interpolation type. 3-axis orthogonal is used when
carrying out interpolation on the (X, Y, Z, J4, J5, J6) coordinate system, and the robot is to
move near a particular point.

Reference Program

10 MVR2 P1,P2,P3
20 MVR2 P1,J2,P3
30 MVR2 P1,P2,P3 WTH M_OUT(17)=1
40 MVR2 P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1
 

Reference

Movement commands, WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVR3 (Move R3)
 

Function:

Carries out 3-dimensional circular interpolation movement from the start point to the end point on
the arc composed of the center point, start point and end point.
 

Format

MVR3 <Start point>, <End point>, <Center point> ,[ TYPE <Constants_1>, <Constants_2>]  [<Appended Condition>]
 

Terminology

<Start Point>    Start point for the arc. Describe a position operation expression or
joint operation expression.
<End Point>    End point for the circular arc. Describe a position operation expression
or joint operation expression.
<Center Point>    Center point for the arc. Describe a position operation expression or
joint operation expression.
<Constants_1> Detour/short cut = 1/0, The default value is 0.
<Constants_2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0.
<Appended Condition>    The WTH and WTHIF conjunctions.
 

Explanation

In circular interpolation motion, a circle is formed with three given points, and robot moves
along the circumference.
The posture is interpolation from the start point to the end point; the transit point posture
has no effect.
If the current position and start point do not match, the robot will automatically move with
linear interpolation (3-axis orthogonal interpolation) to the start point.
If the execution is stopped, the robot is moved with jog, and then the execution is restarted,
the robot will move with joint interpolation to the position where execution was stopped, and
then the remaining circular interpolation will restart.
If the start point and end point structure flags differ for an interpolation method other than
3-axis orthogonal interpolation, an error will occur at the execution.
Of the three designated points, if any points coincide with the other, or if three points are on

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 482 of 562

a straight line, linear interpolation will take place from the start point to the end point. An
error will not occur.
If 3-axis orthogonal is designated for the numeric constant 2, the numeric constant 1 will be
invalidated, and the robot will move with the taught posture.
The fan angle from the start point to the end point is 0 < fan angle < 180 deg.
Designate the positions so that the difference from the center point to the end point and the
center point to the distance is within 0.01 mm.
If the three points are on the same line, or if the start point and center point, or end point
and center point are the same, an error will occur.
If the start point and end point are the same, or if the three points are the same, the robot
will move with linear interpolation from the start point to the end point.
This instruction cannot be used in a constantly executed program.

Reference Program

10 MVR3 P1,P2,P3
20 MVR3 P1,J2,P3
30 MVR3 P1,P2,P3 WTH M_OUT(17)=1
40 MVR3 P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1
 

Reference

Movement commands, WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MVS (Move S)
 

Function:

Carries out linear interpolation movement from the current position to the movement
target position.
 

Format 1

MVS <Movement Target Position> [, <Close distance>] [<Interpolation Type>] [<Appended


Condition>]
 

Format 2

MVS <Separation Distance> [<Interpolation Type>]


 

Terminology

<Movement Target Position>    The final position for the linear interpolation. Describe a
movement position statement
<Close Distance>    If this value is designated, the actual movement target position
will be a position separated by the designated distance in the
tool coordinate system Z axis direction {+/- direction).
<Interpolation Type>    Designate the interpolation type.
TYPE <Numeric constant 1>, <Numeric constant 2>
Numeric constant 1 ... Detour/short cut = 1/0
Numeric constant 2 ... 3-axis orthogonal/Equivalent rotation =
1/0
The default value is 0, 0 {detour, equivalent rotation).
<Appended conditions>    The WTH and WTHIF statements can be used.
<Separation Distance>    If this value is designated, the robot will move from the current
position to a position separated by the designated amount in the

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 483 of 562

tool coordinate system Z axis direction. When a positive value is


set, the movement will take place in the direction that the
mechanical interface {flange surface) is facing, and when a
negative value is set. the movement will take place in the
opposite direction {hand retract).
 

Explanation

Linear interpolation motion is a type of movement where the robot moves from its current
position to the movement target position so that the locus of the control points is in a straight
line.
The posture is interpolation from the start point to the end point.
If the execution is stopped, the robot is moved with jog, and then the execution is restarted,
the robot will move with joint interpolation to the position where execution was stopped, and
then will move to the target position.
Note that when resuming a command for the target position, such as MVS, 100, the robot will
not move the remaining distance.
If the start point and end point structure flags differ for an interpolation method other than
3-axis orthogonal interpolation, an error will occur at the execution.
Of the three designated points, if any points coincide with the other, or if three points are on
a straight line, linear interpolation will take place from the start point to the end point. An
error will not occur.
If 3-axis orthogonal is designated for the numeric constant 2, the numeric constant 1 will be
invalidated, and the robot will move with the taught posture.
 

Reference Program

10 MVS PLT1,10,100.0 WTH M_OUT(17)=1


20 MVS P4+P5,50.0 WTHIF M_IN(18)=1,M_OUT(20)=1
30 MVS ,50
 

Reference

Movement commands, WTH, WTHIF, FINE, CNT


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
OADL (Optimal Acceleration)
 

Function:

Automatically sets the optimum acceleration/deceleration time according to the designated robot hand's load state.

Format

OADL <Switch>
 

Terminology

<Switch>    Set whether to turn optimization ON or OFF.


 

Explanation

The robot moves with the optimum acceleration/deceleration according to the hand
conditions and workpiece conditions designated with the LOADSET command.
The workpiece grasp/not grasp for when the hand is opened or closed is set with parameter
HNDHOLD 1 to 8.
The ACCEL command is invalid when OADL is ON.
OADL is set to OFF as the default.
Once OADL is ON, it is valid until OADL OFF is executed or until the program END is executed.
 

Reference Program

10 OADL ON
20 MOV P1 'Move with maximum load.
30 LOADSET 1,1 'Set hand 1 and workpiece 1.
40 MOV P2 'Move with hand 1 + workpiece 1 load.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 484 of 562

50 HOPEN 1
60 MOV P3 'Move with hand 1 load.
70 HCLOSE 1
70 HOPEN P4 'Move with hand 1 + workpiece 1 load.
80 LOADSET 1,2 'Set hand 1 and workpiece 2.
90 MOV P5 'Move with hand 1 load.
100 HCLOSE 1
110 MOV P6 'Move with hand 1 + workpiece 2 load
*When parameter HNDHOLD1 is set to 0, 1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
ON COM GOSUB (On Communication Go Subroutine)
 

Function:

Defines the starting line of a branching subroutine when an interrupt is generated from a
designated communication line.
 

Format

ON COM [(<File No.>)] GOSUB <Call destination>


 

Terminology

<File No.>    Describe a number between 1 and 3 assigned to the communication line.
<Call Destination>    Describe the line No. or label name.
 

Explanation

If the file No. is omitted, 1 will be used as the file No.


The file No. with the smallest No. have the order of priority for the interrupt.
If a communication interrupt is generated while the robot is moving. the robot will stop.
It is possible to use COM STOP to stop the interrupt. and prevent the robot from stopping.
In the default state, the interrupt is disabled. Execute the COM ON command after this
command to validate the interrupt.
 

Reference Program

10 OPEN "COM1:" AS #1
20 OPEN "COM3:" AS #2
30 ON COM GOSUB 300 'If an interrupt is generated from the file No.1
communication line (COM1:), carry out line 300
process.
40 ON COM(2) GOSUB *RECV 'If an interrupt is generated from the
communication line No.1 communication line, carry
out the label RECV process.
50 COM(1) ON 'Enable interrupt from file No.1 communication
line.
60 COM(2) ON 'Enable interrupt from file No.2 communication
line.
70 COM OFF 'Disable interrupt from file No.1 communication
line.
80 COM(2) OFF 'Disable interrupt from file No.2 communication
line.
 

Reference

COM ON, COM OFF, COM STOP, OPEN

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 485 of 562

COSIMIR® · MELFA-BASIC IV
 
 

ON GOSUB (On Gosub)


 

Function:

Calls up the subroutine at the line No. or label corresponding to the value.

Format

ON <Terminology> GOSUB [<Expression>] [, [<Call destination>]] ...


 

Terminology

<Terminology>    Designate the line No. or label on the nth line to branch to with a numeric
operation expression.
<Call Destination>    Describe the line No. or the label No.
 

Explanation

The value of <Expression> determines which line No. or label subroutine to call.
For example, if the value of <Expression> is 2, the line No. or label described for the second
value is called.
If the value of <expression> is larger than the number of <destinations called up>, the
program control jumps to the next line. For example, the program control jumps to the next
line if the value of <expression> is 5 and there are only three <destinations called up>.
When a line No. or label that is called up does not exist, or when there are two definitions,
an error will occur.
Make sure to return from a subroutine using the RETURN instruction. An error occurs if the
GOTO instruction is used to return, because the free memory available for control structure
(stack memory) decreases and eventually becomes insufficient.
 

Value of <Expression> Process <Control>


Real number Value is converted to an Integer by
rounding it off, and then branching is
executed.
When 0, or when the value exceeds the Control proceeds the next line
number of line Nos. or labels
Negative number or 32767 is exceeded Execution Error
Line number or label is omitted Execution Error
 

Reference Program

100 ON M1 GOSUB 1000, *SUBPR 'Call line 1000 when numeric variable MI
value is 1, and the label *SUBPR line when 2.
 

Reference

RETURN, END, ON GOTO, GOSUB, IF THEN ELSE

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
ON GOTO (On go to)
 

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 486 of 562

Branches to the line with the line No. or label that corresponds to a designated value.

Format

ON <Expression> GOTO [<Branch destination>] [, [<Branch destination>]] ...


 

Terminology

<Expression>    Designate the line No. or label on the nth line to branch to with a numeric
operation expression.
<Call Destination>    Describe the line No. or the label No.
 
Explanation
This is the GOTO version of ON GOSUB.
When a line No. or label that is called up does not exist, or when there are two definitions,
an error will occur.
 

Value of <Expression> Process <Control>


Real number Value is converted to an Integer by
rounding it off, and then branching is
executed.
When 0, or when the value exceeds the Control proceeds the next line
number of line Nos. or labels
Negative number or 32767 is exceeded Execution Error
Line number or label is omitted Execution Error
 

Reference Program

100 ON M1 GOTO 1000,*SUBPR 'Branch to line 1000 when numeric variable M1


value is 1; and the label *SUBPR line when 2.
 

Reference

GOTO, ON GOSUB, IF THEN ELSE

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
OPEN (Open)
 

Function:

Open a file or communication line

Format

OPEN "<File descriptor>" [FOR <Mode>] AS [#] <File No.>


 

Terminology

<File Descriptor>    Describe a file name (including communication lines).


To open a communication line, set "<Communication Line File Name>:"
When not using a communications line, set "<File Name>"
<Mode>    
Designate the method to access a file.
Omitted = random mode
This can be omitted when using a communication line.
INPUT = input mode
Inputs from an existing file.
OUTPUT = output mode (new file)
Creates a new file and outputs it there.
APPEND = Output mode (existing file)
Appends output to the end of an existing file.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 487 of 562

File Descriptor File name Access method


File Describe with 16 INPUT, PRINT,
characters or less APPEND
Communication COM 1:, COM 2:, Omitted =
line file COM 3: random mode
only
 
<File No.>     Describe a constant within the following range.
To interrupt from communication line: 1 to 3.
To not interrupt from communication line: 1 to 8.
 

Explanation

Designate the designated file No. of the file described in <File Descriptor>, and open. Use this
file No. when reading from or writing to the file.
A communication line is handled as a file.
 

Communicationfile Hardware device name


COM 1 Standard RS232-C
COM 2 (Reserved)
COM 3 (Reserved)
 

Reference Program

Communication line

10 OPEN "COM1:" AS #1    'Open standard RS-232-C line as file No. 1.


20 MOV P_01              'Move to position P_01
30 PRINT #1,P_CURR       'Output current position to external source.
"(100.00,200.00,300.00,400.00)(7.)" format
40 INPUT #1,M1,M2,M3     'Send from external source with "101.00,202.00,303.00"
ASCII format.
50 P_01.X=M1            
60 P_01.Y=M2            
70 P_01.C=M3             'Copy to global data.
80 CLOSE                 'Close all opened files.
90 END                  

File operation

10 OPEN "temp.txt" FOR APPEND AS #1 'Create the file "temp.txt" to the controller an
write "abc"
20 PRINT #1, "abc"
30 CLOSE #1
 

Reference

INPUT, PRINT, COM ON, COM OFF, COM STOP, ON COM GOSUB

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
OVRD (Override)
 

Function:

This instruction specifies the speed of the robot movement as a value in the range from 1 to 100%.
This is the override applied to the entire program.
 

Format

OVRD <Designated override>


This function is available for controller software version G2 or later.

OVRD <Designated override>[<Override when moving upward>] [,<Override when moving

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 488 of 562

downward>]
 

Terminology

<Designated override>    Designate the override with a real number. Unit: [%]
(Recommended range: 1 to 100.0)
A numeric operation expression can also be described.
If 0 or a value over 100 is set, an error will occur.
<Override when moving upward/downward> Sets the override value when moving
upward/downward by the arch motion instruction
(MVA)
 

Explanation

The OVRD command is valid regardless of the interpolation type.


The actual override is as follows:
During joint interpolation: (Operation panel (T/B) override setting value) x (Program override
(OVRD command)) x (Joint override (JOVRD command)).
During Linear interpolation: (Operation panel (T/B) override setting value) x (Program
override (OVRD command)) x (Linear designated speed (SPD command)).
The OVRD command changes only the program override. 100% is the maximum capacity of the
robot. Normally, the system default value (M_NOVRD) is set to 100%. The designated override
is the system default value until the OVRD command is executed in the program.
Once the OVRD command has been executed, the designated override is applied until the
next OVRD command is executed, the program END is executed or until the program is reset.
The value will return to the default value when the END statement is executed or the
program is reset.
 

Reference Program

10 OVRD 50
20 MOV P1
30 MVS P2
40 OVRD M_NOVRD 'Set the default value
Also possible with controller Software G2

10 OVRD 30,10,10 'Sets the override when moving upward/downward


20 MVA P3,3 'moving by the arch motion instruction
 

Reference

JOVRD, SPD, Movement commands, Robot status variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
PLT (Pallet)
 

Function:

Calculates the position of grid in the pallet.

Format

PLT <Pallet No.> <Numeric operation expression>


 

Terminology

<Pallet No.>    Select a pallet No. between 1 and 8 that has already been
defined with a DEF PLT command.
<Numeric Operation Expression>    Sets the grid No. for the selected pallet.
 

Explanation

The position of grid of a pallet defined by the DEF PLT statement is operated.
The pallet Nos. are from 1 to 8, and up to 8 can be defined at once.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 489 of 562

Note that the position of the grid may vary because of the designated direction in the pallet
definition.
If a grid No. is designated that exceeds the largest grid No. defined in the pallet definition
statement, an error will occur during execution.
When using the pallet grid point as the target position of the movement command, an error
will occur if the point is not enclosed in parentheses as shown above.
 

Reference Program

100 DEF PLT 1,P10,P11,P12,P13,8,8,1 'The definition of the four-


point pallet. (P1,P2,P3,P4)
110
120 M1 = 1 'Initialize the counter M1.
130 *LOOP 'Setzen eines Labels
140 MOV PICK,50 'Moves 50 mm above the work
unload position.

150 OVRD 50
160 MVS PICK

170 HCLOSE 1 'Close the hand

180 DLY 0.5 'Wait for the hand to close


securely (0.5 sec.)
190 OVRD 100

200 MVS,50 'Moves 50 mm above the


current position.
210 PLACE=PLT 1,M1 'Calculates the M1th position

220 MOV PLACE,50 'Moves 50 mm above the pallet


top mount position.
230 OVRD 50

240 MVS PLACE

250 HOPEN 1 'Open the hand.

260 DLY 0.5

270 OVRD 100

280 MVS,50 'Moves 50 mm above the


current position.
290 M1=M1+1 'Add the counter.

300 IF M1<=12 THEN *LOOP 'If the counter is within the


limits, repeats from *LOOP..
310 MOV PICK,50

320 END

Reference

DEF PLT, Movement Command

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
PREC (Precision)
 

Function:

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 490 of 562

This instruction is used to improve the motion path tracking. It switches between enabling and
disabling the high accuracy mode. This is only available for certain types of robots (RV-1A/2AJ, RV-
4A/5AJ/3AL/4AJL, and RV-20A).
 

Format

This function is available  for controller software version D1 or later.

PREC <Switch>
 

Terminology

<Switch> ON : When enabling the high accuracy


mode.                                               
OFF : When disabling the high accuracy mode.
 

Explanation

The high accuracy mode is enabled using the PREC ON instruction if it is desired to perform
interpolation movement with increased path accuracy.
When this instruction is used, the path accuracy is improved but the program execution time
(tact time) may become longer because the acceleration/deceleration times are changed
internally.
The enabling/disabling of the high accuracy mode is activated from the first interpolation
instruction after the execution of this instruction.
The high accuracy mode is disabled if the PREC OFF or END instruction is executed, or a
program reset operation is performed.
The high accuracy mode is disabled immediately after turning the power on.
The high accuracy mode is always disabled in jog movement.
 

Reference Program

10 PREC ON ' Enables the high accuracy mode


20 MVS P1
30 MVS P2
40 PREC OFF ' Disables the high accuracy mode
50 MOV P1
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
PRINT (Print)
 

Function:

Outputs data into a file (including communication lines). All data uses the ASCII format.

Format

PRINT # <File No.> [, [<Expression>;] ... [<Expression> [;]]]


 

Terminology

<File No.>    Described with numbers 1 to 8.


Corresponds to the control No. assigned by the OPEN command.
<Expression>    Describes numeric operation expressions, position operation expressions and
character string expressions.
 

Explanation

If <Expression> is not described, then a carriage return will be output.


If <File No.> is omitted, the default value of 1 will be used.
Output format of data (reference)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 491 of 562

The output space for the value for <Expression> and for the character string is in units of 10
characters. When outputting multiple values, use a comma between each <Expression> as a
delimiter.
If a semicolon (;) is used at the head of each space unit, it will output after the item that was
last displayed.
The carriage will always be returned after the OPEN statement.
Example
10 M1=123.5
20 P1=(130.5,-117.2,55.1,16.2,0.0,0.0)(1,0)

30 PRINT# 1,"OUTPUT TEST",M1,P1 is described,


OUTPUT TEST 123.5 (130.5,-117.2,55.1,16.2,0.0)(1,0) is output.
30 PRINT# 1,"OUTPUT TEST";M1' P1 is described,
OUTPUT TEST 123.5(130.5,-117.2,55.1,16.2,0.0)(1,0) is output.
If a comma or semicolon is inserted after a <Expression>, the carriage return will not be
issued, and instead, printing will continue on the same line.
30 PRINT# 1,"OUTPUT TEST",
40 PRINT# 1,M1‚
50 PRINT# 1,P1 is described,
OUTPUT TEST 123.5(130.5,-117.2,55.1,16.2)(1,0) is output.
 

Reference Program

10 OPEN "COM1:" AS #1 'Open .standard RS-232-C line as file


No. 1.20 MOV P_01
20 MDATA=150 'Substitute 150 for the numeric
variable MDATA.
30 PRINT #1,"***PRINT TEST***" 'Outputs the character string
"***PRINT TEST****".
40 PRINT #1 'Issue a carriage return
50 PRINT #1, "MDATA=",MDATA 'Output the character string "MDATA"
followed by the value of MDATA, (150).
60 PRINT #1 'Issue a carriage return
40 PRINT #1,"*********************" 'Outputs the character string
"*********************".
50 END 'End the program.
The output result is shown below.

***PRINT TEST***

MDATA=150

*********************

Reference

OPEN, CLOSE ,INPUT

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
PRIORITY (Priority)
 

Function:

In multitask program operation, multiple program lines are executed in sequence (one by one line
according to the default setting). This instruction specifies the priority (number of lines executed in
priority) when programs are executed in multitask operation.
 

Format

This function is available for controller software C2 or later.

PRIORITY <Number of executed lines>[,<Slot number>]


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 492 of 562

Terminology

<Number of executed lines> Specify the number of lines executed at once . Use a numerical value
from 1 to 31.
<Slot number> 1 to 32. If this argument is omitted, the current slot number is set.
 

Explanation

Programs of other slots are not executed until the specified number of lines is executed. For
example, as in the statement example above, if PRIORITY 3 is set for slot 1's program and
PRIORITY 4 is set for slot 2's program, three lines of the slot 1 program are executed first,
then four lines of the slot 2 program are executed. After-ward, this cycle is repeated.
The default value is 1 for all the slots. In other words, the execution moves to the next slot
every time one line has been executed.
An error occurs if there is no program corresponding to the specified task slot.
It is possible to change the priority even while the program of the specified task slot
 

Reference Program

Slot 1

10 PRIORITY 3 ' Sets the number of executed lines for the current slot
Slot 2

10 PRIORITY 4 ' Sets the number of executed lines for this slot to 4
 
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
RELM (Release Mechanism)
 

Function:

Releases the mechanism resource.

Format

RELM
 

Explanation

Releases the currently acquired mechanism resource.


If an interrupt is applied while the mechanism is acquired and the program execution is
stopped, the acquired mechanism resource will be automatically released.
This instruction cannot be used in a constantly executed program.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
REM (Remarks)
 

Function:

Uses the following character strings as comments.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 493 of 562

Format

REM [<Comment>]
 

Terminology

<Comment>    Describe a user-selected character string. 


Descriptions can be made in the range of position lines.
 

Explanation

REM can be abbreviated to be a single quotation mark (').


This can also be after another command on the same line.
 

Reference Program

10  REM ***MAIN PROGRAM***   


20  ' ***MAIN PROGRAM***   
30  MOV P1    ' Move to P1
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
RESET ERR (Reset Error)
 

Function:

This instruction resets an error generated in the robot controller. It is not allowed to use this
instruction in the initial status. If an error other than warnings occurs, normal programs other than
constantly executed programs can-not be operated. This instruction is effective if used in
constantly executed programs.

Format

This function is available for controller software version B1 or later

RESET ERR
 

Explanation

This instruction is used in a program whose start condition is set to constant execution
(ALWAYS) by the "SLT*" parameter when it is desired to reset system errors of the robot.
It becomes enabled when the controller's power is turned on again after changing the value of
the "ALWENA" parameter from 0 to 7.
 
 

Reference Program

Example of execution in a constantly executed program

10 IF M_ERR=1 THEN RESET ERR ' Resets an error when an error occurs in the 
controller
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
RETURN (Return)
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 494 of 562

Function:

When returning from a normal subroutine returns to the next line after the GOSUB.When returning
from an interrupt processing subroutine, returns either to the line where the interrupt was
generated, or to the next line.
 

Format

When returning from a normal subroutine:

RETURN
When returning from an interrupt processing subroutine:

RETURN <Return designation No.>


 

Terminology

<Return Designation No.>    Designate the line where control will return to after an interrupt has
been generated and processed.
0 ... Return control to the line where the interrupt was generated.
1 ... Return control to the next line after the line where the
interrupt was issued.
 

Explanation

When there is a RETURN command in a normal subroutine with a return-to designation


number, and when there is a RETURN command in an interrupt-processing subroutine with no
return-to destination number, an error will occur.
Writes the RETURN instruction at the end of the jump destination processing called up by the
GOSUB instruction.
An error occurs if the RETURN instruction is executed without being called by the GOSUB
instruction.
Always use the RETURN instruction to return from a subroutine when called by the GOSUB
instruction. An error occurs if the GOTO instruction is used to return, because the free
memory available for control structure (stack memory) decreases and eventually becomes
insufficient.
 

Reference

GOSUB, ON GOSUB, ON COM GOSUB , DEF ACT 

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
SELECT CASE (Select Case)
 

Function:

Executes one of multiple statement blocks according to the condition expression value.

Format

SELECT <Condition>
CASE <Expression>
[<Process>]
BREAK
CASE <Expression>
[<Process>]
BREAK
...
CASE <Expression>

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 495 of 562

[<Process>]
BREAK
DEFAULT
[<Process>]
BREAK
END SELECT
 

Terminology

<Condition>    Describe a numeric operation expression.


<Expression>     Describe a numeric operation expression. The type must be the same as the
condition expression.
<Process>    Describe a command statement (excluding a branch condition statement or
repeated control statement) provided with MELFA-BASICI V, a line No. or a label
name.
 

Explanation

If the condition matches one of the CASE items, the process will be executed until the next
CASE, DEFAULT or ENDSELECT.
If the case does not match with any of the CASE items but DEFAULT is described, that block
will be executed.
If there is no DEFAULT, the program will jump to the line after ENDSELECT without
processing.
The SELECT CASE and END SELECT statements must always correspond.
If an END SELECT statement that does not correspond to SELECT CASE is executed, an
execution error will occur. Note that if the END statement is executed midway, or if the last
line of the program is executed, the program execution will stop at that line.
Another SELECT CASE cannot be described in the SELECT CASE. However, WHILE WEND or FOR
NEXT can be described.
Use "CASE IS", when using the comparison operators (<, =, >, etc.) for the "<Expression>".
 

Reference Program

10 SELECT MCNT
20 M1=10 'This line is not executed
30 CASE IS <= 10 'MCNT <= 10
40 MOV P1
50 BREAK
60 CASE 11 'MCNT = 11
70 MOV P2
80 BREAK
90 CASE 12 'MCNT = 12
100 MOV P3
110 BREAK
120 CASE 13 TO 18 '13 <= MCNT <= 18
130 MOV P4
140 DEFAULT 'Other than the above
150 M_OUT(10)=1
160 BREAK
170 END SELECT
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
SERVO (Servo)
 

Function:

Controls the ON and OFF of the servo.

Format

The usual program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 496 of 562

SERVO <Switch>

The program of always (ALWAYS) execution

SERVO <Switch>[,<Mechanism No.>]


 

Terminology

ON: When turning the servo motor power


<Switch> on.                                 OFF: When turning the servo
motor power off.
This is valid only within the program of always
<Mechanism No.> execution. The range of the value is 1 to 3, and describe
by constant
 

Explanation

SERVO controls the servo power for all axes


If additional axes are attached, the servo power supply for the additional axes is also
affected.
 

Reference Program

10 SERVO ON 'Servo ON
20 IF M_SVO<>0 THEN GOTO 20 'Wait for servo ON
30 SPD M_NSPD
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
SKIP (Skip)
 

Function:

Transfers control of the program to the next line.

Format

SKIP
 

Explanation

This command can be described with the WTH or with WTHIF statements. In this case, the
execution of that line is interrupted, and control is automatically transferred to the next line.
Execution of skip can be seen with the M_SKIPCQ information.
 

Reference Program

10 MOV P1 WTHIF M_IN(17)=0,SKIP 'If the input signal (M_IN


(17)) turns ON while moving
with joint interpolation to
the position indicated with
position variable P1, stop
the robot interpolation
motion, and stop execution of
this command.
20 IF M_SKIPCQ=1 THEN HLT ' Pauses the program if the
execution is skipped.
 

Reference

HLT, WTH, WTHIF

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 497 of 562

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SPD (Speed)
 

Function:

Designates the speed for the robot's linear and circular movements.

Format

SPD <Designated speed>


 

Terminology

<Designated Speed>    Designate the speed as a real number. Unit: [mm/s]


 

Explanation

The SPD command is valid only for the robot's linear and circular movements.
The actual designated override is (Operation panel (T/B) override setting value) x (Program
override (OVRDcommand)) x (Linear designated speed (SPD command)).
The SPD command changes onIy the linear designated speed.
When M_NSPD is designated for the designated speed, the robot will always move at the
maximum possible speed, so the line speed will not be constant.
The system default value is applied for the designated speed until the SPD command is
executed in the program. Once the SPD command is executed, that designated speed is held
until the next SPD command.
The designated speed will return to the system default value when the program END
statement is executed.
 

Reference Program

10 SPD 100
20 MVS P1
30 SPD M_NSPD 'Set the default value
 

Reference

ACCEL, CNT, OVRD, JOVRD, Movement command, Robot status variable


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
Substitute
Function:

The results of an operation are substituted in a variable or array variable.

Format 1

<Variable Name> = <Expression 1>

Format 2 (For pulse substitution)

<Variable Name> = <Expression 1> DLY <Expression 2>


 

Terminology

<Variable Name>    Describe the name of the variable where the value is to be substituted.
(Refer to the syntax diagram for the types of variables.)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 498 of 562

<Expression 1>    Substitution value. Describe an arithmetic operation expression.


<Expression 2>    Pulse timer. Describe an arithmetic operation expression.
 

Explanation

When using this additionally for the pulse output, the pulse will be executed in parallel with
the execution of the commands on the following lines.
After the designated time has passed, the state will return to that before the pulse output.
If the END command or program's last line is executed during the designated time, or if the
program execution is stopped due to an emergency stop, etc., the output state will be held.
(The output state during the interrupt can be selected with the system parameters if it is to
be return to the state before the pulse output in the same manner as after the designated
time has passed.)
 

Reference Program

10 P100=P1+P2*2
20 M_OUT(17)=1 DLY 10.0
 

Reference

DLY, Syntax diagram

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
TOOL (Tool)
 

Function:

Designates the tool conversion data.

Format

TOOL <Tool conversion data>


 

Terminology

<Tool conversation data> Specifies the tool conversation data using the position operation
expression.
 

Explanation

The TOOL instruction is used to specify the control points at the tip of each hand in a system
using double hands. If both hands are of the same type, the control point should be set by the
"MEXTL" parameter instead of by the TOOL instruction.
The system default value (P_NTOOL) is applied until the TOOL command is executed. Once
the TOOL command is executed, the designated tool conversion data is applied until the next
TOOL command is executed. This is operated with 6-axis three-dimension regardless of the
mechanism structure.
The tool conversion data changed with the TOOL command is saved in parameter MEXTL, and
is saved even after the controller power is turned OFF.
If different tool conversion data are used at teaching and automatic operation, the robot may
move to an unexpected position. Make sure that the settings at operation and teaching
match. The valid axis element of tool conversion data is different depending on the type of
robot.
Instead of detailed coordinates, it is also possible to use  a position variable.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 499 of 562

                                 

Reference Program

10 TOOL (100,100,0,0,0,0)
20 MVS P1
30 TOOL P_NTOOL
 
Reference

P_TOOL, P_NTOOL

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
TORQ (Torque)

Function:

Designates the torque limit for each axis.

Format

TOOL <Axis no.>, <Numeric value>


 

Terminology

<Axis no.>    Designate the axis No., with a numeric constant. (1 to 8)


<Numeric value>    Designate the limit of the force generated from the axis as a percentage. (1 to
100)
 

Explanation

The torque limit value of the designated axis is limited. The movement is limited so that a
torque exceeding the designation is not applied. Designate a percentage in respect to the
standard torque limit.
This is used when the grasping force is to be limited for the servo hand, etc.
The available rate of torque limitation is changed by robot type.
 

Reference Program

10 TORQ 4,80
20 MVS P1

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 500 of 562

COSIMIR® · MELFA-BASIC IV
 

 
WAIT (Wait)
 

Function:

Waits for the variable to reach the designated value.

Format

WAIT <Numeric value> = <Numeric constant>


 

Terminology

<Numeric value>    Designate an M variable.


<Numeric constant>    Designate a numeric constant.
 

Explanation

This command is used as the interlock during signal input wait and during multitask
execution.
The WAIT instruction allows the program control to continue to the next line once the
specified condition is met.
In case the WAIT instruction is executed in several tasks at one time in the multitask
execution status, the processing time (tact time) may become longer and affect the system.
In such cases, use the IF-THEN instruction instead of the WAIT instruction.
 

Reference Program

10 WAIT M_IN(1) = 1 'Signal state


20 WAIT M_IN(3) = 0
30 WAIT M_RUN(2) = 1 'Task slot state
40 WAIT M_01 = 100 'Variable state
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
WHILE WEND (While End)
 

Function:

The program between the WHILE statement and WEND statement is repeated until the loop
conditions are satisfied.

Format

WHILE<Loop condition>
.
.
WEND
 

Terminology

<Loop Condition>    Describe a numeric operation expression. (Refer to the syntax diagram)
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 501 of 562

The program between the WHILE statement and WEND statement is repeated.
If the result of <Expression> is true (not 0), then the control moves to the line following the
WHILE statement and the process is repeated.
If the result of <Expression> is false (is 0), then the control moves to the line following the
WEND statement.
If a GOTO instruction forces the program to jump out from between a WHILE statement and a
WEND state-ment, the free memory available for control structure (stack memory) decreases.
Thus, if a program is executed continuously, an error will eventually occur. Write a program
in such a way that the loop exits when the condition of the WHILE statement is met.
 

Reference Program

20 WHILE (M1>=-5) AND (M1<=5) 'Repeat the process while the numeric
variable M1 value is between -5 and +5, and
transfer control to line after WEND
statement if range is exceeded.
30 M1=-(M1+1) 'Add 1 to M1, and reverse the sign
40 PRINT# 1, M1 'Output the M1 value
50 WEND 'Return to the WHILE statement (line 20)
60 END 'End the program
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
WTH (With)
 

Function:

A process is added to the interpolation motion.

Format

<Expression> WTH <Process>


 

Terminology

<Expression> For example a movement command like 'MOV P1'


<Process>   Describe the process to be added. The commands that can be described are as follow.
1. <Numeric type data B> <Substitution operator><Numeric type data A> [Substitute,
signal modifier command (refer to syntax diagram)]
2. HLT statement
3. SKIP statement
 

Explanation

This command can only be used to describe the additional command for the movement
command.
An error will occur if the WTH command is used alone.
The process will be executed simultaneously with the start of motion.
The relationship between the interrupts regarding the priority order is shown below.
COM > ACT > WTHIF (WTH) > Pulse substitution
 

Reference Program

10 MOV P1 WTH M_OUT(17)=1 DLY M1+2 'Move to position P1 and set bit 17 for the duration of (M1+2)
Seconds
 

Reference

Movement commands, WTHIF, Substitute


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
WTHIF (With If)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 502 of 562

Function:

A process is conditionally added to the interpolation motion command.

Format

WTHIF <Additional command>, <Process>


 

Terminology

<Additional Command>    Describe the condition for adding the process. (Same as ACT condition
expression)
<Process>     Describe the process to be added with the additional conditions are
established. (Same as WTH)
The commands that can be described as a process are as follow. (Refer
to syntax diagram.)
1. <Numeric type data B> <Substitution operator><Numeric type data
A>
2. HLT statement
3. SKIP statement
 

Explanation

This command can only be used to describe the additional command with conditions for the
movement command.
Monitoring of the condition will start simultaneously with the start of movement.
It is not allowed to write the DLY instruction at the processing part.
 

Reference Program 

10 MOV P1 WTHIF M_IN(17)=1, HLT 'If the input signal 17


turns on, the robot will
stop
20 MVS P2 WTHIF M_RSPD>200,M_OUT(17)=1 DLY M1+2 'If the current command
speed exceeds 200mm/s,
turn on the output for
M1+2 seconds.
30 MVS P3 WTHIF M_MRATIO>15, M_OUT(1)=1 'If the rate of arrival
exceeds 15% during
movement to P3, turn on
the output.
 

Reference

Movement commands, WTH, Substitute, Syntax Diagram, Substitute


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
XCLR (X Clear)
 

Function:

This instruction cancels the program selection status of the specified task slot from within a
program. It is used during multitask operation.
 

Format

XCLR <Slot No.>


 

Terminology

<Slot No.>    Designate the slot number


 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 503 of 562

An error occurs at execution if the specified slot does not select the program.
If the designated program is being operating, an error will occur at execution.
If the designated program is being pausing, an error will occur at execution.
If this instruction is used within a constantly executed program, it becomes enabled by
changing the value of the "ALWENA" parameter from 0 to 7 and turning the controller's power
off and on again.
 

Reference Program

10 XRUN 2,"1" 'Executes the first program in task slot


...
100 XSTP 2 'Pauses the program of task slot 2.
110 WAIT M_WAI(2)=1 'Waits until the program of task slot 2 pauses.
120 XRST 2 'Cancels the pause status of the program of task slot 2.
...
200 XCLR 2 'Cancels the program selection status of the program
210 END
 
Reference

XLOAD , XRST ,  XRUN,  XSTP

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
XLOAD (X Load)
 

Function:

This instruction commands the specified program to be loaded into the specified task slot from
within a program. It is used during multitask operation.
 

Format

XLOAD <Slot no.>, "<Program name>"


 

Terminology

<Slot no.>    Designate the slot no.


<Program name>    Designate the program name.
 

Explanation

If the designated program is already selected for another slot, an error will occur at
execution.
An error occurs at execution if the specified program does not exist.
If the designated program is being edited, an error will occur at execution.
Designate the program name in double quotations. " ".
If the designated program is being executed, an error will occur at execution.
If used in a program that is executed constantly, this instruction is enabled by changing the
value of the "ALWENA" parameter from 0 to 7 and then turning the controller's power on
again.
 

Reference Program

10 XLOAD 2, "10" 'Select program 10 for slot 2


20 XRUN 2 'Start slot 2
30 WAIT M_RUN(2)=1 'Wait to confirm starting of slot 2
 
Reference

XCLR,  XRST ,  XRUN,  XSTP

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 504 of 562

COSIMIR® · MELFA-BASIC IV
 

 
XRST (X Reset)
 

Function:

The execution line of the program in the designated slot is returned to the head line.

Format

XRST <Slot no.>


 

Terminology

<Slot no.>    Designate the slot no.


 

Explanation

This is valid only when the slot is in the stopped state.


If used in a program that is executed constantly, this instruction is enabled by changing the
value of the "ALWENA" parameter from 0 to 7 and then turning the controller's power on
again.
 

Reference Program

10 XRUN 2 'Start
20 WAIT M_RUN(1)=1 'Wait for start to complete
:
100 XSTP 2 'Stop
110 WAIT M_WAIT(1)=1 'Wait for stop to complete
:
150 XRST 2 'Set program execution start line to head line.
160 WAIT M_PSA(1)=1 'Wait for program reset to complete
:
200 XRUN 2 'Restart
210 WAIT M_RUN(1)=1 'Wait for restart to complete
 

Reference

XRUN,  XSTP, XCLR, XLOAD

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
XRUN (X Run)
 

Function:

Runs the designated program in parallel.

Format

XRUN <Slot no.>, <Program Name> [,<Operation Mode>]


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 505 of 562

Terminology

<Slot no.>    Designate the slot no.


<Program Name>    Designate the program name.
<Operation Mode>    0 = Continuous operation
1 = Cycle stop operation
 

Explanation

If the designated slot no. Is already in use, an error will occur at execution.
An error occurs at execution if the specified program does not exist.
If a program has not been loaded into a task slot, this instruction will load it. It is thus
possible to operate the program without executing the XLOAD instruction.
If XRUN is executed in the "waiting" state with the program stopped midway, continuous
execution will start.
Designate the program name in double quotations. " ".
If the operation mode is omitted, the current operation mode will be used.
If used in a program that is executed constantly, this instruction is enabled by changing the
value of the "ALWENA" parameter from 0 to 7 and then turning the controller's power on
again.
 

Reference Program

Example 1

10 XRUN 1,"1" 'Run program 1 with slot 1.


20 XRUN 3,"2",1 'Restart program 2 with slot 3 in the cycle
operation mode.
 
Example 2

10 XLOAD 2,"1" 'Select the program 1 as slot 2


20 DLY 0.5 'Wait for the 0.5 seconds till the completion of
the program load.
30 XRUN 2 'Start the slot 2
20 WAIT M_RUN(2)=1 'Wait to have started
Example 3

10 XLOAD 3,"2" 'Select the program 1 as slot 2


20 DLY 0.5 'Wait for the 0.5 seconds till the completion of
the program load.
30 XRUN 3,,1 'Start the program 1 with cycle operation
20 WAIT M_RUN(3)=1 'Wait to have started
 

Reference

XCLR , XLOAD, XRST , XSTP

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
XSTP (X Stop)
 

Function:

Operation of the program in the designated slot is stopped.

Format

XSTP <Slot no.>


 

Terminology

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 506 of 562

<Slot no.>    Designate the slot no.


 

Explanation

If the program is already stopped, an error will not occur.


XSTP can also stop the constant execution attribute program.
 

Reference Program

10 XRUN 2
:
100 XSTP 2 'Stop
110 WAIT M_WAI(1)=1 'Wait for stop to complete
:
200 XRUN 2 'Restart
 

Reference

XCLR , XLOAD, XRST ,XRUN 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
Overview of the MELFA-BASIC IV Built-in Functions
 

Alphabetical overview of the MELFA-BASIC IV Built-in Functions

Alphabetical overview of the MELFA-BASIC IV Built-in Numeric Functions

Alphabetical overview of the MELFA-BASIC IV Built-in Trigonometric Functions

Alphabetical overview of the MELFA-BASIC IV Built-in Character String Functions

Alphabetical overview of the MELFA-BASIC IV Built-in Position Functions

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
List of Numeric Functions
 

Function Function
name
ABS Produces the absolute value
ASC Provides a character code for the first
character of the character string in
the expression
CINT Rounds off the decimal value and
converts into an integer
CVD Converts an 8-byte character string
into a double-precision real number
CVI Converts a 2-byte character string into
integers
CVS Converts a 4-byte character string into
a single-precision real number
DEG Converts the angle unit from radian
(rad) to degree (deg)
EXP Calculates the value of the
expression‚s exponential function
FIX Produces an integer section

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 507 of 562

INT Produces the largest integer that does


not exceed the value in the expression
LEN Produces the length of the character
string
LN Produces the natural logarithm
LOG Produces the common logarithm.
MAX Obtains the max. value from a random
number of arguments
MIN Obtains the min. value from a random
number of arguments
RAD Converts the angle unit from degree
(deg) to radian (rad)
RND Rounds off the number
SGN Checks the sign of the number in the
expression
SQR Calculates the square root
STRPOS Obtains the 2nd argument character
string position in the 1st argument
character string
VAL Converts a character string into a
numeric value

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
List of Built-in Position Functions
 

Function Function
name
Provides information regarding the arc
CALARC that contains the three specified
points. 
DIST Obtains the distance between two
points
FRAM Calculates the coordinate system
designated with three points. Position
1 is the plane origin, position 2 is the
point on the +X axis, and position 3 is
the point on the +Y axis direction
plane. The plane origin point and
posture are obtained from the XYZ
coordinates of the three positions, and
is returned with a return value
(position). This is operated with 6-axis
three dimensions regardless of the
mechanism structure
RDFL1 Returns the structure flag of the
designated position as character data.
Argument (<numeric value>) 0=R/L,
1=A/B, 2=F/N is returned
SETFL1 Changes the structure flag of the
designated position. The data to be
changed is designated with characters
(R/L/A/B/F/N)
RDFL2 Returns the multi-rotation data of the
designated position as a numeric value
(-2 to 1). The argument <numeric
expression> returns the axis No. (1 to
8)
SETFL2 Changes the multi-rotation data of the
designated position as a numeric value
(-2 to 1). The left side of the
expression is the axis No. to be
changed; the right side is the value to
be set
ALIGN Returns the value of the orthogonal
position (0,+/-90,+/-180) closest to
the position 1 posture axis (A;B;C)
INV Obtains the reserve line.
Checks whether the given position is
POSCQ
within the movement range.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 508 of 562

Obtain the middle position data when


POSMID a linear interpolation is performed
between two given points.
PTOJ Converts the position data into joint
data.
JTOP Converts the joint data into position
data.
Checks whether position 1 is within
the space created by the position 2
ZONE
and position 3 points. Outside range =
0, within range = 1
ZONE2 Checks if the specified position is
within the specified area (Cylindrical
area defined by two points).

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
List of Built-in Character String Functions
 
Function Function
name
BIN$ Converts numeric expression value
into binary character string
CHR$ Provides character having numeric
expression value character code
HEX$ Converts numeric expression value
into hexadecimal character string
LEFT$ Obtains character string having length
designated with 2nd argument from
left side of 1st argument character
string.
MID$ Obtains character string having length
designated with 3rd argument from
the position designated with the 2nd
argument in the 1st argument
character string
MIRROR$ Mirror reversal of the character string
binary bit is carried out
MKI$ Converts numeric expression value
into 2-byte character string
MKS$ Converts numeric expression value
into 4-byte character string
MKD$ Converts numeric expression value
into 8-byte character string
RIGHT$ Obtains character string having length
designated with 2nd argument from
right side of 1st argument character
string
STR$ Converts numeric expression value
into a decimal character string

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
List of Built-in Trigonometric Functions
 

Function Function
name
ATN Calculates the arc tangent. Unit:
radian
Definition range: Numeric value, Value
range: -Pi/2 to +Pi/2
ATN2 Calculates the arc tangent. Unit:
radian

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 509 of 562

Teta=ATN2(y,x)
Definition range: Numeric value of y or
x that is not 0
Value range: -Pi to +Pi
COS Calculates the cosine. Unit: radian
Definition range: Numeric value, Value
range: -1 to +1
SIN Calculates the sine. Unit: radian
Definition range: Numeric value, Value
range: -1 to +1
TAN Calculates the tangent. Unit: radian
Definition range: Numeric value, Value
range: Range of numeric value

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
Alphabetical Overview of MELFA-BASIC-IV Built-In Functions
 

Function Function
name
ABS Produces the absolute value
ALIGN Returns the value of the orthogonal
position (0,+/-90,+/-180) closest to
the position 1 posture axis (A;B;C)
ASC Provides a character code for the first
character of the character string in
the expression
ATN Calculates the arc tangent. Unit:
radian
Definition range: Numeric value, Value
range: -Pi/2 to +Pi/2
ATN2 Calculates the arc tangent. Unit:
radian
Teta=ATN2(y,x)
Definition range: Numeric value of y or
x that is not 0
Value range: -Pi to +Pi
BIN$ Converts numeric expression value
into binary character string
CALARC Provides information regarding the arc
that contains the three specified
points. 
CHR$ Provides character having numeric
expression value character code
CINT Rounds off the decimal value and
converts into an integer
COS Calculates the cosine. Unit: radian
Definition range: Numeric value, Value
range: -1 to +1
CVD Converts an 8-byte character string
into a double-precision real number
CVI Converts a 2-byte character string into
integers
CVS Converts a 4-byte character string into
a single-precision real number
DIST Obtains the distance between two
points
EXP Calculates the value of the
expression‚s exponential function
FIX Produces an integer section
FRAM Calculates the coordinate system
designated with three points. Position
1 is the plane origin, position 2 is the
point on the +X axis, and position 3 is
the point on the +Y axis direction
plane. The plane origin point and
posture are obtained from the XYZ
coordinates of the three positions, and

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 510 of 562

is returned with a return value


(position). This is operated with 6-axis
three dimensions regardless of the
mechanism structure
HEX$ Converts numeric expression value
into hexadecimal character string
INT Produces the largest integer that does
not exceed the value in the expression
INV Obtains the reserve line.
JTOP Converts the joint data into position
data.
LEFT$ Obtains character string having length
designated with 2nd argument from
left side of 1st argument character
string.
LEN Produces the length of the character
string
LN Produces the natural logarithm
LOG Produces the common logarithm.
MAX Obtains the max. value from a random
number of arguments
MID$ Obtains character string having length
designated with 3rd argument from
the position designated with the 2nd
argument in the 1st argument
character string
MIN Obtains the min. value from a random
number of arguments
MIRROR$ Mirror reversal of the character string
binary bit is carried out
MKI$ Converts numeric expression value
into 2-byte character string
MKD$ Converts numeric expression value
into 8-byte character string
MKS$ Converts numeric expression value
into 4-byte character string
POSCQ Checks whether the given position is
within the movement range.
POSMID Obtain the middle position data when
a linear interpolation is performed
between two given points.
PTOJ Converts the position data into joint
data.
RAD Converts the angle unit from degree
(deg) to radian (rad)
RDFL1 Returns the structure flag of the
designated position as character data.
Argument (<numeric value>) 0=R/L,
1=A/B, 2=F/N is returned
RDFL2 Returns the multi-rotation data of the
designated position as a numeric value
(-2 to 1). The argument <numeric
expression> returns the axis No. (1 to
8)
RIGHT$ Obtains character string having length
designated with 2nd argument from
right side of 1st argument character
string
RND Rounds off the number
SETFL1 Changes the structure flag of the
designated position. The data to be
changed is designated with characters
(R/L/A/B/F/N)
SETFL2 Changes the multi-rotation data of the
designated position as a numeric value
(-2 to 1). The left side of the
expression is the axis No. to be
changed; the right side is the value to
be set
SGN Checks the sign of the number in the
expression
SIN Calculates the sine. Unit: radian
Definition range: Numeric value, Value
range: -1 to +1
SQR Calculates the square root

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 511 of 562

STR$ Converts numeric expression value


into a decimal character string
STRPOS Obtains the 2nd argument character
string position in the 1st argument
character string
TAN Calculates the tangent. Unit: radian
Definition range: Numeric value, Value
range: Range of numeric value
VAL Converts a character string into a
numeric value
Checks whether position 1 is within
the space created by the position 2
ZONE
and position 3 points. Outside range =
0, within range = 1
ZONE2 Checks if the specified position is
within the specified area (Cylindrical
area defined by two points).

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
ABS
 

Function

Returns the absolute value of a given value.


 

Format

<Numeric Variable>= ABS (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign.


<Numerical Expression> Specifies a numerical value (variable)
 

Explanation

Returns the absolute value (Value with the positive sign) of a given value.
 

Reference Program

10 P2.C=ABS(P1.C) 'P2.C will contain the value of P1.C


without the sign.
 

Reference

SGN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ALIGN
 

Function

Positional posture axes (A, B, and C axes) are converted to the closest XYZ postures (0, ±90, and
±180). ALIGN outputs numerical values only. The actual operation will involve movement
instructions such as the MOV instruction.
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 512 of 562

Format

<Position Variable>= ALIGN (<Position>)


 

Terminology

<Position Variable> Specifies a position variable to assign.


<Position> Specifies a position (value or variable)
 

Explanation

Converts the A, B, and C components of the position data to the closest XYZ postures (0, ±90,
and ±180). 
Since the return value is of position data type, an error will be generated if the left-hand side
is of joint variable type. 
This function cannot be used in vertical multi-joint 5-axes robot.

Reference Program

10 P1=P_CURR
20 P2=ALIGN(P1)

10 MOV P2
 

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
ASC
 

Function

Returns the character code of the first character in the string.


 

Format

<Numeric Variable>=ASC ("<Character String Expression>")


 

Terminology

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 513 of 562

<Numeric Variable> Specifies a numeric variable to assign.


<Character String Expression> Specifies a string (explicit or a variable)
 

Explanation

Returns the character code of the first character in the string. 


An error will be generated if the string is a null string.
 

Reference Program

10 M1=ASC("A") '&H41 is assigned to M1.


 

Reference

CVS, CVI, CVD, CHR$, VAL

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
ATN
 

Function

Calculates the arc tangent.

Format

<Numeric Variable>=ATN (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign.


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Calculates the arc tangent of a given numerical expression. Unit is in radians.


The range of the returned value for ATN is -pi/2 < ATN < pi/2.
 

Reference Program

10 M1=ATN(100/100) 'pi/4 is assigned to M1.


 

Reference

SIN, COS, ATN2, TAN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 514 of 562

ATN2
 

Function

Calculates the arc tangent.

Format

<Numeric Variable>=ATN2 (<Numerical Expression_1>, <Numerical Expression_2>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign.


<Numerical Expression_1> Specifies numerical value or variable
<Numerical Expression_2> Specifies numerical value or variable
 

Explanation

Calculates the arc tangent of a given numerical expression. Unit is in radians.


The range of the returned value for ATN2 is -pi < ATN < pi.
If <Numerical Expression_2> evaluates to 0, ATN2 will return pi/2 when <Numerical
Expression_1> evaluates to a positive value and -pi/2 when <Numerical Expression 1>
evaluates to a negative value. 
In the case of ATN2, it is not possible to describe a function that contains an argument in
<numerical expression_1> and <numerical expression_2>. If such a function is described, an
error will be generated during execution.
 

Reference Program

10 M1=ATN2(-100/100) 'pi/4 is assigned to M1.


 

Reference

SIN, COS, ATN, TAN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
BIN$
 

Function

Numerical value is converted to a binary string.

Format

<Character String Variable> = BIN$ (<Numerical Expression>)


 

Terminology

<Character String Variable> Specifies a character string variable to assign


<Numerical Expression> Specifies numerical value or variable
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 515 of 562

Explanation

Value is converted to a binary string. 


If the equation does not evaluate to an integer, the integral value obtained by rounding the
fraction will be con
converted to a binary string. 
VAL is a command that performs the opposite of this function.
 

Reference Program

10 M1=&B11111111
20 C1$=BIN$(M1) 'C1$ will contain the character
string of "11111111".
 

Reference

VAL, STR$, HEX$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
CALARC
 

Function

Provides information regarding the arc that contains the three specified points.
 

Format

<Numeric Variable 4> = CALARC (<Position 1>, <Position 2>, <Position 3>, <Numeric Variable 1>,
<Numeric Variable 2>, <Numeric Variable 3>, <Position Variables 1>)
 

Terminology

<Position 1> Specifies the starting point of the arc.


<Position 2> Specifies the passing point of the arc. Same as
the three points in the MVR instruction.
<Position 3> Specifies the endpoint of the arc.
<Numeric Variable 1> Radius of the specified arc (in mm) will be
calculated and returned.
<Numeric Variable 2> Central angle of the specified arc (in radians)
will be calculated and returned.
<Numeric Variable 3> Length of the specified arc (in mm) will be
calculated and returned.
<Position Variables 1> The center coordinates of the specified arc (in
mm) will be calculated and returned (as a
position data type, ABC are all zeros).
<Numeric Variable 4> Return value 
1 : Calculation was performed normally.

-1 : Of positions 1, 2, and 3, either two points


had the exact same position or all three points
were on a straight line. 

-2 : All three points are at approximately the


same position.
 

Explanation

Provides information regarding the arc that is determined by the three specified points,
position 1, position 2 and position 3.
If the arc generation and calculation of various values succeeded, 1 will be returned as the
return value. 
If some points have the exact same position or if all three points are on a straight line, -1 will

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 516 of 562

be returned as the return value. In such cases, the distance between the starting point and
the endpoint will be returned as the arc length, -1 as the radius, 0 as the central angle, and
(0, 0, 0) as the center point. 
If circular arc generation fails, -2 will be returned as the return value. If a circular arc cannot
be generated, -1, 0, 0 and (0, 0, 0) are returned as the radius, central angle, arc length and
center point, respectively. 
It is not possible to describe a function that contains an argument in <position 1>, <position
2>, <position 3>, <numeric variable 1>, <numerical variable 2>, <numeric variable 3> and
<position variable 1>. If such a function is described, an error will be generated during
execution.
 

Reference Program

10 M1=CALARC(P1,P2,P3,M10,M20,M30,P10)
20 IF M1<>1 THEN END 'Ends if an error occurs.
30 MR=M10 'Radius.
40 MRD=M20 'Circular arc angle.
50 MARCLEN=M30 'Circular arc length.
60 PC=P10 'Coordinates of the center point.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CHR$
 

Function

Returns the character that has the character code obtained from the specified numerical expression.

Format

<Character String Variable> = CHR$ (<Numerical Expression>)


 

Terminology

<Character String Variable> Specifies a character string variable to assign


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Returns the character that has the character code obtained from the specified numerical
expression. 
If the numerical expression does not evaluate to an integer, the character will be returned
whose character code corresponds to the integral value obtained by rounding the fraction.
 

Reference Program

10 M1=&H40
20 C1$=CHR$(M1+1) 'C1$ will contain the character
"11111111".
 

Reference

ASC

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 517 of 562

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CINT
 

Function

Rounds the fractional part of an numerical expression to convert the value into an integer.

Format

<Numeric Variable>=CINT (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Returns the value obtained by rounding the fractional part of an equation.


 

Reference Program

10 M1=CINT(1.5) '2 is assigned to M1


20 M2=CINT(1.4) '1 is assigned to M2
30 M3=CINT(-1.4) '-1 is assigned to M3
20 M4=CINT(-1.5) '-2 is assigned to M4
 

Reference

INT, FIX

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
COS
 

Function

Gives the cosine.

Format

<Numeric Variable>=COS (<Numerical Expression>)


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 518 of 562

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Calculates the cosine of the numerical expression. 


The range of arguments will be the entire range of values that are allowed.
The range of the return value will be from -1 to 1.
The unit of arguments is in radians.
 

Reference Program

10 M1=COS(RAD(60)) 'The COS of 60Radiant is assigned to M1


 

Reference

SIN, ATN2, ATN, TAN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
CVD
 

Function

Converts the character codes of the first eight characters of a string into a double precision real number.

Format

<Numeric Variable>=CVD (<Character String Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String Expression>) Specifies a string
 

Explanation

Converts the character codes of the first eight characters of a string into a double precision
real number. 
An error will be generated if the string consists of seven character or less. 
MKD$ can be used to convert numerical values into a string.
 

Reference Program

10 M1=CVD("FFFFFFFF")' '+3.52954E+30 is assigned to M1.


 

Reference

ASC, CVI, CVS, MKI$, MKS$, MKD$

©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 519 of 562

COSIMIR® · MELFA-BASIC IV
 

 
CVI
 

Function

Converts the character codes of the first two characters of a string into an integer.
 

Format

<Numeric Variable>=CVI (<Character String Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String Expression>) Specifies a string
 

Explanation

Converts the character codes of the first two characters of a string into an integer. 
An error will be generated if the string consists of one character or less.
MKI$ can be used to convert numerical values into a string. 
This can be used to reduce the amount of communication data when transmitting numerical
data with external devices.
 

Reference Program

10 M1=CVI("10ABC")' '&H3031 is assigned to M1.


 

Reference

ASC, CVD, CVS, MKI$, MKS$, MKD$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
CVS
 

Function

Converts the character codes of the first four characters of a string into a single precision real

Format

<Numeric Variable>=CVS (<Character String Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String Expression>) Specifies a string
 

Explanation

Converts the character codes of the first four characters of a string into an single-precision

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 520 of 562

real number.
An error will be generated if the string consists of three character or less.
MKS$ can be used to convert numerical values into a string.
 

Reference Program

10 M1=CVS("FFFF")' '12689.6 is assigned to M1.


 

Reference

ASC, CVD, CVI, MKI$, MKS$, MKD$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
DEG
 

Function

Converts the unit of angle measurement from radians (rad) into degrees (deg).

Format

<Numeric Variable>=DEG (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Converts the radian value of an numerical expression into degree value. 


When the posture angles of the position data are to be displayed using positional constants,
the unit used for ((500, 0, 600, 180, 0, 180) (7, 0)) is DEG. As in the case of P1.C, the unit
used will be in radians (rad) when the rotational element of the positional variable is to be
referenced directly. Value of P1.C can be handled in DEG. In such case, set parameter
"PRGMDEG" to 1.
 

Reference Program

10 P1=P_CURR
20 IF DEG(P1.C) < 170 OR DEG(P1.C) > -150 THEN 'Calculate if skipping the
*NOERR error or not
30 ERROR(9100)

40 *NOERR
 

Reference

RAD

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 521 of 562

 
DIST
 

Function

Calculates the distance between two points (position variables).

Format

<Numeric Variable>=DIST (<Position 1>, <Position 2>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Position 1> Specifies a position (variable or value)
<Position 2> Specifies a position (variable or value)
 

Explanation

Returns the distance between positions 1 and 2 (in mm). 


Posture angles of the position data will be ignored; only the X, Y, and Z data will be used for
calculation. 
The joint variables cannot be used. Trying to use it will result in an error during execution.
It is not possible to describe a function that contains an argument in <position 1> and
<position 2>. If such a function is described, an error will be generated during execution.
 

Reference Program

10 M1=DIST(P1,P2) 'M1 will contain the distance between positions 1 and 2.


 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
EXP
 

Function

Calculates exponential functions. (an numerical expression that uses "e" as the base.)

Format

<Numeric Variable>=EXP (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numerical value or variable
 

Explanation

Returns the exponential function value of the numerical expression.


 

Reference Program

10 M1=EXP(2) 'e^2 is assigned to M1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 522 of 562

Reference

LN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
FIX
 

Function

Returns the integral portion of the numerical expression.

Format

<Numeric Variable>=FIX (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numerical value or variable
 

Explanation

Returns the integral portion of the numerical expression value. 


If the numerical expression evaluates to a positive value, the same number as INT will be
returned. 
If the numerical expression evaluates to a negative value, then for instance FIX(-2.3) = -2.0
will be observed.
 

Reference Program

10 M1=FIX(5.5) '5 is assigned to M1.


 

Reference

CINT, INT

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
FRAM
 

Function

Calculates the position data that indicates a coordinate system (plane) specified by three position
data. Normally, use DEF PLT  and PLT  instructions for pallet calculation.
 

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 523 of 562

<Numeric Variable 4>=FRAM (<Numeric Variable 1>, <Numeric Variable 2>, <Numeric Variable 3>)
 

Terminology

<Numeric Variable 1> This will be the origin of X, Y, and Z of the


plane to be specified by three positions. A
variable or a constant.
<Numeric Variable 2> A point on the X axis of the plane to be
specified by three positions. A variable or a
constant.
<Numeric Variable 3> A point in the positive Y direction of the X-Y
plane on the plane to be specified by three
positions. A variable or a constant.
<Numeric Variable 4> Variable to which the result is assigned. 
 

Explanation

This can be used to define the base coordinate system. 


This creates a plane from the three coordinates X, Y, and Z for the three positions to
calculate the position of the origin and the inclination of the plane, and returns the result as
a position variable. The X, Y, and Z coordinates of the position data will be identical to that
of position variable 1, while A, B, and C will be the inclination of the plane to be specified by
the three positions. 
Joint variables cannot be used as the argument. When a joint variable is used, an error will
be generated. 
Since the return value is a position data, an error will be generated if a joint variable is used
in the left-hand side. 
It is not possible to describe <Numeric Variable X> as a function. If you do so, an error will be
generated during execution.
 

Reference Program

10 P100=FRAM(P1,P2,P3) 'Create P100 coordinate


system based on P1, P2
and P3 positions.
20 BASE P100 'Position of P100 will
be used as the origin
for robot.
10 M1=FIX(5.5) '5 is assigned to M1.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
HEX$
 

Function

Converts the value of an numerical expression (Between -32768 to 32767) into hexadecimal string.
 

Format

<Character String Variable >=HEX$ (<Numerical Expression> [, <Number of output characters>])


 

Terminology

<Character String Variable> Specifies a character string variable to assign


<Numerical Expression> Specifies numerical value or variable
<Number of output characters> Number of characters, starting form the least
significant byte
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 524 of 562

Converts the value of an numerical expression into hexadecimal string. 


If <Number of output characters> is specified, the right most part of the converted string is
output for the specified length. 
If the numerical value is not an integer, the integer value obtained by rounding the fraction
will be converted into hexadecimal string. 
VAL is a command that performs this procedure in reverse. 
If <number of output characters> is specified, it is not possible to describe a function that
contains an argument in <numerical expression>. If such a function is described, an error will
be generated during execution.
        NG example C1$=HEX$(ASC("a"),1)
 

Reference Program

10 C1$=HEX$(&H41FF) '"41FF" is assigned to C1$.


20 C2$=HEX$(&H41FF,2) '"FF" is assigned to C2$.
 

Reference

BIN$, STR$, VAL

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
INT
 

Function

Returns the largest integer that does not exceed the value of the numerical expression.
 

Format

<Numeric Variable>=INT (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numerical value or variable
 

Explanation

Returns the largest integer that does not exceed the value of the numerical expression.
If the numerical expression evaluates to a positive value, the same number as FIX will be
returned.
If the numerical expression evaluates to a negative value, then for instance FIX(-2.3) = -3.0
will be observed.
 

Reference Program

10 M1=INT(3.3)) '3 is assigned to M1.


 

Reference

CINT. FIX

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 525 of 562

COSIMIR® · MELFA-BASIC IV
 

 
INV
 

Function

Obtains the position data of the inverse matrix of the position variable. This is used to perform
relative calculation of the positions.
 

Format

<Position Variables>=INV (<Position Variables>)

Terminology

<Position Variables> Specifies a Position variable to assign 


<Position Variables> specifies a Position variable to assign 
 

Explanation

Obtains the position data of the inverse matrix of the position variable.
Joint variables cannot be used as the argument. When a joint variable is used, an error will
be generated. 
Since the return value is a position data, an error will be generated if a joint variable is used
in the left-hand side.
 

Reference Program

10 P1=INV(P2) 'P1 will contain the inverse matrix of


P2.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
JTOP
 

Function

Given joint data will be converted into position data.


 

Format

<Position Variables>=JTOP (<Joint Variable>)

Terminology

<Position Variables> Specifies a position variable to assign 


<Joint Variable> Specifies a joint variable to assign 
 

Explanation

Converts the joint data into the position data.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 526 of 562

Position variables cannot be used as the argument. When a position variable is used, an error
will be generated. 
Since the return value is a position data, an error will be generated if a joint variable is used
in the left-hand side.
 

Reference Program

10 P1=JTOP(J1) 'The position that expresses the J1


(joint type) position using the XYZ type
will be assigned to P1.
 

Reference

PTOJ

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
LEFT$
 

Function

Obtains a string of the specified length starting from the left end.
 

Format

<Character String Variable >=LEFT$ ("<Character String>", <Numerical Expression>)

Terminology

<Character String Variable>  Specifies a character string variable to assign


<Character String> Specifies a string (variable or expression)
<Numerical Expression> Specifies the length of the  assigned String. 
 

Explanation

Obtains a string of the specified length starting from the left end. 
An error will be generated if the value is a negative value or is longer than the string. 
It is not possible to describe a function that contains an argument in <Character String> and
<Numerical Expression>. If such a function is described, an error will be generated during
execution.
 

Reference Program

10 C1$=LEFT$("ABC",2) '"AB" is assigned to C1$.


 

Reference

MID$, RIGHT$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 527 of 562

LEN
 

Function

Returns the length of the string.


 

Format

<Numeric Variable>=LEN ("<Character String>")

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String> Specifies a string (variable or expression)
 

Explanation

Returns the length of the argument string.


 

Reference Program

10 M1=LEN("ABCDEFG") '7 is assigned to M1.


 

Reference

MID$, RIGHT$, LEFT$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
LN
 

Function

Returns the natural logarithm. (Base e.) 


 

Format

<Numeric Variable>=LN (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

Returns the natural logarithm of the value of the numerical expression. 


An error will be generated if the numerical expression evaluates to a zero or a negative
value.
 

Reference Program

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 528 of 562

10 M1=LN(2) '0.693147 is assigned to M1


 

Reference

EXP, LOG

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
LOG
 

Function

Returns the common logarithm. (Base 10.)


 

Format

<Numeric Variable>=LOG (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

Returns the common logarithm of the value of the numerical expression. 


An error will be generated if the numerical expression evaluates to a zero or a negative
value.
 

Reference Program

10 M1=LOG(2) '0.301030 is assigned to M1


 

Reference

EXP, LN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
MAX
Function

Obtains the maximum value.


 

Format

<Numeric Variable>=MAX (<Numerical Expression 1>, <Numerical Expression 2> [, <Numerical


Expression 3>...])

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 529 of 562

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression n> Specifies a numeric expression or  variable
 

Explanation

Returns the maximum value among the arbitrary number of arguments. 


The length of this instruction can be up to the number of characters allowed in a single line
(123 characters). 
It is not possible to describe <Numerical Expression X> as a function. If you do so, an error
will be generated during execution.
 

Reference Program

10 M1=MAX(2,1,3,4,10,100) '100 is assigned to M1


 

Reference

MIN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
MID$

Returns a string of the specified length starting from the specified position of the string.
 

Format

<Character String Variable >=MID$ (<Character String>, <Numerical Expression 2>, <Numerical
Expression 3>)
 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String> Specifies the string
<Numerical Expression 1> Specifies the starting position, starting for the left
<Numerical Expression 2> Specifies the number of elements to assign
 

Explanation

A string of the length specified by argument 3 is extracted from the string specified by the
first argument starting from the position specified by argument 2 and returned. 
An error will be generated if numerical expression 2 or 3 evaluates to a zero or a negative
value. 
An error is generated if the position of the last character to be extracted is larger than the
length of the string specified by the first argument. 
It is not possible to describe a function that contains an argument in <Character String>,
<Numerical Expression 2> and <Numerical Expression 3>. If such a function is described, an
error will be generated during execution.
 

Reference Program

10 C1$=MID$("ABCDEFG",3,2) '"CD" is assigned to C1$.


 

Reference

LEFT$, RIGHT$, LEN

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 530 of 562

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MIN
 

Function

Obtains the minimum value.


 

Format

<Numeric Variable>=MIN (<Numerical Expression 1>, <Numerical Expression 2> [, <Numerical


Expression 3>...])
 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression X> Specifies a numeric expression or  variable
 

Explanation

Returns the minimum value among the arbitrary number of arguments. 


The length of this instruction can be up to the number of characters allowed in a single line
(123 characters). 
It is not possible to describe <Numerical Expression X> as a function. If you do so, an error
will be generated during execution.
 

Reference Program

10 M1=MIN(2,1,3,4,10,100) '1 is assigned to M1


 

Reference

MIN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
MIRROR$
 

Function

Inverts the bit string representing each character code of the string in binary, and obtains the
character-coded string.
 

Format

<Character String Variable >=MIRROR$ (<Character String Expression>)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 531 of 562

Terminology

<Character String Variable > Specifies a string variable to assign


<Character String Expression> Specifies a Character String Expression or  variable
 

Explanation

Inverts the bit string representing each character code of the string in binary, and obtains the
character-coded string.
 

Reference Program

10 C1$=MIRROR$("BJ") '"RB" is assigned to C1$.


'"BJ" =&H42,&H4A=&B01000010,&B01001010.
'Inverted '=&H52,&H42=&B01010010,&B01000010.
'Output ="RB". [
 

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MKD$

Converts the value of an numerical expression (double-precision real number) into a eight-byte
string.
 

Format

<Character String Variable >=MKD$ (<Numerical Expression>)

Terminology

<Character String Variable > Specifies a string variable to assign


<Numerical Expression> Specifies a numerical variable or expression
 

Explanation

Converts the lowest eight bytes of the value of an numerical expression (single-precision real
number) into the strings. 
Use CVD to convert the string to a value. 
This can be used to reduce the amount of communication data when transmitting numerical
data to external devices.
 

Reference Program

10 C1$=MKD$(10000.1)
20 M1=CVD(C1$)' '10000.1 is assigned to M1.
 

Reference

ASC, CVI, CVS, MKI$, MKS$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 532 of 562

 
MKI$
 

Function

Converts the value of an numerical expression (integer) into a two-byte string.


 

Format

<Character String Variable >=MKI$ (<Numerical Expression>)

Terminology

<Character String Variable > Specifies a string variable to assign


<Numerical Expression> Specifies a numerical variable or expression
 

Explanation

Converts the lowest two bytes of the value of an numerical expression (integer) into a
strings. 
Use CVI to convert the string to a value. 
This can be used to reduce the amount of communication data when transmitting numerical
data to external devices.
 

Reference Program

10 C1$=MKI$(123) '
20 M1=CVD(C1$)' '123 is assigned to M1.
 

Reference

ASC, CVI, CVS, MKD$, MKS$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
MKS$
 

Function

Converts the value of an numerical expression (single-precision real number) into a four-byte string.
 

Format

<Character String Variable >=MKS$ (<Numerical Expression>)

Terminology

<Character String Variable > Specifies a string variable to assign


<Numerical Expression> Specifies a numerical variable or expression
 

Explanation

Converts the lowest four bytes of the value of an numerical expression (single-precision real
number) into the strings. 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 533 of 562

Use CVS to convert the string to a value. 


This can be used to reduce the amount of communication data when transmitting numerical
data to external devices.
 

Reference Program

10 C1$=MKI$(100.1) '
20 M1=CVD(C1$)' '100.1 is assigned to M1.
 

Reference

ASC, CVI, CVS, MKD$, MKI$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
POSCQ
 

Function

Checks whether the given position is within the movement range.

Format

<Numeric Variable>=POSCQ (<Position Variable>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign 


<Position Variables> Specifies a joint variable to assign 
 

Explanation

Check whether the position data given by an argument is within the movement range of the
robot. Value 1 will be returned if it is within the movement range of the robot; value 0 will
be returned if it is outside the movement range of the robot.
Arguments must give either the position data type or joint data type.
 

Reference Program

10 M1=POSCQ(P1) 'M1 will contain 1 if the position P1 is within the


movement range.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 
POSMID
 

Function

Obtain the middle position data when a linear interpolation is performed between two given points.
 

Format

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 534 of 562

<Position Variables>=POSMID (<Position Variable 1>, <Position Variables 2>,<Numerical Constant 1>,
<Numerical Constant 2>)
 

Terminology

<Position Variable> Specifies a position variable to assign 


<Position Variable 1/2> Specifies a position variable to assign 
<Numerical Constant 1> Detour/short cut = 1/0
<Numerical Constant 2> 3-axis orthogonal/Equivalent rotation = 1/0
 

Explanation

Obtain the position data of the middle point when a linear interpolation is performed
between two position data. 
The first argument gives the starting point of the linear interpolation, while the second
argument gives the end-point of the linear interpolation. 
The third and fourth arguments correspond to the two TYPE arguments of the MVS command.
The arguments for the starting and end points must be positions that allow linear
interpolation with the specified interpolation type. For instance, an error will be generated if
the structure flags of the starting and end points are different. 
It is not possible to describe a function that contains an argument in <Position Variables 1>,
<Position Variables 2>,<Numerical Expression 1> and <Numerical Expression 2>. If such a
function is described, an error will be generated during execution.
 

Reference Program

10 P1=POSMID(P2,P3,0,0) 'The position data (including


posture) of the middle point between
P2 and P3 will be assigned to P1.
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
PTOJ
 

Function

Converts the given position data into a joint data.


 

Format

<Joint Variable>=PTOJ (<Position Variables>)

Terminology

<Joint Variable> Specifies a joint variable to assign 


<Position Variables> Specifies a joint variable to assign 
 

Explanation

Converts the position data into the joint data. 


Joint variable (J variable) cannot be used as the argument. When a joint variable is used, an
error will be generated. 
Since the return value is a joint data, an error will be generated if a position variable is used
in the left-hand side.
 

Reference Program

10 J1=PTOJ(P1) 'J1 will contain the value of P1 (XYZ position


variable) that has been converted into joint data

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 535 of 562

type.
 

Reference

JTOP

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
RAD
 

Function

Converts the unit of angle measurement from degrees (deg) into radians (rad).
 

Format

<Numeric Variable>=RAD (<Numerical Expression>)


 

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies numerical value or variable
 

Explanation

Converts the degree value of an numerical expression into radian value. 


This can be used to assign values to the posture components (ABC) of a position variable or to
execute trigonometric functions.
 

Reference Program

10 P1=P_CURR '
20 P1.C=RAD(90) '
30 MOV P1 'Moves to P1, which is obtained by
changing the C axis of the current
position to 90 degrees.
 

Reference

DEG

 
 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
RDFL1
 

Function

Returns the structure flag of the specified position using character data "R"/"L", "A"/"B", and "N"/"F".

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 536 of 562

Format

<Character String Variable >=RDFL1 (<Position Variables>, <Numerical Expression>)


 

Terminology

<Position Variable> Specifies a position variable to assign


<Numerical Expression> Specifies which structure flag is to be
extracted.
 0 = "R" / "L", 1 = "A" / "B", 2 = "N" / "F"
 

Explanation

Of the structure flags in the position data specified by argument 1, the flag specified by
argument 2 will be extracted. 
This function extracts information from the FL1 element of position data.
It is not possible to describe a function that contains an argument in <Position Variables> and
<Numerical Expression>. If such a function is described, an error will be generated during
execution.
 

Reference Program

10 P1=(100,0,100,180,0,180)(7,0) 'Since the structure flag 7 (&B111)


is RAN
20 C1$=RDFL1(P1,1) 'C1$ will contain "A".
 

Reference

RDFL2, SETFL1, SETFL2

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
RDFL2
 

Function

Returns the multiple rotation information of the specified joint axis.


 

Format

<Numeric Variable>=RDFL2 (<Position Variables>, <Numerical Expression>)


 

Terminology

<Position Variable> Specifies the position variable from which the


multiple rotation information is to be extracted.
<Numerical Expression> Specifies the value for the joint axis from which
the multiple rotation information is to be
extracted. (1 through 8)
 

Explanation

Of the multiple rotation information of the position data specified by argument 1, the value
for the joint axis specified by argument 2 is extracted. 
The range of the return value is between -8 and 7.
This function extracts information from the FL2 element of position data. 
Structure flag 2 (multiple rotation information) has a 32-bit structure, which contains 4 bits
of information per axis for 8 axes. 
It is not possible to describe a function that contains an argument in <Position Variables> and
<Numerical Expression>. If such a function is described, an error will be generated during
execution.
When displaying in T/B and the multiple rotation is a negative value, value of -1 to -8 is

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 537 of 562

converted into F to 8 (4-bit signed hexadecimal notation) and displayed. 


<Sample display of multiple rotation 87654321 axis <Relationship between display and
information in TB> number of multiple rotations per
axis>
When multiple rotation of axis J6 is +1: FL2=00100000 ......-2 -1  0 +1 +2.......
When multiple rotation of axis J6 is -1: FL2=00F00000 .....  E  F  0  1   2 ........ 
 

Reference Program

10 P1=(100,0,100,180,0,180)
(7,&H00100000)
'
20 M1=RDFL2(P1,6) '1 is assigned to M1.
 

Reference

RDFL1, SETFL1, SETFL2

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
RIGHT$
 

Function

Obtains a string of the specified length starting from the right end.
 

Format

<Character String Variable >=RIGHT$ (<Character String Expression>, <Numerical Expression>)


 

Terminology

<Character String Variable > Specifies a string variable to assign


<Character String Expression> Specifies a Character String Expression or 
variable
<Numerical Expression> Specifies a numerical expression or variable
 

Explanation

Obtains a string of the specified length starting from the right end. 
An error will be generated if the value of the second argument is a negative value or is longer
than the first string. 
It is not possible to describe a function that contains an argument in <Character String> and
<Numerical Expression>. If such a function is described, an error will be generated during
execution.
 

Reference Program

10 C1$=RIGHT$("ABCDEFG",3) '"EFG" is assigned to C1$.


 

Reference

LEFT$, MID$, LEN

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 538 of 562

COSIMIR® · MELFA-BASIC IV
 

 
RND
 

Function

Generates a random number.


 

Format

<Numeric Variable>=RND (<Numerical Expression>)

Terminology

<Numeric Variable> A value in the range of 0.0 to 1.0 will be returned.


<Numerical Expression> A value in the range of 0.0 to 1.0 will be returned.
 

Explanation

Initializes random numbers using the value provided by the argument and extracts a random
number. 
If the numerical expression provided as the argument evaluates to 0, initialization of random
numbers will not take place and the next random number will be extracted. 
When the same value is used to perform initialization of random numbers, identical random
number sequence will be obtained.
 

Reference Program

10 DIM MRND(10) '


20 C1=RIGHT$(C_TIME,2) 'Initializes random
numbers using the clock.
30 MRNDBS=CVI(C1)) 'In order to obtain
different sequence of
numbers.
40 MRND(1)=RND(MRNDBS) 'Sets the initial value
of random numbers and
extracts the first random
number.
50 FOR M1=2 TO 10 'Obtain other nine random
numbers.
60 MRND(M1)=RND(0)
70 NEXT M1
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SETFL1
 

Function

Changes the structure flag of the specified position using a string (such as "RAN").
 

Format

<Position Variable>=SETFL1 (<Position Variable>, <Character String>)


 

Terminology

<Position Variables> Specifies the position variable from which the multiple rotation information

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 539 of 562

is to be extracted.
<Character String> Specifies the structure flag to be changed. Multiple flags can be specified. 
"R" or "L": Right/Left setting.

 "A" or "B": Above/Below setting. 

"N" or "F": Nonflip/Flip setting.


 

Explanation

Returns the position data obtained by changing the structure flags in the position data
specified by argument 1 to flag values specified by argument 2.
This function changes information from the FL1 element of position data. The content of the
position data given by the argument will remain unchanged.
The structure flag will be specified starting from the last character in the string. Therefore,
for instance, if the string "LR" is specified, the resulting structure flag will be "L". 
If the flags are changed using a numerical value, set P1.FL1=7. 
Structure flags may have different meanings depending on the robot model. For details,
please refer to "ROBOT ARM SETUP & MAINTENANCE" for each robot.
The structure flag corresponds to 7 in the position constant (100, 0, 300, 180, 0, 180) (7, 0).
The actual position is a bit pattern.
 

              
 

Reference Program

10 MOV P1

20 P2=SETFL1(P1,"LBF")

30 MOV P2
 

Reference

RDFL1, RDFL2, SETFL2

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SETFL2
 

Function

Changes the multiple rotation data of the specified position.


 

Format

<Position Variables>=SETFL2 (<Position Variables>, <Numerical Expression 1>, <Numerical


Expression 2>)
 

Terminology

<Position Variable> Specifies the position variable whose multiple rotation


data are to be changed.
<Numerical Expression 1> Specifies the axis number for which the multiple
rotation data are to be changed. (1 through 8).
<Numerical Expression 2> Specifies the multiple rotation data value to be
changed (-8 through 7).
 

Explanation

Returns the position data obtained by changing the position data's multiple rotation
information of the joint axis specified by numerical expression 1 to the value specified by

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 540 of 562

numerical expression 2.
This function changes information from the FL2 element of position data.
The content of the position of position variables given by the argument (X, Y, Z, A, B, C, and
FL1) will remain unchanged.

                              

It is not possible to describe a function that contains an argument in <Position Variables>,


<Numerical Expression 1> and <Numerical Expression 2>. If such a function is described, an
error will be generated during execution.
 

Reference Program

10 MOV P1
20 P2=SETFL2(P1,6,1)
30 MOV P2
 

Reference

RDFL1, RDFL2, SETFL1

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
SGN
 

Function

Checks the sign of the numerical expression.


 

Format

<Numeric Variable>=SGN (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

Checks the sign of the numerical expression and returns the following value.   
Positive value 1
Negative value -1
 

Reference Program

10 M1=-12 '
20 M2=SGN(M1) '-1 is assigned to M2.
 

 
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 541 of 562

COSIMIR® · MELFA-BASIC IV
 

 
SIN
 

Function

Calculates the sine


 

Format

<Numeric Variable>=SIN (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

Calculates the sine to which the given numerical expression evaluates.


The range of values will be the entire range that numerical values can take.
The range of the return value will be from -1 to 1.
The unit of arguments is in radians.
 

Reference Program

10 M1=SIN(RAD(60)) '0.866025 is assigned to M1.


Reference

COS, ATN, ATN2, TAN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
SQR
 

Function

Calculates the square root of an numerical expression value.


 

Format

<Numeric Variable>=SQR (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 542 of 562

Calculates the square root of the value to which the given numerical expression evaluates.
An error will be generated if the numerical expression given by the argument evaluates to a
negative value.
 

Reference Program

10 M1=SQR(2) '1,414214 is assigned to M1


 

Reference

COS, ATN, ATN2, TAN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
STRPOS
 

Function

Searches for a specified string in a string.


 

Format

<Numeric Variable>=STRPOS(<Character String 1>, <Character String 2>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String 1/2> Specifies a the character strings, that should be
compared
 

Explanation

Returns the position of the first occurrence of the string specified by argument 2 from the
string specified by argument 1. 
An error will be generated if the length of the argument 2 is 0. 
For instance, if argument 1 is "ABCDEFG" and argument 2 is "DEF", 4 will be returned. 
If the search string could not be found, 0 will be returned.
It is not possible to describe a function that contains an argument in <Character String 1> and
<Character String 2>. If such a function is described, an error will be generated during
execution.
 

Reference Program

10 M1=STRPOS("ABCDEFG","DEF") '
 

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
STR$
 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 543 of 562

Function

Converts the value of the numerical expression into a decimal string.


 

Format

<Character String Variable >=STR$ (<Numerical Expression>)

Terminology

<Character String Variable > Specifies a string variable to assign


<Numerical Expression> Specifies a numerical variable or expression
 

Explanation

Converts the value of the numerical expression into a decimal string.


VAL is a function that performs this procedure in reverse.
 

Reference Program

10 C1$=STR$(123) '"123" is assigned to C1$.


 

Reference

BIN$, HEX$, VAL

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
TAN
 

Function

Calculates the tangent.


 

Format

<Numeric Variable>=TAN (<Numerical Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Numerical Expression> Specifies a numeric expression or  variable
 

Explanation

Returns the tangent of the value to which the numerical expression evaluates. 
The range of arguments will be the entire range of values that are allowed. 
The range of return values will be the entire range that numerical values can take.
The unit of arguments is in radians.
 

Reference Program

10 M1=TAN(RAD(60)) '1.732051 is assigned to M1.


 

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 544 of 562

Reference

COS, ATN, ATN2, SIN

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
 

 
VAL
 

Function

Converts the value in the string into a numerical value.


 

Format

<Numeric Variable>=VAL (<Character String Expression>)

Terminology

<Numeric Variable> Specifies a numeric variable to assign


<Character String Expression> Specifies an Character expression or  variable
 

Explanation

Converts the given character string expression string into a numerical value.
Binary (&B), decimal, and hexadecimal (&H) notations can be used for the string. 
In the example above, M1, M2 and M3 evaluate to the same value (15).
 

Reference Program

10 M1=VAL("15")

20 M2=VAL("&B1111")

30 M3=VAL("&HF")
 

Reference

BIN$, HEX$, STR$

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ZONE
 

Function

Checks if the specified position is within the specified area (a rectangular solid defined by two
points).
 

Format

<Numeric Variable>=ZONE (<Position 1>, <Position 2>, <Position 3>)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 545 of 562

Terminology

<Numeric Variable> Specifies a numerical variable to assign


<Position 1> The position to be checked.
<Position 2> The position of the first point that specifies the area.
<Position 3> The position of the second point that specifies the area.
(diagonal point)
 

Explanation

This will check if position 1 is inside the rectangular solid defined by the two points, position
2 and position 3. (The two points will become the diagonal points of the rectangular solid.) If
the point is inside the rectangular solid, 1 is returned; otherwise, 0 is returned. 
To check whether position 1 is inside that area, each element of position 1 (X, Y, Z, A, B, and
C) will be checked if it is between the values for position 2 and position 3. 
As for the posture angles (A, B, and C), they are checked by rotating in the positive direction
from the angle in position 2 to position 3 and by seeing if the target value is inside the swiped
range. Example) If P2.A is -100 and P3.A is +100, if P1.A is 50, the value is within the range.
Similar checking will be performed for B and C axes. (Refer to diagram below.) 
For components that are not checked or do not exist, if the unit is in degrees, position 2 will
be set to -360 and position 3 will be set to 360. If the unit is in millimeters, position 2 will be
set to -10000 and position 3 will be set to 10000. 
It is not possible to describe a function that contains an argument in <Position 1>, <Position
2> and <Position 3>. If such a function is described, an error will be generated during
execution.

         
 

Reference Program

10 M1=ZONE2(P1,P2,P3)
20 IF M1=1 THEN MOV P_SAFE ELSE END
 

Reference

ZONE2

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ZONE2
 

Function

Checks if the specified position is within the specified area (Cylindrical area defined by two points).
 

Format

<Numeric Variable>=ZONE2 (<Position 1>, <Position 2>, <Position 3>, <Numerical Expression>)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 546 of 562

Terminology

<Numeric Variable> Specifies a numerical variable to assign


<Position 1> The position to be checked.
<Position 2> The position of the first point that specifies the area.
<Position 3> The position of the second point that specifies the
area. 
<Numerical Expression> Radius of the hemisphere on both ends
 

Explanation

This will check if position 1 is inside the cylindrical area (Refer to diagram below) defined by
the two points, position 2 and position 3, and the radius represented by the numerical
expression. If the point is inside the space, 1 is returned; otherwise, 0 is returned.
This function checks whether the check position (X, Y, and Z coordinates) is within the
specified area, but does not take the posture components into consideration.

                                       

It is not possible to describe a function that contains an argument in <Position 1>, <Position
2>, <Position 3> and <Numerical Expression>. If such a function is described, an error will be
generated during execution.
 

Reference Program

10 M1=ZONE2(P1,P2,P3,50)

20 IF M1=1 THEN MOV P_SAFE ELSE END


 

Reference

ZONE
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
Overview of the Parameters of MELFA-BASIC IV
 

Alphabetical overview of the MELFA-BASIC IV parameters

Alphabetical overview of the MELFA-BASIC IV parameters for dedicated I/O

 
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
Alphabetical Overview of MELFA-BASIC-IV parameters
Parameter Function
AREA*AT User area
AREA*ME User area
AREA*P1 User area
AREA*P2 User area
BZR Buzzer ON/OFF
CBAU232 Communication setting: Baud rate
CPRC232 Communication setting:
Communication method
CPRTY232 Communication setting: Parity
CSTOP232 Communication setting: Stop bit
CTERM232 Communication setting: End code
HANDINIT Hand initial state
HANDTYPE Hand type
HNDDAT* Maximum acceleration/deceleration
setting
HNDHOLD* Maximum acceleration/deceleration

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 547 of 562

setting
INB Stop input B contact designation
JOGJSP Jog setting
JOGPSP Jog setting
JOGSPMX Jog speed value
MEJAR Joint movement range
MEPAR Orthogonal movement range
MEXBS Tool base coordinates
MEXTL Standard tool coordinates
OPPSL Program selection rights
ORST* Output signal pattern
PRGUSR User base program
PRSTNA Program reset operation rights
RETPATH Automatic return setting
RMTPSL Program selection rights
SFC*AT Free plane limit
SFC*ME Free plane limit
SFC*P Free plane limit
SLRSTIO Output reset at reset
SLT* Slot table
SLOTON Program selection save
TASKMAX No. of multitasks
USRORG User-designated origin
WRKDAT* Maximum acceleration/deceleration
setting
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AREA*AT
User area

* is 1 to 8.

No. of Arrays

Integer1

Explanation

Designate an area (rectangle defined with two orthogonal coordinate points.)

A signal will be output if that area is outside the movement area (interference). or if the robot‚s current position is within that area.
Up to eight limits can be set using the parameters AREA*P1, AREA*P2, AREA*ME and AREA*AT.

Designate the user-defined area type. (Invalid/zone/interference = 0/1/2)

Zone: The dedicated output signal USRAREA will turn ON.

Interference: An error will occur.

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AREA*ME
User area

* is 1 to 8.

No. of Arrays

Integer1

Explanation

Designate an area (rectangle defined with two orthogonal coordinate points.)

A signal will be output if that area is outside the movement area (interference). or if the robot‚s current position is within that area.
Up to eight limits can be set using the parameters AREA*P1, AREA*P2, AREA*ME and AREA*AT.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 548 of 562

Designate the mechanism No. for which the user-defined area is to be validated.

The mechanism No. is 1 to 4. but normally 1 is set.

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AREA*P1
User area

* is 1 to 8.

No. of Arrays

Real value8.

Explanation

Designate an area (rectangle defined with two orthogonal coordinate points.)

A signal will be output if that area is outside the movement area (interference). or if the robot‚s current position is within that area.
Up to eight limits can be set using the parameters AREA*P1, AREA*P2, AREA*ME and AREA*AT.

Designate the first point of the area.

(X,Y,Z, A, B, C, L1, L2) Unit: mm or deg.

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AREA*P2
User area

* is 1 to 8.

No. of Arrays

Real value8.

Explanation

Designate an area (rectangle defined with two orthogonal coordinate points.)

A signal will be output if that area is outside the movement area (interference). or if the robot‚s current position is within that area.
Up to eight limits can be set using the parameters AREA*P1, AREA*P2, AREA*ME and AREA*AT.

Designate the second point of the area.

(X,Y,Z, A, B, C, L1, L2) Unit: mm or deg.

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
BZR
Buzzer ON/OFF

No. of Arrays

Integer1

Explanation

Designate whether the buzzer sound is ON or OFF.

(OFF/ON=0/1)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 549 of 562

Factory setting

1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CBAU232
Communication setting

No. of Arrays

Integer1

Explanation

Baud rate

Factory setting

9600
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CPRC232
Communication setting

No. of Arrays

Integer1

Explanation

Communication method (0: Non-procedural, 1:Procedural, 2: Data link)

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CPRTY232
Communication setting

No. of Arrays

Integer1

Explanation

Parity (0: None. 1: Odd. 2: Even )

Factory setting

2
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CSTOP232
Communication setting

No. of Arrays

Integer1

Explanation

Stop bit (1, 2)

Factory setting

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 550 of 562

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CTERM232
Communication setting

No. of Arrays

Integer1

Explanation

End code(O:CR1:CR+LF)

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
HANDINIT
Hand initial state

No. of Arrays

Integer8

Explanation

Set the pneumatic hand I/F output for when the power is turned ON.

Factory setting

1, 0, 1, 0, 1, 0, 1, 0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
HANDTYPE
Hand type

No. of Arrays

Character string8.

Explanation

Set the single/double solenoid hand type and output signal No.

Set the signal No. after the hand type.

When D900 is set the signal No.900 and 901 will be output..

Factory setting

D900, D902, D904, D906, D908, D910, D912, D914


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
INB
Stop input B contact designation

No. of Arrays

Integer1

Explanation

Chance the dedicated input (stop) between the A contact and B contact.

(A contact/B contact = 0/1)

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 551 of 562

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
JOGJSP
Jog setting

No. of Arrays

Real value3.

Explanation

Designate the joint jog and step operation speed.

(Inching H, inching L, maximum override.)

Inching H: Feed amount when jog speed is set to High. Unit: deg.

Inching L: Feed amount when jog speed is set to Low. Unit: deg.

Maximum override: Operates at OP override I maximum override.

Factory setting

Setting value for each mechanism


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
JOGPSP
Jog setting

No. of Arrays

Real value3.

Explanation

Designate the orthogonal jog and step operation speed.

(Inching H, inching L, maximum override.)

Inching H: Feed amount when jog speed is set to High. Unit: deg.

Inching L: Feed amount when jog speed is set to Low. Unit: deg.

Maximum override: Operates at OP override I maximum override.

Factory setting

Setting value for each mechanism


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
JOGSPMX
Jog speed limit value

No. of Arrays

Real value1.

Explanation

Limit the robot movement speed during the teach mode. Unit mm/ s.

Even if a value larger than 250 is set, the maximum value will be limited to 250.

Factory setting

250.0
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 552 of 562

COSIMIR® · MELFA-BASIC IV
MEJAR
Joint movement range

No. of Arrays

Real value16.

Explanation

Set the overrun limit value for the joint coordinate system. Set the minus and plus directions.

( -J1, +J1,-J2, +J2, ... , -J8, +J8) Unit: mm

Factory setting

Setting value for each mechanism


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MEPAR
Orthogonal movement range

No. of Arrays

Real value6.

Explanation

Set the overrun limit value for the orthogonal coordinate system. Set the minus and plus directions.

(-X, +X, -Y, +Y, -Z, +Z) Unit: mm.

Factory setting

-10000, 10000, -10000, 10000, -10000, 10000,


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MEXBS
Tool base coordinates

No. of Arrays

Real value6.

Explanation

Set the default value for the relation of the orthogonal coordinate system and robot coordinate system.

(X,Y,Z, A, B, C) Unit: mm or deg.

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
MEXTL
Standard tool coordinates

No. of Arrays

Real value6.

Explanation

Set the default value for the relation of the tool coordinate value and flange.

(X,Y,Z, A, B, C) Unit: mm or deg.

Factory setting

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 553 of 562

0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
PRGUSR
User base program

No. of Arrays

Character string 1

Explanation

Set the user base program.

Factory setting

Non
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
RETPATH
Automatic return setting

No. of Arrays

Integer1

Explanation

When the program is halted by stopping and the robot is moved with jog operation. etc. If the operation is to be resumed. set this to
resume the program after returning to the stop position.

(Function valid/function invalid = 1/0)

Factory setting

1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SFC*AT
Free plane limit

* is 1 to 8.

No. of Arrays

Integer1

Explanation

This is the overrun limit set on a free plane.

Create a plane with three coordinate points, and set the area that does not include the origin as the outside-movement area. Up to
eight limits can be set using the following three types of parameter SFC*P, SFC*ME and SFC*AT.

Designate the validity of the set free plane limit.

(Valid/Invalid = 1/0)

Factory setting

0
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SFC*ME
Free plane limit

* is 1 to 8.

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 554 of 562

No. of Arrays

Integer1

Explanation

This is the overrun limit set on a free plane.

Create a plane with three coordinate points, and set the area that does not include the origin as the outside-movement area. Up to
eight limits can be set using the following three types of parameter SFC*P, SFC*ME and SFC*AT.

Designate the mechanism No. for which the free plane limit is to be validated.

The mechanism No. is 1 to 4. but normally 1 is set.

Factory setting

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SFC*P
Free plane limit

* is 1 to 8.

No. of Arrays

Real value9.

Explanation

This is the overrun limit set on a free plane.

Create a plane with three coordinate points, and set the area that does not include the origin as the outside-movement area. Up to
eight limits can be set using the following three types of parameter SFC*P, SFC*ME and SFC*AT.

Designate three points for creating the plane.

(X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3) Unit: mm .

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SLOTON
Program selection save

No. of Arrays

Integer1

Explanation

Designate whether to save the selected program.

(Invalid/valid = 0/1)

If invalidated. the program selection will be canceled when the program is reset. The OP display will be .„P0000„.

Factory setting

1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
SLT*
Slot table

* is 1 to 32

No. of Arrays

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 555 of 562

Character string 4

Explanation

Set the operation conditions for each task. These are set when the

program is reset.

Designate the (program name, operation mode, starting conditions, and order of priority).

Program name: Selected program name

Operation mode: Continuous/1 cycle = REP/CYC

Starting conditions:

Normal/Error/Always = START/ERROR/ALWAYS

Order of priority: 1 to 31 (31 is the maximum)

Factory setting

1, REP, START, 1

©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
USRORG
User-designated origin

No. of Arrays

Real value8

Explanation

Designate the user-designated origin position.

(J1, J2, J3, J4, J5, J6, J7, J8) Unit: deg

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
WRKDAT*
Maximum acceleration/deceleration setting

* is 1 to 8

No. of Arrays

Real value7

Explanation

Set the hand conditions and work conditions for when OADL is set to ON within the program.

Up to eight conditions can be set. The condition combination is selected with the LOADSET command.

Set the work conditions. (Designate with the tool coordinate system.)

(Weight, size X, size Y, size Z, center of gravity X, center of gravity Y, center of gravity Z)

Unit: kg, mm

Factory setting

0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0


©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
Alphabetical Overview of MELFA-BASIC-IV dedicated input/output parameters

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 556 of 562

Parameter
AIRERR1 .. AIRERR5
ATEXTMD
ATTOPMD
AUTOENA
BATERR
CLVLERR
CYCLE
HLVLERR
EMGERR
ERROUT
ERRRESET
HNDCNTL1 .. HNDCNTL5
HNDERR1 .. HNDERR5
HNDSTS1 .. HNDSTS5
IODATA
IOENA
JOGENA
JOGM
JOG*
JOG-
LINEOUT
LLVLERR
M1MELOCK .. M5MELOCK
M1SRVOFF .. M5SRVOFF
M1SRVON .. M5SRVON
MELOCK
OUTRESET
OVRDOUT
OVRDSEL
PRGSEL
PRGOUT
RCREADY
S1START :: .. S32START
S1STOP .. S32STOP
SAFEPOS
SLOTINIT
SRVOFF
SRVON
START
STOP
STOPSTS
TEACHMD
USRAREA
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AIRERR1 .. AIRERR5
Input:Mechanism 1 .. 5 pneumatic pressure error input signal

Function:

Request the pneumatic pressure error occurrence.

Output: Mechanism 1 .. 5 pneumatic error output signal

Function:

Outputs that a pneumatic pressure error is occurring.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 557 of 562

ATEXTMD
Input:-

Function:-

Output: Teaching mode output

Function:

Outputs that the remote mode is entered.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ATTOPMD
Input:-

Function:-

Output: Automatic mode output

Function:

Outputs that the automatic mode is entered.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
AUTOENA
Input:Automatic operation enable input

Function:

Disables automatic operation when inactive. It this signal is inactive. and the AUTO mode is selected, E5010 will occur.

Output: Automatic operation enable output

Function:

Outputs the automatic operation enabled state.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
BATERR
Input:-

Function:-

Output: Battery voltage drop

Function:

Outputs that the battery voltage has dropped.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 558 of 562

COSIMIR® · MELFA-BASIC IV
CLVLERR
Input:-

Function:-

Output: Warning level error output signal

Function:

Outputs that a warning level error is occurring

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
CYCLE
Input:Cycle stop input signal

Function:

Starts the cycle stop.

Output: In cycle stop operation output signal

Function:

Outputs that the cycle stop is operating.

Turns OFF when the cycle stop is completed.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
EMGERR
Input:-

Function:-

Output: Emergency stop output signal

Function:

Outputs that an emergency stop is occurring.

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ERROUT
Input:Error No. output request

Function:

Outputs the error No. to the numeric value output.

Output: Error No. output signal

Function:

Outputs that the error No. is being output to the numeric value output

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 559 of 562

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA-BASIC IV
ERRRESET
Input:Error reset input signal

Function:

Releases the error state.

Output: Error occurring output signal

Function:

Outputs that an error has occurred.

Factory setting

2, 2
©·2003·EFR·IRF·GERMANY

COSIMIR® · MELFA
HLVLERR
Input:-

Function:-

Output: High level error output signal

Function:

Outputs that a high level error is occurring

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR® ·
HNDCNTL1 .. HNDCNTL5
Input:-

Function:-

Output: Mechanism 1 .. 5 hand outp

Function:

Outputs the general

...

Outputs the general

Factory setting

-1, -1
©·2003·EFR·IRF·GERMANY

COSIMIR
HNDDAT*
Maximum acceleration/de

* is 1 to 8

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 560 of 562

No. of Arrays

Real value7

Explanation

Set the hand conditions an

Up to eight conditions can

Set the hand conditions. (

(Weight, size X, size Y, siz

Unit: kg, mm

Factory setting

Standard load, 0.0, 0.0, 0.


©·2003·EFR·IRF·GERMANY

COSIMIR
HNDERR1 .. HNDERR5
Input:Mechanism 1 .. 5 h

Function:

Requests the hand error o

Output: Mechanism 1 .. 5

Function:

Outputs that a hand error

Factory setting

-1, -1

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 561 of 562

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011


COSIMIR® Page 562 of 562

file://C:\Documents and Settings\eeroko\Local Settings\Temp\~hh643.htm 1.11.2011

You might also like