Gates

mariobo11

Member
Join Date
Sep 2012
Location
Universe
Posts
62
Hello!

I have 5 gates and i have to programm it to open automaticly in some order. Order is picked at panel.

Gates are named 1,2,3,4,5. If i want to open gates in 2,3,5,4,1 order with 5 sec delay between opening I must to pick that order at panel.

Can someone help me how can i programm it for any openning order picked at panel. Just PLC program please.

PLC is TWIDO, but only few word how i could do that is enough. :)

I have no idea how to do it.

Thank you!

:site:
 
I don't have any idea about programming TWIDO PLC but if FIFO is present then you can easily use it to solve your problem and if it's not then you can make your own.

Just use a keypad in your HMI panel in which the gate numbers have to be pressed in the desired sequence of their opening. Then at each key press enter the corresponding number into the FIFO and then open your gates according to the sequence entered in the FIFO.​
 
Last edited:
I don't have any idea about programming TWIDO PLC but if FIFO is present then you can easily use it to solve your problem and if it's not then you can make your own.

Just use a keypad in your HMI panel in which the gate numbers have to be pressed in the desired sequence of their opening. Then at each key press enter the corresponding number into the FIFO and then use it to open your gates in the sequence entered in the FIFO.

The idea is that i pick order of opening and then press Start. I am trying something with FIFO but.......... i need more help :)

Picture of FIFO (TWIDO):
22748892.png
 
I don't know your exact physical setup but from the pic provided by you and guessing at how R,I and O work here's a rough idea to get you started :

1.Initialize( send signal to R) FIFO when a "Keypad" button is pressed in HMI
2.The Keypad should then pop-up on HMI and at the same time make I high
3.At each key press on the Keypad move data to FIFO register
4.When F becomes high close Keypad and make I low
5.On pressing Start make O high and then move data from FIFO register at whatever interval you want the gates to open
6.When "keypad" button is pressed again make O low and continue again from Step 1.

If I and O work in a way such that consecutive low to high transitions on them move data one at a time into or from FIFO register (from and to pre defined locations) respectively then program like this:

1.Initialize( send signal to R) FIFO when a "Keypad" button is pressed in HMI
2.The Keypad should then pop-up on HMI
3.At each key press on the Keypad move data to FIFO register by sending a rising signal to I
4.When F becomes high close the Keypad
5. Then move data from FIFO register at by sending rising signals to O at whatever interval you want the gates to open

(Note: typed in a hurry and with a LOT of assumptions and guesses)
 
Last edited:
You can forget the FIFO if you like and program a simpler method that is easy to understand.

on your screen use five internal bits for the gate sequence buttons.
In your plc designate 5 data registers to receive the sequence
Use an index register to increment the data register at each push of the button.

You will then have 5 consecutive data registers with the required sequence.

You can use these to trigger your gates in the correct sequence
 
Goody has told a simpler way of doing this but in case you still want to go with FIFO then you can see from my previous post that my second assumption was correct and you can follow those steps.

Here are the slight additions to some of those steps based on the additional info you have provided:

3.At each key press on the Keypad overwrite data in %Ri.I and move the new data to FIFO register by sending a rising signal to I
5.Then overwrite data in %Ri.O with data from FIFO register by sending rising signals to O at whatever interval you want the gates to open and use the present data in %Ri.O to open the appropriate gate.

As in Goody's method you can store the sequence in 5 consecutive data registers and program to keep loading the last entered sequence from these registers into the FIFO in the following cycles until a new sequence is entered so that you do not have to re-enter the sequence every time before opening the gates.
 
Last edited:
You can forget the FIFO if you like and program a simpler method that is easy to understand.

on your screen use five internal bits for the gate sequence buttons.
In your plc designate 5 data registers to receive the sequence
Use an index register to increment the data register at each push of the button.

You will then have 5 consecutive data registers with the required sequence.

You can use these to trigger your gates in the correct sequence

I must be stupid but i dont understand how i should setup it in twido... o_O:unsure::cry:
 
I don't know the internal bits of twido software - below was just an explanation of how you could do it


You can forget the FIFO if you like and program a simpler method that is easy to understand.

