q:read value from serial port

Q

qwerty

I have a queston concerning excel. Namely, we have comparator in our firm
with which measure the deviation from the vertical in the bottle that we
produce. These datas are typed into table in excel and are processing
later.Since there is a lot of measuring and the above mentioned comparator
has a cable to connect it with a serial port (9 pines) of comparator, is it
possible to make macro in vb so that on pressing a key the computer reads
value in the serial port and puts it into the activ cell in excell.
 
L

Leith Ross

Hello Qwerty,

If the communications software for the comparator exposes VBA routine
in Excel then your task will be much easier. If not you could writ
your interface using Visual Basic (not VBA) and write a DLL to provid
the low level link needed to the serial port. I would advise agains
it, unless you have the electronics and software background an
experience with low level coding.

It could be the comparator is communicating via DDE (Dynamic Data Link
or RTD (real Time Data). Either of these methods has VBA interfacin
with Excel. You could easily construct a button using VBA to read i
the information.

Happy Holidays,
Leith Ros
 
Q

qwerty

Thank you very much for answering to me so quickly. But i have a question
for you because i am not very good at vb. Do you have an example of vb(or
macro in excel) which reads value on the serial port ?

Merry christmas and happy new year !
 
L

Leith Ross

Hello Qwerty,

I regret the delay in answering back. I was experiencing some problem
with my computer today. I don't have any VBA examples of commands t
read from a serial port because it is not a standard VBA function i
Micsoft Office.

In my original post I stated the company that developed the comparato
would have to had written accessable VBA routines into thier software
VBA is a licensed product for third party development. Contact th
company or reference the manual to find out. Some third partys who ad
VBA to their software are AutoCad and Adobe.

Sincerely,
Leith Ros
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top