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:
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