by inaki » Fri Apr 08, 2005 7:03 pm
by inaki
Fri Apr 08, 2005 7:03 pm
The RCB serial line works at 115kbps, so sending a reading command takes about 20us. Receiving data for 12 motors takes about 90us.
Apparently the speed of the serial line cannot be changed. There is a couple of commands undocumented so perhaps there is a way to do so.
Note that even HeartToHeart does not give a chance to configure the COM port speed.
The bad side of using 115kpbs is that some microcontrollers do not work at that speed.
The typical delay after sending a command is about 250us. This has been measured on the serial cable using an oscilloscope. The 30us stated by Kondo is wrong.
That makes about 750us to complete a command for reading all servos (from both RCB IDs) .
So theoretically is possible to get about 1300 readings of all servo positions per second in the best case, according to my tests, if no delay is used. Other commands may take more or less depending on the number of bytes transmited.
I am going to add support to configure the timeout. Retries can be configured too. Configuring these parameters per function seems too much. I think
Your idea of doing it at RCB_Start is okay.
So, our start function would become as follows:
RCB_Start( portNumber, flags, maxTimeout, maxRetries);
The RCB serial line works at 115kbps, so sending a reading command takes about 20us. Receiving data for 12 motors takes about 90us.
Apparently the speed of the serial line cannot be changed. There is a couple of commands undocumented so perhaps there is a way to do so.
Note that even HeartToHeart does not give a chance to configure the COM port speed.
The bad side of using 115kpbs is that some microcontrollers do not work at that speed.
The typical delay after sending a command is about 250us. This has been measured on the serial cable using an oscilloscope. The 30us stated by Kondo is wrong.
That makes about 750us to complete a command for reading all servos (from both RCB IDs) .
So theoretically is possible to get about 1300 readings of all servo positions per second in the best case, according to my tests, if no delay is used. Other commands may take more or less depending on the number of bytes transmited.
I am going to add support to configure the timeout. Retries can be configured too. Configuring these parameters per function seems too much. I think
Your idea of doing it at RCB_Start is okay.
So, our start function would become as follows:
RCB_Start( portNumber, flags, maxTimeout, maxRetries);