on your screen use five internal bits for the gate sequence buttons. 1 bit per button
In your plc designate 5 data registers to receive the sequence You choose which 5 registers you want to use
Use an index register to increment the data register at each push of the button. as the first button is pressed it moves that number into the the first data register and increments the index register by 1 so that the next button moves its number into the second data register

You will then have 5 consecutive data registers with the required sequence.

You can use these to trigger your gates in the correct sequence use compare or equal to decide which gate should open
 
I will try it today and i would ask you again something if i would be enough stupid o_O:sick:

Edit: I dont know how to use index and data register :(
 
Last edited:
You can forget the FIFO if you like and program a simpler method that is easy to understand.

on your screen use five internal bits for the gate sequence buttons.
In your plc designate 5 data registers to receive the sequence
Use an index register to increment the data register at each push of the button.

You will then have 5 consecutive data registers with the required sequence.

You can use these to trigger your gates in the correct sequence

It is harder to understand your way that FIFO way-:confused:🤞🏻

I just dont know how i should program it...:(:(
 
It is harder to understand your way that FIFO way-:confused:🤞🏻

Goody has explained it quite clearly but if it's harder to understand than FIFO to you because you do not know how to use data/index registers then why don't you do it using FIFO where the Data Structure has already been created and all you have to do is move Data in and out of it, that is, the FIFO will take care of placing the data in correct positions and you don't have to worry about programming for that part.
I have already given you an idea how to use the FIFO and if you have doubts about that you can ask.​
 
Last edited:
Goody has explained it quite clearly but if it's harder to understand than FIFO to you because you do not know how to use data/index registers then why don't you do it using FIFO where the Data Structure has already been created and all you have to do is move Data in and out of it, that is, the FIFO will take care of placing the data in correct positions and you don't have to worry about programming for that part.
I have already given you an idea how to use the FIFO and if you have doubts about that you can ask.​

I am trying it but i cant find any solution...

FIFO store some value just at raising edge of some bit. That is ok, and i can store values just how i want. But problem comes when i want to empty FIFO value by value. It also works on raising edge of some bit.

But what if i want to open some gates in the same time? How can i strike 2 informations out of FIFO?...

I am not so good PLC programmer and it makes me headache.....


Project:
5 gates.
On panel you must pick order of opening and time interval between opening (1min, 2min,10sec).
Also you must pick how much gates are opened (1m, 2m, or stay closed).
When you press START program must be done without any changes.
When you press STOP close gates, or you can CLOSE gates by pressing CLOSE at panel one by one.

:unsure:
 
But problem comes when i want to empty FIFO value by value. It also works on raising edge of some bit.

Use a timer which gets reset on each gate on and use the DN bit of your timer to give signal to O(Out)...

But what if i want to open some gates in the same time?

... use the same DN bit to trigger a comparison placed before each Gate to ensure the correct Gate gets opened.


Timer DN +++++++++++++++ Gate 5
---||-------+ EQ +---------( L )
+ src a: %Ri.O+
+ src b: 5+
+++++++++++++++

 
Last edited:
two ways for fifo
have 5 byte in memory
if sequence is 2,3,4,5,1 put it in the mem like m1 = 2
m2=3 m3=4 m4=5 m5=1
if time is passed open gate m1(2)
m1=m2 m2=m3 m3=m4 m4=m5 m5 =0
then time again.
memory only can be filled when 0

method 2
have same memory m1..m5
two pointers one for input and one for output.
if input is hit increase inputpointer
if output (your timer) the outputpointer is increased.
if any pointer > 5 then pointer = 1
 

Similar Topics

Does anyone use these expressions or find them useful in the course of your work. I am taking a grad class with Industrial Systems Engineering...
Replies
5
Views
4,049
Hi guys, I am very grateful for your help. :D This time, I need help to built the logic gates (74ls04(not), 74ls08 (and), 74ls32 (or), and the...
Replies
2
Views
2,634
Hi guys, I am very grateful for your help. :D This time, I need help to built the logic gates (74ls04(not), 74ls08 (and), 74ls32 (or), and the...
Replies
0
Views
1,834
is there such thing as discrete logic gates for sensor inputs? I ran out of inputs for my plc rack I want to run a pair of sensor to a AND...
Replies
2
Views
2,454
Otis, a PLC programmer/consultant died suddenly at the age of 45. When he presented himself at the pearly gates for admission into Heaven the...
Replies
5
Views
2,254
Back
Top Bottom