TP programming
You can start programming with the EYE+ plugin on the Tablet TP from MENU > Teaching > Editor
. This editor allows
you to create easily TP programs.
A TP program is a .TP
file containing robot instructions (registers and I/O manipulation, apply robot displacements,
call other programs ..) that can be directly started from the IPendant touch. This is the normal way of programming
Fanuc robots if you don’t have ROBOGUIDE.
Important
The camera configuration and hand-eye calibration must be done before executing any commands. If you do not know how to proceed, please refer to the Camera configuration wizard and Plugin hand-eye calibration.
The plugin provides 6 programming blocks under the section Plugin
:
EYE+ Start Production
EYE+ Check Last Error
EYE+ Get Part
EYE+ Stop
EYE+ Prepare Part
EYE+ Raw Command
Note
String arguments in TP program are limited to 34 characters. Some EYE+ commands required more than 34 characters (e.g. multi-feeding commands). If you encounter this kind of situation, you should program your requests using Karel program directly.
You can drag and drop those blocks into your program flow.

Fig. 10 Plugin blocks for EYE+
EYE+ Start Production
Parameters
recipe identifier - the recipe’s unique identifier. The parameter must be an integer between 1 and 65535.
Description
This command must be called to start EYE+ in production state using the right recipe.
Usage example

Fig. 11 EYE+ Start Production example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_START_PRODUCTION(12345)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]<>0) THEN
4: CALL DOSOMETHING
5: ELSE
6: CALL DOSOMETHINGELSE
7: ENDIF
8: CALL IPL_ASYRIL_EYE_STOP('production')
[End]
EYE+ Stop
Parameters
state - is an EYE+ states. The parameter must be a string.
Description
This command is used to stop an EYE+ state and stop the communication on both clients. You must always end your program with this block.
Usage example

Fig. 12 EYE+ Stop example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_START_PRODUCTION(12345)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]<>0) THEN
4: CALL DOSOMETHING
5: ELSE
6: CALL DOSOMETHINGELSE
7: ENDIF
8: CALL IPL_ASYRIL_EYE_STOP('production')
[End]
EYE+ Get Part
Returns
The returned part is stored in the input position register chosen in the Network Configuration page.
Only the X
, Y
and R
components are overwritten in the selected position register. You have to add the other
components (Z
, W
, P
) yourself according to your robot setup. These missing components can be assigned by
hand or by using the assignment operator in your program.
Warning
If you do not assign the last components, the position will not be reachable by your robot.
Description
This command is used to request one part from EYE+. This is a blocking command, meaning it will keep going until it gets a response from EYE+.
Usage example

Fig. 13 EYE+ Get Part example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_START_PRODUCTION(12345)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]=0) then
4: CALL IPL_ASYRIL_EYE_GET_PART
5: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
6: IF (R[21: ]=0) THEN
7: CALL PICKANDPLACE
8: ELSE
9: CALL IPL_ASYRIL_EYE_STOP('production')
10: ENDIF
11: ELSE
12: CALL DOSOMETHINGELSE
13: ENDIF
14: CALL IPL_ASYRIL_EYE_STOP('production')
[End]
EYE+ Prepare Part
Description
This command is used to request one part from EYE+. This command is not a blocking command. The part coordinates can be retrieved later with the EYE+ Get Part block.
Usage example

Fig. 14 EYE+ Prepare Part example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_START_PRODUCTION(12345)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]=0) THEN
4: CALL IPL_ASYRIL_EYE_PREPARE_PART
5: CALL DOSOMETHING
6: CALL IPL_ASYRIL_EYE_GET_PART
7: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
8: IF (R[21: ]=0) THEN
9: CALL PICKANDPLACE
10: ELSE
11: CALL IPL_ASYRIL_EYE_STOP('production')
12: ENDIF
13: ELSE
14: CALL DOSOMETHINGELSE
15: ENDIF
16: CALL IPL_ASYRIL_EYE_STOP('production')
[End]
EYE+ Raw Command
Parameters
command - is the raw command to send to EYE+. The parameter must be a string.
client - is the client number that will be used to send the command.
Client 1
is the first client you selected in the Network Configuration page,Client 2
is the second client you selected.
Returns
The raw response of the command is stored in the string register you selected in Network Configuration page.
Description
This function is used to send raw commands to EYE+. Refer to chapter Commands to know what kind of commands can be sent.
Note
String arguments in TP program are limited to 34 characters. Some EYE+ commands required more than 34 characters (e.g. multi-feeding commands). If you encounter this kind of situation, you should program your request using Karel program directly.
Warning
If you send the raw command 'set_parameter part_quantity 2'
and then use the block EYE+ Get Part,
you will receive only the first part coordinates in the position register. However, if you use the raw command
'get_part'
, the string response will contain all the part coordinates.
Usage example

Fig. 15 EYE+ Raw Command example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_RAW_CMD('start production 12345',1)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]=0) THEN
4: CALL DOSOMETHING
5: ELSE
6: CALL DOSOMETHINGELSE
7: ENDIF
8: CALL IPL_ASYRIL_EYE_STOP('production')
[End]
EYE+ Check Last Error
Returns
The last error detected is stored in the register you selected in Network Configuration page.
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 internally (value set to 0).
Note
A good practice is to use this function just after each plugin command. This way, you will be able to know on which command the last error occurred.
Usage example

Fig. 16 EYE+ Check Last Error example
Here is the resulting code in TP mode. This code is automatically generated from the programming blocks.
Note
The IPL_ASYRIL_EYE_*
programs cannot be called directly from the old FANUC user interface. They are
protected and intended for use only via CRX programming blocks.
1: CALL IPL_ASYRIL_EYE_START_PRODUCTION(12345)
2: CALL IPL_ASYRIL_EYE_CHECK_LAST_ERROR
3: IF (R[21: ]<>0) THEN
4: CALL DOSOMETHING
5: ELSE
6: CALL DOSOMETHINGELSE
7: ENDIF
8: CALL IPL_ASYRIL_EYE_STOP('production')
[End]