![background image](http://html1.mh-extra.com/html/omron/fz4-series/fz4-series_user-manual_1633222222.webp)
4
Using
Tool
220
Using Custom Command
FZ4 User's Manual
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.
If <Logical Expression> Then <Statement>|<Label> [Else <Statement>|<Label>]
Parameters
<Logical Expression>
The logical expression (Boolean expression) for controlling processing.
<Statement>
The command statement to be processed (statement).
<Label>
Label (Label) for the movement destination.
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
Acesst 1.0 6251194
Summary of Contents for FZ4 Series
Page 1: ...User s Manual Cat No Z318 E1 02B Vision Sensor FZ4 Series...
Page 38: ...1 Before Operation 36 Setting Operation Mode FZ4 User s Manual 1 CPU 2 CPUs FZ4 11 H11 only...
Page 330: ...4 Using Tool 328 Remotely Operating the Controller Remote Operation FZ4 User s Manual...
Page 566: ......
Page 648: ...8 Appendixes 646 Manual Revision History FZ4 User s Manual...
Page 654: ...652 FZ4 User s Manual...
Page 655: ......