Legacy Hardware and Apps
Using a flow meter to manipulate monitoring

Hello,

I have a flow meter that gives a pulsed output every 10 liters of water passed. It is set up as a counter. I would like to not monitor the flow anymore but rather the temperatures of various parts of the system until the pump comes on (i.e. when the flow meter is not working).

Then when the pump stops working I would like measurements to start recording again. There is no set time period between measurements. Can you advice me of how to proceed please? If the pulsed meter is no good I have an analog flow meter. Could this be used to record the variables when the pump is not working somehow?

Thanks,
Christian

Hello, I have a flow meter that gives a pulsed output every 10 liters of water passed. It is set up as a counter. I would like to not monitor the flow anymore but rather the temperatures of various parts of the system until the pump comes on (i.e. when the flow meter is not working). Then when the pump stops working I would like measurements to start recording again. There is no set time period between measurements. Can you advice me of how to proceed please? If the pulsed meter is no good I have an analog flow meter. Could this be used to record the variables when the pump is not working somehow? Thanks, Christian

Good morning Christian,

You can do this with alarm statements:

  1. Have a schedule running that reads the counter.
  2. Assign the value of the counter to a channel variable.
  3. Test the variable in an alarm. When the flow rate is zero start the schedule running that records the temperatures.
  4. Have another alarm that stops the temperature measuring schedule when the flow starts again.

Cheers,
Roger

Good morning Christian, You can do this with alarm statements: 1. Have a schedule running that reads the counter. 2. Assign the value of the counter to a channel variable. 3. Test the variable in an alarm. When the flow rate is zero start the schedule running that records the temperatures. 4. Have another alarm that stops the temperature measuring schedule when the flow starts again. Cheers, Roger

Thanks for the fast response Roger.

I will try the above and get back to you.

In the meantime I have another dilemma. I need to use the logger to switch open a valve and close the valve at a certain time until a specific volume has flowed. I am using an analog flow meter, a 2 port valve and a solid state relay (20A).

I want the logger to switch the relay on at 9 am which in turn opens the valve for say 15 liters, then close then valve.

The analog flow mater has a rating of 4-20mA with the valve being powered by mains supply coming off the relay to the logger. So logger - relay - valve.

Thanks again
Christian

Thanks for the fast response Roger. I will try the above and get back to you. In the meantime I have another dilemma. I need to use the logger to switch open a valve and close the valve at a certain time until a specific volume has flowed. I am using an analog flow meter, a 2 port valve and a solid state relay (20A). I want the logger to switch the relay on at 9 am which in turn opens the valve for say 15 liters, then close then valve. The analog flow mater has a rating of 4-20mA with the valve being powered by mains supply coming off the relay to the logger. So logger - relay - valve. Thanks again Christian

Good morning Christian,

Once again a great one for the alarms.

We have several internal System Timers (ST) 3ST have the hour of the day. You can use this to start the process at 9 am.

ALARM1(3ST>9)"Start"{[1DSO=1 1CV=0]}

The 4-20 mA will probably be flow rate (Eg l/Sec) so you will need to accumulate the flow rate to calculate volume. (the +=1CV will sum the flow rates. If the schedule raed 1 per second then

1#I("Volume",+=1CV,S1)

Will give you flow in l/Sec

Then have another alarm that turns the relay off when the volume reaches the number you want.

Cheers,
Roger

Good morning Christian, Once again a great one for the alarms. We have several internal System Timers (ST) 3ST have the hour of the day. You can use this to start the process at 9 am. ```` ALARM1(3ST>9)"Start"{[1DSO=1 1CV=0]} ```` The 4-20 mA will probably be flow rate (Eg l/Sec) so you will need to accumulate the flow rate to calculate volume. (the +=1CV will sum the flow rates. If the schedule raed 1 per second then ```` 1#I("Volume",+=1CV,S1) ```` Will give you flow in l/Sec Then have another alarm that turns the relay off when the volume reaches the number you want. Cheers, Roger

Evening Roger.

I have been out of the office so sorry for the late reply.

I am not entirely following the code you wrote. Please could you explain this step by step as I am very new to Delogger. I have a code that can turn on and off the logger at a certain time. the code looks like this (I tried this once but I don't know how foolproof it is.

Begin"relay"
RA1H
ALARM1(3ST><18,18.50)1DSO
End

So if I was to open the valve at 9 and close after say 5 liters with the same flow meter (4-20mA) what would the code look like please?

Could you explain the main points in each please?

Thanks,
Christian

Evening Roger. I have been out of the office so sorry for the late reply. I am not entirely following the code you wrote. Please could you explain this step by step as I am very new to Delogger. I have a code that can turn on and off the logger at a certain time. the code looks like this (I tried this once but I don&#039;t know how foolproof it is. ```` Begin&quot;relay&quot; RA1H ALARM1(3ST&gt;&lt;18,18.50)1DSO End ```` So if I was to open the valve at 9 and close after say 5 liters with the same flow meter (4-20mA) what would the code look like please? Could you explain the main points in each please? Thanks, Christian

Good morning Christian,

You have your alarm to start the process so now up need another alarm to shut it down.

ALARM1(3ST>9)"Start"{[1DSO=1 1CV=0]}
1#I("Volume",+=1CV,S1)
ALARM2(1CV>5)"Stop"{[1DSO=0]}

Cheers
Roger

Good morning Christian, You have your alarm to start the process so now up need another alarm to shut it down. ```` ALARM1(3ST&gt;9)&quot;Start&quot;{[1DSO=1 1CV=0]} 1#I(&quot;Volume&quot;,+=1CV,S1) ALARM2(1CV&gt;5)&quot;Stop&quot;{[1DSO=0]} ```` Cheers Roger

Hi Roger

I have tried the code but instead of hours I set it up as minutes (for testing purposes). Span "S1" is voltage that the logger reads, being I think from 400mV to 2000mV (0.4V to 2V). And is located in the analog channel 3.

Typing the code:

S1 = 5, 200, 0.4, 2 "Liters/min"
BEGIN"relay"
RA1M
ALARM1(2ST>20)"Start"{[1DSO=1 1CV=0]}
RA1S
1#V("Volume",+=1CV,S1)
ALARM2(1CV>5)"Stop"{[1DSO=0]}
END

Gave the following error 'channel option/list error' on the line

3#V("Volume",+=1CV,S1)

Notice that the flow is in liters per minute, I will need to convert this to Liters/sec if I want to scan every second when the valve is open right?

Thanks,
Christian

Hi Roger I have tried the code but instead of hours I set it up as minutes (for testing purposes). Span &quot;S1&quot; is voltage that the logger reads, being I think from 400mV to 2000mV (0.4V to 2V). And is located in the analog channel 3. Typing the code: ```` S1 = 5, 200, 0.4, 2 &quot;Liters/min&quot; BEGIN&quot;relay&quot; RA1M ALARM1(2ST&gt;20)&quot;Start&quot;{[1DSO=1 1CV=0]} RA1S 1#V(&quot;Volume&quot;,+=1CV,S1) ALARM2(1CV&gt;5)&quot;Stop&quot;{[1DSO=0]} END ```` Gave the following error &#039;channel option/list error&#039; on the line ```` 3#V(&quot;Volume&quot;,+=1CV,S1) ```` Notice that the flow is in liters per minute, I will need to convert this to Liters/sec if I want to scan every second when the valve is open right? Thanks, Christian

Good morning Christian,

The line
1#V("Volume",+=1CV,S1) is not correct.
How exactly do you have the resistor connected to the DT800? (That is what terminals do you have the resistor connected to?)

The calibration you use will depend on the calibration of the flow sensor. If it outputs in L/min then you will that's what it is. The dataTaker will return an instantaneous reading of the flow rate.

Cheers,
Roger

Good morning Christian, The line ```` 1#V(&quot;Volume&quot;,+=1CV,S1) ```` is not correct. How exactly do you have the resistor connected to the DT800? (That is what terminals do you have the resistor connected to?) The calibration you use will depend on the calibration of the flow sensor. If it outputs in L/min then you will that&#039;s what it is. The dataTaker will return an instantaneous reading of the flow rate. Cheers, Roger

Hi Roger

I have the flow meter in the positive and negative terminals of Analog 4. So having amended the code to read....

S1=5,200,400,2000
P31=3
RS1S

RA1M LOGONA GA
ALARM1(2ST>22.)"start"{[1DSO=0, 5CV=0]}
4V(S1,"volume",+=5CV)
ALARM(5CV>5.)"stop"{[1DSO=0]}

END

Updating the logger to version 4.10 and still on returning the line

4V(S1,"volume",+=5CV)

Still yields the warning:

warning: abnormal firmware reset - type UERRLOG for details.

The office computer with Delogger on updated the software as it is connected to the internet so I have migrated the dataTaker there. Admittedly it doesn't have all the connections but it is easier until we identify the correct solution.

S1 may not be fully correct but I shouldn't think this would affect the result in giving the warning.

The valve now opens however but no trigger is available to shut the logger.

Hope this helps.
Christian

Hi Roger I have the flow meter in the positive and negative terminals of Analog 4. So having amended the code to read.... ```` S1=5,200,400,2000 P31=3 RS1S RA1M LOGONA GA ALARM1(2ST&gt;22.)&quot;start&quot;{[1DSO=0, 5CV=0]} 4V(S1,&quot;volume&quot;,+=5CV) ALARM(5CV&gt;5.)&quot;stop&quot;{[1DSO=0]} END ```` Updating the logger to version 4.10 and still on returning the line ```` 4V(S1,&quot;volume&quot;,+=5CV) ```` Still yields the warning: ```` warning: abnormal firmware reset - type UERRLOG for details. ```` The office computer with Delogger on updated the software as it is connected to the internet so I have migrated the dataTaker there. Admittedly it doesn&#039;t have all the connections but it is easier until we identify the correct solution. S1 may not be fully correct but I shouldn&#039;t think this would affect the result in giving the warning. The valve now opens however but no trigger is available to shut the logger. Hope this helps. Christian

Good morning Christian,

The crash is caused by a syntax error in your code.

The line

ALARM1(2ST>22.)"start"{[1DSO=0, 5CV=0]}

has a , in the alarm action list. this is causing the crash. Try using

ALARM1(2ST>22.)"start"{[1DSO=0 5CV=0]}

Cheers,
Roger

Good morning Christian, The crash is caused by a syntax error in your code. The line ```` ALARM1(2ST&gt;22.)&quot;start&quot;{[1DSO=0, 5CV=0]} ```` has a , in the alarm action list. this is causing the crash. Try using ```` ALARM1(2ST&gt;22.)&quot;start&quot;{[1DSO=0 5CV=0]} ```` Cheers, Roger

Hi Roger

Thanks for the help above. However I am still a little way off regards to the problem even though your suggestion was correct.

See code below with problem description.

I need to open the valve several times during the day based on time and close it based on volume but when I do so schedule "C" shuts the valve off or the schedule "B" opens and closes but "C" does nothing.

I entered the problem into Prog1.dl8 but found it does not work based on time "T" and the system timers. The following code also does not work. Can you help please

BEGIN
RA1M LOGONA GA 2*TK("") 2+TK("") 2-TK("")
S1=0,30,393,2000

RB1H LOGONB GB
ALARM1(2ST><21,23)"start"{[1DSO=0 5CV=0]}
RB1S
4V(S1,"volume",+=5CV)
4CV=5CV/60
ALARM2(4CV>2.)"stop"{[1DSO=1 RB1H]}

RC1H LOGONC GC
ALARM3(2ST><24,28)"start"{[1DSO=0 2CV=0]}
RC1S
4V(S1,"volume",+=2CV)
1CV=2CV/60
ALARM4(1CV>2.)"stop"{[1DSO=1 RC1H]}

END

There are 6 of these schedules in total plus other data I have to record (mostly thermocouples and pulsed output flow meters).

Schedules "B" and "C" could also be at different hours.

Many thanks
Christian

Hi Roger Thanks for the help above. However I am still a little way off regards to the problem even though your suggestion was correct. See code below with problem description. I need to open the valve several times during the day based on time and close it based on volume but when I do so schedule &quot;C&quot; shuts the valve off or the schedule &quot;B&quot; opens and closes but &quot;C&quot; does nothing. I entered the problem into Prog1.dl8 but found it does not work based on time &quot;T&quot; and the system timers. The following code also does not work. Can you help please ```` BEGIN RA1M LOGONA GA 2*TK(&quot;&quot;) 2+TK(&quot;&quot;) 2-TK(&quot;&quot;) S1=0,30,393,2000 RB1H LOGONB GB ALARM1(2ST&gt;&lt;21,23)&quot;start&quot;{[1DSO=0 5CV=0]} RB1S 4V(S1,&quot;volume&quot;,+=5CV) 4CV=5CV/60 ALARM2(4CV&gt;2.)&quot;stop&quot;{[1DSO=1 RB1H]} RC1H LOGONC GC ALARM3(2ST&gt;&lt;24,28)&quot;start&quot;{[1DSO=0 2CV=0]} RC1S 4V(S1,&quot;volume&quot;,+=2CV) 1CV=2CV/60 ALARM4(1CV&gt;2.)&quot;stop&quot;{[1DSO=1 RC1H]} END ```` There are 6 of these schedules in total plus other data I have to record (mostly thermocouples and pulsed output flow meters). Schedules &quot;B&quot; and &quot;C&quot; could also be at different hours. Many thanks Christian

Good morning Christian,

There is always more than one way to do a task.

The first thing I do when I have a complex job is to draw up a table with start and stop conditions and which valve is in what state with those conditions. Then you can start on the code. I ran this and it works

BEGIN
S1=0,30,393,2000

RA1M LOGONA GA
2*TK("")
2+TK("")
2-TK("")

RB1H LOGONB GB
ALARM1(2ST><21,23)"Start"{[1DSO=0 5CV=0 RB1S]}
4V(S1,"Volume",+=5CV)
4CV=5CV/60
ALARM2(4CV>2.)"Stop"{[1DSO=1 RB1H]}

RC1H LOGONC GC
ALARM3(2ST><24,28)"Start"{[1DSO=0 5CV=0 RC1S]}
4V(S1,"volume",+=2CV)
1CV=2CV/60
ALARM4(1CV>2.)"Stop"{[1DSO=1 RC1H]}

END

Cheers,
Roger

Good morning Christian, There is always more than one way to do a task. The first thing I do when I have a complex job is to draw up a table with start and stop conditions and which valve is in what state with those conditions. Then you can start on the code. I ran this and it works ```` BEGIN S1=0,30,393,2000 RA1M LOGONA GA 2*TK(&quot;&quot;) 2+TK(&quot;&quot;) 2-TK(&quot;&quot;) RB1H LOGONB GB ALARM1(2ST&gt;&lt;21,23)&quot;Start&quot;{[1DSO=0 5CV=0 RB1S]} 4V(S1,&quot;Volume&quot;,+=5CV) 4CV=5CV/60 ALARM2(4CV&gt;2.)&quot;Stop&quot;{[1DSO=1 RB1H]} RC1H LOGONC GC ALARM3(2ST&gt;&lt;24,28)&quot;Start&quot;{[1DSO=0 5CV=0 RC1S]} 4V(S1,&quot;volume&quot;,+=2CV) 1CV=2CV/60 ALARM4(1CV&gt;2.)&quot;Stop&quot;{[1DSO=1 RC1H]} END ```` Cheers, Roger

Hi Roger

I ran the code and it worked but I have modified it to try and take account of times of day. The following code works but only opens the valve within the same hour.

I have specified each schedule with "3ST" and "2ST" but I still get the valve opening in the came hour regardless of what "3ST" is set to.

BEGIN
S1=0,30,393,2000

RA1M LOGONA GA
2*TK("")
2+TK("")
2-TK("")

RB1M LOGONB GB
AlARM1(3ST><18,19)
ALARM2(2ST><21,22)"Start"{[1DSO=0 5CV=0 RB1S]}
4V(S1,"Volume",+=5CV)
4CV=5CV/60
ALARM3(4CV>2.)"Stop"{[1DSO=1 RB1H]}

RC1M LOGONC GC
ALARM4(3ST><20,21)
ALARM5(2ST><5,6)"Start"{[1DSO=0 2CV=0 RC1S]}
4V(S1,"volume",+=2CV)
1CV=2CV/60
ALARM6(1CV>2.)"Stop"{[1DSO=1 RC1H]}

END

Is it because the schedule is set to "RB1M" instead of "RB1H" for example?
It is late here and I can't stay longer to test it.

Thanks again
Christian

Hi Roger I ran the code and it worked but I have modified it to try and take account of times of day. The following code works but only opens the valve within the same hour. I have specified each schedule with &quot;3ST&quot; and &quot;2ST&quot; but I still get the valve opening in the came hour regardless of what &quot;3ST&quot; is set to. ```` BEGIN S1=0,30,393,2000 RA1M LOGONA GA 2*TK(&quot;&quot;) 2+TK(&quot;&quot;) 2-TK(&quot;&quot;) RB1M LOGONB GB AlARM1(3ST&gt;&lt;18,19) ALARM2(2ST&gt;&lt;21,22)&quot;Start&quot;{[1DSO=0 5CV=0 RB1S]} 4V(S1,&quot;Volume&quot;,+=5CV) 4CV=5CV/60 ALARM3(4CV&gt;2.)&quot;Stop&quot;{[1DSO=1 RB1H]} RC1M LOGONC GC ALARM4(3ST&gt;&lt;20,21) ALARM5(2ST&gt;&lt;5,6)&quot;Start&quot;{[1DSO=0 2CV=0 RC1S]} 4V(S1,&quot;volume&quot;,+=2CV) 1CV=2CV/60 ALARM6(1CV&gt;2.)&quot;Stop&quot;{[1DSO=1 RC1H]} END ```` Is it because the schedule is set to &quot;RB1M&quot; instead of &quot;RB1H&quot; for example? It is late here and I can&#039;t stay longer to test it. Thanks again Christian

Good morning Christen,

It is because the schedule is being called every 1 hour. Changing to every one minute should help.

Cheers,
Roger

Good morning Christen, It is because the schedule is being called every 1 hour. Changing to every one minute should help. Cheers, Roger
48
13
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