24 Hour Heating Timer for RTC MIAC

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

first I have to change the 16.00 - 23.00 time period to something like 16.00 - 22.00 so that I can test times tonight, is it quite easy to do ?
Yes, you can simply change 23 to 22. It is fine.
And could you put minutes in ie for eg 22.15 ?
With existing code you can't do that..I am modifying the code and post shortly to have that facility.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Hi Stuart

I have modified the code and now you can easily put start and stop hour and min both. You don't need to search for that to put now in the code. There is a calculation box in the beginning of the code..I put a comment where to put different period hour and min.
Please let me how you are getting!!
Attachments
RTC_MIAC_HEATER_Final.fcf
(39.06 KiB) Downloaded 410 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Thanks Enamul,

That will make it easier to test...

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

I have just programmed the MIAC with these settings:

//Period 1
HOUR1_START = 21
MIN1_START = 35
HOUR1_STOP = 21
MIN1_STOP = 37
//Period 2
HOUR2_START = 21
MIN2_START = 39
HOUR2_STOP = 21
MIN2_STOP = 40
//Period 3
HOUR3_START = 21
MIN3_START = 42
HOUR3_STOP = 21
MIN3_STOP = 42


Q1 Lit up at 21.35 (first on period) and then stayed on ie the rest of the on off programs did not work.


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

OK I see. I am checking the code why it's not working
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul

This might help you, i programmed these times:

//Period 1
HOUR1_START = 21
MIN1_START = 53
HOUR1_STOP = 21
MIN1_STOP = 49
//Period 2
HOUR2_START = 21
MIN2_START = 54
HOUR2_STOP = 21
MIN2_STOP = 52
//Period 3
HOUR3_START = 21
MIN3_START = 57
HOUR3_STOP = 21
MIN3_STOP = 57

But Q1 never came on at all.

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Hi Stuart,
If start hour and stop hour is same..in that case stop min must be higher than start min. Clock can't run reverse. I have corrected part of the issue. It will work now for period 1, 2 and 3 if they are like different slots of different hour..if they are in the same hour only period 1 will work..you can test that meanwhile I am modifying rest bit..
Attachments
RTC_MIAC_HEATER_Final.fcf
(40.06 KiB) Downloaded 412 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Here is the code in which you should be able to set three periods in same hour to test the system. But please remember to put start min smaller than stop min for all three periods. Like
Period 1:
HOUR1_START=23
MIN1_STRAT = 34
HOUR1_STOP =23
MIN1_STOP = 36

Period 2:
HOUR2_START=23
MIN2_START = 37
HOUR2_STOP=23
MIN2_STOP = 39

Period 3:
HOUR3_START = 23
MIN3_START = 40
HOUR3_STOP=23
MIN3_STOP=42
Attachments
RTC_MIAC_HEATER_Final.fcf
(41.68 KiB) Downloaded 380 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul

Just tested code with

//Period 1
HOUR1_START = 23
MIN1_START = 19
HOUR1_STOP = 23
MIN1_STOP = 20
//Period 2
HOUR2_START = 23
MIN2_START = 21
HOUR2_STOP = 23
MIN2_STOP = 22
//Period 3
HOUR3_START = 23
MIN3_START = 24
HOUR3_STOP = 23
MIN3_STOP = 25



first period comes on and then off, then stays off ie other 2 periods do not work.

The reason I set the last period to same on /off time was to cancel that time period so it only comes on 2 periods (I thought I could Cancel a period like this)

Ok I will try last code you posted now

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

The last code I used:

//Period 1
HOUR1_START = 23
MIN1_START = 32
HOUR1_STOP = 23
MIN1_STOP = 33
//Period 2
HOUR2_START = 23
MIN2_START = 34
HOUR2_STOP = 23
MIN2_STOP = 35
//Period 3
HOUR3_START = 23
MIN3_START = 36
HOUR3_STOP = 23
MIN3_STOP = 37


The first period came on then went off, the second period came on and went off straight away before off time, and period 3 did not come on at all.

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Hi Stuart,
Thanks for the postings. It would not be possible to find out problem without Flowcode's strong simulation feature. I have made simple clock and test code in simulation. Now it's working fine.
Attachments
RTC_MIAC_HEATER_Final.fcf
(42.78 KiB) Downloaded 394 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Thanks Enamul,

That's great I will have a go at that now, I will let you know in a bit...

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

I have just programmed the new code with these periods:

//Period 1
HOUR1_START = 17
MIN1_START = 55
HOUR1_STOP = 17
MIN1_STOP = 56
//Period 2
HOUR2_START = 17
MIN2_START = 57
HOUR2_STOP = 17
MIN2_STOP = 58
//Period 3
HOUR3_START = 17
MIN3_START = 59
HOUR3_STOP = 18
MIN3_STOP = 00

But as soon as I programmed it the Q1 light lit up at 17.52 which it shouldn't of done.

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

It has just gone off at 17.56

On at 17.57

off at 17.58

On at 17.59

Failed to go off at 18.00

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

But as soon as I programmed it the Q1 light lit up at 17.52 which it shouldn't of done.
Can you please try once more? It shouldn't do that.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul, I have programmed a couple of settings this being the latest one:

//Period 1
HOUR1_START = 18
MIN1_START = 20
HOUR1_STOP = 18
MIN1_STOP = 22
//Period 2
HOUR2_START = 18
MIN2_START = 26
HOUR2_STOP = 18
MIN2_STOP = 29
//Period 3
HOUR3_START = 18
MIN3_START = 33
HOUR3_STOP = 18
MIN3_STOP = 35


However on every one even this one as soon as you program the miac the Q1 light is on, then it goes off at the first off time and carries on normally.

EDIT: just gone off at 18.22 (first off time)

Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

I have just done this set of periods:

//Period 1
HOUR1_START = 19
MIN1_START = 15
HOUR1_STOP = 19
MIN1_STOP = 17
//Period 2
HOUR2_START = 19
MIN2_START = 19
HOUR2_STOP = 19
MIN2_STOP = 21
//Period 3
HOUR3_START = 19
MIN3_START = 22
HOUR3_STOP = 19
MIN3_STOP = 25


And the same as soon as you program the code Q1 relay comes on and goes off at first off time.

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

I have just been looking at the flowchart for the code, does this mean anything in my pic ?
flowchart_DST.jpg
flowchart_DST.jpg (115.92 KiB) Viewed 17432 times
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Ohh..I thought I put off there but it seems I put ON which is wrong.
Actually I am still at university..Can't look at the simulation file. It's good that you have noticed the issue.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

No probs Enamul,

I tried disabling that miac relay on box, but it did not work.

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

I changed the MIAC command to relay off, but that did not work.

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Hi Enamul,

What are the variables rem1, rem2 and rem3 in the code please ?

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

REM1,2 & 3 is just to avoid send relay on command every time it comes to the decision true case.
I changed the MIAC command to relay off, but that did not work.
Relay need to be OFF there..I am checking in simulation now all the cases you have posted.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by acestu »

Thanks Enamul,

I was just trying to read the flowchart that's all, to see if I could figure out why the relay comes on straight away.

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 24 Hour Heating Timer for RTC MIAC

Post by Enamul »

Hi Stuart

I have tested code in simulation...only that Relay ON was the issue. Other than that code works very nice for me. I have tested your time periods..
//Period 1
HOUR1_START = 19
MIN1_START = 15
HOUR1_STOP = 19
MIN1_STOP = 17
//Period 2
HOUR2_START = 19
MIN2_START = 19
HOUR2_STOP = 19
MIN2_STOP = 21
//Period 3
HOUR3_START = 19
MIN3_START = 22
HOUR3_STOP = 19
MIN3_STOP = 25
It worked fine for me..Here is the code I have tested.
Attachments
RTC_MIAC_HEATER_Final_V1.01.fcf
(42.78 KiB) Downloaded 318 times
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply