Timer? Logic

Nhrafan26

Member
Join Date
Nov 2008
Location
Slatington, PA
Posts
53
Kind of racking my brain here with this one today.
Here's what I want to do:

There is an air cylinder with spring return.
I want to initiate the solenoid to turn on after 4 seconds, the cylinder will extend. I then want to count 2 seconds and release the solenoid.
The cylinder will return to collapsed position.
Then I want to count 10 seconds until this repeats. OR if a sensor has detected a gap for longer than say 5 seconds.
Any example of how I can lay this out? I had some example logic written but deleted it. I will try again tomorrow, just looking for ideas or should I used anything besides TOF / TON / ONS to accomplish this?
RSlogix 500.
 
You're almost there already.
1. I want to initiate the solenoid to turn on after 4 seconds, the cylinder will extend.
2. I then want to count 2 seconds and release the solenoid.
The cylinder will return to collapsed position.
3. Count 10 seconds until this repeats.

The sensor is used for what? what is the application?
OR if a sensor has detected a gap for longer than say 5 seconds.

Don't know where you are in regards to plc logic, so I am assuming you are
new to the business.
Questions.
What type of device would tell the plc to turn on a valve?
What part of the plc would tell the plc to turn on the valve?
What is the purpose of a timer / counter?

zip your work - forum rules and we will offer suggestions.

james
 
An operator will initiate a call for product. I am having this turn on input 0.0 which starts the sequence.
The logic will then turn on solenoid to turn on valve 1. I put a timer in to give 2 seconds for valve to completely open (will probably just use the valve report though)
before turning on the pump.
Once the valve is open and the pump is running i am monitoring a sensor to detect a gap or bridging in product. If that happens the vibrator turns on until the gap is gone.
I will have a debounce timer in to allow for quick gaps.
Now there are flex arms that "massage" the product container to allow it to drop into the bin. That's where the air cylinder comes in. I want timers that can be adjusted so i can set up good timing to allow a constant flow with minimal reliance on the only sensor at the bottom of the bin.
 
This isn't for a school project is it? I don't want to give away answers.

This is what I've come up with given what I got out of your first post.

rlgU44g.jpg
 
If the cycle steps are the same every time apart from what's initiating the cycle, you should be able to use one timer for the whole sequence.

Use InRange comparators to look at the elapsed time, and trigger actions based on the time of the one timer.
 
I took dwoodlock's advice and simplified what I previously posted using limits reading one timer instead of a chain of timers.

2ucaHxG.jpg
 
No, not for a school project. Real world.
Ok, I'm gonna open myself up to criticism here because I do want to get better as I go along.
Here is a copy of what I have written so far, minus most of the logic I was asking about because I deleted that to start over.
Check it out and let me know. Yes, it's a very simple program so far with none of the other stuff done but I'd rather correct it now.
 
One thing I notice with your vibrator section is you have a TOF being triggered by the start delay's DN signal. The TOF instruction doesn't begin counting until it sees a true-to-false transition. I think a TON triggering a T4:2.TT would work better for running the vibrator.
 
Did some changes to the program, ok, well re-wrote the whole thing.
Can you please check this out and tell me how can I get this to repeat?
Once the flex logic is initiated I want it to repeat through over and over.
I want B3:0.9 to be energized for 3 seconds then go false for 5 seconds, then energize for 3 seconds then back to false for 5 seconds and just keep repeating as long as B3:0.5 is on.

flex.jpg
 
You can bump the timer preset down to 14 and write a move instruction to put a value of 5 to T4:3.ACC triggered by an XIC from T4:3.DN
 
If the cycle steps are the same every time apart from what's initiating the cycle, you should be able to use one timer for the whole sequence.

Use InRange comparators to look at the elapsed time, and trigger actions based on the time of the one timer.


I would use different timer for each, if cylinder or valves get a bit sticky etc. you may want to adjust timers separately , less complications later
 
This program is very small so structure wont be a big deal , but large programs tend to become spaghetti logic.
Lad 2 should be called main and most of your JSR's should be in there.
I would create a separate ladder for each . inputs , outputs, and use other bits to go from there.
a Ladder for start logic , and a ladder for your cycle see where I'm going with this, how ever you decide to do it think of the personnel who might have to troubleshoot it later ,
 
You can bump the timer preset down to 14 and write a move instruction to put a value of 5 to T4:3.ACC triggered by an XIC from T4:3.DN

Going to try this and see how it works for us. The machine isn't in use yet so I have some time to play around with a few things which is perfect.
 
This program is very small so structure wont be a big deal , but large programs tend to become spaghetti logic.
Lad 2 should be called main and most of your JSR's should be in there.
I would create a separate ladder for each . inputs , outputs, and use other bits to go from there.
a Ladder for start logic , and a ladder for your cycle see where I'm going with this, how ever you decide to do it think of the personnel who might have to troubleshoot it later ,

I did re-write the program using what I think is a little better layout. Let me post it up here and you can take a look and tell me your opinion.
Thanks for the feedback. I notice there's really no set way to do things with this type of work but I would like to see what everyone is doing and do it similarly and for ease of troubleshooting larger systems in the future.
 

Similar Topics

Hello all, I am working on an old machine that has a hydraulic filter that must be replaced every so often. When the filter needs changing, a...
Replies
7
Views
1,550
Hello Folks, I am new to Direct Soft, but a customer has a program that need me to edit. It is a DL06. We have a TMR function (T4) that we want...
Replies
24
Views
5,474
Hi there, I have a Zelio SR2B121JD and am trying to work out in FBD how to pause a timer. If I start a timer for a 60 second countdown, how can I...
Replies
14
Views
7,195
I still have to preface this with "I am a newbie". Fumbling my way through ladder logic in Micro820 using CCW software. I need to send a 24vdc...
Replies
3
Views
2,504
hi all, i have compact logic plz RS studio & factory talkview and a Universal frequency counter/Timer from Agilient (keysight). how can i...
Replies
0
Views
1,787
Back
Top Bottom