why not... Ethernet message is just a sequence of bytes. that is where WireShark comes in
Communication kuka/Cognex using EthernetKRL (TCP/IP protocol)
-
Abdoul -
May 18, 2019 at 2:01 PM -
Thread is marked as Resolved.
-
-
yes I read the documentation on Native commands of InSight but it does not work when I send it, nothing happens.
Have you set up the A0 image object properly? The Trigger condition has to be set to match the communication method being used
But with kuka I can not send Native commands via EthernetKRL.
Yes, you can. I've done it. -
why not... Ethernet message is just a sequence of bytes. that is where WireShark comes in
I check each time with WireShark to see if the transmission of data has occurred, and I see each time it happened.QuoteHave you set up the A0 image object properly? The Trigger condition has to be set to match the communication method being used
I did not touch the configuration not default of A0 it's just the trigger mode that I chose "extern"
QuoteYes, you can. I've done it.
Oh good, I've been trying since, but I'm having some difficulty:1. with Hyperterminal and cognex when I launch the communication I get on hyperterminal a message (see image1 attached) I put the Usernam "admin" and the Password "" and I receive another logged User message.
2. with KRC and cognex I receive the welcome message in the buffer memory of the KRC (see image2 attached) but this time I have trouble putting the User name and the Password because I do not have a screen on which I display, and when I send him a string "admin" and " " as Password he sends me a message << User: Password: Invalid Password >>
-
...what? No, you have to emulate the HyperTerminal interaction. You don't send "User: blah", you have to open the connection, send just the Username (with CR&LF appended), then receive the password prompt, then send just the password (with CR&LF appended).
-
same now it's blocking at the flag (line 57 image attached)
-
What does WireShark show?
-
What does WireShark show?
I receive the data but it's just the cognex welcome message "Welcome to In-Sigh (tm) 5100 Session 0" after I do not see the prompt for the User and if I send that even the username he me invalid password returnssee the images Data attached.
-
Your SWRITE command is still writing "User:" and "Password" into your output string. You cannot do that.
Second, stop using the same string for your output and input. That's just going to potentially give you bad test data.
Also... are you sending "SE8" before you do the login? That's also no good.
-
Thanks for feedback SkyeFire
Your SWRITE command is still writing "User:" and "Password" into your output string. You cannot do that.Second, stop using the same string for your output and input. That's just going to potentially give you bad test data.
Also... are you sending "SE8" before you do the login? That's also no good.
1. in my KRL program I first open the connection with :
RET = EKI_Init ( "Configcomm")
RET = EKI_Open ( "Configcomm")
Normally I should have the welcome message to be able to log in but that's not the case2.After when I send an instruction to In-Sight with the instruction:
SWRITE (Cmd [], STATE, OFFSET, "% s", "SE8")
Cmd [STRLEN (cmd []) + 1] = 'H0D'
Cmd [STRLEN (cmd []) + 2] = 'H0A'
this time I get a answer from cognex which is this: "Welcome to Is-Sight 5100 Session 0" but without the "User:"3. Then if I send admin to see if he will ask me the Password with:
SWRITE (Cmd [], STATE, OFFSET, "% s", "admin")
Cmd [STRLEN (cmd []) + 1] = 'H0D'
Cmd [STRLEN (cmd []) + 2] = 'H0A'and I receive the following message in the Buffer:
"User: Password: Invalid Password"Configuration:
Eki ->client
In-Sight -> server (telnet port: 23)
I do not understand why I can not see the authorization for the User and Password.
I'll put a zip file containing the config file and the program tomorrow when I'm in the office. -
with Sending RAW data "Stream" we have the EOS (end of string) is added automatically when we send a data and when we read in a memory, the suffix EOS indicates the end of the reading.
In my config file I have EOS = "13,10" which corresponds to CR + LF
That's why I do not get all the data sent by In-Sight.In-Sigth send: "Welcome to In-Sigth (tm) 5100 Session 0
User: "
and I receive: "Welcome to In-Sigth (tm) 5100 Session 0" because in the course of reading he read the return carriage and the line feed.How to do
-
Well, you can't send "SE8" until after you've logged in. That's absolute.
I've never seen an InSight that doesn't send the login prompt immediately upon connection opening, though. What does WireShark show? Does the Cognex send back the login prompt immediately after the EKI_OPEN command?
The "User:" will be in the buffer, you probably have to use an additional EKI_GET to see it. But really, you don't need to see that -- just open the connection, send "admin"+CR&LF, then send password+CR&LF, at which point you should be logged in and can start sending Native Mode commands.
-
Thanks for your help guys , it works.
-