ERROR real-valued function Parameters source Real value, variable, or expression (interpreted as an integer) whose value selects the source of the error code as follows: -2 Return additional error code for current robot. ERROR(-2, 0) returns the standard eV+ error number. ERROR(-2, 1) returns the motor mask for the current robot. This bit mask indicates the motor(s) referenced for the error number returned by the instruction ERROR(-2,0). The LSB indicates motor 1, etc. If the ERROR(-2, 1) =0, the error is not associated with a specific motor. -1 Return the number of the most recent error from the program in which the ERROR function is executed.
0 Return the number of the most recent error from the program executing as task #0. 0 ≤27 Return the number of the most recent error from the program executing as the corresponding task number. 1001 Asynchronous FIFO element n-1000, where n equals 1 Most recent item 2 Next older item, etc. Returns 0 if no more FIFO elements exist. Valid select parameter values for the FIFO are 0, 1, and 3. The asynchronous FIFO is not valid while the robot is in power-down initialization state. User programs should wait until STATE(1) returns a nonzero value before using ERROR() with source > 1000.
select Optional real value, variable, or expression (interpreted as an integer) that selects the error information to be returned. (The value 0 is assumed if this parameter is omitted.) 0 Return the error number of the most recent program eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 205