Support Forums
Start and stop for heater using DT80

I am working on a project using a data logger DT80, the project involves getting a thermocouple to sample temperature every second while at the same time to turn on a heater for 15 seconds and then turn it off for 15 minutes.

I have been trying to use an alarm and channel variable. I also would like this program to loop itself. This is my first time using a data taker. I was wondering if someone could help me with this?

Regards,
James

I am working on a project using a data logger DT80, the project involves getting a thermocouple to sample temperature every second while at the same time to turn on a heater for 15 seconds and then turn it off for 15 minutes. I have been trying to use an alarm and channel variable. I also would like this program to loop itself. This is my first time using a data taker. I was wondering if someone could help me with this? Regards, James

Good morning James,

There are several ways to do this. As the schedule is running once per second you could use a counter to count the number of seconds then reset the counter at 15 minutes. For example:

BEGIN"15s15m"
1CV=0
RA1S
1CV=1CV+1
1TK
Alarm1(1CV<15.5)"Heater on"{1DSO=0} 'Turn On heater
Alarm2(1CV>15.5)"Heater off"{1DSO=1) 'Turn off heater
Alarm3(1CV>900)"Reset time counter"{1CV=0)
END

There are some other ways too. You could also use the system timers etc. but the above is simple to understand.

Cheers,
Roger

Good morning James, There are several ways to do this. As the schedule is running once per second you could use a counter to count the number of seconds then reset the counter at 15 minutes. For example: ```` BEGIN&quot;15s15m&quot; 1CV=0 RA1S 1CV=1CV+1 1TK Alarm1(1CV&lt;15.5)&quot;Heater on&quot;{1DSO=0} &#039;Turn On heater Alarm2(1CV&gt;15.5)&quot;Heater off&quot;{1DSO=1) &#039;Turn off heater Alarm3(1CV&gt;900)&quot;Reset time counter&quot;{1CV=0) END ```` There are some other ways too. You could also use the system timers etc. but the above is simple to understand. Cheers, Roger

Hi Roger,

Thanks for the help. However, I do not know how to tell the heater to turn on and off using a relay?

Regards,
James

Hi Roger, Thanks for the help. However, I do not know how to tell the heater to turn on and off using a relay? Regards, James

Hi James,

1DSO=0 will turn the heater on; 1DSO=1 will turn the heater off.

Wire the relay as per figure 120 on page 265 of the DT80 user manual (UM0085-B3). Make sure the relay the digital is controlling does not exceed 100mA and 30 VDC. Or use the relay in the DT80 which can switch 30 VDC @ 1 Amp.

If you do use the internal relay then; 1Relay=1 will turn the relay on and 1Relay=0 will turn it off.

Cheers,
Roger Doulis

Hi James, 1DSO=0 will turn the heater on; 1DSO=1 will turn the heater off. Wire the relay as per figure 120 on page 265 of the DT80 user manual (UM0085-B3). Make sure the relay the digital is controlling does not exceed 100mA and 30 VDC. Or use the relay in the DT80 which can switch 30 VDC @ 1 Amp. If you do use the internal relay then; 1Relay=1 will turn the relay on and 1Relay=0 will turn it off. Cheers, Roger Doulis

Hi Roger,

I have been able to get the data logger to sample every second.

However I have realized that I need to send a single signal to the heater to turn it on and a single signal to turn it off. This is because if I use a continuous signal it won't allow enough time for the heater to light.

I was wondering how I would be able to do this as I am using a digital output?

Regards,
James

Hi Roger, I have been able to get the data logger to sample every second. However I have realized that I need to send a single signal to the heater to turn it on and a single signal to turn it off. This is because if I use a continuous signal it won&#039;t allow enough time for the heater to light. I was wondering how I would be able to do this as I am using a digital output? Regards, James

Hi James,

Ok, then we need to know exactly what signal do you need? DT80 will turn a digital on or off and we can program the digital to be on or off for a period of time.

So EXACTLY what is the signal required to start and what is the signal required to stop?

Cheers,
Roger

