Omron FZ4 Series User Manual page 222

Vision sensor
Table of Contents

Advertisement

CHAR1$="A"
CODE&=Asc(CHAR1$)
CHAR2$=Hex$(CODE&)
The result is as follows:
CODE&=65
CHAR2$=41
Controls the flow of processing in accordance with specified conditions.
4
If <Logical Expression> Then <Statement>|<Label> [Else <Statement>|<Label>]
Parameters
<Logical Expression>
<Statement>
<Label>
Return Value
None.
Description
Controls the flow of processing in accordance with the Logical Expression.
While the <Logical Expression> value is true (not 0), either the statement below the Then <statement> is
executed or the processing is moved to the line specified by the <Label>.Refer to Calculation for details
on logical expressions and Boolean values.
Reference:
Specifying a <Label> after Then will move the processing to the Label.
Specifying a statement after Then will execute that statement.
When the <Logical Expression> value is true (not 0), processing is moved to the line after the Else
<statement> or to the line specified by the<Label>.
The Else statement can be omitted.
The Else statement may not be written on the next line.Describe the If - Else all in one statement.
Example
Output the judge result of Camera Image Input.
If UnitJudge(0)=1 Then Gosub *OKOUT Else Gosub *NGOUT
Return
*OKOUT
Print "OK"
Return
*NGOUT
Print "NG"
Return
Stop
220
Using Custom Command
The logical expression (Boolean expression) for controlling processing.
The command statement to be processed (statement).
Label (Label) for the movement destination.
Calculation (p.159)
FZ4 User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents