omron — 6.1. Connecting Vision Sensor to Robot Controller

For connecting the Vision Sensor to the Robot Controller, follow the procedures below. 29 6.1. Connecting Vision Sensor to Robot Controller Set the IP address of the Vision Sensor to the tag [C1:] according to the step 1 in Chapter 3.1 additionally, set the port number of the Vision Sensor according to the step 2 in Chapter 3.1 1 Call the initialization function (FHDEFGLOBAL) for external variables and initialize them. The external variables include variables to monitor the c ommunication state. When executing the connection processing, be sure to call and execute the initialization function (FHDEFGLOBAL) for the ex ternal variables. 35: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 36: !

(2)Initialize global variables ; 37: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 38: ; 39: CALL FHDEFGLOBAL ; Initialization function for external variables 2 39: CALL FHDEFGLOBAL Set the number of the local coordinate system and tool coordinate system to be used. 40: UserCoordNo =0 ; Local Coord No 41: ToolCoordNo =0 ; Tool Coord No 3 Set the number of retry times and timeout period [sec.] at connection to the register 196 and 197 respectively. Set the number of retry times and timeout period [sec] when communi cating with registers 198 and 199 respectively. 46: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 47: ! (1) Set the network ; 48: ! configuration. ; 49: ! You have to configure a client ; 50: !

TAG 'C1' and the following ; 51: ! communication settings. ; 52: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 53: ; 54: R[196]=2 ; The number of retry times at server connection 55: R[197]=10 ; The timeout period at server connection [sec.] 56: R[198]=2 ; The number of retry times at communications 57: R[199]=10 The timeout period at communications [sec.] 4 Set the register variables as arguments for the connection function (FHCONNECT) to the Vision Sensor and call it. 59: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 60: ! Connect to the FH server ; 61: !;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; 5