+ Reply to Thread
Results 1 to 4 of 4

q:read value from serial port

Hybrid View

  1. #1
    qwerty
    Guest

    q:read value from serial port

    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.



  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Qwerty,

    If the communications software for the comparator exposes VBA routines in Excel then your task will be much easier. If not you could write your interface using Visual Basic (not VBA) and write a DLL to provide the low level link needed to the serial port. I would advise against it, unless you have the electronics and software background and 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 interfacing with Excel. You could easily construct a button using VBA to read in the information.

    Happy Holidays,
    Leith Ross

  3. #3
    qwerty
    Guest

    Re: q:read value from serial port

    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 !


    "Leith Ross" <Leith.Ross.20m3yy_1135541701.322@excelforum-nospam.com> wrote
    in message news:Leith.Ross.20m3yy_1135541701.322@excelforum-nospam.com...
    >
    > Hello Qwerty,
    >
    > If the communications software for the comparator exposes VBA routines
    > in Excel then your task will be much easier. If not you could write
    > your interface using Visual Basic (not VBA) and write a DLL to provide
    > the low level link needed to the serial port. I would advise against
    > it, unless you have the electronics and software background and
    > 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 interfacing
    > with Excel. You could easily construct a button using VBA to read in
    > the information.
    >
    > Happy Holidays,
    > Leith Ross




  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Qwerty,

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

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

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1