Hello everyone,
I must write from a Kuka in a program by serial to an Arduino Mega the number of times that run a program in a specified time.
I have create the code, but I tried to comunicate with the Arduino and I haven't a response.
Now, I have a question, on the KRC2ed05 I can use only the COM3, but, wich is it?
Can I comunicate only with pins 2-3-5, or I must connect other pins?
I attached a foto of the Kuka case.
Thank you and sorry, but I'm newbie.
Serial Comunication on KRC2ed05
-
MrNico -
June 1, 2017 at 10:20 PM -
Thread is marked as Resolved.
-
-
COM1 and COM2 are on the motherboard (between USB ports and LPT port).
COM3 is next to A32 -
I must transfer a integer variable by serial and then read that from hyperterminal by another PC, I have configurated all how the manual (Cread/Cwrite) show, but the data that I read is wrong( I read six smiles).
Can you help me?
What am I doing wrong? -
For such short program there are numerous mistakes...
[size=2px]Files you posted don't compile so you never tried it yourself. Why do you say it sends some data?[/size]
File name is invalid... KRL does not support spaces in names. There are only 38 characters that can be used in KRL names and space is not one of them.
Variable name in first FOR loop is wrong
Program is not in English. Who is supposed to understand it?
You are not using any fault handling.
You say you want to transfer integer values but you are using %f placeholders and robot position (which is REAL).
Etc.
-
You are trying to read $POS_ACT beford tool and base are set. Cartesian coordinates are only available when tool and base are set.
You mention seeing smiley faces. Those are probably place holders for control characters. Please take a look at Ascii table.
-
You are trying to read $POS_ACT beford tool and base are set. Cartesian coordinates are only available when tool and base are set.You mention seeing smiley faces. Those are probably place holders for control characters. Please take a look at Ascii table and consider reading that data with Hex-editor.
-
Sorry I attached a wrong file, I'm very sorry, this is the first test I did.
Now I insert the last program I made.
Sorry again.
-
These are the files that have six black face.
What I do not understand is because at each loop I see six black faces, the counter changes but the sequence is the same.
Each block stops at HALT of write ()IF (SW_T.RET1 <> # CMD_OK) THEN
HALT; Transmission errorIt has transmitted, why stop it?
-
Try changing your loop range to a normal part of Ascii table, so you can see the transferred valus as they are. First few characters are control characters. They are not printable and often will be substituted.
For example instead of 1-10 try 65-75, or 96-106 or 48-58.
Look up Ascii table....