[PLUG] c++ serial port programming

Russell Senior seniorr at aracnet.com
Sat Oct 25 02:28:25 UTC 2008


>>>>> "rich" == rich  <t_rex at verizon.net> writes:

rich> Are there any c++ programmers that know how to access a device
rich> connected to the serial port?  Is there any c++ programming
rich> material available that addresses the com ports?

rich> I have two DGH data acquisition modules that are plugged into
rich> ttyS0 aka COM1.

rich> The command to read data is "$1RD\r" where $1 is the address of
rich> the module, RD is the Read Data command and \r is a carriage
rich> return.

rich> Next I need a 30 to 100ms delay while the device takes the
rich> reading and puts it in a buffer.

rich> Then I need to retrieve the data which is in the form
rich> '*00019.00\r'

rich> Finally, is there anyone who knows how to do this that is
rich> willing to communicate with me regarding this issue?

rich> Rich

rich> I left out some important information in my previous message.

rich> The port has to be configured to 4800 baud with the following
rich> format.

rich> Data Format All modules communicate in standard NRZ asynchronous
rich> data for- mat. This format provides one start bit, seven data
rich> bits, one parity bit and one stop bit for each character.

Yeah, I've written programs to do stuff like that.


-- 
Russell Senior         ``I have nine fingers; you have ten.''
seniorr at aracnet.com



More information about the PLUG mailing list