473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RS232 data to Access database - general approach

Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTerminal is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.
Nov 13 '05 #1
8 7528
Check this site:
http://www.granite.ab.ca/access/serialport.htm
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com

"Chris" <c_************ @yahoo.co.uk> wrote in message
news:33******** *************** **@posting.goog le.com...
Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTerminal is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.

Nov 13 '05 #2
On 2 Jul 2004 04:14:19 -0700, c_************@ yahoo.co.uk (Chris)
wrote:

Use mscomm.ocx. It makes interacting with the com port a lot easier.
-Tom.

Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTermina l is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.


Nov 13 '05 #3
c_************@ yahoo.co.uk (Chris) wrote in message news:<33******* *************** ***@posting.goo gle.com>...
Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTerminal is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.


http://www.tinaja.com (Don Lancaster) talks about the Basic Stamp
microprocessor that, from what it appears, can be programmed in VBA
style coding. I would be interested in hearing about anyone else who
has used this processor to log data outside of the computer into
Access or to control a machine/device/process.

James A. Fortune
Nov 13 '05 #4
well you on a java board so the default answer is going to be to get
java involved and your lovely project can have many elegant solutions.
however, right now, you just want the job done. if you have a few hours
(or days) you can fiddle with it using Access VBA. windows people would
want you to launch a major campaign to active your downloading software
the moment the user connects the handheld to the serial port. this could
require praying to jesus or buddah as 99% of your software developement
time and money could go to that alone.

depending on how fast the user wants his handheld back, you effectively
have to either run an app that checks the port for the presense of the
handheld every five minutes or an interrupt that will activate a service
routine if there's change on the port.

the easu part is writing to an access database or a text file.

wish i were there, i'd spend the day at it. ofcourse, i'd want you to
consider linux but hey, you can't have everything...

cheers

- perry

pe***@cplusplus .org
Chris wrote:
Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTerminal is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.


Nov 13 '05 #5
So are you saying that I can't just open the port automatically when
the data arrives? Do I have to have it open already in preparation
for the data to arrive - I suppose this seems like an obvious thing to
say. And I guess it isn't a good idea to have the port open the whole
time just incase some data comes along?

Maybe the user could just click on a "prepare for measurement" button
on a small java app on the desktop which opens the port and then shut
it again after?

Chris
Nov 13 '05 #6
Chris wrote:
Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTerminal is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.


Windows NT/2000 and XP has strict control over I/O ports and will cause
an exception (privileged instruction) error if an attempt is made to
access a port that you are not privileged to write to. Applications such
as MS Office run in a ring 3 privilege level and do not have direct
write access to the port without the use of system calls using the API.

I suggest writing VBA code to use a OCX/DLL and provide access that way.
I'm sure you can find reference material on www.allapi.net or
http://msdn.microsoft.com or planetsourcecod e.com may be of some help to
you.

You could instead use the DDE feature of Microsoft Office to communicate
with HyperTerminal

If you can find middleware or code it, you could use the import tools in
access (simple vba macro) to import the data.


Nov 13 '05 #7
"Chris" <c_************ @yahoo.co.uk> wrote in message
news:33******** *************** ***@posting.goo gle.com...
So are you saying that I can't just open the port automatically when
the data arrives? Do I have to have it open already in preparation
for the data to arrive - I suppose this seems like an obvious thing to
say. And I guess it isn't a good idea to have the port open the whole
time just incase some data comes along?

Maybe the user could just click on a "prepare for measurement" button
on a small java app on the desktop which opens the port and then shut
it again after?

Chris


there is no penalty for having the port open all the time. I would suggest
using a pure VBA solution in Access. All you need to do is include the
MSCOMM32.OCX in your app - it is a MS-supplied ActiveX control that manages
serial ports. It is very easy to use. I wrote an interface to our phone
system to automatically log all calls in less than a day using the control.
Here is a sample code snippet. MSComm1 is the OCX, fContinue is a Global
Boolean. I start the loop when a button is clicked, and stop it when the Esc
key is pressed (or the app closes):

Private Sub DataLoop()

Dim InBuffer As String

'Tell the control to read entire InBuffer when Input
'is used.
MSComm1.InputLe n = 0
'Set control's InBuffer size to 1K
MSComm1.InBuffe rSize = 1024
'Use port chosen
MSComm1.CommPor t = cboPort.Text
'9600 baud, even parity, 7 data, and 1 stop bit.
MSComm1.Setting s = "9600,E,7,1 "
'Open the port.
MSComm1.PortOpe n = True

Do
lblStatus.Capti on = "Waiting for data..."
'Send start command
MSComm1.Output = Chr$(14)
'Clear input InBuffer
InBuffer = vbNullString
Do
DoEvents
InBuffer = InBuffer & MSComm1.Input
Loop Until InStr(InBuffer, vbCrLf) Or Not fContinue

'Send stop command
MSComm1.Output = Chr$(15)

If Len(InBuffer) > 0 Then
lblStatus.Capti on = "Data received - posting..."
Call PostData(InBuff er)
End If
Loop While fContinue

'Close the serial port.
MSComm1.PortOpe n = False

End Sub
Nov 13 '05 #8
The easiest tool that I know of for feeding serial data directly into
an Access database application would be a product called WinWedge from
TAL Technologies.
WinWedge is a serial communications program that is designed to run in
the background and feed incoming serial data directly to other Windows
programs. It works by either "stuffing the keyboard buffer" so that
the other program sees the data as if it were being typed in on the
keyboard or it can also feed data to other programs using a feature of
Windows called Dynamic Data Exchange (DDE). Access has excellent
support for DDE and it works great with WinWedge to do exactly what
you are looking to do.
For more information about WinWedge visit:
http://www.taltech.com/products/winwedge.html
On 2 Jul 2004 04:14:19 -0700, c_************@ yahoo.co.uk (Chris)
wrote:
Here's the situation:

I work at a scientific institution and I have a portable electronic
device which is used to take measurements. The device produces a very
small amount of numerical data, about 10 to 15 numbers per
measurement. This operation is performed frequently and I would like
to implement an automatic solution that moves this data across a
windows network and into the fields of an Access database application.

The device has an RS232 port to transmit the data each time a
measurement is made. I have tested this and can save the data to a
text file by using the HyperTerminal application which ships with
windows 98.

HyperTermina l is fine but in order to read in data from the device I
have to run the HyperTerminal application and manually open a serial
port before the measurement is executed. I need a solution that opens
the port automatically i.e. the user only has to operate the device
and not the computer terminal that the device is connected to. The
solution should either send data straight to Access or store the data
in a text file for middleware to deal with.

What should be my general approach? Would it be possible to implement
a solution in, for example java, or could I use Access VBA?

Maybe I don't need to write any code at all if there is middleware
available that could do the transfer?

Any suggestions appreciated.


Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2958
by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing resources was much simpler: you logged in with a userID and password, and when you were done you ended your session by logging out (or occasionally by being disconnected). Connection time was easy to measure, and it made sense to both the customer...
7
12755
by: Chris | last post by:
Here's the situation: I work at a scientific institution and I have a portable electronic device which is used to take measurements. The device produces a very small amount of numerical data, about 10 to 15 numbers per measurement. This operation is performed frequently and I would like to implement an automatic solution that moves this data across a windows network and into the fields of an Access database application. The device...
1
7825
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import java.lang.*; import javax.comm.*;
10
5790
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this (also copied below for easier reference): http://groups.google.it/groups?hl=en&lr=&safe=off&selm=6beiuk%24cje%40netlab.cs.rpi.edu&rnum=95 I don't agree anymore.
8
2009
by: Steve Jorgensen | last post by:
Hi folks, I'm posting this message because it's an issue I come up against relatively often, but I can't find any writings on the subject, and I haven't been able to figure out even what key words one would use to look for it. First, in broad philosophical terms, code actually -is- data. Code is the data that's fed into a compiler, interpreter, or microprocessor that tells it what to do. Code execution is, then, just a form another...
0
3731
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank text boxes how do I stop this and how would I code it to redirect to a thank you page. All with out the help of a web server this has to br ran from the desktop and with in IE with a local directory. Pleas help I am stuck. here is the code! ...
3
2330
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many bytes I would like to read. If I specify too many exception occures, if too less there are still some data in buffer.
13
2539
by: Michelle | last post by:
Hi all... I could use a little TLC here for understanding and not for solving a specific problem... sorry if I've got the wrong group, but I'm using VB so I figured this was the most appropriate one. I'm an advanced beginner, but in all of the books and class material I have, I haven't found something that gets to the point about this... lot's of high level theoretical talk, but nothing that says things in simple terms. I'm building...
3
2662
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links on the subject? (and yes, I have already googled it at length, but still no strong decision) ============= After a long stint of pure-desktop / pure-server applications, I'm currently working on a number of smart-client projects in C# using...
15
2686
lwwhite
by: lwwhite | last post by:
I'm not sure if this discussion is a better fit for the Access or XML forum and I don't want to double-post, so I'm starting in Access because you've been so helpful to me here. I am preparing a presentation comparing using a relational database vs. a native XML database within a content management system to manage XML-based documentation. The point I am trying to make is how difficult it can be to reconstruct the XML hierarchy/tree once the...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.