Hi James, Ok, then we need to know exactly what signal do you need? DT80 will turn a digital on or off and we can program the digital to be on or off for a period of time. So EXACTLY what is the signal required to start and what is the signal required to stop? Cheers, Roger

Hi Roger,

The heater is normally operated using a push button switch and I would like to change it to a closed looped system so that the data logger would take over the switch's function.

Regards,
James

Hi Roger, The heater is normally operated using a push button switch and I would like to change it to a closed looped system so that the data logger would take over the switch&#039;s function. Regards, James

Good afternoon James,

1DSO(500)=0 will turn digital input on for 500 mSec. You might need to have another digital signal to turn the heater off.

Cheers,
Roger

Good afternoon James, 1DSO(500)=0 will turn digital input on for 500 mSec. You might need to have another digital signal to turn the heater off. Cheers, Roger

Hi Roger,

I am still having trouble signaling the heater to turn on and to turn off. I have been making minor adjustments to the code below however I could not get it working.

Below is the code that I have been using:

'JOB=JOB1
'COMPILED=2011/02/09 13:01:59
'TYPE=dt80
DT=\d
001: BEGIN"JOB1"
002: CATTN
003: 'Spans and polynomial declarations
004: 'Thermistor declarations
005: 'Switches declarations
006: 'Parameter declarations
007: 'Global declarations
008: RS1S
009: 'schedule definition
010: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA
011: 1CV=0
012: 1CV=1CV+1
013: 2TK
014: ALARM1(1CV<0.5000)6DSO{[6DSO(500)=0]}
015: ALARM2(1CV>15.5000)7DSO{[7DSO(15500)=0]}
016: ALARM3(1CV>900.0000){[1CV=0 ;6DSO=1; 7DSO=1]}
017: END
'end of program file

Regards,
James

Hi Roger, I am still having trouble signaling the heater to turn on and to turn off. I have been making minor adjustments to the code below however I could not get it working. Below is the code that I have been using: ```` &#039;JOB=JOB1 &#039;COMPILED=2011/02/09 13:01:59 &#039;TYPE=dt80 DT=\d 001: BEGIN&quot;JOB1&quot; 002: CATTN 003: &#039;Spans and polynomial declarations 004: &#039;Thermistor declarations 005: &#039;Switches declarations 006: &#039;Parameter declarations 007: &#039;Global declarations 008: RS1S 009: &#039;schedule definition 010: RA(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA 011: 1CV=0 012: 1CV=1CV+1 013: 2TK 014: ALARM1(1CV&lt;0.5000)6DSO{[6DSO(500)=0]} 015: ALARM2(1CV&gt;15.5000)7DSO{[7DSO(15500)=0]} 016: ALARM3(1CV&gt;900.0000){[1CV=0 ;6DSO=1; 7DSO=1]} 017: END &#039;end of program file ```` Regards, James

Hi James,

Step back a a bit and think about this. You need to start and stop a heater. What are all the exact steps that you would do if you were to do this by hand?
e.g:

  1. To start the heater I push the button marked "ignition" and hold it down for n seconds.
  2. To stop the heater I push the button marked "Shut down" For y seconds.

You must include every single set in the chain. Once you know this you can then program your logger to follow this procedure exactly.

If you leave out a single step then the system won't work.

Cheers,
Roger

Hi James, Step back a a bit and think about this. You need to start and stop a heater. What are all the exact steps that you would do if you were to do this by hand? e.g: 1. To start the heater I push the button marked &quot;ignition&quot; and hold it down for n seconds. 2. To stop the heater I push the button marked &quot;Shut down&quot; For y seconds. You must include every single set in the chain. Once you know this you can then program your logger to follow this procedure exactly. If you leave out a single step then the system won&#039;t work. Cheers, Roger

Hi Roger,

I have thought about what I want the data logger to do. I have decided to use two system timers for the program and I am able to get the heater to turn on 15 seconds and then to turn off.

The problem that I have is that it repeats this cycle every minute and this means that I am unable to keep the heater off for 15 minutes after it has been on for 15 seconds.

I was wondering if there is a way to make the 2ST timer start after the 1ST timer finishes and also not allow the 1ST timer to start again until the 2ST timer completes 15 minutes?

The code that I am using is:

'JOB=JOB1
'COMPILED=2011/02/23 11:24:22
'TYPE=dt80
DT=\d
001: BEGIN"JOB1"
002: CATTN
003: 'Spans and polynomial declarations
004: 'Thermistor declarations
005: 'Switches declarations
006: 'Parameter declarations
007: 'Global declarations
008: RS1S
009: 'schedule definition
010: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA
011: 1TK
012: ALARM1(1ST>1.0000){[1RELAY=1]}
013: ALARM2(1ST>2.0000){[1RELAY=0]}
014: ALARM3(1ST>17.0000){[1RELAY=1]}
015: ALARM4(1ST>18.0000){[1RELAY=0]}
016: ALARM5(2ST>15.0000){[1ST=0]}
017: ALARM6(2ST>15.0000){[2ST=0]}
018: END
'end of program file

Your help is very much appreciated,

Regards,
James

Hi Roger, I have thought about what I want the data logger to do. I have decided to use two system timers for the program and I am able to get the heater to turn on 15 seconds and then to turn off. The problem that I have is that it repeats this cycle every minute and this means that I am unable to keep the heater off for 15 minutes after it has been on for 15 seconds. I was wondering if there is a way to make the 2ST timer start after the 1ST timer finishes and also not allow the 1ST timer to start again until the 2ST timer completes 15 minutes? The code that I am using is: ```` &#039;JOB=JOB1 &#039;COMPILED=2011/02/23 11:24:22 &#039;TYPE=dt80 DT=\d 001: BEGIN&quot;JOB1&quot; 002: CATTN 003: &#039;Spans and polynomial declarations 004: &#039;Thermistor declarations 005: &#039;Switches declarations 006: &#039;Parameter declarations 007: &#039;Global declarations 008: RS1S 009: &#039;schedule definition 010: RA(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA 011: 1TK 012: ALARM1(1ST&gt;1.0000){[1RELAY=1]} 013: ALARM2(1ST&gt;2.0000){[1RELAY=0]} 014: ALARM3(1ST&gt;17.0000){[1RELAY=1]} 015: ALARM4(1ST&gt;18.0000){[1RELAY=0]} 016: ALARM5(2ST&gt;15.0000){[1ST=0]} 017: ALARM6(2ST&gt;15.0000){[2ST=0]} 018: END &#039;end of program file ```` Your help is very much appreciated, Regards, James

Hi James,

I would take a slightly different approach.

DT80 is in itself just a very sophisticated time and it is the schedule that keeps the time. As the schedule runs every 1 second if you count the seconds then you can trigger the alarms on the count

In DT80 code you can do something like:

Begin
1CV=0
RA1S
1TK
1CV=1CV+1
Alarm(1CV><1,2)1Relay 'Turn relay on for 1 second start heating
Alarm(1CV><15,16)1Relay 'Turn relay on for 1 second Stop Heating
Alarm(1CV>900){1CV=0) 'reset counter to zero and start again.
End

Cheers,
Roger

Hi James, I would take a slightly different approach. DT80 is in itself just a very sophisticated time and it is the schedule that keeps the time. As the schedule runs every 1 second if you count the seconds then you can trigger the alarms on the count In DT80 code you can do something like: ```` Begin 1CV=0 RA1S 1TK 1CV=1CV+1 Alarm(1CV&gt;&lt;1,2)1Relay &#039;Turn relay on for 1 second start heating Alarm(1CV&gt;&lt;15,16)1Relay &#039;Turn relay on for 1 second Stop Heating Alarm(1CV&gt;900){1CV=0) &#039;reset counter to zero and start again. End ```` Cheers, Roger

Hi Roger,

I was able to get the first RELAY signal to work. However I was not able to get the second RELAY to work and I also was not able to make the program to repeat itself. I was wondering if you could explain to me why this occurred?

Also would I need any of the three alarms to repeat? The code I have used is below:

