Navigation

  • Page 1

    Tech Note: Robot Communications - FANUC

  • Page 2

    Page 1 of 17 Version 1.0 8/16/06 1 OVERVIEW ............................................................................................................................. 2 1.1 Scope ..............................................................................................................

  • Page 3

    Page 2 of 17 Version 1.0 8/16/06 1 Overview 1.1 Scope The purpose of this document is to outline the steps needed to connect and transfer data from a Cognex In-Sight Sensor to a FANUC Robot Controller. In all setups outlined the robot controller will be the device controlling the acquisi...

  • Page 4

    Page 3 of 17 Version 1.0 8/16/06 x :REAL y :REAL angle :REAL BEGIN -- Connect to In-Sight OPEN FILE file_var ('RW', 'P2:') -- Instruction In-Sight to Acquire an Image -- (wait for a response) WRITE file_var ('sw8',CHR(13)) -- Read status READ file_var (s...

  • Page 5

    Page 4 of 17 Version 1.0 8/16/06 2.5 In-Sight Serial Port Setup While connected to the sensor and Offline: 2.5.1 Input Settings  Select Sensor | Discrete I/O Settings | Input Settings…  For Input Module, select I/O Expansion Module  Click OK

  • Page 6

    Page 5 of 17 Version 1.0 8/16/06 2.5.2 Serial Settings  Select Sensor | Serial Port Settings…  Set the following properties: o Baud Rate: 19200 o Data Bits: 8 o Stop Bits: 1 o Parity: None o Handshake: None o Mode: Native o Fixed Input Length: Unchecked o Input Terminator: 13 o Outp...

  • Page 7

    Page 6 of 17 Version 1.0 8/16/06 o Angle: Double-click E6, double-click E2  Press the Manual Trigger icon a few times to confirm that ExtractBlobs( ) data is changing.  Save the job  Turn the sensor Online 3 Ethernet Communications 3.1 Needed Hardware In-Sight Sensor (models 3400 ...

  • Page 8

    Page 7 of 17 Version 1.0 8/16/06  Choose Clients.  Move the cursor to the tag you want set up for Socket Messaging, and press F3 You will see a screen similar to the following: SETUP Tags Tag C3: 1 Comment: ...

  • Page 9

    Page 8 of 17 Version 1.0 8/16/06 tag S3, move the cursor structure element [3], as shown in the following screen. SYSTEM Variables $HOSTS_CFG 1 [1] HOST_CFG_T 2 [2] HOST_CFG_T 3 [3] HOST_CFG_T 4 [4] HOST_CFG_T ...

  • Page 10

    Page 9 of 17 Version 1.0 8/16/06 xs :STRING[9] ys :STRING[9] angles :STRING[9] x :REAL y :REAL angle :REAL BEGIN WRITE TPDISPLAY(CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR) SET_FILE_ATR(file_var, ATR_IA) -- Connect t...

  • Page 11

    Page 10 of 17 Version 1.0 8/16/06 IF UNINIT(mp_str) THEN mp_str = '' ENDIF WRITE TPDISPLAY(mp_str,CR) IF (mp_str <> 'User Logged In') THEN WRITE TPDISPLAY('Log In Failed',CR) --Error RETURN ENDIF -- Instruction In-Sight to Acquire an Image -- (wait for a ...

  • Page 12

    Page 11 of 17 Version 1.0 8/16/06  In cell A2 type ExtractBlobs( at this point the property sheet for ExtractBlobs should popup, click OK  Insert Snippet “FANUC Communications”: o Select cell A4 o If the Tool Palette isn’t visible; select View | Tool Palette o From the Snippets t...

  • Page 13

    Page 12 of 17 Version 1.0 8/16/06 4 Sensor Interface Communications To use the Sensor Interface option a third-party protocol converter, from PREMOSYSactionURI(http://www.premosys.com/): http://www.premosys.com, is required. This converter handles the serial handshaking protocol of FANUC’...

  • Page 14

    Page 13 of 17 Version 1.0 8/16/06 22: !In-Sight TO ROBOT ; 23: IF R[5:REC_ACK]=2 OR R[5:REC_ACK]=3 OR R[5:REC_ACK]=6,JMP LBL[4] ; 24: !ROBOT TO In-Sight ; 25: IF R[5:REC_ACK]=4 OR R[5:REC_ACK]=5 OR R[5:REC_ACK]=8 OR : R[5:REC_ACK]=9,JMP LBL[5] ; 26: !POSITION IS Not OK ;...

  • Page 15

    Page 14 of 17 Version 1.0 8/16/06 4.6 In-Sight Job Setup Use the sample included with the VE0010 protocol converter 5 Trouble Shooting 5.1 Serial with HyperTerminal 5.1.1 In-Sight Serial Port Setup While connected to the sensor and Offline: 5.1.2 Input Settings  Select Sensor | Discrete...

  • Page 16

    Page 15 of 17 Version 1.0 8/16/06 5.1.3 Serial Settings  Select Sensor | Serial Port Settings…  Set the following properties: o Baud Rate: 115200 o Data Bits: 8 o Stop Bits: 1 o Parity: None o Handshake: None o Mode: Native o Fixed Input Length: Unchecked o Input Terminator: 13 o Ou...

  • Page 17

    Page 16 of 17 Version 1.0 8/16/06 5.1.5 Connect to In-Sight  From Windows click Start | All Programs | Accessories | Communications | HyperTerminal  Create a New Connection o Port: COM1 o Bits per second: 115200 o Data bits: 8 o Parity: None o Stop bits: 1 o Flow Control: None  Fil...

  • Page 18

    Page 17 of 17 Version 1.0 8/16/06 5.2.2 Connect to In-Sight  From Windows click Start | Run...  In the Run window type: telnet <the sensors IP Address> example: telnet 10.27.80.66  Click OK  You should be prompted for a user name, type admin  Press Enter  The passwor...

x