Results 1 to 1 of 1
  1. #1
    0pascal0 is offline Member
    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Default 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.
    Kind regards
    Pascal
    Last edited by 0pascal0; 04-11-2013 at 09:53 AM.

Similar Threads

  1. Replies: 0
    Last Post: 11-07-2011, 09:48 AM
  2. Redirecting port 80 index to port 8080 index
    By chyrl in forum Advanced Java
    Replies: 0
    Last Post: 11-30-2010, 03:15 PM
  3. Sending commands to Serial Port(COM1)
    By ali_sakar in forum Advanced Java
    Replies: 19
    Last Post: 10-02-2009, 07:33 PM
  4. Problems sending SMTP SSL with exchange, port 25
    By iamjuan in forum Advanced Java
    Replies: 1
    Last Post: 08-28-2009, 04:11 AM
  5. port already in use...
    By twoHats in forum Networking
    Replies: 6
    Last Post: 05-04-2009, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •