Com port question

Discussion in 'Scripting & Programming' started by philbenson, Jan 3, 2006.

  1. philbenson

    philbenson Byte Poster

    Ok, I have a computerised telescope (Meade LX200GPS for anyone out there in the "know") which is equipped with two RS232 serial connectors.

    The telescope is connected to a usb port on my PC which is configured via a USB - serial converter as COM 3.

    I have installed ASCOM drivers which includes a series of COM based references or object classes. I am now using (I have both VS 2003 and 2005) and would like to build a windows or web based application to control the telescope.

    I have imported the System.IO class library to connect to the telescope. How do I connect to, and open the com port though so I can send commands to the telescope?
    Certifications: MCP, MCP+I, MCSE, MCSA, MCTS
    WIP: CCNA(?)
  2. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    :unsure BUMP! :rolleyes:
  3. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    Wow Phil that is a really good question, unfortunately I haven't got a clue. I am impressed by anybody using a computer to do things which are not common or garden and controlling a telescope falls well into that category 8)

    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)
  4. philbenson

    philbenson Byte Poster

    Yes I thought it would be something different. Simple fact is that I have had a long time (< 20 years) interest in astronomy, and now I'm simply trying to combine it with my experience and knowledtge of computers.

    The telescope comes supplied with software that allows interfacing with a PC (Autostar Suite) which works fine. So I know it can be done. I just want to know the mechanics of how it is done.

    Looking at the MSDN website, it seems than v1.1 of the .Net Framework does not support direct connection to com ports. However v2 (which comes with VS 2005) does.

    The ASCOM driver contains a number of class libraries which can be added to Visual Studio as COM references. You can then create a telescope object according to the type you have.

    So in VB.Net 2005 I have created a form, placed a button on it and added the following to the click event:-

    Dim lx200 as LXP.TelescopeClass
    lx200 = New LXP.TelescopeClass
    lx200.connected = true

    You can then populate labels or textboxes with data which tell you exactly where the telescope is pointing (e.g. textbox1.text = lx200.altitude etc)

    Still got a few teething problems but I'm certainly making progress with it. It's also helping me to understand different aspects of programming which is an added plus. More info on ASCOM can be found at the URL below.
    Certifications: MCP, MCP+I, MCSE, MCSA, MCTS
    WIP: CCNA(?)
  5. xubinhua

    xubinhua New Member

    :oops: hi, philbenson
    it's glad to talk with u about telescopee
    very lucky that i have a Meade LX200 GPS telescope to play with,and i have use it to observe the moon,jupiter saturn etc,it is really amazing.
    And i want to develop a interface to control my telescope,i have VB and Ascom with me,recently i have some question in programming,such as how to use the telescope simulator.
    u said u have programmed some interface of control your lovely telescope,what problem do u come up.
    and the most important :can u share your source code with me?
    thanks a lot
    my email is [email protected] :rolleyes:

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.