Avertissement

Vous lisez une ancienne version de cette documentation. Si vous souhaitez obtenir des informations actualisées, veuillez consulter 5.0 .

URScript functions

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. 189-Fig. 190.

../../../_images/script_code_eyeplus_functions_call.png

Fig. 189 Script call

../../../_images/urscript_function_dropdown_list.png

Fig. 190 List of all the functions within the EYE+ plugin

EYErawCommand(<name>, <command>)

Paramètres

  • name - the name of the EYE+ to which you want to send the command. It is a string, so do not forget to add the character " before and after the name.

  • command - the EYE+ command to send. The command is a string, so do not forget to add the " character before and after the command.

Remarque

It is not necessary to add the ASCII line feed character to the command.

Renvoie

  • The returned value is directly given as output of the function. It is the raw response of the EYE+ (string).

Description

This function allows you to send raw EYE+ commands. Refer to chapter Commandes to check what kind of command can be sent.

Exemple d’utilisation

../../../_images/raw_command_example.png

Fig. 191 EYErawCommand example

EYEcheckLastError(<name>)

Paramètres

  • name - the name of the EYE+ to which you want to send the command. The name is a string, so do not forget to add the character " before and after the name.

Renvoie

  • 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 Codes d’erreur (error type 4xx or 5xx).

  • If a plugin error has occurred, the output is one of the following errors displayed in Tableau 32 (error type 6xx).

Tableau 32 Plugin errors

Error code

Signification

691

Incomplete coordinates received

692

Cannot convert the error flag

693

Wrong socket number

694

Cannot change sockets timeout

695

EYE+ not registered

696

Wrong input parameter type

697

Plugin timeout

698

Socket not connected

699

Socket error

Once the error is returned as output from the function, the error is cleared (value set to 0).

Exemple d’utilisation

../../../_images/check_last_error_example.png

Fig. 192 EYEcheckLastError example