Hello,
I'm attempting to talk to a maxon motor controller through the RS232 interface. I've created a serial port and I'm using the putc and getc commands.
The way the communication works is that I send the first byte, wait for a byte in reply, and then continue to send the rest of the packet.
The first communication works fine.
On all the communications after, I do a putc IMMEDIATELY followed by a getc, however (using a comm analyzer) I see that I put my byte, the motor controller responds with a byte, however it isn't picked up by the getc like in the first communication.
I've tried slowing down the baud rate, which should give ample time for the mbed to get the byte compared to the first communication.
It appears to me that the mbed is simply missing the byte from the getc, however I don't see any reason why this should happen considering it catches the first communication.
Any ideas?
Hello,
I'm attempting to talk to a maxon motor controller through the RS232 interface. I've created a serial port and I'm using the putc and getc commands.
The way the communication works is that I send the first byte, wait for a byte in reply, and then continue to send the rest of the packet.
The first communication works fine.
On all the communications after, I do a putc IMMEDIATELY followed by a getc, however (using a comm analyzer) I see that I put my byte, the motor controller responds with a byte, however it isn't picked up by the getc like in the first communication.
I've tried slowing down the baud rate, which should give ample time for the mbed to get the byte compared to the first communication.
It appears to me that the mbed is simply missing the byte from the getc, however I don't see any reason why this should happen considering it catches the first communication.
Any ideas?