Mitsubishi Translators

This section provides basic information about the Mitsubishi1 translator.

This page discusses:

Supported Features

Basic Features Advanced Features
Feature Download Upload NRL Teach Safety Controller System Files
Motion Motion Parameters Joint / Cartesian Targets Circular Motion Coordinated Motion 7 DOF Robots
Tool / Object Frames Fixed TCP Aux Axes Conveyors Offsets
Feature Set IO Run Task Loops Parallel Position Variables
Wait IO Pulse IO If / Case Arrays
Application Spot Paint Arc Sealing
Tested Controller Versions MELFA CR750 MELFA CR800
This table displays if the feature is:
  • available
  • not available

Overview

Mitsubishi Program Structure

Mitsubishi programs use both GoTo and GoSub instructions to jump to Labels. A Return instruction is required when GoSub is used. The Return instruction jumps back to the instruction following the GoSub instruction after the Label ~ Return section is executed.

In OLP support, “GoSub *Label” is uploaded as DELMIA Goto *Label, and a return label is created following the Goto instruction. And the Mitsubishi Return instruction is uploaded as a DELMIA Goto with the return label as its target. This is the upload result when a Label is called only once by a GoSub instruction.

When a Label is called by GoSub more than once, the Label ~ Return section is uploaded as a separate task, and the GoSub instruction is uploaded as a DELMIA Run(procedure) instruction. This also applies to GoSub inside of FOR, IF, WHILE, and SELECT-CASE instructions, even when a Label is called only once by a GoSub, since it is not possible to jump into the middle of these instructions.

The main task name is the Mitsubishi program file name. The subroutines’ names are <Label#main>. The sub-tasks are downloaded with the main task to the same Mitsubishi program file.

Position data used in motion instructions are uploaded and downloaded. To get position data NOT used in motion instructions (such as pallet definition instruction Def Plt) into the downloaded program files, set Template to the folder where original programs are.

<file beginning, main program>

…

End

‘ comment subroutine_1

*Label_1

…

Return

…

‘ comment subroutine_n

*Label_n

…

Return

‘ comment

<Position List section>

The comments after End and Return are stored to tasks’ header during upload and are downloaded back. It is accessible by right-clicking the task header in Teach and select Edit OLP Content.

Instruction Support

Mitsubishi Instruction Support

The following table summarizes the level of support for each Mitsubishi Instruction by the DELMIA Mitsubishi translator and DELMIA simulation. Any instruction which does not appear in this list is uploaded as a V6 Comment instruction and will not be used in simulation.

Mitsubishi MELFA-BASIC Instructions Level of Support DELMIA Instruction Comments
Motion Instructions
MOV Support Robot Motion Joint move
MVS Support Robot Motion Linear move
MVR Support Robot Motion Circular move, arc from P1 to P2, P3
Logic Instructions
GOTO Label Support Goto Label
GOSUB Label Support Run (procedure) GoSub is used to call a subroutine defined in the same program file. The subroutine is uploaded as a task named in the format <subroutine#main> where “subroutine” is the Label name and “main” is the Mitsubishi program file name.
*Label Support Label on another instruction The label is set on the DELMIA instruction which follows it.
IF Support Condition
SELECT Support Test
FOR Support For
WHILE Support While-Do
CALLP Support Run (procedure)
IO and Arithmetic Instructions
M_Out Support Assign Set output
Variable=Expression Support Assign
M_Timer Support Timer Timer reset & start
Wait Support Wait Wait for IO or numeric variable
DLY Support Wait Wait time
Other Instructions
Spd Support Motion Profile Sets Linear speed
Ovrd Partial Support Motion Profile 3rd numeric value is ignored
JOvrd Support Motion Profile Sets Joint speed
Cnt Partial Support Accuracy Profile 2nd numeric value is ignored
Fine Partial Support Accuracy Profile “Fine Distance P” is supported
‘ (Comment) Support Custom In-line comment is also supported.

DELMIA Instruction Support

The following table summarizes the level of support for each DELMIA instruction by the DELMIA Mitsubishi translator. Following the table is a detailed description of how each instruction is translated.

DELMIA Instruction Level of Support Mitsubishi MELFA-BASIC Instructions Comments
Robot Motion Support MOV, MVS, MVR Joint, Linear, and Circular moves
Goto Support GOTO *Label
Condition Support IF THEN ELSE ENDIF
Test Support Select
For Support FOR-NEXT
While do Support WHILE
Run (procedure) Support CALLP or GoSub If the task name is in the format <subroutine#main>, it is downloaded with the main task in the same program file, and the Run (procedure) is downloaded as GoSub. Otherwise, it is downloaded as CallP.
Assign Support

M_Out

Variable=Expression

Set output

Assignment

Wait Support

DLY

WAIT

Pure delay

Wait for IO or numeric variable

