controlling servomotor via serial port

R

Thread Starter

ryann2k1

Can anyone help me how to write and read data from serial port in C programming and in C++?

I need to control my servomotors and everytime I send data, i need to monitor whether this motor is already in the position or not?
Thank you..

cheers
 
C

Curt Wuollet

Many here can explain that. But it would help
if you mentioned which operating system.
There is extensive free documentation for
Linux and family. You will also need to
know what protocol your target devices
use which is usually a far greater problem.

Regards
cww
 
Hi.

Thanks for the reply.

I am using Windows XP SP 2. It has already library function, but once I run it, I could not read data from my serial port (connected to a servomotor). There is a warning signal that I do not implement a code to read data from serial port.

The code:
bool dxl_open( char* port_name, int baud_number ){};

Any suggestion what to put in the { }?
I am a newbie to programming.
Thank you.

Cheers,

ryann2k1
 
Top