Results 1 to 1 of 1
Thread: Sending GCODE to com port
- 04-11-2013, 08:50 AM #1Member
- Join Date
- Apr 2013
- Rep Power
Sending GCODE to com port
Hello Java programmers,
My name is Pascal Jacobs , I'm 20 years old (today birthday haha) and for my internship I have to prove a concept wich is based on controlling a robot. The first concepts are already proved and some parts rest confidentiality.
The first step was to prove if I was able to get the exact coordinates from a sensor wich is based on IR lights. The next step was the format them into GCODE so a CNC machine can read this and moves the that specific position. The CNC machine is using a mantis interface board. If sending a single Gcode to the interface it will move.
Now my problem is, sending a single Gcode. Using the arduino seriele monitor to send a single Gcode, it works great. When I use my program to send a single string, the CNC doesnt move. I know what the problem is, but searching for the right answer is very hard. So I hope you people could help me out with it.
The way outputStream.write(messageString.getBytes()); is sending data might be in the wrong format. Does anybody know what can send a string in probably ASCII? Getbytes is formating them into bytes like: [B@5ac2480b but has to be exact the string.
messageString = "G0 X20 Y20" . This is a direct command for the CNC machine
I hope its a bit clear. My english is very blurry:).
Thanks in advance.
Last edited by 0pascal0; 04-11-2013 at 09:53 AM.
- By Dark-Redd in forum Advanced JavaReplies: 0Last Post: 11-07-2011, 09:48 AM
- By chyrl in forum Advanced JavaReplies: 0Last Post: 11-30-2010, 03:15 PM
- By ali_sakar in forum Advanced JavaReplies: 19Last Post: 10-02-2009, 07:33 PM
- By iamjuan in forum Advanced JavaReplies: 1Last Post: 08-28-2009, 04:11 AM
- By twoHats in forum NetworkingReplies: 6Last Post: 05-04-2009, 07:09 AM