Mitsubishi Electric CR750-Q Instruction Manual page 320

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
Wait (Wait)
[Function]
Waits for the variable to reach the designated value.
[Format]
Wait[]<Numeric variable>=<Numeric constant>
[Terminology]
<Numeric variable>
<Numeric constant>
[Reference Program]
(1) Signal state
1 Wait M_In(1)=1
2 Wait M_In(3)=0
(2) Task slot state
3 Wait M_Run(2)=1
(3) Variable state
4 Wait M_01=100
[Explanation]
(1) This command is used as the interlock during signal input wait and during multitask execution.
(2) The Wait instruction allows the program control to continue to the next step once the specified condition
is met.
(3) In case the Wait instruction is executed in several tasks at one time in the multitask execution status, the
processing time (tact time) may become longer and affect the system. In such cases, use the If-Then
instruction instead of the Wait instruction.
(4) Number of conditions which may be included in a Wait command is one. If more than one is included, an
erroneous judgment or an error in execution process can result.
An example of wrong indication) Wait M_In(38)=1 Or M_In(39)=1
→There are two ways to avoid it.
1) Avoid using the Wait command and use the "If-Then" statement instead.
Example) *Loop
2) Set 0 (conditional command) to the parameter PRSPEC.
(5) If Wait and CallP commands are executed at the same time in a multitask program, it may affect the sys-
tem. For a possibility that these commands are executed at the same time in a multitask program, set 0
(conditional command) in the parameter PRSPEC.
4-300 Detailed explanation of command words
Designate a numeric variable. Use the input/output signal variable (in such cases
as M_In, M_Out) well.
Designate a numeric constant.
' The same meaning as 1 *L10:If M_In(1)=0 Then GoTo *L10.
If M_In(38)=1 Or M_In(39)=1 Then *Next Else *Loop
*Next

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents