Omron SYSMAC FH Series User Manual page 244

Vision sensor vision system
Hide thumbs Also See for SYSMAC FH Series:
Table of Contents

Advertisement

6
Hit [Enter] on your keyboard.
One line of the program is executed. The program stops at the next line.
Macro(U3)210 *MEASUREPROC
Macro(U3)220 Stop
Macro(U3)>cont 1
Macro(U3)230 POS.X#=(POS0.X@ + POS1.X@) / 2
Macro(U3)>
7
Continue to step through the program unit until the line that contains the error is
executed.
When the line with the error is executed, error information appears in the system status console
window. In this case, it can be seen that the error is caused by dividing by 0.
Macro(U3)210 *MEASUREPROC
Macro(U3)220 Stop
Macro(U3)>cont 1
Macro(U3)230 POS.X#=(POS0.X@ + POS1.X@) / 2
Macro(U3)>cont 1
Macro(U3)240 POS.Y#=(POS0.Y@ + POS1.Y@) / 2
Macro(U3)>cont 1
Macro(U3)250 Print POS.Y# / POS.X#
Macro(U3)Division by zero in 250
Macro(U3)>
Identifying the Cause of the Error
Once you have determined the location of the error, identify the cause.
8
Check the value of the variable.
Enter "VarList" in the system status console window from your keyboard.
9
Hit [Enter] on your keyboard.
The variables are listed in the system status console window.
Macro(U3)210 *MEASUREPROC
Macro(U3)220 Stop
Macro(U3)>cont 1
Macro(U3)230 POS.X#=(POS0.X@ + POS1.X@) / 2
Macro(U3)>cont 1
Macro(U3)240 POS.Y#=(POS0.Y@ + POS1.Y@) / 2
Macro(U3)>cont 1
Macro(U3)250 Print POS.Y# / POS.X#
Macro(U3)Division by zero in 250
Macro(U3)>varlist
POS.X#=0.000
POS0.X@=0.000
POS1.X@=0.000
POS.Y#=211.000
POS0.Y@=209.000
POS1.Y@=213.000
From the program contents and the variable list, it can be seen that the value of the POS.X# denominator
variable is 0.
242
Basic Knowledge For Macro Customize Functions
WWW.NNC.IR
Vision System FH/FZ5 Series
User's Manual (Z340)

Advertisement

Table of Contents
loading

Table of Contents