Pulse Support M_Out … Dly …
Custom Support

Details on Instructions

Unsupported Instructions
Any DELMIA instruction that is not supported on download generates a warning. Any MELFA-BASIC instruction that is not supported on upload generates a warning, and a Custom instruction created so that it is downloaded.
Custom
A custom instruction text is downloaded into the program exactly as is. On upload, any unsupported instruction is created as a custom instruction, with the name of the custom instruction being the Mitsubishi instruction's text.
GoTo

A DELMIA GoTo instruction is translated into an MELFA-BASIC GoTo instruction. A label, which is the target of the GoTo instruction, is required on another instruction. In MELFA-BASIC, the label, denoted by a *, is its own an instruction.

On upload the label will be set on a DELMIA instruction created for the Mitsubishi instruction following the label instruction.

MELFA-BASIC Labels start with a letter of the alphabet and is up to 16 characters long. The characters that may be used are alphanumeric.

GoSub

MELFA-BASIC GoSub instruction is used to call a subroutine defined in the same program file.

On upload, the subroutine is uploaded as a task named in the format <subroutine#main> where “subroutine” is the Label name and “main” is the Mitsubishi program file name. The GoSub instruction is uploaded as Run (procedure).

Condition
A DELMIA Condition instruction is translated into a Mitsubishi MELFA-BASIC IF-THEN-[ELSE]-[ENDIF] instruction. The expressions in the DELMIA Condition must conform to the Mitsubishi IF logical expressions. Multiple expressions can be joined with AND or OR binary Boolean operators. See Expression Conversion for how expressions are translated.
Test
A DELMIA Test instruction is translated to a MELFA-BASIC Select-Case instruction.
For-Loop
A DELMIA For-Loop instruction is translated into Mitsubishi MELFA-BASIC For-Next instruction. DELMIA restricts the STEP to be either 1 or -1.
While-Do
A DELMIA While-Do instruction is translated to MELFA-BASIC While instruction.
Run (procedure)

A DELMIA Run instruction, where the Run is calling a procedure, is translated into a MELFA-BASIC CALLP instruction.

On upload, the program files being called are searched for in the same folder as the program file selected for upload. If they do not exist, a blank task is created for the Run instruction to be valid.

Assign

A DELMIA assign instruction is translated into a Mitsubishi M_OUT if the destination variable is an output signal, otherwise it is translated into a Mitsubishi assign instruction.

See Expression Conversion for how expressions are translated.

See Variable Conversion for details on how each MELFA-BASIC data types are translated.

Wait
A DELMIA Wait instruction is translated as a Mitsubishi WAIT (condition) or DLY (delay) instruction.
Pulse
A DELMIA Pulse instruction is translated as a Mitsubishi M_Out instruction with DLY option.
Robot Motion
MOV, MVS, and MVR without motion options (such as Type or Close Distance) are supported.

Variable Conversion

Mitsubishi Input and Output variables, numeric variables and String variables are supported. During upload, Mitsubishi Input and Output variables are created as DELMIA external IOs which are defined on the robot. Mitsubishi Timer variables are created as DELMIA Control Timers which are also defined on the robot. Mitsubishi numeric variables whose names start with the letter ‘M’ are created as DELMIA local variables whose types are Double. And Mitsubishi String variables whose names start with the letter 'C' and end with the symbol '$' are created as DELMIA Local String variables.

Mitsubishi Variables Type Direction Scope Upload to DELMIA Variable Name
M_In(x) Boolean Input Global M_INx (Input Signal)
M_Out(x) Boolean Output Global M_OUTx (Output Signal)
M_Timer(x) Double Global M_TIMERx (Control Timer)
M… Double Local M*
C…$ String Local C*$ is string

Expression Conversion

Mitsubishi expression support is limited to a simple set of operations.

Category Description Mitsubishi Operator DELMIA Operator
Binary Integer/Double Plus + +
Minus - -
Multiply * *
Division / /
Unary Negative - -
Not NOT not
Binary Comparison Equals = =
Not Equals <> <>
Less Than < <
Less Than or Equal <= <=
Greater Than > >
Greater Than or Equal >= >=
Binary Boolean And AND and
Or OR or

Controller Parameters

Below are the parameters for the current release.

Parameter Measure Purpose Default Value
MaxProgramLength Integer Max number of instructions allowed per robot task when downloading. If the task has more instructions than the number specified, it will be split into multiple programs during translation. This is useful if the program size exceeds the maximum allowed size for your controller. If the value is 0, the task will not be split. 0
User Base Program name String Specifies a program that defines external variables. The program file will be uploaded before other programs so that the variable types are declared. This is the parameter PRGUSR in Mitsubishi Controller. Base

[1] MELFA-BASIC is or may be a trademark or registered trademark of Mitsubishi or its subsidiaries in the U.S. and in other countries.