Welcome! Log In Create A New Profile

Advanced

Issue receiving Marlin 2.0 acknowledgements

Posted by JHalps30 
Issue receiving Marlin 2.0 acknowledgements
July 06, 2019 02:54PM
As a fun project I wrote my own program for 3D printing (basically a homemade version of Repetier host). My program works by sending a command to the printer then waiting for the return signal, "ok", before sending the next line. My program worked successfully with Marlin 1.1, but when I switched to Marlin 2.0 with a 32-bit board (RE-ARM for Ramps + Ramps 1.6), my program no longer received any acknowledgement messages. If I open a terminal window and send a command the terminal windows sees the acknowledgements correctly, so I know that the acknowledgements are being sent.

Can anyone see what the problem is? I'm at a loss.

For those interested my code is in c++/cli. Here is my read thread:

private: void ReadFromSerial()
{
// Initializes cancel function as false
cancelPrint = 0;
int x = 1;
int inputDataByte;
String^ ok = "ok";
String^ message = nullptr;
char letter;
// Reads data while printer is connected
try
{
while (this->serialPort->IsOpen)
{
//MessageBox:confused smileyhow("Loop " + x);

if (cancelPrint == 1)
{
MessageBox:confused smileyhow("Read loop cancelled");
return;
}

message = this->serialPort->ReadLine();
if (message == ok)
sendMessage = 1;
}
MessageBox:confused smileyhow("Port in read no longer open");
}

catch (Exception^ e)
{
MessageBox:confused smileyhow("Unknown error in read thread");
cancelPrint = 1;
}
}

Edited 1 time(s). Last edit at 07/06/2019 02:59PM by JHalps30.
Sorry, only registered users may post in this forum.

Click here to login