Interfacing GUI server and FPGA board via RS232 cable to control robotic arm
we are creating a Qt application for controlling a robotic arm that has 6 motors and need to communicate from the application in PC with an FPGA board. We need to transmit commands in the form of 8 bits to each stepper motor. First 6 bits are for the motor number and last 2 bits consists of Forward(1) and backward(0) commands.
Later on, we will receive response from FPGA board regarding collision information in a form of 6 float values and immediately RS232 transmits this response back to server in order to display the position of collision part on robotic arm and if response is null nothing should be happened. Can anyone help me with the code in c++.
is a really good starting point for serial talking app.
Has comport setup dialog and can already send and read.
Since read from serial is just a stream of bytes,
you can save your self lots of pain
if u design with data maker (end of data) in the data packet you send
so its very easy to spot if whole response has been read so far. etc.