ROBOT3D - Robot Offline Programming & Simulation

Programming instructions


PROGRAM HELP - Revision 1.9.01

*** VERY IMPORTANT: You can only acess programs that are in current program directory. See the CHDIR command in this text.

The program menu is designed to implement an automatic mode of operation, based on cycle logic.

The integrated command interpreter can read text files of type <.R3D> and produce complete robot programs. Point data, and conditions are retrieved from separated files.

The interpreter language R3D specially developped for the package is an implementation of the BASIC language and is designed to take full advantage of all simulation routines.

The program files can be created or edited by an text editor of the user's choice. Use the file ROBMOD.CFG to set the editor name and path. The filename is passed to the editor as a parameter. ROBMOD uses the small editor RODIT because of memory limitations. To use another editor it must occupy less than 100k.

If the user has problems running RODIT.EXE under ROBMOD please reconfigure your CONFIG.SYS and AUTOEXEC.BAT to leave about 600kb of DOS memory.

The search Directory for program and locations data is defined in the ROBMOD.CFG file.

Example (file ROBMOD.CFG) :

RODIT
1,0,1,8,1200,10,1,1
C:\ROBOT3D\PROG

Please set the last line to the desired Directory. Alternatively the directory can be changed by the CHDIR command.

The basic Directories are as follows:

