This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.  
Your Personal PLC Tutor Site - Interactive Q & A

"Setting up timers to interlocks to monitor online/offline time"

New Here? Please read this important info!!!
Email this topic to a friend
Printer-friendly version of this topic
Locked thread - Read only 
Previous Topic | Next Topic 
Home Conferences Questions/Answers--Early 2001 (Public)
Original message

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Jan-28-01, 07:46 PM (EST)
"Setting up timers to interlocks to monitor online/offline time"

The unit is abating styrene, from the plant. The plant is (an aluminum foundry). The reason for the duct burners is to maintain 350F through the baghouse and into the RL (the baghouse seperates the sand from the voc).
Within the plant are 4 interlocks, 2 active and 2 passive. The 2 passive interlocks indicate if there is an alarm condition in the unit, or if the unit is not ready to go online (shutdown). I am interested in the unit when it is online/offline or shutdown (due to an alarm). The 2 active interlocks control the main isolation damper which determines whether the unit is online of offline.
What I would like to do is monitor the online and offline time for the unit. I would like to be able to collect both weekly and monthly hours for my reports. I believe that the interlocks are the key. Within the contract that my company has with the foundry are penalties for when unit is down and the plant is taken out of production. These are based upon percentages (less than 1 1/2% total down time for the month is the ideal goal). Currently it is very difficult to accurate gauge the online time.
I have some familiarity with RSLogix 5, and have tried to set up a "ons" command based upon one of the interlock bits going high. But currently what I am seeing is that the bit that I have assigned for these conditions (n20;8/8 and n20;8/9) do not go high for just one scan. What is happening is that they are cycling high and low. I've thought about the "osr" or "osf" commands, but I don't fully understand their use.Or if they would be the right command(s) for this situation.
The interlock bit that I am looking at are when the unit is operating online (N26:0/8 goes high causing an ote O:011/5) and when it is offline. I believe that I can use the same addresses for both (one when the condition is true and another for when the conditions is false). I initially had it set up that when N26:0/8 went high I would ONS N20:8/8 and have an OTE N20:8/8 , but what I was seeing was N20:8/8 cycling high and low. It didn't just go high one scan and then go low. The shutdown condition is generated when both the RTO Standby Mode Interlock (O:011/4) and RTO Operating Online Mode Interlock (O:011/5) are both false (xio's for both).
I have T46 (77 and 78) available for timing. What would be a good way to go about setting this up?


Thanks again,
Russ Friend

  Top

 Table of contents

RE: Setting up timers to interlocks..., Terry Woods, Jan-28-01, (1)
RE: Setting up timers to interlocks..., Russ Friend, Jan-28-01, (2)
RE: Setting up timers to interlocks..., Terry Woods, Jan-29-01, (3)
RE: Setting up timers to interlocks..., Russ Friend, Jan-29-01, (4)
RE: Setting up timers to interlocks..., Terry Woods, Jan-30-01, (5)
RE: Setting up timers to interlocks..., Russ Friend, Jan-31-01, (6)
RE: Setting up timers to interlocks..., Terry Woods, Feb-01-01, (8)
RE: Setting up timers to interlocks..., Russ Friend, Feb-04-01, (9)
RE: Setting up timers to interlocks..., Terry Woods, Feb-04-01, (10)
RE: Setting up timers to interlocks..., Russ Friend, Feb-05-01, (11)
RE: Setting up timers to interlocks..., Terry Woods, Feb-06-01, (12)
RE: Setting up timers to interlocks..., Russ Friend, Jan-31-01, (7)
RE: Setting up timers to interlocks..., Terry Woods, Feb-06-01, (13)

Lobby | Topics | Previous Topic | Next Topic
Messages in this topic

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Jan-28-01, 10:56 PM (EST)
1. "RE: Setting up timers to interlocks to monitor online/offline time"
First, I'd like to say Welcome!

Then I need to tell you that there are many types of PLC's that use their own jargon. Some of the people here use the type you have... some don't and may not be familiar with the unique identifiers you are using.

