COMMAND_SET_DIMVALUE uses 2 bytes to set the dimspeed. But how can I set a dimspeed to 3h?
On the last page in the PDF velleman.eu/downloads/0/velb … vmb4dc.pdf there is a table that it seems possible. How? How to defint this time parameter?
3h = 10800seconds. 10800/256 = 42,1875. Highbyte = 42(decimal)=0x2A (Hex) and lowbyte = 0.1875*256= 48(decimal)=0x30(hex).
So your databyte1=H’07’
hope this will help you.
First, convert your time to seconds
3 hours = 180 minutes = 10800 seconds
Second, convert this value to hexadecimal notation
10800 = 2A30
The value you get is the value that you need to put in the two bytes
DATABYTE4 = 2A
DATABYTE5 = 30
wow thanks for the fast response. My fault, I didn’t take the time to calculate, but indeed, I forgot how big numbers you could make with a little of bytes…
So the biggest fade time is : 0xFFFF = 65535 /60 /60 = 18,204166 hours
Then you can’t make any fade time of 3 Days like explained in the PDF with mode? Or Am I still missing something?
Or the manual says : “The dim time is limited to 1 day” This wil mean 18 hours then?
Actually both are correct, COMMAND_SET_DIMVALUE (as described on page 7) only accepts a 16-bit time in seconds, which is a maximum dim delay of roughly 18 hours.
However, when working with module memory (page 11 of the protocol), you will see that actions are saved in groups of 6 bytes of which the third byte is the ID of the action you want to perform (the complete list of actions is on page 13).
Some actions have parameters, with a maximum of three parameters per action. If an action has a ‘Dim time’ parameter, then the value is formatted according to what is noted on page 14. With a value ranging from 1 second to 3 days.
You can see this in action on the VMB4RYLD and VMB4RYNO modules in VelbusLink, for example: