Timer question

mike47

Member
Join Date
Aug 2012
Location
GA
Posts
20
As I stated in a previous thread, I'm new at this PLC stuff. Ive been an industrial mechanic-machinist for years and I've been taking a PLC course at a local tech school and lovin it. I would like to use this site as a resource. I hope yall dont mind generic questions. :oops:
I did a small PLC project at school using limit switches and solenoids to act as a clamp and drill. I wanted to put my own twist on it and included a home position pb. I wanted the pb to only work once then become "locked out" until E-stop was pressed. To do this I used a TON set to a few milliseconds with the TT bit turning on a OTL until the cylinder hits its home limit switch which then unlatches. To "lockout" the button, I used the TON's DN bit to hold (seal in) the TON true thus rendering the button useless until the E-stop de-energizes the TON. The instructor said he had never seen the DN bit used that way and didnt recommend it. I realise there are other ways of doing this, but I thought it was kind of clever. Has anyone ever used a timer's DN bit to latch the timer instruction in its DN condition? Or do I need to shut up and move on?
 
what would happen if you press the PB again after pressing and releasing the e-stop pb? Since the cylinder is already hitting the home switch, would anything happen?
 
It is clever, but TIME is not a factor in this operation.

I would have used the pushbutton's bit to Latch a control bit. I would use the EStop de-energizing to unlatch the control bit. This establishes the meaning of the pushbutton.

Then I would have used a one-shot of the control bit to Latch on the homing sequence.

This would emphasize that there are two specific things taking place:

1. The pushbutton is recognized only once until an EStop occurs.

2. The action of the pushbutton at its turn-on is to start the homing sequence.

One critical thing is to write the code so that, with appropriate comments, it is obvious what is going on. This is important for someone later in time (possibly yourself) so that they don't have to puzzle out why a timer was used and what important function the time is playing.

Welcome to the world of PLC programming.
 
As I stated in a previous thread, I'm new at this PLC stuff. Ive been an industrial mechanic-machinist for years and I've been taking a PLC course at a local tech school and lovin it. I would like to use this site as a resource. I hope yall dont mind generic questions. :oops:
I did a small PLC project at school using limit switches and solenoids to act as a clamp and drill. I wanted to put my own twist on it and included a home position pb. I wanted the pb to only work once then become "locked out" until E-stop was pressed. To do this I used a TON set to a few milliseconds with the TT bit turning on a OTL until the cylinder hits its home limit switch which then unlatches. To "lockout" the button, I used the TON's DN bit to hold (seal in) the TON true thus rendering the button useless until the E-stop de-energizes the TON. The instructor said he had never seen the DN bit used that way and didnt recommend it. I realise there are other ways of doing this, but I thought it was kind of clever. Has anyone ever used a timer's DN bit to latch the timer instruction in its DN condition? Or do I need to shut up and move on?

I guess you should ask yourself two questions:
1. Does your method work?
2. Is there a simpler way to accomplish what your method does?
If the answers are yes and no, respectively, then there is nothing wrong with your method. Did your instructor offer a different suggestion to disable the PB until the E-stop had been pressed?

I don't understand his misgivings. Timer /Dn bits are quite often used to "seal-in" a TON instruction. It's a very common technique, as opposed to using a Latch/Unlatch structure. One common usage is on an input from a photo-eye that runs a "jam" timer. An XIC of the photo-eye starts the TON. The Timer /DN bit seals in around the photo-eye. An XIO of an "alarm ack" pb or something else would be used to drop-out the TON rung. The /DN bit would then be used in another rung to trigger an alarm. This way the alarm stays on until it is acknowledged.

Like I said, if your particular programming method works, it is efficient, and it easy enough for the next guy to come along to understand, and it is safe, then it is "good" programming. Everybody's got different styles, and your instructor should realize that. Sounds like he may be one of those guys who think his way of programming is the only "correct" way. If so, learn what you can from him, but use your own judgement too. When it comes to programming, most of what we learn is usually self-taught, anyway. Someone can show you the basics, and show you how to get around in a program, but other than that, you usually have to figure things out for yourself, at least in my experience.

Anyway, that's my $.02.

EDIT: I just saw Bernie's post above. He is spot-on, as usual. He pointed out an inefficiency in your method, which is using a Timer when time isn't critical to the operation. It's more sequencing that is important, which the Latch/Unlatch structure would achieve. Doesn't mean that there is anything wrong with using a /DN bit to seal-in a timer, though.

Cheers,
Dustin

🍻
 
Last edited:
Hows the best way to display the logic here?

this will work. The key to this circuit is the OSR (one shot rising edge) instruction. The home_cr drives your cyclinder and the home_ls is the home limit switch.

I like to use rslogix micro starter lite to build my ladder logic circuit and then use window's print screen to capture it to a png file for upload.
2ij11fd.png
 
Last edited:
DAVID90, The home LS is the same LS the machine uses for its "clamp open" position. So everytime the clamp comes off that limit switch what would happen? I'll have to try it and see. Thanks. This is fun, (I guess I'm becoming a nerd). I will post my logic when I get to my other laptop.
 
Keep in mind, the home pushbutton has to be rendered useless after the first time because the limit switch and the soleniod output are the same ones used in the run logic. plus the home pb is used as a counter reset in the run logic using another set of contacts on it.

logic1.jpg
 
Last edited:
Here's how I would do it. The timers in your program really are unnecessary, plus the way you have it written, the output will latch every time the PB is pressed, because the timer time will be up, and the .TT bit will be re-triggered.

Hope this helps.

Cheers,
Dustin

🍻

HomePB.jpg
 
Here's how I would do it. The timers in your program really are unnecessary, plus the way you have it written, the output will latch every time the PB is pressed, because the timer time will be up, and the .TT bit will be re-triggered.

Hope this helps.

Cheers,
Dustin

🍻
The timer timing bit will not trigger as long as the done bit is held. This logic actually works.:confused:
 
Here's how I would do it. The timers in your program really are unnecessary, plus the way you have it written, the output will latch every time the PB is pressed, because the timer time will be up, and the .TT bit will be re-triggered.

Hope this helps.

Cheers,
Dustin

🍻
I didnt showing the whole logic but the home switch is also the clamps limit switch so when the run mode starts and the clamp moves off of the limit/home switch, wont your home button be ready to activate again? this button cannot interfere with the sol output or the LS after the home cycle. This is fun thanks--Mike D
 

Similar Topics

I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
91
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
308
Hi, I've been lurking for about a month now and via the search, I've been able to string together a basic micro820/PV800 project. I've got a...
Replies
10
Views
3,070
I'm trying to program an output to go true immediately when I hold a maintained pushbutton but only go true for a scan then go false for 5 seconds...
Replies
15
Views
3,379
I added T4:50 to delay the OTE from coming on, but the customer only wants T4:50 to delay the OTE every 12 hours. I am a beginner and can't...
Replies
11
Views
2,793
Back
Top Bottom