Searching \ for '[PIC]:[EE]: Using Microsoft Access with RS232' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=rs232
Search entire site for: '[EE]: Using Microsoft Access with RS232'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:[EE]: Using Microsoft Access with RS232'
2000\08\08@135337 by Craig Lee

flavicon
face
I have a project where I would very much like to interface serial port
control with Access.

I have to transmit a few control words to a bit banged PIC device, and
then receive several strings from it after a spell.  I use RX and TX
for communication and RTS to hard reset the PIC device.  Of course these
signals go through a MAX232 translator.

I have a C program that handles this fine, but I want to integrate this
functionality into Access.  Access doesn't seem to have the Visual Basic
objects for serial communication, nor does it allow calls to DLLs. It can
however do calls to ActiveX controls or by way of a DDE link.  Very
convoluted me thinks, but that is Microsoft for ya!

Has anyone done this before?  I've seen a few shareware methods, but they
are quite foreign to me. ie. Poor detail.  I'd prefer the ActiveX method,
or something that doesn't require me to build a complete DDE app just to
make a couple of serial calls.

Help?

Craig

> {Original Message removed}

2000\08\08@140959 by M. Adam Davis

flavicon
face
You can find activeX wrappers for microsoft's MSCOMM control, which is included
in professional and enterprise versions of VB (4 and up).

You should be able to peek around and find one of these wrappers, ask in an
Access newsgroup.

If you know C and have visual C++, then it shouldn't be difficult to write an
activeX module to do what you want.

-Adam

Craig Lee wrote:
{Quote hidden}

> > {Original Message removed}

2000\08\08@142037 by David Blain

picon face
There are multiple ways of creating an ActiveX object for your Access app to
call.  It all depends on your programming skill set and tools available to
you.  These are the solutions that I suggest, in order of preferred (at
least to me):

1) If you have source code for the C program and a copy of MS Visual Studio,
I would create a simple ATL (Active Template Library) Project with one or
more Simple ATL Objects in it that would call or implement the code from the
original C program.  This is not the simplest approach, but it would offer a
dll that was small with little or no dependants.  There are a lot of
examples of creating ATL DLL's on various sites.

2) Same as above, but use MFC instead of ATL.  The resulting DLL will be
bigger, but the coding is easier if you don't know ATL.

