keyence Machine Vision X KUKA Robot

  • Hi!


    Does Anyone work with Keyence Machine vision and KUKA robot?


    I would like to know more information about the comunication.


    Thanks :grinser043:

    Tiago / Brazil

  • Schritt für Schritt zum Roboterprofi!
  • Hi Tiago,


    we need more information about your camera set.
    In the home page of Keyence Machine vision there is a big selection.
    If near at hand post us the communication spezification (camera, monitor, remote,...)
    have a nice day :beerchug:

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • I still don't know what the model that I will use, but I belive that the possibility is the model cv110.


    I know that this model use RS-232C


    How can I acces the varibles in the robot? The DVT use KUKA Vision, but the Keyence?


    Thanks to help again LindePaul :danke:


    *Do you work in the KUKA?



    Tiago / Brasil

    Tiago / Brazil

    Einmal editiert, zuletzt von Tiago Josué ()

  • the CV-110 controller has a serial (RS232) connector.
    What we need to know
    - use the serial communication a protocol (like XON/XOFF, 3964, nothing)
    - we need a description of the communication telegram


    Then we can read and write the data with the KRC via CREAD/CWRITE.


    *yes

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • And with the model CV2100 with Ethernet port, how can I proceed to access the data from cam? Is necessary to use the OPC server? :kopfkratz:


    Tiago / Brazil

    Tiago / Brazil

    Einmal editiert, zuletzt von Tiago Josué ()

  • Hi Tiago,
    i got following information:
    the KUKA.Ethernet.KRL-XML needs AlphaNumeric datas - i looks like the camera doesn't provide this data format !
    Therefore, serial communication.


    aus dem Datenblatt (CV 2100) sind folgende Informationen zu entnehmen:


    - Interface Video output Colour, Conforming to the NTSC system RS-232C
    Numerical value output and image data and control input/output.


    - Ethernet 100 BASE-TX/10 BASE-T
    Numerical value output, image data and control input/output


    http://www.keyence.co.uk/produ…2100_specifications_1.php


    Ich denke eine serielle RS-232 Kommunikation sollte möglich sein. Die Verwendung von EKX (Ethernet KRL XML)
    würde eine "alphanumerical output" (Zeichen und Zahlen) voraussetzen, was offenbar nicht vorliegt (das gleiche
    gilt auch für die KUKA UK Vision).


    --> serielle Schnittstelle

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • Hi again!



    I am using the CV 2100 and now I am trying to send the string "T1"(input trigger command) by SER_3 to my machine vision.


    I did the follow:


    DEF escrever( )


    ; -------- Declaration section --------
    DECL INT HANDLE
    DECL REAL TIMEOUT
    DECL CHAR IS_VALUE[2]
    DECL MODUS_T MR_T, MW_T
    DECL STATE_T SR_T,SW_T, SC_T



    ; -------- Initialization --------
    MW_T=#SYNC ; initialize synchronous transmission
    MR_T=#ABS ; initialize active reading
    TIMEOUT=3.0; initialize timeout after 3 seconds



    ; -------- Main program --------
    COPEN(:SER_3, HANDLE)
    CWRITE(HANDLE,SW_T,MW_T,"T1")
    CCLOSE(HANDLE,SC_T)


    End
    _____________________________________


    But I received: ␠T1␠


    I think that is necessary to intoduce the CR (enter or new line command) after the T1 string. Is true?



    I am using XON/XOFF and 9600bps.


    :hilfe:

    Tiago / Brazil

  • I'm still learning too, but I would suggest this.


    Are those two characters not the XON and XOFF start characters? If you look in "c:\KRC\Roboter\INIT" for the file "SERIAL.INI". There will be two lines :-


    XON_VAL=17
    XOFF_VAL=19


    so what you are receiving is "(character 17)T1(character 19)"


    It appears if you change it to
    XON_VAL=0
    XOFF_VAL=0


    then you should just get "T1"


    I think that's right! Could someone please correct me if I am wrong :)

  • According to Wikipedia, ASCII 0 is the "NUL" command. It does not have any function but a length of 1 byte. The receiver is supposed to throw this byte away, it can be used if you do have fixed message-length but not enough data.
    In C it marcs the end of a character.
    That means: depending on the software you use to receive, you still might see the two bytes.
    You could think of turning Xon/Xoff off.

    If you and DEAD people can read Hex, how many people can read Hex?

  • You are right Martin.
    A COPEN sends a XON, the CCLOSE a XOFF.


    - it is only necessary to use COPEN one time, a CCLOSE is'nt necessary
    - XON=0, XOFF=0 would help also

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • Thanks again.


    I found the variables (XON_VAL, XOFF_VAL) and I changed It.


    Now I belive that is necessary to intoduce the CR (enter or new line command) in the end (XOFF_VAL) to my vision system process the command. But the values that I introduce in the XOFF_VAL were not send.


    In KEYENCE manual I have the follow information : to trigger command, send T1 [CR]


    Is necessary to send the value 13 (CR > ASCII) after T1? If yes, Where and How? In the XOFF_VAL?

    Tiago / Brazil

  • Hi Josué,
    XOFF_VAL is a protocol character ! Don't mix up this with user data !


    Try this:
    DECL CHAR CR


    CR = 10


    CWRITE(........,"T1%c",CR)

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • Does CWRITE know about the /-parameters? I think "\n" or "\r" is a CR. Then you don't have to use another variable.
    If each command ends with a CR, then it is not user data, I would use the XOFF then. Thats even more convenient.

    If you and DEAD people can read Hex, how many people can read Hex?

  • CWRITE doesn't support the format parameter "\param", only %.


    Please, never use the XOFF_VAL as a user data !!!!


    XOFF will be sent only if
    - CCLOSE (you have to call CCLOSE after each CWRITE, don't be silly !!)
    - while CREAD to avoid a buffer overflow

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • Thats good to know. I did not use XON/XOFF until now, but I would not have expected this behaviour. I thought each message is started with XON and ended with XOFF automatically.

    If you and DEAD people can read Hex, how many people can read Hex?

  • Hallo Kai,


    das "primitive" Protokoll XON/XOFF wurde eigentlich für serielle Drucker entwickelt.
    Die hatten damals noch nicht soviel Speicher. Wenn denen der Speicher kurz vor dem Überlaufen war haben sie ein XOFF an der PC geschickt. Wenn wärend des Druckens der Speicher wieder frei wurde schickten sie ein XON (PC darf wieder senden). Ob das Endgerät
    (hier Drucker) eingeschaltet war haben die Geräte die DSR-Leitung hochgesetzt.

    Wer nach allen Seiten offen ist kann nicht ganz dicht sein

  • :danke:


    Thanks for help, I attached above the final software.


    .....


    ;ABRE PORTA
    ;-----------


    COPEN(:SER_3, HANDLE)



    ; PREPARA VARIAVEL PARA ENVIO
    ;-------------------------------------------


    COMMAND[]="T1" ;CONFIGURA COMANDO A SER ENVIADO
    CR = 13 ;CONFIGURA CARACTE ENTER
    OFFSET = 0
    SWRITE(SEND_COMMAND[],STATE,OFFSET,"%S%c",COMMAND[],CR)


    ;ENVIA PACOTE
    ;------------------


    CWRITE(HANDLE,SW_T,MW_T,"%s",SEND_COMMAND[])


    ;LE O PACOTE QUE ESTA NO BUFFER
    ;-------------------------------


    WAIT FOR $DATA_SER3>0


    OFFSET = 0
    CREAD(HANDLE,SR_T,MR_T,TIMEOUT,OFFSET,"%s",PACOTE[])



    ; DIVIDE O PACOTE EM PARTES
    ;---------------------------


    OFFSET = 3
    SREAD(PACOTE[],STATE,OFFSET,"%1d",STATUS_FOTO)


    OFFSET = 5
    SREAD(PACOTE[],STATE,OFFSET,"%5d",posx)



    ....



    THAKS AGAIN, COME TO BRASIL TO DRINK BEERS WITH US !!!!!! :):beerchug:

    Krause&nbsp; - Brasil<br /><br />Sou Brasileiro e não desisto nunca !!!<br /><br />Santa Catarina, todos lugares do mundo estão aqui...

  • Can I use this software that works in the KRC2 in a KRC1A controller? Or any diference? :kopfkratz:


    I have an application with KR100P and KRC1A with Banner Vision System.


    Thanks!

    Tiago / Brazil

Erstelle ein Benutzerkonto oder melde dich an um zu kommentieren

Du musst ein Benutzerkonto haben um einen Kommentar hinterlassen zu können

Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Geht einfach!
Neues Benutzerkonto erstellen
Anmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden