![background image](http://html1.mh-extra.com/html/omron/fh-1-series/fh-1-series_user-manual_742686245.webp)
WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
243
5
Optimizing Scene
s (
M
ea
su
re
men
t Flo
w
s)
(M
acr
o
Custo
m
ize
Fu
ncti
ons)
Vision System FH/FZ5 Series
User’s Manual (Z340)
Stopping the Program When a Specific Condition is Met
The program can also be stopped when a specific condition is met. Setting an appropriate condition allows
the location of an error to be identified more efficiently than with the Stop function.
*MCRINIT
Debug 18
Rem Use the SetStop function to set the program stop condition so that the program stops when the Stop function
parameter is 0
SetStop Str$(0)
Return
*MEASUERPROC
Rem The actual measurement process is written from here
POS.X#=(POS0.X@ + POS1.X@) / 2
POS.Y#=(POS0.Y@ + POS1.Y@) / 2
Rem Execute the Stop function and stop the program on the line where the POS.X# variable is 0
Stop Str$(POS.X#)
Rem Execute the Stop function and stop the program on the line where the POS.Y# variable is 0
Stop Str$(POS.Y#)
Print POS.Y# / POS.X#
Return
A true/false relational expression (true: -1, false: 0) can also be set as the condition for the Stop function.
Example: Stopping the program when the CORRELATION& variable is less than 60
Set the SetStop function so that the program stops when the relational expression is true (-1).
SetStop Str$(-1)
The Stop function stops the program when the relational expression CORRELATION& < 60 is true.
Stop Str$(CORRELATION& < 60)
Note
Содержание fh-1 series
Страница 8: ...WWW NNC IR 6 Vision System FH FZ5 Series User s Manual Z340...
Страница 14: ...WWW NNC IR 12 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 22: ...WWW NNC IR 20 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 48: ...WWW NNC IR Initializing the Controller 46 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 68: ...WWW NNC IR Editing Scene Groups 66 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 132: ...WWW NNC IR Useful Functions for Operation 130 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 172: ...WWW NNC IR Saving Scene Groups in External Memory 170 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 254: ...WWW NNC IR Basic Knowledge For Macro Customize Functions 252 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 650: ...WWW NNC IR Macro Reference 648 Vision System FH FZ5 Series User s Manual Z340 Related Items None...
Страница 881: ...WWW NNC IR...