The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: visual basic control of TW7223 or XM10E


  • To: <ukha_d@xxxxxxx>
  • Subject: Re: visual basic control of TW7223 or XM10E
  • From: "Julian Samphire" <jules@xxxxxxx>
  • Date: Tue, 16 Oct 2001 12:54:50 +0100
  • Delivered-to: mailing list ukha_d@xxxxxxx
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • References: <9qgvfr+4fsh@xxxxxxx>
  • Reply-to: ukha_d@xxxxxxx

Here's a snippet of code I did a few weeks ago as a proof of concept (note:
this isnt the best way to do this)...


Dim Instring As String
Dim Buffer

MSComm1.InputLen = 0
MSComm1.PortOpen = True

MSComm1.Output = Chr(4) & Chr(103)


Do
DoEvents
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, Chr(107))

MSComm1.Output = Chr(0)

Do
DoEvents
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, Chr(85))

MSComm1.Output = Chr(134) & Chr(99)

Do
DoEvents
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, Chr(233))

MSComm1.Output = Chr(0)

Do
DoEvents
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, Chr(85))


I believe this turn off A9 or A4 I cant remember :)

Regards,

Jules
----- Original Message -----
From: <rid@xxxxxxx>
To: <ukha_d@xxxxxxx>
Sent: Tuesday, October 16, 2001 10:43 AM
Subject: [ukha_d] visual basic control of TW7223 or XM10E


> Hi
>
> Has anyone had experience of using Visual Basic (version 6) to
> control an X10 main interface such as the TW7223 or TW5223 or XM10E,
> using the serial port.
>
> I have some documentation about it, but need some help with the code.
>
> I am using the MSComm component in Visual Basic to talk to the serial
> port,and can quite happily set the port (MSComm1.CommPort = 3), set
> the settings (MSComm1.Settings = "4800,N,8,1"), open it
> (MSComm1.PortOpen = True), etc.
>
> Now I need to know how to send signals the X10/main interface will
> understand.
>
> I have tried (MSComm1.Output = "0x86,0x64") which I thought
might be
> A1, but to no avail.
>
> Does anyone hav some VB source code I could have please.
>
> Cheers
>
> Rid
>
>
>
>
>
> For more information: http://www.automatedhome.co.uk
> Post message: ukha_d@xxxxxxx
> Subscribe:  ukha_d-subscribe@xxxxxxx
> Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
> List owner:  ukha_d-owner@xxxxxxx
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>





Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.