Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

X10 CM15a

Solved!
Go to solution

Just wondering if anyone has any experience interfacing the X10 CM15A, which is a USB transmitter for the X10 home automation units. 

 

I want to be able to control a couple of 110V appliances from labview using these devices, and everything I've found relates to the older CM11A which has been replaced by this newer unit.

 

Any help would be greatly appreciated.

 

Brian 

0 Kudos
Message 1 of 13
(8,466 Views)

Hello Brian,

 

Are you trying to figure out how to acquire the signal from the device? Do you have a transmitter and multiple receivers?

 

I guess it is hard for me to tell if you are asking about hardware connection, hardware configuration/communication or hardware control. If you have already connected and configured the hardware and it works, then the hardware control is figuring out how to program your hardware in LabVIEW.

 

From the sound of it the hardware connection is fine because it is USB and can connect to that bus. Do you know how to communicate with the transmitter? Are there drivers for the transmitter?

 

Please clearify which missing link you want help with.

 

Vince M
Applications Engineer
0 Kudos
Message 2 of 13
(8,446 Views)

Hi Vince,

 

I have a USB transmitter, and multiple receivers. I can use the Activehome Pro software and drivers (ftp://194.45.31.243/X10/Software/) and it all works fine, so what I need to figure out is how to communicate with the transmitter via Labview. 

 

The protocol is allegedly the same as for previous hardware (CM11a) which you can read about here: http://www.smarthome.com/manuals/protocol.txt

 

So I guess the real problem is that I don't know how to use the USB driver in Labview? Do I do this using VISA? If so, what do I use for the port reference? I'm used to using RS232, so I'd just be selecting a COM port, but obviously USB doesn't work like that.

 

If you could help me with that, I'd be very grateful!!

 

Brian 

0 Kudos
Message 3 of 13
(8,440 Views)

Hi Brian,

 

I looked on our ni.com/idnet to see if a LabVIEW driver already existed for this and I could not find one. It looks like you have two options:

 

Interface with the third party software through ActiveX if this functionality already exists (vendor provided). Or you can parse through the documentation and create a LabVIEW driver for this device. There are resources available on ni.com/idnet titled Resources for Instrument Driver Users and Developers.

 

You are correct. USB communication is serial so you will need to use the NI-VISA VIs. If you create a driver for this device IDNet would like to have this. If you don't want to develop the LabVIEW driver yourself you may suggest that drivers be developed for the device but there is no garentee on the time it will take to have it developed or that it will actually be developed.

 

I hope this is a help on getting started.

Vince M
Applications Engineer
0 Kudos
Message 4 of 13
(8,423 Views)

Download the SDK.  Look at the help file.

The files you'll need are in C:\Program Files\AHSDK\bin 

 

From labview, you have two choices:

1. Call the library functions in ahscript.dll.  SendAction or RcvAction

2. Make a system call to the two provided utilities: ahcmd.exe or ahcview.exe

 

Hope that helps.

 

I will be purchasing this interface and will be working on a LabVIEW interface.  But it won't be until sometime in January.

 

If you get anywhere, please update this thread so we can coordinate.  I'd love to be able to provide an NI supported standard driver for the CM15a.

 

Chuck

0 Kudos
Message 5 of 13
(8,392 Views)

Hi Chuck,

 

Haven't had the chance to work on this over the holidays, but I'll be taking a look at it over the next week or so. I'm not the strongest user of Labview, so I don't know what I'll be able to manage, so I'd be keen to know if you make any progress on this.

 

Brian 

0 Kudos
Message 6 of 13
(8,255 Views)

Hi! Chuck,

 

    I'm also working on this issue these days and found out that they don't provide an interface of RecvAction when you use Automation open in LabVIEW, which means I cannot see the signals sent back from motion sensors.

    

    There is only one method function SendAction as you mentioned and one property node called OnRecvAction which has no outputs!

 

    I also checked ahcmd.exe and ahcview.exe they can only send command or queryplc not a bit of RecvAction.

 

It's strange that ActiveHomePro software coming with CM15A can see the motion sensor signals,  I think they are using different dlls. (One for their software, one for SDK)

 

   If you have any development on x10 devices, please let me know.

 

Thank you in advance!

   

0 Kudos
Message 7 of 13
(7,903 Views)
Solution
Accepted by topic author bpmccain

For those who want to try out the ActiveX CM15a interface, I have attached a nice example VI (LV 8.5.1). The VI Documentation includes complete information on installing and testing ahsdk, and setting up automation in LV. 

 

As Wente noted, there does not seem to be a method to do read-backs. 

 

I did not spend much time on this. Perhaps there are other commands to ahsdk that are not exposed as ActiveX methods. If so, it is also possible to send shell commands with the SystemExec function. I'll be interested in hearing what else the group digs up on this.

 

 

Gary Johnson
Message 8 of 13
(7,866 Views)

Thanks Gary. I know there are some unresolved issues from posts following mine, but I wanted to mark yours as the solution to my original post. Hadn't gotten around to learning about ActiveX yet in Labview, so your sample *.vi has made things a lot easier for me.

 

0 Kudos
Message 9 of 13
(7,837 Views)

I'm glad it worked for you.

 

By the way, the fellow I wrote it for reports that extended codes do indeed work. For instance, in the Command string control, enter "extcode 31 xx" where xx is a hex value between 00 and FF to set absolute brightness of a lamp module between off and on. 

Gary Johnson
0 Kudos
Message 10 of 13
(7,822 Views)