TONR start stop problem

elma7y

Member
Join Date
Jul 2019
Location
alex
Posts
3
hi guys , i need some help as im trying to do a project of a tank has 3 level sensors s1(ground sensor),s2(middle sensor),s3(top sensor) and 3 valves va(first liquid) , vb(second liquid) , vd(drain valve) and a mixer and also a heater, start and stop PBs..
so i need to make it work like this :
first s1 wont read so va will work till the liquid reach s2...
then va will stop working and vb will start working till it reaches s3...
then the mixer and heater will work together ,the mixer for 10 sec and the heater for 15 sec..
then vd will start to work till the tank is embty and the process will continue over and over ..... the problem is that i must have the ability to stop the process in any step and start it in the same step i done this with va,vb but i dont know how to do a mark for TONR so i can start it and stop it.with stop push button .... im using tia v13
here is the code
https://ibb.co/wNvdn3P
https://ibb.co/M1zy4Nx
https://ibb.co/qCzHJgy
https://ibb.co/30JhpMc
https://ibb.co/rQM3Fz6

thx...
 
Last edited:
Create a flag that indicates the system is running.
Set it on with start, reset it with stop.
Use the running flag with the mixer/heater output to drive the TONR for each to keep track of how far they have run.
Drive the R input of the TONRs to reset the timer when both are complete.
 
Geof is right, But if you need to make it more flexible i.e. if at some time you need to add another stage/step I suggest you use a sequence word.
for example
On initial start set a flag (run flag) and if seq. = 0 load 10 (or any value) into the seq. word, compare the seq. for 10 and run seq. number 1, when true set the seq. to 20, compare the seq. = 20, run the seq. 2 and so on. If in the future you need to add a sequence for example between 1 & 2 set the seq. to 5at the end of seq. number 1.
Use the run flag in the logic for the outputs to enable the valves/pumps and if required to hold retentive timers or counters if used.
By using a sequence word in steps of 5 or 10 you can then add extra sequences. It is also useful if the system contains an HMI as many can display text based on a value in a word i.e. 0 = "IDLE", 10 = "Adding Ingredient 1", 20 = "Adding Ingredient 2" and so on.
See attached pdf for an Idea
 
Create a flag that indicates the system is running.
Set it on with start, reset it with stop.
Use the running flag with the mixer/heater output to drive the TONR for each to keep track of how far they have run.
Drive the R input of the TONRs to reset the timer when both are complete.
thanks geoff i did it and it worked...
im still a beginner in plc programming so what is the level of this project?
 
Geof is right, But if you need to make it more flexible i.e. if at some time you need to add another stage/step I suggest you use a sequence word.
for example
On initial start set a flag (run flag) and if seq. = 0 load 10 (or any value) into the seq. word, compare the seq. for 10 and run seq. number 1, when true set the seq. to 20, compare the seq. = 20, run the seq. 2 and so on. If in the future you need to add a sequence for example between 1 & 2 set the seq. to 5at the end of seq. number 1.
Use the run flag in the logic for the outputs to enable the valves/pumps and if required to hold retentive timers or counters if used.
By using a sequence word in steps of 5 or 10 you can then add extra sequences. It is also useful if the system contains an HMI as many can display text based on a value in a word i.e. 0 = "IDLE", 10 = "Adding Ingredient 1", 20 = "Adding Ingredient 2" and so on.
See attached pdf for an Idea
thanks parky , about adding another stage because im still a beginner so i dont understand very well ..
does it sufficient to add another set reset marker as i did to vb and vd ..
 

Similar Topics

Hello I'm trying to do some structured text for a timer that will illuminate a lamp for 2 seconds, then extinguish for 2 seconds. At the moment...
Replies
18
Views
4,379
Is this a bug in RSLogix 5000, or is there something wrong. I cannot get the TONR command to work in a sequential function chart; I can get it to...
Replies
17
Views
9,672
Hi. could someone give me an example about TONR instruction in structured text? I need to build a sort of "clock" wich set a bit at each...
Replies
3
Views
8,581
Hi All. I'm using TONR timers in a CFC to time certain steps in a sequence. I want to show the time remaining on the OS (PV - ET), but can't...
Replies
0
Views
1,658
How do you make a user defined tag which has multiple attributes like the TONR timer? Can you make your own tag which has the same functionality...
Replies
7
Views
3,943
Back
Top Bottom