Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Retrieve serial port data from temperature sensor?

Status
Not open for further replies.

fabmadre

Programmer
Jun 7, 2007
1
MU
Hi,

I am trying to write a program in c++ to retrieve data from a serial port from a temperature sensor and I wanted to be able to retreive these data for reports generations. but I failed to find the answer. I saw the post on serial port data on VB and I would be grateful if someone could help me out of this dilema. Even if I could only recover the data in an Excel document or Access database I will do the rest. only the acquisition part important for me. Help!!!

thanks you all,


Fabrice.
 
Aside from the fact this is a VB6 forum, we'd need a lot more information re: the manufacturer of the sensor and the specifics of the serial port configuration and protocol b4 we could help you.
 
Years ago before VB5, with Access 2 I used the communications activeX that came with it on an access form and wrote a piece of MSaccess code to receive comms data and stored it in the database.
It was a serial barcode in a library checkout and it searched for the book name and updated the borrowers barcode against it in a column .
There were plenty of examples of how to do this.
I dont know it it still works with later versions of access but I would think it would.
Didnt need C or VB for that.
 
fabmadre
Good question! it is usualy easer in C++ then vb. what you need to do is set up communications with the serial port. you are more then likly using a plc

I do it as a two step process. Communications from the sensor to the plc then using the interface supplied by the plc manufacture such as A/B setting up a memory var in the vb and some sort of loop to keep cheking the port, or even just writing it to text box on the form then using the on change event for the text box.

check this site out to get started. good training info

Good luck with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top