'JOB=JOB1
'COMPILED=2011/02/24 09:48:39
'TYPE=dt80
DT=\d
001: BEGIN"JOB1"
002: CATTN
003: 'Spans and polynomial declarations
004: 'Thermistor declarations
005: 'Switches declarations
006: 'Parameter declarations
007: 'Global declarations
008: RS1S
009: 'schedule definition
010: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA
011: 2CV=0
012: 1TK
013: 2CV=2CV+1
014: ALARM1(2CV><1.0000,2.0000)1RELAY
015: ALARM2(2CV><2.0000,16.0000){[1RELAY=0]}
016: ALARM3(2CV><16.0000,17.0000)1RELAY
017: ALARM4(2CV>17.0000){[1RELAY=0]}
018: ALARM5(2CV>120.0000){[2CV=0]}
019: END
'end of program file

Regards,
James

Hi Roger, I was able to get the first RELAY signal to work. However I was not able to get the second RELAY to work and I also was not able to make the program to repeat itself. I was wondering if you could explain to me why this occurred? Also would I need any of the three alarms to repeat? The code I have used is below: ```` &#039;JOB=JOB1 &#039;COMPILED=2011/02/24 09:48:39 &#039;TYPE=dt80 DT=\d 001: BEGIN&quot;JOB1&quot; 002: CATTN 003: &#039;Spans and polynomial declarations 004: &#039;Thermistor declarations 005: &#039;Switches declarations 006: &#039;Parameter declarations 007: &#039;Global declarations 008: RS1S 009: &#039;schedule definition 010: RA(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA 011: 2CV=0 012: 1TK 013: 2CV=2CV+1 014: ALARM1(2CV&gt;&lt;1.0000,2.0000)1RELAY 015: ALARM2(2CV&gt;&lt;2.0000,16.0000){[1RELAY=0]} 016: ALARM3(2CV&gt;&lt;16.0000,17.0000)1RELAY 017: ALARM4(2CV&gt;17.0000){[1RELAY=0]} 018: ALARM5(2CV&gt;120.0000){[2CV=0]} 019: END &#039;end of program file ```` Regards, James

Hi Jim,

There is a hole in the logic, try this

Begin
1..3CV=0

RA1S
1cv=1cv+1
Alarm(1CV><1,2)2CV"Alarm 1^M^J" 'Turn relay on for 1 second start heating
Alarm(1CV><15,16)3CV"Alarm 2^M^J" 'Turn relay on for 1 second Stop Heating
Alarm(1CV>900)"Alarm 3^M^J"{1CV=0} 'reset counter to zero and start again.
1relay=2cv+3cv
End

Roger

Hi Jim, There is a hole in the logic, try this ```` Begin 1..3CV=0 RA1S 1cv=1cv+1 Alarm(1CV&gt;&lt;1,2)2CV&quot;Alarm 1^M^J&quot; &#039;Turn relay on for 1 second start heating Alarm(1CV&gt;&lt;15,16)3CV&quot;Alarm 2^M^J&quot; &#039;Turn relay on for 1 second Stop Heating Alarm(1CV&gt;900)&quot;Alarm 3^M^J&quot;{1CV=0} &#039;reset counter to zero and start again. 1relay=2cv+3cv End ```` Roger

Hi Roger,

I was unable to get action 2^M^J or 3^M^J to run. I was wondering if you could explain to me how this function works.

Regards,
James

Hi Roger, I was unable to get action 2^M^J or 3^M^J to run. I was wondering if you could explain to me how this function works. Regards, James

Hi James,

The ^M^J is a simple carriage return Line feed to make the output look more readable. Just drop it off. The rest is just plain Boolean logic.

Cheers,
Roger

Hi James, The ^M^J is a simple carriage return Line feed to make the output look more readable. Just drop it off. The rest is just plain Boolean logic. Cheers, Roger

Hi Roger,

Thanks for the continued help I was able to get the program to work after making some minor adjustments to the code.

The problem I have now, is that my first alarm to turn on the heater is not working while the alarm to turn it off instead turns on the heater as the first alarm does not work. The heater would then only turn off when it reaches the second alarm again.

I have measured this signal using a multimeter and found that the first relay signal is not as loud or long enough compared to the relay signal that is used to turn the heater off.

I was wondering if there is a way fix this problem? The code that I am using is below.

'JOB=JOB1
'COMPILED=2011/03/01 15:38:42
'TYPE=dt80
DT=\d
001: BEGIN"JOB1"
002: CATTN
003: 'Spans and polynomial declarations
004: 'Thermistor declarations
005: 'Switches declarations
006: 'Parameter declarations
007: 'Global declarations
008: RS1S
009: 'schedule definition
010: 
011: 1CV=0
012: 'schedule definition
013: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA
014: 4TK
015: 1CV=1CV+1
016: ALARM1(1CV><1.0000,2.0000)1RELAY
017: ALARM2(1CV><16.0000,17.0000)1RELAY
018: ALARM3(1CV>900.0000){[1CV=0]}
019: END
'end of program file

Regards,
James

Hi Roger, Thanks for the continued help I was able to get the program to work after making some minor adjustments to the code. The problem I have now, is that my first alarm to turn on the heater is not working while the alarm to turn it off instead turns on the heater as the first alarm does not work. The heater would then only turn off when it reaches the second alarm again. I have measured this signal using a multimeter and found that the first relay signal is not as loud or long enough compared to the relay signal that is used to turn the heater off. I was wondering if there is a way fix this problem? The code that I am using is below. ```` &#039;JOB=JOB1 &#039;COMPILED=2011/03/01 15:38:42 &#039;TYPE=dt80 DT=\d 001: BEGIN&quot;JOB1&quot; 002: CATTN 003: &#039;Spans and polynomial declarations 004: &#039;Thermistor declarations 005: &#039;Switches declarations 006: &#039;Parameter declarations 007: &#039;Global declarations 008: RS1S 009: &#039;schedule definition 010: 011: 1CV=0 012: &#039;schedule definition 013: RA(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)1S LOGONA GA 014: 4TK 015: 1CV=1CV+1 016: ALARM1(1CV&gt;&lt;1.0000,2.0000)1RELAY 017: ALARM2(1CV&gt;&lt;16.0000,17.0000)1RELAY 018: ALARM3(1CV&gt;900.0000){[1CV=0]} 019: END &#039;end of program file ```` Regards, James

Good afternoon James,

That is not the same as the code I posted. You have two conditions to turn on the same relay and they are mutually exclusive. The first alarm it turning on and the second alarm which runs a few micro seconds latter turns it off again.

Look again at my last post:

Alarm(1CV><1,2)2CV"Alarm 1^M^J" 'Turn relay on for 1 second start heating
Alarm(1CV><15,16)3CV"Alarm 2^M^J" 'Turn relay on for 1 second Stop Heating
Alarm(1CV>900)"Alarm 3^M^J"{1CV=0} 'reset counter to zero and start again.
1relay=2cv+3cv

NOTE: The alarms They are now setting variables that I latter add together and use the result to turn on the relay.

Have you done state machines yet in your studies? If so do a time state diagram and you will see the solution.

Cheers,
Roger

Good afternoon James, That is not the same as the code I posted. You have two conditions to turn on the same relay and they are mutually exclusive. The first alarm it turning on and the second alarm which runs a few micro seconds latter turns it off again. Look again at my last post: ```` Alarm(1CV&gt;&lt;1,2)2CV&quot;Alarm 1^M^J&quot; &#039;Turn relay on for 1 second start heating Alarm(1CV&gt;&lt;15,16)3CV&quot;Alarm 2^M^J&quot; &#039;Turn relay on for 1 second Stop Heating Alarm(1CV&gt;900)&quot;Alarm 3^M^J&quot;{1CV=0} &#039;reset counter to zero and start again. 1relay=2cv+3cv ```` NOTE: The alarms They are now setting variables that I latter add together and use the result to turn on the relay. Have you done state machines yet in your studies? If so do a time state diagram and you will see the solution. Cheers, Roger
118
17
2
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