Pascal to Lau

Discussion in 'C-Bus Automation Controllers' started by bushy, Apr 16, 2021.

  1. bushy

    bushy

    Joined:
    May 17, 2008
    Messages:
    8
    Likes Received:
    0
    Hi All,

    I have a program in Pascal that uses a lot of system I/O which I adjust the values via sliders. Is this possible to do in LAU as I'm new to this language.

    Thanks in advance.
     
    bushy, Apr 16, 2021
    #1
  2. bushy

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Depends on which systemIOs you are using. The SHAC does not support a lot of the systemIO functionality of PICED.
     
    Ashley, Apr 16, 2021
    #2
  3. bushy

    bushy

    Joined:
    May 17, 2008
    Messages:
    8
    Likes Received:
    0
    Hi Ashley
    An example of logic below
    once (GetEnableState("BFEN_Heat_Coach Captains")= On) and
    (GetRealIBSystemIO("Measurement App Real Value", "local", 200, 1)< GetRealSystemIO("Coach Captains High Heat Set Point"))then
    begin
    SetLightingState("BF_Heat_Coach Captain High Heat", ON);
    SetLightingState("BF_Heat_Coach Captain Low Heat", ON);
    SetLightingState("BF_Heat_Coach Captain Fan", ON);
    end;

    Im using the Get real System IO as my variable which I can adjust via slider.
     
    bushy, Apr 21, 2021
    #3
  4. bushy

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    248
    Likes Received:
    31
    Location:
    New Zealand
    if i am understanding correctly what you have above, the below this might get you started

    create on the lighting application ga for "Coach Captains High Heat Set Point" and set vis slider etc
    create the measurement group object in the shac for device 200, 1
    i assume the enable group already exists in shac "BFEN_Heat_Coach Captains"

    tag keyword trigger to all three objects above (or call the keyword whatever you want)

    add an event script on the keyword trigger

    if GetEnableState("BFEN_Heat_Coach Captains") then

    local temp = GetCBusMeasurement(0, 200, 1)
    local setpoint = GetLightingLevel("Coach Captains High Heat Set Point")

    if temp < setpoint then
    SetLightingState("BF_Heat_Coach Captain High Heat", true);
    SetLightingState("BF_Heat_Coach Captain Low Heat", true);
    SetLightingState("BF_Heat_Coach Captain Fan", true);
    end

    end
     
    Pie Boy, Apr 24, 2021
    #4
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.