Please login or register.

Login with username, password and session length

Author Topic: VB6 & CM15a  (Read 6104 times)

icetech

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
VB6 & CM15a
« on: January 03, 2008, 07:24:36 PM »

I have an existing automation/security application that's already written in VB6. I'd like to use  the CM156a and don't really want to rewrite everything for VB.NET.

I found these posts  http://www.accessha.com/forums/archive/t-54.html  that imply that I can do what I need. I've been working with Assembly & VB6 for a long time now,  but I've never worked with any kind of scripting language.

Does anyone have any working code examples for VB6 or advice on how to communicate with the CM15a and VB6?

Thanks in advance for any help you can offer.
Logged

ArtClark

  • Guest
Re: VB6 & CM15a
« Reply #1 on: January 15, 2008, 01:43:18 AM »

I Must admit, I can't help a lot.  I was going to send over what I have done, but it turns out I (In Frustration!) deleted all my VB6 code.  I simply wanted my own control program but found that the usefulness was limited in what I wanted to do.  (AHP did enough...)  I wanted to run certain code from my web server and this was not too hard (Actually took an hour to do the code for 10 Misc buttons on an html page).

I asked for assistance in this same area about a year ago, or even longer ago, the years seem to go by all too quickly these days, and never received a response, so I had to at least answer you and let you know others have worked on this.

The SDK DOES work and many calls from scripting have worked well for me.  (VBscript in ASP on MS IIS 5.0)  If you understand that last reference, no more needs to be said.  If not, just accept it's the windows 2000 Web Server with the proper entry into Global.ASA in the root of the inetpub Dir.  Unfortunately, Server 2003 is harder to configure with the proper calls available, so you can figure that out quicker than I could try to explain.  Each setup will have to be configured to work with whatever services you need to support for the existing Application.  All this assumes that you want to go through running a web server on the machine  (PC) that is connected to the CM15 and also is running AHP.

For basic home use, you get into the normal, "Is it worth it" question.  If this is for the fun of coding, far be it for me to even hint that you need not code.  Just go for it.  However, there are many good code addon's already coded and debugged for use with this stuff.  Voice commands, Dispatcher, etc.  I, myself, would never have the time to code a large application ever again, and if you want to use your application with ANY of these already available apps, then you get into which leads, who follows, how to avoid signal crashes, etc.  All seemingly simple, but as I found out, it gets worse the more you take control.  I'm sure, given 2-3 months at 8 Hours/Day, I could easily make an AHP program to do ALL I wanted to do plus all that AHP does, etc.  It was easier to use what was available, add small amount of scripting to a web page, and use existing Macro/Flag capeabilities to accomplish what I wanted.  For more brains in the code, I kept any Non-AHP information completely separate in my code, but seeing as this data is no longer related to the CM15 and AHP, you certainly don't need me to chime in there.

I have assumed that you mean the CM15a and the "6" was a finger bounce???  If you already HAVE a working app. and just wish to modify that, you should have no problems whatsoever.  I don't believe that any of the calls or entrys have ever been modified from the original SDK.  That is a very manual way to control, but very effective, to say the least.  Of course, if the app was designed to operate with an older interface, such as the serial port, and now you are going to use the USB port, it would depend on HOW it used to communicate.  If it used MSCOMM for RS-232, you have a LOT of re-writing to do.  If it called X-10 entry points in the existing x10nets task, then only small changes will be needed.

I've gotten way off-track here.  I am sorry I don't have any of my original source but scripting was so much easier that I went right into it.  If you really want to re-use code, you will have to experiment on the old code.  Only you will know the right way to go, as (I assume) you wrote it in the first place, no-one will know it better.  I hope I have spurred you on to continuing what you have started.  I, myself, never seem to be able to hold interest in projects for very long, so have never fully wrung out the VB6 interface calls, but it is fairly simple in VBscript, so 6 can't be much worse. 

Just as a piece of info, if the orig. program used RS-232 through MSCOMM, to move THAT into VB.net would be a nightmare.  A FULL re-write would be easier than modifying the original code to VB.net code.  (I tried that with a DNC communications program and the changes to the entire control structure of the program made it impossible).  If the original used X-10 entry points, then the code should function in it's original form the way it used to, but without any of the extras that the SDK offers. 

Good Luck and Happy Coding.
Logged
 

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