Please login or register.

Login with username, password and session length

Author Topic: SDK Instability with XP Pro  (Read 7264 times)

vance bufalo

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
SDK Instability with XP Pro
« on: September 05, 2006, 09:46:38 PM »

I have both the SDK and AHP installed on XP Pro SP2.  Both my Excel Macro VB code and the Dos AHCMD become unstable, shut down, and want to send the error report to Microsoft if  I  try to send a command more than once a second.  They both appear to be stable if i wait 2-3 seconds between each command.  I down-loaded the latest SDK in June 06.  Is there a fix?

If anyone has access to Excel and is interested in a Lawn Sprinker Control /Basic Timer / Control console program, I'll send a sample program that is user friendly if you have minimum Excel knowledge   
Logged

sriley

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Re: SDK Instability with XP Pro
« Reply #1 on: September 13, 2006, 11:10:22 PM »

I also see the driver crashing my program.  I just sent an email to support saying they need to fix the driver or refund my money, as this is unacceptable.  I am using .NET to program it on an XP computer.  My software is very stable, and the only change I made was to add support for this device.

If anyone knows of a solution or an updated driver, please let me know.  Being able to send a command only once every few seconds doesn't work for me - I hadn't looked into the problem enough to know that this is what might be causing it.  My driver says it is version 3.0.0.180 dated 2/16/2005.  I loaded the latest SDK, and the device wouldn't work, so I loaded other software until the device finally was recognized by the operating system.

Ah - I tried loading the SDK again and got driver version 3.0.0.187, from 6/28/2005 - I'd assume this is the latest driver.  I'll try it out and let everyone know tomorrow if this is any better - but please let me know if you guys have this problem.

UPDATE - no, the driver is still crashing.  I'll do some test tomorrow to confirm whether it's the sending comands too quickly problem.
« Last Edit: September 16, 2006, 02:20:19 AM by sriley »
Logged

vance bufalo

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: SDK Instability with XP Pro
« Reply #2 on: September 18, 2006, 11:18:16 PM »

I've made a minor breakthrough.  2 actions that seem to help the stability.  First:  When issuing a VB command to Call the Activehome object, TRy the following sequences

Dim ActiveHomeObj As ActiveHome
Set ActiveHomeObj = CreateObject("X10.ActiveHome")
Dim W, X, Y, Z As Integer
Dim Str2 As String
Str2 = "A1 On"

 Call ActiveHomeObj.SendAction("sendplc", Str2, 1, 1)
'  Where Str2 = Address Action (on or Off)
' The , 1, 1 after the variable seems to improve reliability

' Add a slight Delay after issuing the Command
For X = 1 To 100
    Y = X
Next X

End Sub

The second acction was to insert the following statements at the head of each routine that either directly or indirectly calls Activehome.Obj.SenAction Command.

Dim ActiveHomeObj As ActiveHome
Set ActiveHomeObj = CreateObject("X10.ActiveHome")
 
I had several routines that called "driver routines" that actually issued the X10 command.  Whenever the driver routines completed and returned to the calling routine, Excel shutdown.  By having the Dim & Set commands at the beginning of the parent routines, the problem disappeared.

This is working great with Excel's version of VB.  I can't verify it with the full blown VB package


 

Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.