You can expect more help from more people (and some very good ones who don't use your type of PLC) if you describe you problem in more general terms. For example, I don't know what ONS and OTE are. Nor do I understand the Allen Bradley method of identifying bits. It's been too many years since I migrated away from AB.

You can expect many more participants if this is discussed at a more conceptual level. Thanks for listening to my rant. Now...

So, it sounds like you have 4 interlocks. I don't think the type of interlock matters for this particular problem.

It also sounds like you need ALL 4 of the Interlocks ON for the system to be OnLine. And the system is OffLine if ANY interlock is OFF.

Is this correct so far?

Your description sounded a little contradictory.

If my description is correct, then you simply need a signal from each interlock to 4 separate inputs. Then you create a line of code that AND's all 4 of the inputs. The output for that line of code should be a control relay named "ONLINE".


I-LOCK 1 I-LOCK 2 I-LOCK 3 I-LOCK 4 ONLINE
---| |--------| |--------| |--------| |---------( )


If ALL 4 inputs are ON then "ONLINE" is TRUE. If ANY of the inputs is OFF then "ONLINE" is FALSE.

Use "ONLINE"=TRUE to drive a Timer (Timer-A).
Use "ONLINE"=FALSE to drive a Timer (Timer-B).

Use a 1-minute or 1-second or whatever kind of timers you need.


INC UpTime
ONLINE +---------+ SEC CNT
--| |-----------| TIMER A |--------( )
|TimeBase |
| 1 sec |
+---------+

INC DownTime
ONLINE +---------+ SEC CNT
--|/|-----------| TIMER B |--------( )
|TimeBase |
| 1 sec |
+---------+

While "ONLINE" is TRUE Timer-A runs. When Timer-A times out it increments an UpTime unit counter (minutes or seconds) and then resets the timer. You can cascade several counters to get UpTime DAYS(0-365), HOURS(0-24), MINUTES(0-60) and SECONDS(0-60).

While "ONLINE" is FALSE Timer-B runs. When Timer-B times out it increments a DownTime unit counter (use same timebase as in UpTime section) and then the timer is reset. Again, cascade several counters to get DownTime DAYS(0-365), HOURS(0-24), MINUTES(0-60) and SECONDS(0-60).

On a display you can show the counter values as DAYS, HOURS, MINUTES and SECONDS of UPTIME and of DOWNTIME.

You'll need a way to reset your counters either manually or automatically as and when necessary.

So, if this doesn't help, maybe you can clarify your description a bit.


  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Jan-28-01, 11:38 PM (EST)
2. "RE: Setting up timers to interlocks to monitor online/offline time"
Hi Terry,
Sorry if my post was confusing, it's my first post and it seems that going from what I'm thinking in my head to my fingertips gets a bit confusing sometimes..
Here is a brief rundown on the interlocks:
Alarm interlock.. goes high when the alarm bit goes high. It's purpose is to let the plant know that there is an alarm condition. I would say that it's passive in the fact that whether the unit stays online or offline is dependant only upon the type of fault that occurs, and not this interlock. It's purpose is just to inform the plant that some kind of fault exists.
Shutdown interlock.. this condition is only true if 2 other interlocks are false(the online and standby interlocks) (0 bit) using xio commands. The importance of the shutdown interlock is that it indicates that the unit is not in a ready condition, nor is it online. This occurs normally during warm-up, but some faults (serious ones) would also cause this condition.
Standby mode interlock.. goes true when the unit is ready to go online, but the isolation damper is still closed. This occurs when the plant switches the unit offline, or anytime when the unit is at a ready position, but not in production.
Unit operating online interlock.. is true when the unit is ready for production and the plant opens up the isolation damper.

Thank you for the help with the timers. I think using 3 for each condition (hours/minutes/seconds) would be ideal.
Getting the online hours are crucial. Also somehow obtaining the time when the unit has a fault that takes it out of production (and the time until it is back online) are also crucial. The trick is that so far this week I have had a number of times when the unit had major faults, but luckily they occured when then plant was not in production (the isolation damper was closed). Being able to differentiate these is where I am stumped the most. Translating the numbers that I get from the timers is also something that I am interested in. Resetting them shouldn't be too difficult, except that I need to make it challenging enough so that the plant maintenance personel don't accidentally reset the time for the week .

Thanks for the idea's, I'm going to try and work up the timers tomorrow.

Russ

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Jan-29-01, 00:03 AM (EST)
3. "RE: Setting up timers to interlocks to monitor online/offline time"
The more often you come back , the easier it will be for you to more clearly define your problem.

So, after reading this new info, it sounds like you actually have several specific combinations of interlock failures that indicate OffLine and a few combinations that indicate sort-a-kind-a OffLine but not critical.

You can use the same line of code that I wrote for "ONLINE" but tailor it to identify each and every critical condition that you need to track. Then you can again build timer routines for these or simply maintain a count of occurrances.

It's also possible to maintain a list of occurrances with a time-stamp! (This really depends on the type of PLC you have.)

Before you start hacking into your code, why not think it over then float a plan here and give us a look at it?

As far as keeping the production workers from accidently resetting the timers and counters, that can be easily accomplished by building a simple password routine.
--That is, if you don't already have that capability built into your display.

Through your display, write a numerical value to some memory location, then press some function button to reset the timers and counters. The routine would first look to see if the correct numerical value existed in the memory location.

If the numerical value does not compare to a hardcoded value that you have in the program, then the routine simply aborts without changing anything - except for the memory location which is zero'd out.

If the numerical value is equal, then the timers and counters are reset and the numerical value is zero'd out.

Keep comin' back! We love this stuff!

  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Jan-29-01, 09:13 PM (EST)
4. "RE: Setting up timers to interlocks to monitor online/offline time"

Here's what I tried out today (that was successful)

For getting the online time

N26;0/8(operating T4;7/DN Online second timer
-----xic-----online------xio--------------TON T4;7------------
bit) done bit Timer base 1.0
reset Preset60
Accum

T4;7/DN Online Minute timer (count-up)
-----xic------------------------CTU-----Preset 60
C5:3 Accum 0

C5:3/DN Online Hour timer (count-up)
-----xic-----------------------CTU----Preset 200(safe for weekly)
Accum 0
C5:3/DN
-----xic-----------------------MOV------
Source 0
Dest C5:3/ACC

I had tried the to do a reset command on the minute counter, but when it was in standby mode it would reset to 1, not 0. The mov command seems to work fine. I have hardly used the panelview software, but it looks like it should be fun. I'm hoping to be able to display all 3 times on the same screen. *though I would like to be able to reset the shutdown time seperately from the other two, though having one global reset.* I think that using the move command to zero out all of the accum values would be the best safest way to go about this. Is there any way to do a mass move? One where I can put the zero value into the accum of all of the counters/timers without having to write a rung of logic for each one? Any tips/hints for the panelview side of things?
How does this look so far? For the shutdown/standby modes the logic is pretty much identical. The only differences are in what causes each mode to go high and start the initial TON for each mode.


Thanks for all the help!

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Jan-30-01, 08:45 PM (EST)
5. "RE: Setting up timers to interlocks to monitor online/offline time"
First a note about drawing ladder rungs...
I couldn't tell if your ladder was accurate..

Precede ladder code with...

[CODE]

Do your code stuff here
Then end with

[/CODE]

So, now....how 'bout this?


WAS
OnLine OnLine
---| |-----|/|------+---(LATCH)Was ONLINE
|
+---( )OnLine Just Went ON
(True for 1 scan)
.
WAS
OnLine OnLine
---|/|-----| |------+---(UnLATCH)Was OnLine
|
+---( )OnLine Just Went OFF
(True for 1 scan)
.
OnLine
Just Went
ON
---| |-----------+-------RESET Timer T4: 7
| Reset the Timer to 1 Scan Time!
OnLine | For example, if scan time is .025
Just Went | seconds then reset timer to .025.
OFF |
---| |-----------+
.
This will reset your timer everytime you go from ON to OFF to ON etc.
.
OnLine
---| |---+-----------Timer T4: 7
OnLine | Base = 1.0
---|/|---+ Preset 60
Acc
.
OnLine T4: 7 OnLine Minute Count
---| |------| |-----Counter C5: 3
Preset 60
Acc 0

.
OnLine C5: 3 OnLine Hour Count
---| |------| |-----Counter C5: 4?
Preset 200
Acc 0

.

OnLine T4: 7 OffLine Minute Count
---|/|------| |-----Counter C5: 5?
Preset 60
Acc 0
.

OnLine C5: 5 OffLine Hour Count
---| |------| |-----Counter C5: 6?
Preset 200
Acc 0
.
RESET
UpTime
Counter
(From PanelView)
---| |----MOV------------MOV------------(RST)Timer T4: 7
Source 0 Source 0
Dest C5: 3/ACC Dest C5: 4/ACC
.
RESET
DownTime
Counter
(From PanelView)
---| |----MOV------------MOV------------(RST)Timer T4: 7
Source 0 Source 0
Dest C5: 5/ACC Dest C5: 6/ACC


Regarding Mass Moves, you should be able to identify a starting address (counter address), the type of data (Word, Double Word, etc.) and then define a value, and then declare how many copies of the value you want to write.

For example, If you want to zero out counters 1, 2 and 3 (they must be sequential!) and the data space used by these counters is a Single Word, then....

This is a generic description 'cause I ain't up on Allen-Bradley anymore.

Using the Move Word Function...
Identify the address of Counter-1,
Declare the data size to be Word (usually by Move-type),
Define the value you wish to write,
Declare the number of times to do this.

Regarding PanelView... it can be a pain in the A S S !
Read-up on it real good!

You certainly can setup a screen to allow you to reset only Uptime or only Downtime or Both, as you want.

You should be able to read the timer and each counter directly from the counter and timer locations with PanelView and display the value.

What do you think???


  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Jan-31-01, 10:58 PM (EST)
6. "RE: Setting up timers to interlocks to monitor online/offline time"
That's really neat! So it's possible to use the exact same Timer for the different modes.
I'm not exactly sure how fast the processor scans, so I'm not sure what value to set the timer for. How can I get the scan time? Also, I noticed that when the unit goes from online to standby, that while the counters keep their values the timers don't. What could I do to get around this?
Panel view is a pain in the a s s!!! For sure. I just had a one hour telephone talk-through help lesson from my trainer (which definitely helped a lot in setting up screens that will show the different modes and times for each). But there is so much more to learn. Are there any places on the web where I could get some info on panel view stuff? I have an AB PanelView 1000 (sadly not one of the cool touch screens .


Thanks for all your help, it's greatly appreciated. My company has a sink or swim kind of motto sometimes (hehehe). But I am definitely learning.


Russ

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Feb-01-01, 06:45 PM (EST)
8. "RE: Setting up timers to interlocks to monitor online/offline time"
HOW TO GET SCAN TIME:

Always-ON
-----| |---------MOV T:Whatever ACC to Vmem-X

Always-ON
-----| |---------RESET T:Whatever to 0

Always-ON
-----| |---------Timer T;whatever
TimeBase .001

Then either monitor the value of Vmem-X through your programming software or display on the PanelView.

NEXT...

When you move from On-Line to Off-Line the timer is reset to zero.

So, for purposes of tracking and displaying uptime and downtime use the minutes and hours only.

If you want to display seconds as well, then you need to change your timer to .1 sec timebase and add a Second Counter for Uptime and Downtime.


  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Feb-04-01, 01:53 PM (EST)
9. "RE: Setting up timers to interlocks to monitor online/offline time"
For the panelview, my trainer moved the value accumulated in each counter (as well as the timers) to words. Then has the panelview display the words.
I've thought about adding a new screen on top of this. Adding a counter in the logic that is true for all 3 modes (online/standby/shutdown). This counter counts the hours and has a preset equal to 168hrs. When its done bit goes high it moves all of the modes hour and minute values to 6 more words, and then resets the timers and counters (as well as itself).
This way I can display weekly results and don't even have to worry about ever needing to reset anything. Each week all of the values would reset themselves. This eliminates the need for security.
Would this work?


Russ

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Feb-04-01, 03:35 PM (EST)
10. "RE: Setting up timers to interlocks to monitor online/offline time"
Russ,

Yeah! It sounds like it would work. But there are all kinds of possible problems. For example, how do you track time while the PLC is OFF? What happens if the PLC is OFF when your reset time comes and goes?

If your PLC happens to be down for 2 hrs starting at Hour 167, then, when you come back up in 2 hours, your update/reset routine would be off by 2 Hours! And the Off-Line Counter would not have been counting time while the PLC was down.

If this is no big deal, then your routine will work, but you should probably still build in a method to reset times manually to specified times.

Since the System Clock runs continuously, there are ways to teach your program to read actual date/time and make decisions based on what it sees. This can work even across periods when the PLC is OFF!

Using Date/Time functions can be quite complicated, but you'll get the best results.

Don't make the routine any more complicated than it needs to be, however, make it as complicated as it needs to be to get the desired results. It's a trade-off... effort for results!

The general rule is, it takes a great deal of effort on the part of the programmer to make it simple for the users!

  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Feb-05-01, 11:43 PM (EST)
11. "RE: Setting up timers to interlocks to monitor online/offline time"
Hey Terry I found a way around the problem of downtime.
Now if the plc is down (sadly I will know when it loses 120VAC as it will call me :O( , but it has a backup battery power supply to keep it running.(which is kind of cool). (though calls for flame outs at 4:30AM are irritating, but part of the deal .
Anyway, what I did was set a minute counter, that works for all 3 mode minute timers (so it's true for all conditions with all the minute timers), which is what the whole counter setup is based on. The scan times are 9-11MS (so far the max observed scan time is 23MS).
When the weekly total minute timer reaches (10080)it moves all of the minute/hour accums from the three modes into words (which are displayed on the panelview). Also I set up to move the three modes (sec/min/hr) accums to words as well. So that on one of the panelview screens it shows the current weeks times, as well as the previous weeks times. This way there is no need to reset anything as the logic does it for me. :O) (ahhhh maximum return for minimal effort...hahahaha).. actually call it a 70HR week. But it's something that I'll never have to really mess with again (though I thought of using 1 second timers so that I can retain the seconds as well), but this should work fine. (ie yes I will do that probably very soon :O). I just can't keep from playing with this stuff, it's too much fun.
Btw I'm working up some more screens in the panel view (and setting timers to them) so that I can put all of my preventative maintenance time-tables onto a screen and not have to worry about missing something). Plus once it's done I won't have to do it again. :O)
Do you have any suggestions of other things that I could put into the panelview/plc that could be of some help???


Addicted to PLC,
Russ

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Feb-06-01, 00:39 AM (EST)
12. "RE: Setting up timers to interlocks to monitor online/offline time"

My Friend, you have the disease! AIN'T IT GREAT!!!

GOD, I LOVE THIS STUFF!!!

I'll have to think a little on what I might think you need...

But, my best advice to you is, figure out those things that the production people run into that they call you in for. Then find a way to get the info that they need on the screen so that they don't have to call you in! That is, unless you like running around all night instead of sleeping!

I've taken much of my code and built screens that show exactly what is necessary for a condition to occur. I've provided "Tech Flashes" to the operators to explain how particular modules are supposed to work, showed them the function on a screen and explained that they need a GREEN path to get the function to work.

So far this has given me plenty of completely restful nights!

This ought to give you all kinds of ideas!

I'm a firm believer in eliminating STUPID PROBLEMS!!!

I hate being called in to fix a mis-aligned limit switch! (I live 30 miles from work! Way the hell too far for me to take a casual drive!)

You're on yer way my man! WELCOME to the "GOD, I LOVE THIS S H I T" Club!

The only additional comment I have is, don't get distracted from the Real Problems,. It is so easy to get wrapped up in programming cute stuff that you leave the real stuff on the side. Don't let that happen!

And remember, always... VP... that is Visual Progress! If you can constantly produce a program change that constantly produces an obviously perceived change for the better, you will be held in High Regard!

Production foremen can be pricks at times but when you get them on your side you're in hog-heaven!

  Top

Russ Friend Click to EMail Russ Friend - (17 posts) Click to check IP address of the poster Jan-31-01, 11:03 PM (EST)
7. "RE: Setting up timers to interlocks to monitor online/offline time"
That's really neat! So it's possible to use the exact same Timer for the different modes.
I'm not exactly sure how fast the processor scans, so I'm not sure what value to set the timer for. How can I get the scan time? Also, I noticed that when the unit goes from online to standby, that while the counters keep their values the timers don't. What could I do to get around this?
Panel view is a pain in the a s s!!! For sure. I just had a one hour telephone talk-through help lesson from my trainer (which definitely helped a lot in setting up screens that will show the different modes and times for each). But there is so much more to learn. Are there any places on the web where I could get some info on panel view stuff? I have an AB PanelView 1000 (sadly not one of the cool touch screens .


Thanks for all your help, it's greatly appreciated. My company has a sink or swim kind of motto sometimes (hehehe). But I am definitely learning. btw what is the rating next to each topic for? How does that work?


Russ

  Top

Terry Woods Click to EMail Terry Woods - (708 posts) Click to check IP address of the poster Feb-06-01, 00:45 AM (EST)
13. "RE: Setting up timers to interlocks to monitor online/offline time"
BTW Russ,

Did you see how your posting turned-out? You should use the PREVIEW Button Often while posting!!!!

I think the problem with this particular posting was that you didn't do the Braket-/-CODE-Bracket right after your code secion.

  Top


Unlock | Archive | Remove

Lobby | Topics | Previous Topic | Next Topic
Rate this topic (1=skip it, 10=must read)? [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ]
Your Personal PLC Tutor Site Learn Now!!.