omron — ERROR real-valued function

ERROR real-valued function execution error (excluding I/O errors-see IOSTAT) for the specified program task. 1 If the most recent error (for the specified program task) had an error code in the range -1100 to -1199, return the variable part of the corresponding error message as a numeric value. If the most recent error had an error code in the range -1000 to -1099, return the variable portion of the corresponding error message as a bit mask indicating the joints or motors to which the error applies. Zero is returned if the error did not have a variable portion in its message.

(Also see select = 3 below.) 2 Return the error number of the most recent error from an MCS instruction executed by the specified program task. 3 Return the number of the robot associated with the most recent error for the specified program task. Zero is returned if the error was not associated with a specific robot. (Also see select = 1.) Details An eV+ task can access any errors that result in robot power being disabled. These errors include the asynchronous messages that previously were output only to the monitor window. This function is especially useful in a REACTE subroutine program to determine why the REACTE was triggered. NOTE:

The ERROR function does not report errors reported by the IOSTAT function. See System Messagesfor a list of all the eV+ error messages and their error numbers. As noted above, when the select parameter is 1, the value returned by this function should be interpreted as a 6-bit numeric value. The following program illustrates how the value should be interpreted. Example Program: Return error message corresponding to an error code .PROGRAM error.string(code, vcode, robot, $msg) ; ABSTRACT: Return error message corresponding to error code(s). ; ; INPUTS: code Basic error code e.g., from ; [e.g., from ERROR(n) or IOSTAT(lun)] ; vcode Variable part of the error code ; [e.g., from ERROR(n,1)].

eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 206