Directory PATH

  • C:
  • ROBOT3D
  • CAD
  • CELL
  • PROJ
  • ROBOT
  • TOOL
  • SLIDE
  • PROG
  • TUTOR
  • work1
  • work2
  • work3
  • The directories work1, work 2 & work3 are examples of user created directories to keep the user programs and point data.

    The lenght of a program is 10k bytes maximum but as programs can be chained by means of CALL instructions the only limitation is disk memory.

    The functions provided in the program menu are:

    * SAVE
    Save point data in file [.COR]. Data recorded: X,Y,Z,A,B,C,S (status),T (turn), E1..E6 (external axis), A1..A6 (robot axis), Tool , Base , Condition (techware).
    In program RUN if the locations are teached (see MARK_LOC in Utility menu) the data points are saved by the system.

    * RETRIEVE
    Retrieve point data from file [.COR].
    Data recorded: X,Y,Z,A,B,C,S (status),T (turn), E1..E6 (external axis), A1..A6 (robot axis), Tool , Base , Condition (techware). The locations data can be loaded in a program by means of a GET_DATA interpreter command.

    The locations data can be loaded in a program by means of a GET_DATA command.

    ***** EXAMPLE OF A [.COR] FILE: *****

    0,PTP X+1366.9,Y-0.0,Z+1269.2,A-0.000,B+77.000,C+90.000,S 0,T 0,
    E1+0.000,E2+0.000,E3+0.000,E4+0.000,E5+0.000,E6+0.000,
    A1+0.000,A2+0.000,A3+0.000,A4+0.000,A5-35.000,A6+0.000,
    TOOL 0,FRAME 0,COND 0
    1,PTP X+1366.9,Y-0.0,Z+1269.2,A-0.000,B+77.000,C+90.000,S 47,T 0,
    E1+0.000,E2+0.000,E3+0.000,E4+0.000,E5+0.000,E6+0.000,
    A1+0.000,A2+0.000,A3+0.000,A4+0.000,A5-35.000,A6+0.000,
    TOOL 0,FRAME 0,COND 0
    2,PTP X+1561.7,Y-100.0,Z+1414.1,A-0.000,B+77.000,C+90.000,S 11,T 0,
    E1+0.000,E2+0.000,E3+0.000,E4+0.000,E5+0.000,E6+0.000,
    A1+5.219,A2+28.281,A3-51.330,A4+19.673,A5-12.787,A6-22.220,
    TOOL 0,FRAME 0,COND 0
    3,PTP X+1561.7,Y+100.0,Z+1314.1,A-0.000,B+77.000,C+90.000,S 34,T 0,
    E1+0.000,E2+0.000,E3+0.000,E4+0.000,E5+0.000,E6+0.000,
    A1-5.219,A2+20.606,A3-29.065,A4-9.456,A5-26.969,A6+11.442,
    TOOL 0,FRAME 0,COND 0

    NOTE: Please note that a [.COR] file is suitable to be converted in a [.R3D] file if the point numbers are removed.

    ***** EXAMPLE OF A MODIFIED [.R3D] FILE: *****

    PTP X+2836.6,Y+2626.4,Z+810.0,A+179.999,B-0.000,C+180.000,21
    PTP X+2836.6,Y+2626.4,Z+810.0,A+179.999,B-0.000,C+180.000,21
    PTP X+2733.5,Y+1761.5,Z+810.0,A+154.999,B+0.000,C+180.000,21
    LIN X+2733.5,Y+1461.5,Z+810.0,A+154.999,B+0.000,C+180.000,21
    PTP X+2733.5,Y+1161.5,Z+810.0,A+129.999,B-0.000,C+180.000,21
    END

    * ERASE
    Erases data points from memory. The range can be specified.

    * TRACE
    Traces all data points in memory defining the robot path.

    * LOC2R3D
    This function is very usefull as it can transform locations files [.COR] files in [.R3D] files using the space_points approach. The program file is ready to run, edit or translate.

    EXAMPLE:
    REM Project: default
    REM Kinematics: RT01
    REM Robot: IRB2000
    REM RBASE (X+0.0,Y+0.0,Z+0.0,A+0.0,B+0.0,C+0.0)
    REM Cell: floor
    REM CBASE (X+0.0,Y+0.0,Z+0.0,A+0.0,B+0.0,C+0.0)
    REM Tool: pkh500b
    REM TOF[0] (X-440.5,Y+0.0,Z+136.5,A+0.0,B-112.0,C+0.0)
    REM Positioner: orbit
    REM PBASE (X+1000.0,Y+0.0,Z+0.0,A+0.0,B+0.0,C+0.0)

    REM Description:
    REM >
    REM >

    GET_DATA "AAA "
    HOME
    REM HOME (X+1300.0,Y-0.0,Z+1820.0,A-0.0,B+18.0,C-0.0)
    REM P1,Tool=0,Frame=0,Cond=0
    PTP_SP 1
    REM P2,Tool=0,Frame=0,Cond=0
    LIN_SP 2
    END

    * SELECT
    Selects the program <.R3D> file.

    * RUN
    Starts running the program file with the interpreter.
    The user can specify the starting line number. (See LIST command)
    The user is prompt to erase the objects loaded if any.

    NOTE:
    During program run the ARROW_KEYS,T,+,-,0,1,2,3,4,5,6,7,F,S,P,L
    can be used to execute display functions like in the display menu.

    F - FASTRUN toggle
    T - PAN TCP
    S - STOP
    P - PAUSE
    L - Toggle STEP-BY-STEP mode

    * EDIT
    Invoques the RODIT editor to edit a program file. If no file is specified it creates a new file. The filename cannot exceed 12 chars. The editor name can be changed in the file ROBMOD.CFG.
    To have information about the editor see the RODIT.DOC file in the ROBOT3D directory.

    * LIST
    Shows program listing of selected program, with line numbering.
    In alternative another type of file can be listed.

    * PRINT
    Prints program listing. The program <.R3D> or the locations file <.COR> can be printed.

    * CHDIR
    Changes the current Directory for searching programs [.R3D] & locations files. Please
    indicate the complete path.

    * IRDATA
    Converts programs to and from SIEMENS IRDATA with the IRD_R3D and R3D_IRD utilities.
    Please read IRDATA.DOC file to see language limitations.
    (Only supplied with complete package).

    * ABB_S3
    Converts programs to and from ABB ARLA (s3) with the R3D_ARLA and ARLA_R3D utilities.
    ARLA programs must be compiled with the ABB OLP3 software supplied by ABB ROBOTICS.
    Please read ARLA.DOC file to see language limitations.
    (Only supplied with complete package).

    * ABB_S4
    Converts programs to and from ABB RAPID (s4) with the R3D_S4 and S4_R3D utilities.
    S4 programs can be downloaded directly on the robots.
    Please read S4.DOC file to see language limitations.
    (Only supplied with complete package).

    * KUKA (C1)
    Converts programs to and from KRL (KRC1) with the KRC1_R3D and R3D_KRC1 utilities.
    KRC1 programs can be downloaded directly on the robots.
    Please read KRC1.DOC file to see language limitations.
    (Only supplied with complete package).

    * KUKA (C32)
    Converts programs to and from KRL (KRC32) with the KRC32R3D and R3DKRC32 utilities.
    KRC32 programs can be downloaded on the robots using APS (c) application.
    Please read KRC32.DOC file to see language limitations.
    (Only supplied with complete package).

    R3D - Robot3D Offline Programming Language (NEUTRAL LANGUAGE)

    The set of commands are as follow:

    * Float variables:

    A-W (changed to integer format whenever necessary)
    P0-P99 parameters
    NOTE: When performing motion instructions the variables X,Y,Z,A,B,C
    and R,S,T,U,V,W are reserved.
    DIM Varname
    NOTE: A DIM Statment shall be used for each variable
    Declared float variables names (max 30)

    * REM text
    Comments text

    * NEW
    Clears variables from memory

    * FOR <control var_name>=<initial value> TO <target value>
    .
    NEXT

    <initial value> & <target value> can be parameters expressions.

    * GOSUB <line_num>
    .
    <line_num>
    code
    .
    RETURN

    NOTE: Parameters are not supported!

    * JMP_SUB <line_num>,<ntimes>
    .
    <line_num>
    code
    .
    RETURN

    <ntimes> can be a parameter expression.
    This constructiom is equivalent to the gosub but the call is repeated
    <ntimes>. NOTE: unlike the GOSUB this construction can't be nested!
    The following is legal:

    . JMP_SUB 50,3
    . END

    . 50 PRINT "SUB 50"
    . GOSUB 100
    . RETURN

    . 100 I=I+1
    . RETURN

    The following is illegal:

    . JMP_SUB 50,3
    . END

    . 50 PRINT "SUB 50"
    . JMP_SUB 100,2
    . RETURN

    . 100 I=I+1
    . RETURN

    * GOTO <line_num>

    NOTE: Parameters are not supported!

    * Assignment
    <var_name>=<expression>
    or <var_name>=<function>(expression)
    NOTE: var_name can be a parameter.
    expression can be a parameter expression.

    functions:

    SIN(value) value in DEG
    COS(value) "
    TAN(value) "
    ASIN(value) value-> [-1,1] return an angle in DEG
    ACOS(value) "
    ATAN(value) "
    ABS(value)
    EXP(value)
    LOG(value)
    SQR(value)
    INP_SIGNAL(value) return the value of an Input_signal
    TIMER(value) return the value of timers 1,2
    timer 1 - accumulated time
    timer 2 - last motion time

    * IF <expression> <operator> <expression>
    THEN <statement>

    <<expression>> can be a parameter expression.

    OPERATORS: >,<,=

    * PRINT <arg_list>

    * LPRINT <arg_list>
    Same as print but output goes to the printer.

    * TX_RS232 <arg_list> Same as print but output goes to the serial
    communications port. The TINYCOMM or other comunication program
    must be used on remote computer. The cable to use is a NULL cable.

    FILE HANDLING
    * FPRINT <arg_list>
    Send output to file PROGRAM.OUT. If the file is to be saved don't forget
    to save it with another name to not be destroyed in the next program run.
    This must be done in DOS.

    * INPUT "<prompt-string>",<var_name>

    NOTE: var_name can be a parameter.

    * END
    End of program

    ROBOT FUNCTIONS
    NOTE: in the following expression refers to parameter expressions.

    * HOME
    Puts the robot in a predefined position. Should be used only before any movement
    instruction as cycle time is not calculated. Is usefull to put this instruction after a
    GET_DATA to suppress any positionning error.

    * CHG_TOOL "<tool_name>"
    Changes the tool and recover the necessary TOF matrix from <tool_name.TOF>

    * LIN X<value>,Y<value>,Z<value>,A<value>,B<value>,<C<value>,<status_code>
    Linear interpolation using coordinates.
    <sol_code> is the code for axis status related with inverse kinematics
    solutions 00111111=63 => PPPPPP ; 00000001=1 => PNNNNN
    If grippers are active the two left bits are added.
    (Example: 10-000000=128 Gripper 2 is ON)

    * LIN_SP <expression>
    Linear interpolation using space points recorded.

    * PTP X<value>,Y<value>,Z<value>, A<value>,B<value>,<C<value>,<status_code>
    Syncronous Point to Point interpolation using coordinates (Interpolation is done
    in joint space - all axis start and stop at same time).

    * PTP_SP <expression>
    Syncronous Point to Point interpolation using space points.

    * CIR X<v1>,Y<v2>,Z<v3>,X<v4>,Y<v5> ,Z<v6>,A<v7>,B<v8>,C<v9>,<status_code>
    Circular interpolation using values. <v1 to v3> gives aux_point coordinates <v4> to <v9>
    gives end_point coordinates.

    * CIR_SP <expression1>,<expression2>
    Circular interpolation using space points. <expression1> gives aux_point
    number <expression2> gives end_point number.
    NOTE: Circular programming is always Absolute. See the PROG_REL command.

    * ZOF <num>,X<value>,Y<value>,Z<value> ,A<value>,B<value>,<C<value>
    mum[0,16]
    Station frame. Zero Offset number <num> setting. The ZOF functioncan be
    used to shift and rotate points in the 3D space allowing the same program
    to be executed in diferent locations.
    The coordinates are optional. If not specified the value are retrieved
    from internal table <project.ZOF>.

    * TOF <num>,X<value>,Y<value>,Z<value> ,A<value>,B<value>,<C<value>
    num[0,16]
    Tool frame selection.
    The coordinates are optional. If not specified the value are retrieved
    from internal table <project.TOF>.

    * PPA R<value>,S<value>,T<value>,U<value> ,V<value>,W<value>
    Motion of external axis or positioner. This instruction should appear
    after a robot movement to define the robot pose.
    Actual version 5.00 includes external axis position in Location file.

    * MOVE_JOINTS <value>,<value>,<value> ,<value>,<value>,<value>
    Motion of robot axis.

    * REC_JOINTS_PAR <num>
    Assign robot joint values to parameters starting with param P<num>.

    NOTE: In motion movements using coordinates (and for ZOF, OBJ_POS &
    OBJ_OFF) the value of the normal variables (eg. X,Y,..U,R) are assigned to
    zero before expression is evaluated.
    For example an instruction like LIN X+10*i,Y+5,0,A+10,B+5+i,C+0,63
    with i=5 is evaluated like
    LIN X=50, Y=5, Z=0, A=10, B=10, C=0
    OBS: See also the PROG_REL command for exception to this rule!

    * OP_GRP <expression> - valid values 1,2.
    Open gripper

    * CL_GRP <expression>
    Close gripper

    * PICK_OBJ <expression> (0..39)
    Attaches the object defined by expression to the robot TCP. See ATTAC_OBJ
    in SETTINGS menu)

    * FREE_OBJ <expression> (0..39)
    Frees an object attached to the robot TCP, robot or external link.

    * LOAD_OBJ "<obj_name>"
    Loads an object in the cell. Ojects are numbered in a sequencial
    order.

    * OBJ_POS <num>,X<value>,Y<value>,Z<value> ,A<value>,B<value>,C<value>
    Places an object within the cell in the specified position origin.
    valid values for num 0..39

    * OBJ_OFF <num>,X<value>,Y<value>,Z<value> ,A<value>,B<value>,C<value>
    Places an object within the cell in the specified position offset
    related to the origin.
    valid values for num 0..39

    * ROBOT_LINK <num>
    num< DOF(Degrees of freedom) +2
    Assigns location of robot link <num> to variables X,Y,Z,A,B,C.

    * EXTERN_LINK <num>
    num< DOF_EXT(Degrees of freedom) +2
    Assigns location of external link <num> to variables X,Y,Z,A,B,C.

    * ATTACH_ROB_LINK <solid_num>,
    Attach object_num to robot link_num.

    * ATTACH_EXT_LINK <solid_num>,<link_num>
    Attach object_num to external link_num.

    * S_EXTFRAME
    Calculate a frame associated with external axis. The frame will move
    during external axis motion. Programed motions (LIN and CR will) will
    will be corrected by this dynamic frame. Used to couple robot axis and
    positioner axis.

    * RS_EXTFRAME
    Reset external frame calculation.

    * ERASE_OBJS
    Erase all objects.

    * DELAY <n> - [n] miliseconds.
    Suspends execution by n miliseconds (if FASTRUN=OFF)
    Increments total timer.

    * WAI_IL <n> - Wait for input <n> LOW (valid values 0..31)

    * WAI_IH <n> - Wait for input <n> HIGH (valid values 0..31)

    * S_O <n>- Set Output <n> (valid values 0..31)

    * RS_O <n> - Reset Output <n> (valid values 0..31)

    * ARC_ON
    Starts arcwelding with (valid values 0..99)
    Not implemented.

    * ARC_OFF
    Stops arcwelding with (valid values 0..99)
    Not implemented.

    * VEL_CPA <value> Linear velocity [mm/s]
    VEL_ALL <value> Velocity for all axis [%]
    VEL_AXS ,<value> Velocity for one axis [%]
    VEL_OV<value> Velocity override [%]

    * ACC_CPA <value> Linear aceleration [mm/s2]
    ACC_ALL <value> Aceleration for all axis [%]
    ACC_AXS ,<value> Aceleration for one axis [%]

    * WELD <weld_cond> - valid values 0..99. Not implemented.
    States a weld condition for post-processing

    * $<meta_command> META_COMMAND for simulation.

    $ZOOM_IN <n> - Zoom In n repetitions
    $ZOOM_OUT <n>
    $PAN_UP <n>
    $PAN_DOWN <n>
    $PAN_RIGHT <n>
    $PAN_LEFT <n>
    $PAN_TCP
    $VIEWPORT <n>
    $DRAW_ON enables screen regeneration
    $DRAW_OFF disable screen regeneration

    * GET_DATA "filename"
    Retrieves data from a data file. Same as Retrieve in MANUAL mode.
    NOTE: to use instructions with space points (ex. PTP_SP 5) the point
    data should exist in memory. If you haven't teach any point you should use an GET_DATA
    instruction on the program.

    BISIACH & CARRU users:

    The only way to get the correct PHI parameter after post-processing for the TAURUS SYSTEM
    in the RCM is to use the space point aproach in
    the programming instructions:

    PTP_SP will give correct PHI
    PTP X... will give a PHI estimation for planar movements.

    * CALL "filename"
    Stops execution of the current program and starts execution of a new program. Same as SELECT
    and RUN in MANUAL mode.

    * PROG_ABS
    Program is run with absolute coordinates (Default!).

    * PROG_REL
    Programed coordinates are relative to last position.
    Example:

    . PROG_ABS
    . PTP X+500.1,Y-600,Z-100,A+0,B+30,C+180,30
    . PROG_REL
    . PTP X+0,Y+100,Z+0,A+0,B+35,C+180,30

    second actual location: (500,-500,-100,0,35,180)
    NOTE: The orientation is always ABSOLUTE!

    SIEMENS RCM users:

    The way to write the program listings must ensure that the movement
    type is correct (Incremental or Absolute)

    For example:

    PROG_REL
    50 PRINT "SP50"
    PROG_REL
    GOSUB 30
    LIN X+30,Y+0,Z+0,A+90,B+0,C+180,21
    RETURN

    PROG_ABS
    30 PRINT "SP30"
    PROG_ABS
    PRINT "WELDING"
    RETURN

    As SUB 30 is an absolute rotine the LIN after the GOSUB 30 instruction doesn't produce the
    desired result since the motion is now absolute. To correct the following instruction should
    be placed after the GOSUB 30:

    GOSUB 30
    -> prog_rel

    Programming Examples in R3D

    Back to Homepage

    Order


    RCAM2_info@arsrobotic.com

    Copyright © 2006, Francisco J.C. Fernandes, Last Updated -28-3-2019 10:00:00