timer t22

189 views
Skip to first unread message

guyc

unread,
Jun 27, 2015, 4:31:08 PM6/27/15
to sou...@googlegroups.com
I was trying to set the timer of typical 22 on 30 seconds.

In the configuration I have the instructions :

#define ONTIME                  3         
#define time_base_slow  1000


the timer is in the  loop slow 10 seconds

 EXECUTESLOW()   {
        UPDATESLOW();

        SLOW_10s()  {

          // The timer handle timed-on states
           Timer_Windows(sc1);
            Timer_Windows(sc2);


Can I calculate the time the timer is on as followed :

time base_slow  x ONTIME x slow 10s() ?


Di Maio, Dario

unread,
Jun 27, 2015, 5:47:48 PM6/27/15
to sou...@googlegroups.com
Hi,

you should find your answer here

Let me know,
Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/caebb027-1075-4c60-9f79-d263cf22c559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

guyc

unread,
Jun 29, 2015, 6:41:43 PM6/29/15
to sou...@googlegroups.com


Thanks a lot Dario.

I modified the sketch.

in configuration :
#define   Souliss_T2n_Timer_Val 0xA3
#define   Souliss_T2n_Timer_Off 0xA0



in loop :

Souliss_Logic_T22(memory_map, sc3, &data_changed, Souliss_T2n_Timer_Val);
Souliss_Logic_T22(memory_map, sc4, &data_changed, Souliss_T2n_Timer_Val);


in the  loop slow 10 seconds :

      EXECUTESLOW()   {
        UPDATESLOW();

        SLOW_10s()  {

          // The timer handle timed-on states
           Timer_Windows(sc1);
            Timer_Windows(sc2)
;



For the calculation :

(Souliss_T2n_Timer_Val - Souliss_T2n_Timer_Off)*Timer_Execution) :  ( 0xA3 - 0xA0) . 10 sec = 30 seconds

In reality the timer is running between 23 and 30 seconds

 



Di Maio, Dario

unread,
Jun 30, 2015, 1:28:07 AM6/30/15
to sou...@googlegroups.com

If your timing isn't stable, this means that you have a very big phase that take too long to be executed.
You can try to split your code over miltiple phases with different timing.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

guyc

unread,
Aug 9, 2015, 6:46:40 PM8/9/15
to souliss


My sketch has 3 fast-loops. The loop for the T22 is at 200ms.

Actually I have another problem with t22. For an unknown  reason the screens are stopping  some times  in the middle and at that time the timer is still active. All the screens has the same behaviour.
Most of the time they are going up and down right well, but other moments they stop on a arbitrary position.
It's very strange. When I activate all the screens at the same moment, It can happen that 3 of them are doing well and the fourth one stops.

At this moment I only work with the local pushbuttons. The Souliss app is not in use.
Reply all
Reply to author
Forward
0 new messages