Dimmer scaling

Post in this thread issues and solution you find with the MainLobby 3 Client
tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Dimmer scaling

Postby tmax » Tue Apr 19, 2011 4:42 pm

Hi,
I have added dimmer sliders to my scenes but my KNX system uses a 1 byte telegram for dimming. so the value is from 0-254 instead of 0-100. Normally in another dedicated KNX GUI software I can place a scale value of .39 to get the 0-100 slider working correctly to scale
Is this possible in Mlobby with the 0019-0053 slider?. I have been looking through the forum and found MLmath, but I cannot seem to get it to work and i also need the status variable to be scaled.
I use MLGenericDevice to send and receive the commands and it is working fine. The slider only allows me to dim up to under 50% and then the KNX dimmers send the status back about a second after the dimming is complete and then update the status variable if the return value is over 100 then the slider jumps to the bottom.

So my send command is mlservecmd.MLGenericDevice|KNX~tvroom_screenlights_dim~{{value}}
and my status variable is {{tvroom_screenlights_status}}

I have tried the following for the command
Macro|MLServeCmd.Macro|mlservecmd.MLGenericDevice|KNX~tvroom_screenlights_dim~{{value}}!
SetVariable|tvroom_screenlights_status!
MLMath|tvroom_rearlights_status~{{tvroom_screenlights_status }}~.39!

and this for the status ({{tvroom_screenlights_status}}*.39)

Could somebode help me please?

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: Dimmer scaling

Postby mcascio » Wed Apr 20, 2011 7:59 am

Have you tried using the MLSliders plugin to do the conversion?
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Re: Dimmer scaling

Postby tmax » Wed Apr 20, 2011 4:29 pm

Thanks Mario,
I didnt see that one :oops: But i am still having a few problems,

I now have the command on my slider as MLServeCmd.MLSliders|Set~1~{{value}}

in the MLSliders I have the slider 1 range from 0-254
The Server Varaible = tvroom_screenlights_dim
The MLServe command on change = MLGenericDevice|KNX~tvroom_screenlights_dim~{{value}}

Is this correct?

Also can i get ML sliders to also set the status variable response from the dimmer which is {{tvroom_screenlights_status}}

tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Re: Dimmer scaling

Postby tmax » Wed Apr 20, 2011 4:48 pm

Ive been looking at it in more detail and is actually dimming perfect. The problem is that the slider is not moving to its correct position after the dimmer sends back its response.

Can i also convert the response variable like i did with the command?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Dimmer scaling

Postby CinemarDave » Wed Apr 20, 2011 6:03 pm

In your previous example your MLMath command was missing an operator

MLMath|tvroom_rearlights_status~{{tvroom_screenlights_status }}~.39!

should be

MLMath|Multiply~tvroom_rearlights_status~{{tvroom_screenlights_status}}~.39


Return to “MainLobby 3 Client”

Who is online

Users browsing this forum: No registered users and 1 guest