To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 24215
24214  |  24216
Subject: 
Re: Two Usb towers
Newsgroups: 
lugnet.robotics
Date: 
Tue, 2 Aug 2005 23:13:30 GMT
Viewed: 
986 times
  
In lugnet.robotics, Steve Hassenplug wrote:


When you use VB, I assume you have a function something like this to find & open the
port:

I don't, but I will have soon. All I have/need at the moment is the line:

form2.PhantomCtrl1.InitComm


--
Public Function FindTower()
    On Error GoTo FindError
    Dim strPort As String
    Set Me.LEGOcom = New LEGOVPBrickLib.VPBrick
    Me.LEGOcom.FindPort strPort
    Me.LEGOcom.Open strPort
    Me.LEGOcom.Monitor True
    Exit Function
FindError:
    If Err.Number = -520093436 Then
        MsgBox "Tower not found"
    Else
        MsgBox "Error (" & Err.Number & ") " & Err.Description
    End If

End Function
--

if you save the value of strPort, and execute .Findport again, it should return
another string, which is the name of the second port.  Those are the values you use
when you open the port you want to communicate from.

Does that help?  (is it clear?)

It looks straightforward enough. I can't do anything tonight as it's too late
but I'll report back soon.

Thanks Steve (again) :-)

Steve



Message is in Reply To:
  Re: Two Usb towers
 
(...) When you use VB, I assume you have a function something like this to find & open the port: -- Public Function FindTower() On Error GoTo FindError Dim strPort As String Set Me.LEGOcom = New LEGOVPBrickLib.VPBrick Me.LEGOcom.FindPort strPort (...) (19 years ago, 2-Aug-05, to lugnet.robotics)

10 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR