Omron SYSMAC FH Series User Manual page 515

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

Advertisement

Errcmnd$
Get the function name of the macro where an error occurred.
Format
Errcmnd$
Parameter
None.
Return value
Returns the character string type value of the upper case letters that represents the macro function name
where the error occurred.
Description
Gets the character string of the macro function name where the error occurred at error occurrence in the
program.
If there is no error in the program or an error occurred as a result of the unrelated operations to the macro
functions such as a division by zero operation, a null string is returned.
Use this macro function in the Try-Catch-End Try statement.
If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"
error will occur.
Usage Cautions
• None.
Example
Outputs the error information to the system status console window only if the error is occurred in the
GetUnitData statement process in the *MEASUREPROC subroutine within the Unit Macro processing unit. If
an error is occurred in other macro function statement in the subroutine, the measurement processing ends
without taking any action.
*MEASUREPROC
Try
GetUnitData 5, 5, CR#
SetUnitData 6, 143, CR#
Catch
If Errcmnd$ = "GetUnitData" Then
Print Errcmnd$
Endif
End Try
Return
Useable Modules
Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro
Vision System FH/FZ5 Series
User's Manual (Z340)
WWW.NNC.IR
8
513
Macro Reference

Advertisement

Table of Contents
loading

Table of Contents