VB.Net Serial Port Communication

I’m a VB.Net developer, but I have never done any serial port communication before. I can open Com4 with Baudrate 115200 DataBits 8 Stop and parity at 1 and then i can with two different threads send communication to the XCarve /Arduino and receive data bytes back (from Arduino I guess).

I’m trying to get communication back after a move

Question 1
I get o?H which does not seem to translate to string from HEX, ASCII or Binary

Question 2
When I press the limit switch i don’t get any read bytes in the buffer

Question 3
When I use Universal GCode sender it starts showing the machine in lock mode what is this and how can i read that from the serial port?

Look in GitHub for a grbl sender in .net, it is going to serve as a example. For the limits you have to switch a flag, check the guide for debugging homing switches in this forum.

[quote=“MarcJeeves, post:1, topic:23944”]
Question 1
I get o?H which does not seem to translate to string from HEX, ASCII or Binary[/quote]

grbl uses standard text strings to receive and reply to requests, so you should be using and looking for ASCII text.

Pressing the switch does not cause a message to be sent to the host. You have to make a request to have grbl send you information about the switch values.

If you have homing enabled grbl boots up in lock mode to prevent your machine from performing any operation until homing is done. You can override this.

After the power up message, grbl does not send anything to the serial port except for replies to commands sent to it.

The machine or serial port is locked ? Only one program can open the serial port at a time. If you have UGS open, it will grab the serial port. Therefore your program won’t be able to open the port until you close UGS.