RS232 Communicating/Receiving
-
I'm connecting from my pc to a device using rs232 (COM1) ports. The device sends a string of ASCII characters to the serial port of the device. I want to be able to grab these characters from the device using C++ and store them in a temporary location where other programs can access them or to send them to a specific field in an oracle database. Any help or suggestions would be great! Note: there is a single bit sent from the device to begin and a single bit when it ends.
-
I'm connecting from my pc to a device using rs232 (COM1) ports. The device sends a string of ASCII characters to the serial port of the device. I want to be able to grab these characters from the device using C++ and store them in a temporary location where other programs can access them or to send them to a specific field in an oracle database. Any help or suggestions would be great! Note: there is a single bit sent from the device to begin and a single bit when it ends.
not exactly sure what you are having problems with here but if it is with the send and receiving part I would suggest you do a search in MSDN. The main functions you will use to do all operations with the COM port are ReadFile(...) and WriteFile(...) . You get a handle to the COM Port with CreateFile(...) . You also need to use the COMSTAT structure and the TIMEOUTS structure. If you need more specific help post a more specific question and I will try to give better advice. Joseph Dempsey jdempsey@cox.rr.com Joseph.Dempsey@thermobio.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous