Support Forums
Running a schedule for a set time period

Hello,

I am very new to programming with a Datataker and have a quick question.

I have a system that when a flowrate drops below a set value (15) I run a schedule to latch the DT80 relay to backflush the system.

I would like to run this backflush schedule for a set peiod (say 5 minutes) and then return back to the normal operating state and open the relay.

I can get the unit to halt other schedules and run the backflush schedule, but I cannot get this to halt and return to other schedules.

Is there an easy way to run this schedule for a set time and then halt?

Thanks very much,

Nicholas Cox.

Hello, I am very new to programming with a Datataker and have a quick question. I have a system that when a flowrate drops below a set value (15) I run a schedule to latch the DT80 relay to backflush the system. I would like to run this backflush schedule for a set peiod (say 5 minutes) and then return back to the normal operating state and open the relay. I can get the unit to halt other schedules and run the backflush schedule, but I cannot get this to halt and return to other schedules. Is there an easy way to run this schedule for a set time and then halt? Thanks very much, Nicholas Cox.

Good afternoon Nick,

You can use an alarm to start the other schedule again.
In the first schedule you have an alarm that when a value drops below 15 sends a command to HA; GB (Halt schedule A: Go schedule B)
You need to do the opposite in schedule B., that is a condition that after 5 minutes HB; GA

For example:
Begin
1CV=20
RA1S
1CV=1CV-1
Alarm(1CV<15){HA;GB:2CV=0}

RB1M
1Relay=1
2CV=2CV+1 'Count the minutes
Alarm(2CV>=5){1Relay=0; GA; HB}

End

If you are using dEX you will need use manual channels to add the counters and alarms

Cheers

Roger

Good afternoon Nick, You can use an alarm to start the other schedule again. In the first schedule you have an alarm that when a value drops below 15 sends a command to HA; GB (Halt schedule A: Go schedule B) You need to do the opposite in schedule B., that is a condition that after 5 minutes HB; GA For example: _Begin 1CV=20 RA1S 1CV=1CV-1 Alarm(1CV&lt;15){HA;GB:2CV=0}_ _ RB1M 1Relay=1 2CV=2CV+1 &#039;Count the minutes Alarm(2CV&gt;=5){1Relay=0; GA; HB}_ _End_ If you are using dEX you will need use manual channels to add the counters and alarms Cheers Roger

Sorry but I have some corrections to that code:

  • The >= will not work in that alarm
  • The 5 minute period will almost certainly not be 5 minutes because the B schedule runs in sync with midnight, not immediately. This means the B schedule must run at the same period or faster than the schedule that starts it.
  • There was a typo in the alarm code, a colon before the 2CV instead of a semi-colon.

Begin
1CV=20
RA1S
1CV=1CV-1
Alarm(1CV<15){HA;GB;2CV=0}

RB1S
1Relay=1
Alarm(2CV>300){1Relay=0; GA; HB}
2CV=2CV+1 'Count the seconds


End

The 300 value is for 300 seconds, the "greater than" symbol in this case actually means "greater than or equal to", therefore it takes into account the "zeroth second" that the schedule is active.
KadeM

Sorry but I have some corrections to that code: - The &gt;= will not work in that alarm - The 5 minute period will almost certainly not be 5 minutes because the B schedule runs in sync with midnight, not immediately. This means the B schedule must run at the same period or faster than the schedule that starts it. - There was a typo in the alarm code, a colon before the 2CV instead of a semi-colon. _Begin 1CV=20 RA1S 1CV=1CV-1 Alarm(1CV&lt;15){HA;GB;2CV=0}_ _RB1S 1Relay=1 Alarm(2CV&gt;300){1Relay=0; GA; HB} 2CV=2CV+1 &#039;Count the seconds_ _ End_ The 300 value is for 300 seconds, the &quot;greater than&quot; symbol in this case actually means &quot;greater than or equal to&quot;, therefore it takes into account the &quot;zeroth second&quot; that the schedule is active. KadeM

Thank you both very much for your replies, greatly appreciated. I did manage to get it working 100%! smile

I had a bum steer with the last employee leaving code in place which used the system timer 2ST, which obviously didn't work.

Sometimes you get caught up trying to be more complex than is required, where an easier solution works just as well, if not better.

Cheers, Nick.

Thank you both very much for your replies, greatly appreciated. I did manage to get it working 100%! :D I had a bum steer with the last employee leaving code in place which used the system timer 2ST, which obviously didn&#039;t work. Sometimes you get caught up trying to be more complex than is required, where an easier solution works just as well, if not better. Cheers, Nick.

Hi Nick,

It's great that you have it all working 100% now. That's the funny thing when you have a whole programming language available, there are so many ways to to it. I am sure you could do it using 2ST, but we like to keep it simple.

Hi Nick, It&#039;s great that you have it all working 100% now. That&#039;s the funny thing when you have a whole programming language available, there are so many ways to to it. I am sure you could do it using 2ST, but we like to keep it simple.
45
4
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft