Inputting And Outputting External Signals; Input Signals; Output Signals - Mitsubishi MELFA CR1D Instruction Manual

Table of Contents

Advertisement

4MELFA-BASIC V

4.1.4 Inputting and outputting external signals

This section explains the general methods for signal control when controlling the robot via an external
device (e.g., PLC).

(1) Input signals

Signals can be retrieved from an external device, such as a programmable logic controller.
The input signal is confirmed with a robot status variable (M_In(), etc.) Refer to
tus variables"
for details on the robot status variables.
*Command word
Command word
Wait
*System variables
M_In, M_Inb, M_Inw, M_DIn
*Statement example
Statement example
Wait M_In(1)=1 .................................................................
M1=M_Inb(20) ..................................................................
M1=M_Inw(5)....................................................................
*Related functions
Signal output ................................................................................
Branching with input signal ..........................................................
Interrupting with input signal ........................................................

(2) Output signals

Signals can be output to an external device, such as a programmable logic controller.
The signal is output with the robot status variable (M_Out(), etc.). Refer to
variables"
for details on the robot status variables.
*Command word
Command word
Clr
*System variables
M_Out, M_Outb, M_Outw, M_DOut
*Statement example
Statement example
Clr 1 ...........................................................................
M_Out(1)=1 ...............................................................
M_Outb (8)=0 ............................................................
M_Outw (20)=0..........................................................
M_Out(1)=1 Dly 0.5 ...................................................
M_Outb (10)=&H0F ...................................................
*Related functions
Signal input ........................................................................................
Timer ..................................................................................................
4-111 MELFA-BASIC V functions
Waits for the input signal to reach the designated state.
Function
Clears the general-purpose output signal according to the output signal reset pattern in the
parameter.
Clears based on the output reset pattern.
Turns the output signal bit 1 ON.
Turns the 8 bits, from output signal bit 8 to 15, OFF.
Turns the 16 bits, from output signal bit 20 to 35, OFF.
Turns the output signal bit 1 ON for 0.5 seconds. (Pulse output)
Turns the 4 bits, from output signal bit 10 to 13 ON, and turns the four bits from 14 to 17 OFF.
Function
Explanation
Waits for the input signal bit 1 to turn ON.
Substitutes the input signal bit 20 to 27, as an 8-bit state, in numeric variable M1.
Substitutes the input signal bit 5 to 20, as an 16-bit state, in numeric variable M1.
Page 111, "(2) Output signals"
Page 104, "(1) Unconditional branching, conditional branching, waiting"
Page 107, "(3) Interrupt"
Explanation
Page 111, "(1) Input signals"
Page 109, "(5) Timer"
Page 140, "4.3.26 Robot sta-
Explanation
Explanation page
Page 140, "4.3.26 Robot status
Explanation
Explanation page

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents