Hello,
I am attempting to write commands directly to my robot through serial port communication using an external program. I have seen on other posts that it is possible, however, I do not know how to format the commands themselves. Do I send lines of KRL directly or do I format commands such as x,1,y,3, etc? Thank you
Writing Commands to Robot Through Serial Port
-
Mnenmenth -
July 11, 2016 at 8:14 PM -
Thread is Resolved
-
-
The format would depend on what you want to accomplish, but sending KRL commands isn't possible as far as I know.
-
I am looking to do things such as tell the robot to go to a certain position or set the rpm of the spindle.
-
Well, first off, what model controller is this, and what version of KSS are you running?
It's not possible to send program commands to a KRC via the serial port, in the sense of a Telnet session on a computer. However, it is possible to create a program in the robot that will listen to incoming ASCII strings and parse them into variables, which can then be used as motion coordinates, speeds, etc.
-
My apologies. I meant to include my robot info but obviously I forgot. I have a KRC2 running KSS5.x. Thank for clarifying this for me. So basically I could write a program that loops over and receives input from an external program through COM socket to tell it where to position the robot?
-
Essentially, yes. The devil is in the details, but it is doable. Often, due to timing/handshaking issues, I find it easier to set up the remote computer as the "server", and have the robot act as the "client" -- that is, rather than the robot "listening," it sends out a request for instructions when it's ready and able to accept said instructions. So,
Open Port.
Send command request string.
Get response string back.
Close port.
Parse string into usable variables. -
Okay, thank you for the help Skyfire