Cognex to Motoman NX100

  • Hi all,


    We have a project here to use a Cognex Insight Micro 1100 to send X,Y, Angle info to a NX100 controller via ethernet.


    In regards to setting up the Cognex to send this data via ethernet, can anybody recommend settings? There are various ethernet options and this is a new area of learning for me.


    The motoman vision manual explains how to connect the camera in with the controller but besides this is there anything special I need to do with the NX100 to receive the incoming X,Y, ANGLE data?


    Thanks
    P

  • Place your Ad here!
  • are you using Ethernet or Ethernet/IP?


    I'm going to guess ethernet for now... In which case it may prove difficult. I've never really tried to do direct ethernet on NX. Documentation from Yaskawa that I've seen is sparce... With my experience, I'd say you have 2 options that I've done in this past


    1) Serial
    2) Ethernet/IP


    RoboGuru

  • Thanks Mr. Guru.
    I do have the Ethernet/IP option in the Cognex software which I have set up now.
    Here's a screen shot of the settings.. 1.jpg
    So here's some more newby questions:
    - Should I have the data set as 32 bit float? Does the NX100 want something different?
    - Do I need the "NX100 OPTIONS INSTRUCTIONS FOR DATA TRANSMISSION FUNCTION" manual to understand what is going on? Do you have this manual? Can you post it to me?
    - When the camera sends the data, where does it end up in the NX100?


    Thanks
    PC

  • When I do E I/P between a Cognex camera and a Yaskawa controller, I use a 16-bit floating point for X and Y. For the RZ I use a 8-bit floating point. The data ends up in Universal Inputs. For X and Y, I use the DIN to read the MSB into a Byte variable and the LSB into the next consecutive address. I then reassemble the number in a D variable. The Rz is read into a Byte variable and transferred into a D-variable. Once the number is reassembled I will multiply by -1 if the number is negative. Scale if necessary. I will also check the value against 0 and the previous.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • Thanks everyone, my understanding is slowly getting there..


    Robo Guru, No I don't have Ethernet IP in the robot. Didn't realise this was a separate piece of hardware. Can it still be done via Ethernet?


    If I do choose to do it via serial, I'm guessing I will need an Ethernet to serial converter as the camera does not have a serial output. Am I thinking correctly here?


    I would prefer to use the existing Ethernet and not incur any further expenses (over budget already) so any assistance here would be great!

  • I have never tried doing ethernet to the cognex direct. In theory the serial method should work the same as Ethernet but that is just theory. ..


    EthernetIP is an option for motoman


    Serial is an option for cognex


    Your stuck in the middle


    RoboGuru

  • Hi Robo Guru,


    Yes, serial is an option for Cognex but it also offers various other Ethernet options.. see the screen shot below from In-sight Explorer 4.9.0. All our Cognex cameras are actually running on Ethernet in some way, shape, or form at the moment. None with serial.


    Yes, Ethernet IP is an option for Motoman but one that I don't really want to invest in. I'm still faced with the mystery of if and how the NX100 can receive X,Y,Angle data using the existing Ethernet hardware.


    Any takers??

  • /JOB
    //NAME VISION
    //POS
    ///NPOS 0,0,0,3,0,0
    ///TOOL 0
    ///POSTYPE BASE
    ///RECTAN
    ///RCONF 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    P00080=2299.390,-1023.871,258.000,179.9999,0.0070,1.2701
    P00099=-1248.972,-1131.203,-485.423,-179.9965,0.0032,-90.0011
    ///RCONF 0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    P00111=-1980.139,409.024,-484.762,179.9870,0.0029,91.3789
    //INST
    ///DATE 2014/05/06 18:37
    ///ATTR SC,RW
    ///GROUP1 RB1
    NOP
    '********************************
    'Read value from camera and
    'process offset values
    'Used In PICK from pallet, PICK
    'from conveyor and MASTER check
    'No motions
    '********************************
    'Cognex values at "zero"
    'I010,I020,I030
    'Range (+ / -)values from part
    'I011,I012,I021,I022,I031,I032
    'Values read when picture taken
    'I013,I023,I033
    'Range (+ / -)values for calib
    'I018,I019,I028,I029,I038,I039
    '
    *TOP
    CALL JOB:TOOL1_DO
    DOUT OT#(101) OFF
    WAIT IN#(101)=OFF
    WAIT IN#(102)=OFF
    'B076 flag indicates OK
    SET B076 1
    '
    *READY'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''CAMERA
    '................Aquisition bits
    SET B070 0
    SET B071 0
    '...............................
    'Turn the camera light on
    DOUT OT#(13) ON
    TIMER T=0.20
    '.........Camera online in MAIN
    '...........Wait for CAM online
    WAIT IN#(192)=ON T=2.00
    JUMP *NO_ONLIN IF IN#(192)=OFF
    JUMP *SHOT IF IN#(192)=ON
    *NO_ONLIN
    DOUT OG#(10) 0
    JUMP *TOP IF IN#(83)=ON
    '...............................
    *SHOT
    '...Read aquisition
    DIN B070 IG#(26)
    TIMER T=0.10
    '.....Trigger was enable in MAIN
    '........Wait for trigger enable
    WAIT IN#(185)=ON
    '....................Trigger ON
    DOUT OT#(186) ON
    '............Confirm trigger ON
    WAIT IN#(186)=ON
    '...Wait for different aquistion
    *AQUIC
    TIMER T=0.10
    DIN B071 IG#(26)
    JUMP *AQUIC IF B070=B071
    WAIT IN#(196)=ON
    'Turn the camera light off
    DOUT OT#(13) OFF
    '....................Trigger off
    DOUT OT#(186) OFF
    '
    '...................................................................................I'm still faced with the mystery of if and how the NX100 can receive X,Y,Angle data ....................................................................................using the existing Ethernet hardware.
    'X Result - Process Incoming Data
    GETREG I013 MREG#(16)
    'Y Result - Process Incoming Data
    GETREG I023 MREG#(17)
    'z Result - Process Incoming Data
    GETREG I033 MREG#(18)
    '...................Check results
    JUMP *DATA_NOK IF I013>I011
    JUMP *DATA_NOK IF I013<I012
    JUMP *DATA_NOK IF I013=0
    JUMP *DATA_NOK IF I023>I021
    JUMP *DATA_NOK IF I023<I022
    JUMP *DATA_NOK IF I023=0
    JUMP *DATA_NOK IF I033>I031
    JUMP *DATA_NOK IF I033<I032
    JUMP *DATA_NOK IF I033=0
    '.....Camera X value, not robot X
    SET I015 I010
    SUB I015 I013
    SET D060 I015
    '.....Camera Y value, not robot Y
    SET I025 I020
    SUB I025 I023
    SET D061 I025
    '.....Camera z value, not robot z
    SET I035 I030
    SUB I035 I033
    SET D062 I035
    '.Multiply D for 100 and 10
    MUL D060 100
    MUL D061 100
    MUL D062 1000
    'Process the values of D060,D061,
    'D062 and D031 to move to the
    'pick up position
    '
    '
    *Rows
    ..........................Here goes my palletizing program
    JUMP *END
    '
    *DATA_NOK
    JUMP *TRY_ONE IF B076=1
    JUMP *TRY_TWO IF B076=0
    *TRY_ONE
    SET B076 0
    JUMP *READY
    *TRY_TWO
    'After two camera shots the
    'values are larger/smaller
    'than the range.
    JUMP *X_NOK IF I013>I011
    JUMP *X_NOK IF I013<I012
    JUMP *NO_DATA IF I013=0
    JUMP *Y_NOK IF I023>I021
    JUMP *Y_NOK IF I023<I022
    JUMP *NO_DATA IF I023=0
    JUMP *r_NOK IF I033>I031
    JUMP *r_NOK IF I033<I032
    JUMP *NO_DATA IF I033=0
    '
    *NO_DATA
    'Camera didn't see features
    DOUT OG#(12) 23
    JUMP *ENDFAULT
    '
    *X_NOK
    'X values is out of range
    DOUT OG#(12) 24
    JUMP *ENDFAULT
    '
    *Y_NOK
    'Y values is out of range
    DOUT OG#(12) 25
    JUMP *ENDFAULT
    '
    *r_NOK
    'Angle value is out of range
    DOUT OG#(12) 26
    JUMP *ENDFAULT
    '
    *ENDFAULT
    DOUT OT#(101) ON
    JUMP *TOP IF IN#(101)=ON
    JUMP *END IF IN#(102)=ON
    TIMER T=0.20
    JUMP *DATA_NOK
    '
    *END
    DOUT OT#(101) OFF
    END

    Retired but still helping

  • You need to use ethernet/IP for the robot as well or like I said use serial on your camera to the robot.


    The robot ethernet port is not capable of interfacing with other devices such as your camera. It is meant as a means to do backups, etc... The INFORM language on NX-100 is weak. It can not open a connection to the camera and retrieve data values.


    Fabian just posted an example robot program running Ethernet/IP


    RoboGuru

  • Hi all,


    Thanks for your answers thus far.


    A few developments are:


    - We will be using a Cognex DVT 540 (no longer Insight Micro 1020)


    - We will be using serial instead of ethernet


    Do you guys have any documentation or sample programs you can send me for setting and using the serial commands in the NX100?


    All the vision documentation I have from Motoman is centred around the Insight products. Does anybody know if DVT cameras can be used in the same way? Manuals?


    Thanks
    P

  • 1) Serial commands are non-existent in Motoman NX-100 robots. So switching to DVT will not be of any benefit to you.


    2) With the In-Sight product, Cognex "baked" in support for the Motoman robots. Motoman has a function called DCI which is typically used to send/receive job and variable data to a PC. On In-Sight, when you select Motoman for the serial port it emulates the DCI function so it now becomes compatible with Motoman robots. The DCI function of the robot is what will read/write data to the camera's spreadsheet.



    Again, you will either need to get the serial port option for your Cognex or the Ethernet/IP option for your Motoman robot.


    RoboGuru

  • Hi Robo Guru,


    I'm switching to DVT because the Insight Micro cannot correct for lens distortion or give coordinates in mm, only pixels.


    I'm confused by your comment that "Serial commands are non-existent in Motoman NX-100 robots" because in your first post you said:


    "With my experience, I'd say you have 2 options that I've done in this past


    1) Serial"


    and then again later


    "You need to use ethernet/IP for the robot as well or like I said use serial on your camera to the robot."


    Then again in your most recent post you say:


    "Again, you will either need to get the serial port option for your Cognex or..."


    Am I missing something?? :hmmm: Can the robot deal with incoming serial data from the camera or not? :help: Not moving very far..

  • - If your using a good insight micro then yes you can calibrate into mm's. They can also adjust for lens distortion using the transform commands... but my guess is that your using a micro 1050 or some other model that doesn't have PatMax feature.


    The serial port on a motoman robot is good for 2 things...
    1) Data backup to a computer
    2) DCI function


    The DCI function allows someone to store jobs and variables on a computer. The robot DCI function will access the computer over the serial port. On the robot side, you program using the command called SAVEV and LOADV. These commands connect to Motoman's computer program called Visual DCI and nothing else.


    The insight software tricks the motoman robot by emulating the Visual DCI software. So when the computer thinks it's talking to Visual DCI it's actually talking with the Cognex...


    The DVT doesn't have this ability to emulate the Visual DCI function


    So, you either need to purchase the serial port option for your cognex camera or you need to purchase an ethernet/ip card for your robot.


    RoboGuru

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners