Logic Help - Adjustable Set Point Temp on eDLT display for Floor Heating

Discussion in 'C-Bus Wiser 2 Controller' started by noyzey, Dec 8, 2021.

  1. noyzey

    noyzey

    Joined:
    Mar 24, 2010
    Messages:
    34
    Likes Received:
    1
    Location:
    Sunshine Coast, Australia
    A little help would be appreciated as I feel like I'm re-inventing the wheel.

    I have an ensuite bathroom, with a 5104DTSI and in-floor probe installed. I have an eDLT in that room. I've written the logic to turn the contactor (via C-Bus relay) on when the temp drops below a pre-defined value in my logic script. Likewise, when the temp rises above the predefined value, the relay turns off. Not too difficult.

    I want to be able to set the temp on the eDLT rather than a predefined value in a logic script. And this is the bit that I feel like I'm reinventing the wheel. I thought I could use a GA on an eDLT button (0-255) and in logic multiply this value by 0.04 to get a range of 10, add 20 to this value, round the value up and I can now set a temperature value between 20 and 30 deg Celcius.
    I'd like to display this setpoint value in the small text section of the eDLT, so the client can adjust the set point temp up or down on the eDLT in that room.

    IS THERE A BETTER WAY TO DO THIS?
     
    noyzey, Dec 8, 2021
    #1
  2. noyzey

    Goran C Forum Member

    Joined:
    Jun 7, 2012
    Messages:
    28
    Likes Received:
    0
    Location:
    Adelaide
    You could possibly set up several scenes - eg 20deg, 22deg, 24deg, 26deg, 28deg, 30deg in the eDLT and use a Scene Cycle/Set key function to choose a scene for a dummy lighting group. Eg selecting and setting via the scene select function 24deg scene set the lighting level of the C-Bus dummy group - once the scene is triggered to set the dummy group which represents a specific setpoint your logic in a PAC, Wiser, 5500SHAC, 5500AC2, 5500NAC or 5500NAC2 can compare the setpoint and the actual temperature (different C-Bus group) and then perform desired control.

    See example in EDLT of using Scene Widget Type with Cycle Down/Cycle Up Key Function (allowing you to scroll through the Scene List) and Select (allows you to select the current Scene - trigger it)

    Also show is how you can set the display to scene label (set up your scenes with meaningful label) and use icons and status text which provide meaning.
    upload_2023-2-7_11-4-33.png
     

    Attached Files:

    Goran C, Feb 7, 2023
    #2
  3. noyzey

    noyzey

    Joined:
    Mar 24, 2010
    Messages:
    34
    Likes Received:
    1
    Location:
    Sunshine Coast, Australia
    Thanks for your suggestion. I worked this out using pascal logic, code below. I used nudge up and down to set the set point temp. Nudge by 17 between 0-254 gives 15 steps, which I thought was a big enough temperature range.
    There's a bit of maths involved in this script.
    I ended up with this code, with some help from this forum. It works really well. It also stores the set point temp and mode into non-volatile memory so it survives a power outage.

    If anyone can improve on this idea, I'm all ears.

    Global Variables:
    SetPointString: String;
    SetPointValue: real;


    Initialisation:

    if (GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Mode")= 50%) then
    begin
    SetPointValue:= round(GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button") * 0.058 +25);
    SetStringSystemIO("B3 Ens System IO", SetPointString);
    Format (SetPointString, SetPointValue:1:0);
    Append (SetPointString, '*C');
    SetStringIBSystemIO("Label Group Text", "Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button", 0, SetPointString);
    EnableModule("B3 Ens Thermostat Set Point");
    EnableModule("B3 Ens Floor OFF/ON");
    EnableModule("B3 Ens Reset");
    { In place to correct floor heating mode if on when not within the thrmostat range }
    if (GetRealIBSystemIO("Measurement App Real Value", "Network 1", 0, 1) >= SetPointValue) then SetLightingState("L1 - B3 Ens Floor Heat", OFF)
    else
    SetLightingState("L1 - B3 Ens Floor Heat", ON);
    end;



    MODULES----
    B3 Ens Thermostat Set Point:
    { eDLT with GA "B3 Ens Floor Button" is set to function nudge up/down by 17 values, resulting in 15 nudge steps up or down }
    { Create "B3 Ens System IO" string variable in Project/ Edit System IO }

    once HasChanged(GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button")) then
    begin
    { This value is multiplied by 0.058 and 25 is added to give a range from 25-40 deg C }
    SetPointValue:= round(GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button") * 0.058 +25);
    SetStringSystemIO("B3 Ens System IO", SetPointString);
    Format (SetPointString, SetPointValue:1:0);
    Append (SetPointString, '*C');
    SetStringIBSystemIO("Label Group Text", "Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button", 0, SetPointString);
    end;

    B3 Ens Heating Mode
    { GA "B3 Ens Floor Mode" is on an eDLT which is in multi level function mode with 2 steps. 0%, 50% and 100% }
    once (GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Mode")= 0%) then

    begin
    SetStringIBSystemIO("Label Group Text", "Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button", 0, 'Disabled');
    SetLightingState("L1 - B3 Ens Floor Heat", OFF);
    DisableModule("B3 Ens Floor OFF/ON");
    DisableModule("B3 Ens Thermostat Set Point");
    DisableModule("B3 Ens Reset");
    end;

    once (GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Mode")= 50%) then
    begin
    SetPointValue:= round(GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button") * 0.058 +25);
    SetStringSystemIO("B3 Ens System IO", SetPointString);
    Format (SetPointString, SetPointValue:1:0);
    Append (SetPointString, '*C');
    SetStringIBSystemIO("Label Group Text", "Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button", 0, SetPointString);
    { In place to correct floor heating mode if on when not within the thrmostat range }
    if (GetRealIBSystemIO("Measurement App Real Value", "Network 1", 0, 1) >= SetPointValue) then SetLightingState("L1 - B3 Ens Floor Heat", OFF)
    else
    SetLightingState("L1 - B3 Ens Floor Heat", ON);
    EnableModule("B3 Ens Thermostat Set Point");
    EnableModule("B3 Ens Floor OFF/ON");
    EnableModule("B3 Ens Reset");
    end;

    once (GetCBusLevel("Network 1", "Area Presets", "<TEMP> - B3 Ens Mode")= 100%) then
    begin
    SetStringIBSystemIO("Label Group Text", "Network 1", "Area Presets", "<TEMP> - B3 Ens Floor Button", 0, 'Disabled');
    SetLightingState("L1 - B3 Ens Floor Heat", ON);
    DisableModule("B3 Ens Floor OFF/ON");
    DisableModule("B3 Ens Thermostat Set Point");
    DisableModule("B3 Ens Reset");
    end;



    B3 Ens Floor OFF/ON
    { B3 Ensuite Floor Heating Temperature triggering from C-Bus via temperature sensor which has a device 0, channel 1 set to mesaurement}
    { The contactor will be held on until the set point temperature is reached. At this set point temp, the contactor will turn off. }

    once (GetRealIBSystemIO("Measurement App Real Value", "Network 1", 0, 1) >= SetPointValue) then SetLightingState("L1 - B3 Ens Floor Heat", OFF);
    once (GetRealIBSystemIO("Measurement App Real Value", "Network 1", 0, 1) < SetPointValue) then SetLightingState("L1 - B3 Ens Floor Heat", ON);


    B3 Ens Reset
    { In place to correct Floor Heater if user tries to turn on/off in Auto Thermostat Mode }
    once HasChanged(GetLightingState("L1 - B3 Ens Floor Heat")) then
    begin
    if (GetRealIBSystemIO("Measurement App Real Value", "Network 1", 0, 1) >= SetPointValue) then SetLightingState("L1 - B3 Ens Floor Heat", OFF)
    else
    SetLightingState("L1 - B3 Ens Floor Heat", ON);
    end;
     
    noyzey, Feb 7, 2023
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.