Plugin functions - URScript
URScript functions are not accessible through the “EYE+ Control” URCap but only through Scripts (Script, Assignment or If). It is also possible to call these functions directly from URScript programs.
Calling these functions from Script, Assignment or If is possible by directly typing the right command on the keyboard. Or, it is possible to find them in the <Function> drop-down list as shown in the following example Fig. 17-Fig. 18.

Fig. 17 Script call

Fig. 18 List of all the functions within the EYE+ plugin
EYERawCommand(<command>, <name = “EYE”>, <socket = 1>)
Parameters
command - the EYE+ command to send. The command is a string, so do not forget to add the
"
character before and after the command.Note
It is not necessary to add the ASCII line feed character to the command.
name - the name of the EYE+ to which you want to send the command. If no name is specified as argument, the function takes “EYE” as default name. It is a string, so do not forget to add the character
"
before and after the name.socket - the socket on which the command will be sent (1 or 2). If no socket is specified as an argument, the function takes socket 1 by default.
Returns
The returned value is directly given as output of the function. It is the raw response of the EYE+ (string).
EYECheckLastError(<name = “EYE”>)
Parameters
name - the name of the EYE+ to which you want to send the command. If no name is specified as argument, the function takes “EYE” as default name. It is a string, so do not forget to add the character
"
before and after the name.
Returns
The returned value is directly given as output of the function. It is the last EYE+ error recorded (integer).
Description
This function is used to check if an error has occurred.
If no error has occurred, the output is equal to 0.
If an EYE+ error has occurred, the output is equal to one of the error codes listed in Error codes (error type
4xx
or5xx
).If a plugin error has occurred, the output is one of the following errors displayed in section Plugin errors (error type
6xx
).
Once the error is returned as output from the function, the error is cleared (value set to 0).