Pushbutton Ideas

klittle

Member
Join Date
Oct 2007
Location
mississippi
Posts
14
i have a project with 28 push buttons that basically enable 28 valves but how do i enable the valves in the order that the buttons are pressed? if three people push buttons only one valve can be turned on at a time and they have to come on in the order they were pushed?
 
Totally impossible!

Let's say 35 persons are pushing the buttons randomly at a random time.

Or are there any other limitations that you would like to inform us of?
 
Hi klittle,

if I am understanding all, I would do it like this:

- you scan all buttons in one cycle
- for each button pressed, you put the corresponding number into a fifo
- in a second task you check the fifo
- if there is a number (or more numbers) inside, you pick the first and handle the corresponding valve.
- if the valve is finished, check if there is more in the fifo.

br
bb
 
assuming there is only one operator pushbutton station, if you have a plc, then get a touch screen. on an AB pv600 for example, you can only push one cell at a time.

BACK TO THE MAIN POINT,
you have asked a very vague question. We need more details.
what is this application, what does it control, WHAT HAPPENS IF A VALVE IS TURNED ON OUT OF SEQUENCE, how to reset machine,
safety issues?

Yes, you can do what you asked, but we can't do it without a lot more information.

regards,
james.
 
Simplify the problem down to 2 push buttons/Valves

If you can describe the functionality required, it will be easier to then extend it to many pushbuttons.
 
this is a system that delivers an ice/water mixture to 28 stations with a button at each station. when the button is pushed the corresponding valve opens then there is a delay and the pump turns on for a time set through a HMI for each valve then the pumps turns off and after a delay the valve closes. the system can only deliver to one station at a time but they have requested that if a button is pushed while someone else is requesting ice then that will be the next station that is enabled. which would be fine if there were only 2 buttons but there are 28 buttons. the sequence is determined by the order in which the buttons are pushed and some buttons may never be pushed on a shift.
 
You haven't identified a controller. If I were using an Allen Bradley unit I would use the FIFO Load and FIFO Unload commands.

The FIFO Load would be enabled when a button was pressed. It would place the identifier for that button into the FIFO array.

The routine controlling the valves/pump would watch for any entry in the array. If there was it would perform an FIFO unload to get the identifier, go through the actuation and timing routines for that identifier, then go back to looking for an entry in the FIFO array.
 
thanks Mr. Carlton i am looking at how to do that and i think i can make it work. i have not yet used a FIFO but i think i under stand how it works.
 
What is to happen if you press Button 1 and then press it again whilst the delivery sequence is in progress - do you get another delivery of ice/water immediately after the first one ?
 
What is to happen if you press Button 1 and then press it again whilst the delivery sequence is in progress - do you get another delivery of ice/water immediately after the first one ?
no i will not use the Input directly they will have to hold the button down for a time and i will latch in a bit and if the bit is latched in the button will not do anything.
 
What is to happen if you press Button 1 and then press it again whilst the delivery sequence is in progress - do you get another delivery of ice/water immediately after the first one ?
Regardless of latchingor using a delay this is a legit question.
Assume the station pumps ice at this point and the operator holds the button down for a certain amount of time.
The system has to re-supply another batch?
Besides the FifO solution posted which solves the push button sequence issue, you'll have to do a lot of coding to make the system function as intented.
 
Getting only one valve to turn on at a time is a pretty simple bit hack if you assign the priority to the least significant bit or most significant bit.

For example, J := I AND (NOT (I-1)) will always leave you with just one bit set in word J and that bit will be the least significant bit from I. Other bit hacks give you different bits. Google "bit twiddling hacks" to get a number of different ways to do it.

You should be able to use a combination of that and the FIFOs Bernie mentioned to do what you need.
 
you can do it without memory just the first one button is seen.
by ld 1 andnot 2 andnot3 etc.
ld2 andnot1 andnot3 etc.

or by memory so that way the valve will be open if none is pushed.
 

Similar Topics

Good Afternoon , I'm doing a FactoryTalk View application ME, and I have a Momentary Pushbutton that I have the correct tag attached to it...
Replies
5
Views
2,121
Hey guys ! How do I use the pushbutton fucntion block and test it ? I put the FB on the worksheet, put the signal tags, but I dont know how to...
Replies
5
Views
620
Sorry for the basic question: On my HMI, I've created a button labelled SAVE to save the current values (distances in mm). It's not linked to any...
Replies
22
Views
2,220
Hi all, (This is with FTV SE v12) I am trying to use the Push Button -> Button and I would like to have the same color for the border and the...
Replies
9
Views
1,605
Hi all, (This is with FTV SE v12) I am trying to use the Push Button -> Button and I would like to have the same color for the border and the...
Replies
0
Views
1,084
Back
Top Bottom