WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
241
5
Optimizing Scenes (Measurement Flows) (Macro Customize
Functions)
Vision System FH/FZ5 Series
User’s Manual (Z340)
Identifying the Cause of an Error
After changing the usage mode to debug mode, identify the cause of the error.
Identifying the location of the error
To identify the cause of the error, determine where the error occurred.
1 Enter the Stop function in the program editing screen.
Example:Enter the Stop function immediately before the measurement process in the
*MEASUREPROC subroutine of the Unit Macro.
2 Close the program editing screen with [OK] and return to the main screen.
The main screen appears.
3 Execute measurement.
When the Stop function line is executed, the measurement process stops. If the process does not
stop, check if debug mode is specified with the debug function parameter.
4 Check the system status console window.
The system status console window shows the following:
5 Execute the program in steps of one line.
Enter "Cont 1" in the system status console window from your keyboard.
*MEASUERPROC
Rem Execute the Stop function and stop the program at this line
Stop
Rem The actual measurement process is written from here
POS.X#=(POS0.X@ + POS1.X@) / 2
POS.Y#=(POS0.Y@ + POS1.Y@) / 2
Print POS.Y# / POS.X#
Return
Macro(U3)210 *MEASUREPROC
Macro(U3)220 Stop
Macro(U3)>
Macro(U3)210 *MEASUREPROC
Macro(U3)220 Stop
Macro(U3)>cont 1