4-193
Detailed explanation of command words
4MELFA-BASIC IV
Dly (Delay)
[Function]
1) When used as a single command:
At a designated time, it causes a wait. It is used for positioning the robot and timing input/output signals.
2) When used as an additional pulse output:
Designates an output time for a pulse.
[Format]
1) When used as a single command
2) When used as an additional pulse output
[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.01 seconds. It is allowed to specify 0.00 as well.
The maximum value is the maximum single-precision real number.
[Reference Program]
(1) Waiting for time
1 Dly 30
' Wait for 30 seconds
(2) Pulse output of the signal
2 M_Out(17)=1 Dly 0.5
' Send the signal output to the general-purpose output signal 17
for 0.5 seconds.
3 M_Outb(18)=1 Dly 0.5
' Among general-purpose output signals 18 to 25, only signal 18 is
output (on) for the first 0.5 seconds, and signals 19 to 25 are out-
put (on) after 0.5 seconds have passed.
(3) Wait for the completion of positioning.
1 Mov P1
' Moves to P1.
2 Dly 0.1
' Positions to 1.
(4) Wait for completion of hand opening. (closing)
1 HOpen 1
' Open the hand 1.
2 Dly 0.5
' Wait for hand 1 to open securely.
[Explanation]
(1) This instruction sets the wait time in a program. It is used for timing input/output signals, positioning
movement instructions, and for specifying pulse output times when used in a signal output statement
(such as step 20 in [statement example] above).
(2) The pulse output will be executed simultaneously as the next command in the steps that follow.
(3) Up to 50 pulse outputs can be issued of all programs simultaneously. Exceeding this, an error will occur
when the program tries to execute it.
(4) A pulse output reverses each of its bits after the specified time. This means that if M_Outb (8-bit signal)
or M_Outw (16-bit signal) is used, the corresponding number of bits are reversed.
(5) As for pulse output, the execution of a program ends without waiting the elapse of the specified duration
if the End instruction or the last step of the program is executed during the specified duration. However,
output turns off after the specified duration.
(6) The relation of the priority levels for other interrupts is as shown below:
COM>Act>WthIf (Wth) >Pulse output (Time setting ON)
(7) Even if stop is input during the execution of a pulse output, the pulse output operation will not stop.
Note1) If stop is input at step 20 in the following program, the output signal state will be held, and the execu-
tion is stopped.
1 M_Out(17)=1
2 Dly 10
3 M_Out(17)=0
Note2) If a pulse output by the M_Outb (8-bit signal) or the M_Outw (16-bit signal) is used, each bits in the
corresponding bit width are reversed after the designated time.
M_Outb(1)=1 Dly 1.0
In this case the bit pattern 00000001 is output for one second, and the bit pattern 11111110 is output
thereafter.
Dly[]<Time>
Example)
M_Out(1) = 1
Dly[]<Time>