stop/start with same PB

shane Smit

Member
Join Date
Nov 2003
Posts
2
Can enyone help me with this?
I want to make a Stop/Start program using the same pushbutton but, the
big catch is I can only use two lines. I can get it work only a few
times in a row but I cant figure out the exact scan times. Oh ya, I can only use contacts and coils not tools.

Thanx.
 
Last edited:
Arik, the 'traditional' flip-flop is like this:

| INPUT ONE-SHOT
|----] [---------------------( )
|
| ONE-SHOT OUTPUT OUTPUT
|----] [---------]/[-----+---( )
| |
| OUTPUT ONE-SHOT |
|----] [---------]/[-----+


Yet you have:

| INPUT ONE-SHOT
|----] [---------------------( )
|
| ONE-SHOT^ ONE-SHOT^ OUTPUT
|----] [----+----]/[-----+---( )
| | |
| OUTPUT | OUTPUT |
|----] [----+----]/[-----+


Which will work, but the toggle to OFF looks like it will be delayed one scan. I understand that you HAVE TO use a transitional contact with the normally-closed contact in order to make your logic work, but why do you need it with the normally-open contact, when 201.00 is already transitional?

Just curious?... :confused:

beerchug

-Eric
 
Shane said:
I can only use two lines

If by this you mean 2 rungs of ladder logic then Arik's or Eric's methods are fine.

If on the other hand you literally mean 2 lines using ladder logic, then as far as I know your particular PLC has to have a built in flip-flop instruction (i.e. Mitsubishi's ALT).
Of course you would still need to use a one-shot (ONS-AB, DIFU-Omron, PLS-Mitsi). Otherwise the instruction would operate on every scan of the PLC, leading to rapid alternation of the output whilst the input is on.

|   INPUT                  ONE-SHOT
|----] [---------------------( )
|
| ONE-SHOT FLIP-FLOP (ALT) OUTPUT
|----] [---------------------( )
|


One complication that many programmers overlook is shaky hand syndrome or dodgy contacts which can lead to input bounce and consequent unexpected results (from pressing the button). I use a timer to help avoid this problem...

|   INPUT           TIMER              ONE-SHOT
|----] [-------------] [-----------------( )
|
| ONE-SHOT FLIP-FLOP (ALT) OUTPUT
|----] [---------------------( )
|
| ONE-SHOT TIMER
|----]/[--------------------(0.2s)



Anthony
 
Anyone spot the mistake?

I posted last night from memory and after looking at it today I spotted a glaring error on the second ladder!

It should have read:

| INPUT TIMER ONE-SHOT
|----] [-------------] [-----------------( )
|
| ONE-SHOT FLIP-FLOP (ALT) OUTPUT
|----] [---------------------( )
|
| INPUT TIMER
|----]/[--------------------(0.2s)



As previously posted it would have alternated the output every 0.2 seconds... šŸ™ƒ

However, having studied the ladder further, I think this would work:

| INPUT TIMER FLIP-FLOP (ALT) OUTPUT
|----] [-------------] [-----------------( )
|
| INPUT TIMER
|----]/[--------------------(0.2s)



That's two lines of ladder and an input buffer timer!

Anthony
 
Eric F
Far as I remember that the way it work with Omron.I use this way
so maney years and i dont remember why.
In AB I use the "traditional" way and it work fine.
I will check it again and let you know.
Thanx for your comment.

Anthony
If we had in our PLC alterant contact we would not have this discussion, if you have built in altrant contact you dont need the timer just the input output(alterant contact) and one shot.
 
Interesting

:D None of the examples shown will work in a Siemens TI555. It takes 4 rungs in the 555. I wrote a small SCL file for the S7 to do it with a block. This was used to allow one button on an operator interface to toggle a PID loop between auto and manual but the prinicpal is the same. The code looks like this-

FUNCTION_BLOCK FB106

TITLE = 'Auto/Man Toggle'
//
// AUTO/MANUAL TOGGLE FOR PID Loops
//
VERSION: '1.0'
AUTHOR: MLL
NAME: AUTO_MAN
FAMILY: OP17

VAR_INPUT

// Output Parameters

AUTO_MAN_INPUT : BOOL;


END_VAR


VAR

CURRENT_STATE : BOOL;

END_VAR

VAR_OUTPUT

// Output Parameters

AUTO_MAN_OUTPUT : BOOL;


END_VAR


BEGIN

IF AUTO_MAN_INPUT AND Current_State THEN
AUTO_MAN_OUTPUT := FALSE;

END_IF;

IF AUTO_MAN_INPUT AND NOT CURRENT_STATE THEN
AUTO_MAN_OUTPUT := TRUE;

END_IF;

Current_State := AUTO_MAN_OUTPUT;


END_FUNCTION_BLOCKO
 
And in STL

You can also do a toggle in Statement list-

A DB9.DBX 4.0
FP M 11.0
= L 0.0
A L 0.0
AN DB9.DBX 0.0
S DB9.DBX 0.0
A L 0.0
A DB9.DBX 0.0
R DB9.DBX 0.0
 
Arik

No offence mate, but did you actually read my first post?

Since the originator of this thread (Shane) didn't state which PLC he needed to code to and given that he also wanted the code in two lines (he wrote 'lines' and not 'rungs') I stated that he can only do this if his PLC has an ALTERNATE (flip-flop) instruction:
I wrote:
your particular PLC has to have a built in flip-flop instruction (i.e. Mitsubishi's ALT).

You wrote:
if you have built in altrant contact you dont need the timer just the input output(alterant contact) and one shot

Do you mean like the first ladder shown in my first post?
Once again, I refer you to my first post:
One complication that many programmers overlook is shaky hand syndrome or dodgy contacts which can lead to input bounce and consequent unexpected results (from pressing the button)

Clearly, a one-shot and a flip-flop will work... The timer part just improves the reliabilty and if it is implemented as I have shown in the final ladder, it will eliminate the need for a one-shot. Because, in effect, the timers output bit can only be on for one scan when the input button is pressed.

Anthony
 
Eric the F is typing mistake sorry.


Anthony

First I want to apologize I didnā€™t mean to harm or insult.
I assumed he(Shan) didnā€™t have alternant contact on his PLC.
With alternate contact you still need 2 rungs .If Shan mean 2 line it maybe in STL Your way show also 2 rungs.
Your ladder. The timer is not necessary, it work like one shot and not give any thing just delay between the button hits (I hope I write it right).
Because after you hit the button the one shot(or output) go on and the timer go off.
It happen in one cycle.
 

Similar Topics

I am using durus development software of GE FANUC. i want to know how will i develop a logic for operating an output with only one start and stop...
Replies
5
Views
2,579
Hello I am trying to make a program work with a sqo instruction .The process has 5 steps ,and a starting step of zero.There should be 8 sec...
Replies
17
Views
1,051
Good morning to everyone on the forum and happy new year. I'm trying to use the following functions in sysmac studio, because I need to enable one...
Replies
1
Views
327
Good Morning , I would like to start a Powerflex 525 with a N.O. Start Pushbutton , and when the N.O. Start Pushbutton is released I would...
Replies
3
Views
1,663
Hello, I am trying to detect when the PLC changes from STOP to START mode. This can be considered an edge case scenario, but I would to analyze...
Replies
4
Views
1,566
Back
Top Bottom