Can I use logic to convert temperature to measurement APP

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Charlie Crackle, Jun 5, 2013.

  1. Charlie Crackle

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne
    Can I use logic to read the value of the current temperature in c-bus thermostat (App 172) and then resend it out on the Measurement APP ?

    Thinking...

    Temp := GetRealIBSystemIO("HVAC Temperature", 1, HVACZone1);

    SetRealIBSystemIO("Measurement App Real Value", 1, 1, Temp)


    What I am missing is how do I set the units on this value so the message has the correct units of "Degrees C" on the message on cbus

    Charles
     
    Last edited by a moderator: Jun 5, 2013
    Charlie Crackle, Jun 5, 2013
    #1
  2. Charlie Crackle

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    Yes, you can.

    Before you can send measurements you need to add a new entry in the Measurement Manager (Project->C-Bus Applications->Measurement Manager), and tick the "controllable" option.

    When you do this, you configure the units as well as the Device ID and Channel that will be used.

    Nick
     
    NickD, Jun 6, 2013
    #2
  3. Charlie Crackle

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne
    Thankyou that filled in the knowledge gap

    I got it working. Sends messages when changes or every30 seconds. Works great.



    Code:
     if GetBoolIBSystemIO("HVAC Data Valid", 1, HVACZoneU) then
         begin 
              If HasChanged(GetRealIBSystemIO("HVAC Temperature", 1,HVACZoneU))or HasChanged(GetRealIBSystemIO("HVAC Set-Level", 1, HVACZoneU)) OR (TimerTime(1) > 30) then
                  begin
                   SetRealIBSystemIO("Measurement App Real Value", 254, 12, 0, GetRealIBSystemIO("HVAC Temperature", 1,HVACZoneU));
                   SetRealIBSystemIO("Measurement App Real Value", 254, 12, 1, GetRealIBSystemIO("HVAC Set-Level", 1, HVACZoneU));
                   TimerSet(1,0)
                  end;
                  delay(1);
        end
     

    Attached Files:

    Charlie Crackle, Jun 6, 2013
    #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.