4MELFA-BASIC V
MELFA-BASIC V functions 4-117
(5) Timer
The program can be delayed by the designated time, and the output signal can be output with pulses at a
designated time width.
*Command word
*Statement example
*Related functions
(6) Stopping
The program execution can be stopped. The moving robot will decelerate to a stop.
*Command word
*Statement example
*Related functions
Command word
Explanation
Dly Functions as a designated-time timer.
Statement example
Explanation
Dly 0.05 .............................................................................
Waits for only 0.05 seconds.
M_Out(10)=1 Dly 0.5.........................................................
Turns on output signal bit 10 for only 0.5 seconds.
Function Explanation page
Pulse signal output.............................................................................
Page 118, "(1) Input signals"
Command word
Explanation
Hlt This instruction stops the robot and pauses the execution of the program. When the program is
started, it is executed from the next step.
End This instruction defines the end of one cycle of a program. In continuous operation, the program
is executed again from the start step upon the execution of the End instruction. In cycle
operation, the program ends upon the execution of the End instruction when the cycle is
stopped.
Statement example
Explanation
Hlt.....................................................................................
Interrupt execution of the program.
If M_In(20)=1 Then Hlt .....................................................
Pauses the program if input signal bit 20 is turned on.
Mov P1 WthIf M_In(18)=1, Hlt..........................................
Pauses the program if input signal bit 18 is turned on while moving toward P1.
End...................................................................................
Terminates the program even in the middle of the execution.
Function Explanation page
Appended statement.......................................................................... Page 302, " Wth (With)"