Please login or register.

Login with username, password and session length

Author Topic: CM11A Documentation for DIM and Bright settings  (Read 15007 times)

hkactive

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 50
CM11A Documentation for DIM and Bright settings
« on: May 30, 2006, 05:22:48 PM »

I was programming the CM11a using vb6 and can't succeed in programming more than 15 DIMs using the format given in the CM11A_Protocol.txt
The following is a quote from the CM11A_protocol.txt:

Quote
3.1.1.   Header:Code.

The Header:Code combination is configured thus:

   Header:   7   6   5   4   3   2   1   0
      < Number of Dims>   1  F/A E/S

Where:   

Number of Dims is a value between 0 and 22 identifying the number of dims to be transmitted (22 is equivalent to 100%)

0x86,0x64         Function: A Dim 16/22*100%
         0xe0      Incorrect checksum.
   0x86,0x64         Function re-transmission
         0xea      Checksum ((0x86 + 0x64)&0xff)
   0x00            OK for transmission.
         0x55      Interface ready.


 I'm using  VB6 to send the following code:
    mscomm1.ouput = chr$(clng("&H" & strDimmerValue & "6") & chr$(clng("&H" & strHouseCode & strCommandType))

Where strDimmerValue is a value between 1 and 22, and strHouseCode is a Hex$ of the HouseCode, and strCommandType comes from a string constant depending on what command the program requests: On = "2" , Off = "3", etc.

Code works fine until I hit a hex$ value of Ten up to the suggested limit of &H16 (Decimal value of 22) for dim or bright values.

I receive an error saying that the function is unsupported and my program crashes.

Testing the program, I found that the program worked fine with the following Hex Values for the Dim or Bright Settings:
   1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

But as soon as you tried to send a value not within these parameters--i.e. 10,11,12,13,14,15,16, the program crashed.

So I guess my question is, Is the documentation incorrect about there being 22 dim settings. Are there just 15 for the CM11A? Or do I just not understand the documentation?

Or is there a different way of sending the values. According to the given sample, the Dim Value is sent in the same byte with the 6: 0x86.

Any help from the engineer about the specs or other programmers would be appreciated.

Hank

Logged

Pag

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: CM11A Documentation for DIM and Bright settings
« Reply #1 on: June 01, 2006, 05:53:45 AM »

It's been about ten years since I did any VB, but I think your problem may be as follows.

The first five bits of the header are the dim amount, followed by the three control bits 110.  So for a dim amount of 1, the byte sent would be 00001110, or hex 0E.  For a dim amount of 16 the byte is 10000110, hex 86.

Hope this helps?

Ian
Logged
 

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