Having trouble sending G-code to a Witbox

Hello, We have a problem trying to send our G-code to the Witbox. We can read the Serial port and get an upstart message, but we can't write to the printer. A completely simplified code is posted below and even with this simple code we cannot get anything through.

import processing.serial.*;
Serial myPort;
void setup(){
 myPort=new Serial(this,Serial.list()[1], 115200);
}

void draw(){
  delay(750);
  myPort.write("G91");
  delay(750);
  myPort.write("G1 Z 0.1");
}

We're pretty certain that the port number is right as we can read from it. Thanks in advance, we hope you'll help us find the cause of our problem.

Answers

  • Do you have related documentation about your device, specifically your comm protocol?

    Kf

  • I don't know really where to look for it and can't seem to find it just googling?

    If it's any help we're currently trying to run our code from an Acer Aspire M3 MA50, but looking in the manual for it I can't seem to find any information about my comm protocol. It's running Windows 10 and have been able to communicate with the printer via the Arduino IDE using the serial monitor, but it only works when we send the command "manually" like that and not when trying to communicate via processing.

    Thanks for the input though, if further information about the comm protocol would be useful I'd be very happy providing it, but I just don't really know what I'm looking for as I'm not that computer savvy.

  • The device we're communicating with is a bq Witbox on firmware update 2.50.

  • Answer ✓

    The solution was stupidly simple, to just add an end line character. So to make it work the code should be altered like this:

    import processing.serial.*;
    Serial myPort;
    void setup(){
     myPort=new Serial(this,Serial.list()[1], 115200);
    }
    
    void draw(){
      delay(750);
      myPort.write("G91 \n");
      delay(750);
      myPort.write("G1 Z 0.1 \n");
    }
    
  • Great you get it to work. This is why the documentation comes handy.

    Kf

Sign In or Register to comment.