Hi there, my lab partner and i are currently finishing up a school project and have run across a little snag in our programming. We are using five inputs. these five inputs will altogether trigger three/four outputs in various combination. We have set up in basic ladder/logic input bits that will trigger corresponding outputs and light indicators.
example.
input1=1, output1=1, light1=1
so if input1 is true, it turns on output1 and light indicator 1, and so on for the next four sets as well.
our problems come in with our next output sets.
the inputs (inputs 1- 5) also trigger two dual acting pneumatic cylinders. these two are set up opposite each other and move opposite one another.
example
cylinder 1 cylinder2
----------> <-----------
when any of the input signal is true, one of the cylinders will move
cylinder1 cylinder2
-----------><------------
then on the next cycle for the inputs, the next cylinder will move
cylinder1 cylinder2
----------><----------
hope this makes sense.
the goal is to have the cylinders only fire on momentarily, but if the input signal is true, what ends up happening is the cylinders will stay on, so the other cant move until the input signal that was on is false.
we are using a JSR to jump to a structured text logic for the cylinders.
if input1 or input 2 or input 3 or input 4 or input5 then
cylinder1=1
else
cylinder1=0
<transition>
if input1 or input 2 or input 3 or input 4 or input5 then
cylinder2=1
else
cylinder2=0
<transition>
after the 2nd transition, we just loop the instruction back to the first cylinder logic.
sorry if the post is kind of long. any help would be appreciated.
we have thought about using timers to control the output but are having problems setting that up in
structured text.
again, what we are trying to do is have inputs 1-5 trigger the two cylinders in sequence momentarily.
thanks.