3) You can create a VB ActiveX DLL or OCX that either calls a native 'C' DLL
directly or uses  various VB techniques to access the COM port.  This is
simpler if you know VB and don't know C++/MFC/ATL.  There will be more
baggage (required DLL's) with this approach.

There are more ways, but these three make the most sense from a programmers
point of view.  If you tell me the Name of the DLL, it's interface and the
name/parameters (with data types) of the functions / properties, I could
send you a shell ATL project where you would only have to add application
specific code.

Hope this helps a little.

David.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\08@154610 by Craig Lee

flavicon
face
I use Borland C.  Thanks for the tips, etc.

I've never used Visual Basic, and I haven't used the ACL stuff
under Visual C... I guess I'm a bit proud in that I despise such convoluted
types, and haven't put in the effort to get my head wrapped around it.

I haven't used Access either, however I don't need to, all I need to do is
find something that will work with it.

If someone has an ActiveX Dll with rudimentary functions for control of
serial streams and direct access to RTS/CTS, this is all I need.  Maybe we
can trade something?

I can probably change the PIC protocol a bit so that the RTS control is
no longer necessary.

Or perhaps I should buy a copy of Visual C and bend over for Billy.

Thx,

Craig

> {Original Message removed}

2000\08\08@161135 by M. Adam Davis
flavicon
face
I should indicate that I've seen *free* activeX wrappers for the mscomm
control.  You shouldn't pay for that.  You should really check out either the VB
newsgroups or the Access newsgroups.  Otherwise there are many people who sell
such software...  I wouldn't bend over just yet unless you see yourself needing
Visual C later

-Adam

Craig Lee wrote:
{Quote hidden}

> > {Original Message removed}

2000\08\08@161358 by David Blain

picon face
Depending which version of Borland C (The last version I owned was 5.0...
much better then MS but I have to go with what my clients use :-( ),  I
believe that it can also produce ActiveX dll's.  Unfortunately I don't know
what is involved in doing so.

David.


{Original Message removed}

2000\08\09@065214 by P.J. McCauley

picon face
Dan,

Do you have to interface to Access itself or just an Access database? If it
is the latter, you could write the entire app in Visual Basic. I've done
this and it works well. There are lots of example data base application
source codes at
http://www.planetsourcecode.com/

Hope this helps,

Joe

{Original Message removed}

2000\08\09@091112 by Pekka Ritamaki

flavicon
face
       Craig Lee <spam_OUTpicmeTakeThisOuTspamENLIGHT.CA> wrote:
>I have a C program that handles this fine, but I want to integrate this
>functionality into Access.  Access doesn't seem to have the Visual Basic
>objects for serial communication, nor does it allow calls to DLLs. It can
>however do calls to ActiveX controls or by way of a DDE link.


- Graig, I have done about similar to my home data collection system,
PIC cloud (=lot of PIC's in same  environment, also in the my roof).

Maybe this is not the right answers for you, but maybe you can learn
something.

1 Hardware    I have several PIC serial sensor devices for    -wind speed    -wind direction
  -oil burner temperature 1 hot water 2 water to radiators, 3 water
from  radiator
  -outside temperature 1 ( north) ,2 ( south)
  -outside light ( north side)    -humidity 1 outside, 2 inside

All the PIC Cloud members use similar serial commands 2400 bps e.g.
#TT00  for temp 00
They respond like $TT00+23.1<CR>. A sensors can be remotely calibrated
to EEPROM and their address can be changed. A software filters messages.
I normally use 5 measurement per second speed.   I call that as a smarTBus protocol.

All sensors are connected in parallel to RS232, but they have functional
networks address like in CAN-bus.

All sensor cables are connected to outside connection box (a cloud box)
with has a led +220R series resistor to sensor power supply to protect,
isolate and indicate sensor electronics and wiring.

The cloud box is installed to height of my head for easy checking
wiring. It has transparent, waterproof top cover.
It has also a protected 12 V 2A power supply for whole system with 3
LEDs in a different parts of power supply for easy viewing power
problems ( in winter  we have sometimes -30 ,.. -40 centigrade outside).
The whole PIC cloud sensor system works with 2-4 ma coming from PC RS232
DTR/RTS-pin, but I need more power for coming controls.

A big 150 mm *400 mm LED display panel is ready for use, but not yet
installed. This will be working when PC is off.

A PC is connected to one RJ-45 cable slot. The PC sends commands for
each sensors according timing from database.
  2 Wiring
I use 8 pin RJ-45 cheapernet wiring cable and RJ-45 connection boxes
for easy fault isolation although 4    wires for a sensor is needed (
power, rx, tx, gnd).
A  2-slot RJ-45 box is in a heating room and other 4 box inside near
cloud box.
wiring from roof ( wind sensor) uses 4 wire telephone cable for its
light weight.

3. Software

The idea for software has been hard part. How to collect data?
How much is needed? What to do when hard disk is full of second data?
How to display old data.
How to control setups?
A relational database is answer for me

I use Access 2000 database through ODBC32 connection, ADO 2.5 ( MS
ActiveX-data component) driver for VB6.0.

4. Database
 Weather.mdb database has tables for seconds, minutes, hours, days,
months and years
When 60 seconds has elapsed I mode data to minutes table and so on. the
database can located anywhere in  networks. ODBC32 (WIN98/Setup/Odbc32)
manages its location. no programming involved.
   Database length can be adjusted  dynamically by user, e.g. 1200 months
(10 years is enough for me)
Database information length can be  adjusted  by user. Data of the
database is shown in real-time graphics (MSgraph component) all the
time.
Graphics data can be selected by user ( sensors, trends, grids,
scales   etc.)
The Weather.exe has  a digital (current min, max., max. times etc.) and
analog display ( easy wind directions).  Setup and  database editing
grid is dome using standard  VB 6.0  tools.

5. Sensor setup database

 First I used Windows registry for display, database and calibration
data.   It became quite huge and it was difficult to manipulate.   Now I have setup database wsetup.mdb, which has all sensor data,
commands, timing, calibrations etc. for     easy   user access.
---  Wiring and cloud box take 1-2 days to build and install, software I
started about first of  June 2000.
Most of sensors were almost ready from my normal work. The most
difficult thing was to get right software  idea.  It has no practical use, only a fun project.

Pekka


-- ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø
Pekka Ritamaki, Probyte Oy Microprocessor software & hardware design
Nirvankatu 31, 33820 TAMPERE, FINLAND http://www.sci.fi/~pri
tel: Int. 358-3-2661885 fax: Int. +358-3-2661886 email:.....priKILLspamspam@spam@sci.fi

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu>

2000\08\09@112159 by Craig Lee

flavicon
face
Pekka,

To much sunlight this time of year?

Access 2000 is the intended target.  It is still not clear how you do the
serial access.  What is ADO2.5?

I tried using MSCOMM32.OCX, I was surprised it was already installed in
my system directory.  However, each time I go to use it, it says it is
improperly registered, or I don't have a license to use it.  Screwey!

The application is my street racing control system.  The pic takes care
of the timing and control of the street light.  Then when the break beam
detectors are tripped, those times are recorded, and sent back to the PC
in milliseconds format.

Currently, I have a program that does all that control and recording.
Then it spits out a text file which is imported into an Access 2000
application and processed to determine classes (bike, big block, small
block, tricycle, male, female, fastest reaction time, etc) and find
who the winner is in each class.

I want to integrate the functionality of my external program into
Access, but am having trouble with this task.

Do you have a form, macro, etc. with a distributable serial driver
you could send me that actually works?

Craig

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu>

2000\08\09@113840 by Alan B. Pearce

face picon face
have you tried using OLE? I am not a programmer, but have inherited a system
which is using Word as the source of a control document, and then the results of
the test are written to a duplicate of the document. In this case all the
information is in tables in the Word document, with one column being test
instructions, and the results get written into a second column, with another
column having a date/time stamp added. I'm using VB3 and Word6 as that is what I
inherited, but I believe Borland products had the OLE capability, possibly under
another name. It is not exactly a whizz-bang process, but it does work for us.

Failing that is it possible to do ODBC or SQL functions on Access? This may give
you another way in, that is probably more generic. Using SQL would mean it
should be readily portable to another database engine, or make your program
potentially portable to other systems. Just a thought.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu>

2000\08\09@115926 by Michael Rigby-Jones

flavicon
face
> -----Original Message-----
> From: Craig Lee [SMTP:picmespamspam_OUTENLIGHT.CA]
> Sent: Wednesday, August 09, 2000 4:21 PM
> To:   @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
> Subject:      Re: [PIC]:[EE]: Using Microsoft Access with RS232
>
> Pekka,
>
> To much sunlight this time of year?
>
> Access 2000 is the intended target.  It is still not clear how you do the
> serial access.  What is ADO2.5?
>
> I tried using MSCOMM32.OCX, I was surprised it was already installed in
> my system directory.  However, each time I go to use it, it says it is
> improperly registered, or I don't have a license to use it.  Screwey!
>
Unless you have a MS development tool that came with the COMM control, you
won't have the necessary license to use the control at design time.  An
compiled application could however still use the control.  I believe the
MSCOMM control comes with the Professional or Enterprise editions of Visual
Basic/ C etc.

Regards

Mike

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu>

2000\08\09@121140 by Craig Lee

flavicon
face
I guess this is all fine and good to do a DDE or OLE link between Access
and my other program.  However, the intention is to find something that
is within Access to eliminate support of two applications.

Craig

> {Original Message removed}

2000\08\09@122358 by Craig Lee

flavicon
face
So even if I had the appropriate MS development tool, I can't use
MSCOMM natively with Access 2000?!

Craig

> {Original Message removed}

2000\08\09@124015 by Jarmo Latvala

picon face
I think you must use some  Api calls because in Access you don't have tools to
use Com/Lpt ports.
- jla

Craig Lee wrote:

> I guess this is all fine and good to do a DDE or OLE link between Access
> and my other program.  However, the intention is to find something that
> is within Access to eliminate support of two applications.
>
> Craig
>
> > {Original Message removed}

2000\08\09@124644 by Alan B. Pearce

face picon face
>I guess this is all fine and good to do a DDE or OLE link between Access
>and my other program.  However, the intention is to find something that
>is within Access to eliminate support of two applications.

My understanding is that these are already within access, and this is how the
Microsoft Office suite of programs talk to each other. The application I have
inherited did nothing special with Word, except use the Microsoft Office VB pack
that came with the VB compiler. This had all the necessary bits for VB to hook
into Word. As I understand the situation with Borland, they licensed the
necessary stuff from Microsoft, and have their own name for it. This would mean
you are using what is already in Access.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu>

2000\08\09@132849 by M. Adam Davis

flavicon
face
I have Access 2000 and VB 6 (visual studio professional, for the nit-picky).
I've just created a new database with a new form and successfully inserted the
MSCOMM control (which *is* and activeX control as far as access is concerned).

However, another workstation with access 2000 wouldn't let me use the control in
a design environment.

You need to purchase VB, or find someone who has the mscomm control with design
rights, and have them write an activeX wrapper for you, giving you design rights
to their wrapper.

Make sense?

You *can* use mscomm natively with Access.  You need to get it wrapped, or buy
VB professional

-Adam

Craig Lee wrote:
>
> So even if I had the appropriate MS development tool, I can't use
> MSCOMM natively with Access 2000?!
>
> Craig
>
> > {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...