Was Bit, Was On, Was Off, Was Detected, Sensor Detected, Switch Detected,

rsdoran

Lifetime Supporting Member
Join Date
Apr 2002
Location
Birmingham, AL
Posts
7,371
Maybe someone has a different term to express this concept. It applies to a situation where a sensor has activated but has to deactivate before the next step activates.

In the attached pdf is a Versa Pro program for an L-Sealer. This is a device that takes packages from an incoming conveyor then pushes then into packaging film then an arm comes down to cut and seal the package. It is then transported into an oven.

In my case I had a ZERO budget and only a few weeks to modify 3 machines. I did have numerous GE 90-30's (system pulls) and other used parts. They did allow the lead man in that dept. to do much of the work as I had to perform regular duties first and that when not too busy. It actually succeeded fair beyond what we expected, so much so that they eliminated a shift and went with 2-10 hr a day shifts with make up rarely needing more then 1 extra shift to come in on Friday.

Anyway in the pdf rungs 8 is the PACKAGE WAS DETECTED BIT. In this situation the sensor detected the package as present then set a bit to show it WAS DETECTED, after X amount of time after NOT being DETECTED to allow package to be in position, it then pushed it into the film wrap; rung 9.

This is just to get the ball rolling, I hope, and others will provide possibly better examples or explanation of this simple but elusive concept.
 
Christoph said:
Kinda Like A One-shot Maybe.

NO, a one shot is a bit that is active for one scan.

This is a situation where you need to know if something has been ON then goes OFF (or vice versa) to enable the next rung/step of the operation.

In the example program I provided, the WAS BIT would be set when the paper got detected. I needed to know it HAD DETECTED the paper roll and WAS NOW NOT DETECTED so X amount of time later, for it to position, then I could activate a pusher (air cylinder).

I am not the best at explaining things but this is what I mean about basic concepts, some times some of us do not catch on easily.
 
Last edited:
I have run into similar situations lots of times. Mostly in packaging or conveyor systems. I have solved it in three different ways.

First, like your solution, I latched one bit at a time, and steped through the process. Each bit looked for the preceding bit. Part Present, latch bit 1, Bit 1 and part missing plus time, latch bit 2 unlatch bit 1 and so on.

PE1 = 1 > Latch bit 1
PE1 = 0 + bit 1 + TMR > Latch bit 2 > Unlatch bit 1

Second, I used a bit shift to indicate where in the process the part was. Each bit in the word/s indicates a position in the process.

PE1 = 1 >shift
PE1 = 0 + bit 1 = 1 +TMR > shift

0001 > 0010 > 0100 > 1000 > 0000

After each step, shift the bit. Bit position determines what to do next. Great for reliable situations like an index table. This is also a good way to show good part/bad part at each location. If a station fails, simply write a 0 in its position.

Third, looked at each location seperatly to decide what to do next. This was much more complicated, but for production reasons, it was the best solution. In most cases, this was used to process raw material, where quality was not within tight ranges (think logs.) This guarenteed that there were parts in each location, ready for the next step in the process. During initial load, and final unload this is simple, but if a position has an error, the program must know how to solve the error. I used both latched bits (step by step), and bit shift (good/bad) with success.
 
If I find myself programming in SFC, grafcet, or a custom-rolled state handler, I find it conceptually easier to follow something like this by simply splitting the operation into 2 steps:

Make one of the 'entry ' conditions for the step something like 'package sensor TRUE', and make one of the 'exit' conditions 'package sensor FALSE'.


Let's say you've entered the 'loading' sequence for a conveyor: ( where '|--' denotes the conditions required to enter/exit a step)


Step 1: Run conveyor until loading sensor blocked
|
|-- Loading Sensor TRUE
|
Step 2: Continue running until sensor is clear
|
|-- Loading Sensor FALSE
|
Step 3: The rest of your process
 
ndzied1 said:
Ron,


Here's a link to the type of cycle I usually program. It has served me well for many years.

http://www.plctalk.net/qanda/showpost.php?p=179819&postcount=7


If you want more complicated examples, send me a PM and i'll send you something.

Norm it is not about my needs on this issue, it was more about explaining the concept.

As I mentioned, at least hope I did, it was understanding when certain things had to be done based on PAST events. There are many ways to do this but for some of us the CONCEPT is not always that easy to understand.

I was hoping, appears I have failed though, to provide an understanding of a simple concept.
 
rsdoran said:
...
I was hoping, appears I have failed though, to provide an understanding of a simple concept.

My bad, I wandered a bit. I am familure with the concept, but am not quite sure how to name it. If there was something there, and now there is not, it is time to fill the spot.
 
Sorry Ron,

In my haste to post on my way out the door I didn't really read what you were asking...

Anyway, my link can still serve as my way to do what you are talking about since you did talk about getting the ball rolling....
 
I'm not sure if this is what you're asking, but are you referring to a rising edge type thing? Like a OSR (one shot rising),in rslogix 5/500 which detects the moment an input is triggered?
Some of our Reliance stuff offers a "falling edge" bit (maybe rslogix too!), which only detects the moment an input goes from On to Off.
Is this the concept you're asking about, or is it the logic/scan portion that you're asking about?
 
If I have a programming problem to solve, I prefer to review several possible techniques and settle on the one that works best in combination with my particular skill-set and the problem itself.

After all, at the end of the day no one is faced with a technique - we are faced with problems that require exploitation of techniques.

The problem, in this case, is really the question of how one can manage product flow past a checkpoint. So far, folks have presented several techniques to deal with the problem - the 'WAS' bit technique and several other state management techniques.

Anybody faced with a similar problem now has a single place from which to learn multiple ways to approach it. Everybody wins!
 
Couldn't this be accomplished with a off timer? Assuming, of course that PLC has off timers. I'm most familair with Allen Bradley, and I think thiers would've done the job well.
 
This is just to get the ball rolling, I hope, and others will provide possibly better examples or explanation of this simple but elusive concept.

I think what Ron was looking for was better explainations, more examples from everyone. More of a generic response if you will.

Maybe something like this Ron?

Example01.JPG


Very sloppy and generic I know but hopefully it will keep the ball rolling.

Of course you could also remove the timer and rely on the PRX_DETECT_PART to tell you when the sensor is clear again but I gathered that you wanted some sort of time base in there.
 
Last edited:
I have several Shanklin A27A L bar sealers that operate exactly like this. My older ones run about 28 ppm and the new ones about 35. The older ones use simple photoeye initiate and off delays with SLC 100. The newer ones have SLC 5/03 still with a PE. Same basic programming though. Settings through a pot on several. Several have DTAMs or PV550 with adjustment there.
I'll look later when I get some time and if still relevant shoot you the ladder stuff.
 

Similar Topics

Question- Say I have 8 digital INPUTS to my PLC, any of which may be asserted HIGH for a few seconds, all these inputs "OR'd", currently, to...
Replies
16
Views
3,505
I don't know what to think about this... When a "finger car" travels over a bump, there is a spike in the output Q1.3 (24 vdc output). I've...
Replies
9
Views
3,011
This one is stumping me, it might not even be possible. I have machines running PLC 5's and machines running ControlLogix processors. When a...
Replies
13
Views
5,484
Need to find a way to zero out some registers on 1st scan if programming was just downloaded. Want to differentiate between a 1st scan following a...
Replies
2
Views
2,021
Trying to open View Studio and get a message "View Studio was NOT successfully personalized" Anyone ever run into this?
Replies
1
Views
125
Back
Top Bottom