FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Engineering » Control
ladder logic question
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
Author Message
bakerjw2000
science forum beginner


Joined: 16 Jul 2006
Posts: 2

PostPosted: Sun Jul 16, 2006 12:59 am    Post subject: ladder logic question Reply with quote

I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.
Back to top
Stanislaw Chmielarz
science forum beginner


Joined: 16 Jul 2006
Posts: 2

PostPosted: Sun Jul 16, 2006 8:30 am    Post subject: Re: ladder logic question Reply with quote

bakerjw2000 wrote:

Quote:
I am trying to take a normally open switch such as a push button
and make it toggle a binary bit on and off. SImple butI can't
seem to grasp what I need to do. I am sure someone has done it
before.

It seems to me that You ought to implement flip flop type D.


--
Pozdrowienia!!StaCH
Sieci,systemy,serwis PC,alarmy,kamery,domofony,sterowniki PLC.
http://www.uniprojekt.com mobile:wap.uniprojekt.com
Back to top
BFoelsch
science forum beginner


Joined: 10 Jun 2005
Posts: 10

PostPosted: Sun Jul 16, 2006 2:16 pm    Post subject: Re: ladder logic question Reply with quote

"bakerjw2000" <bakerjw@bakerjw.org> wrote in message
news:1153011576.513800.6760@h48g2000cwc.googlegroups.com...
Quote:
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.

SOR XIC I:002/4 ONS B3/10 OTE B3/0 EOR
SOR BST XIC B3/0 NXB XIC B3/1 BND BST XIO B3/1 NXB XIO B3/0 BND OTE B3/1 EOR


That should do it for you.
Back to top
Jerry Avins
science forum Guru


Joined: 03 May 2005
Posts: 534

PostPosted: Sun Jul 16, 2006 3:48 pm    Post subject: Re: ladder logic question Reply with quote

Stanislaw Chmielarz wrote:
Quote:
bakerjw2000 wrote:

I am trying to take a normally open switch such as a push button
and make it toggle a binary bit on and off. SImple butI can't
seem to grasp what I need to do. I am sure someone has done it
before.

It seems to me that You ought to implement flip flop type D.

Stanislaw,

Don't you mean set-reset?

bakerjw2000,

Does the device repertoire not include a toggle switch? If not, you can
do what you want with two pushbuttons and either a set-reset flipflop or
a latching relay. (You can make a latching relay from a single two-pole
relay a normally-closed, and a normally-open pushbutton.)

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
Stanislaw Chmielarz
science forum beginner


Joined: 16 Jul 2006
Posts: 2

PostPosted: Sun Jul 16, 2006 4:20 pm    Post subject: Re: ladder logic question Reply with quote

Jerry Avins wrote:

Quote:
Stanislaw Chmielarz wrote:
bakerjw2000 wrote:

I am trying to take a normally open switch such as a push
button and make it toggle a binary bit on and off. SImple butI
can't seem to grasp what I need to do. I am sure someone has
done it before.

It seems to me that You ought to implement flip flop type D.

Stanislaw,

Don't you mean set-reset?

No, one input, output divide by 2. For set-reset You must use two
inputs of PLC.



--
Pozdrowienia!!StaCH
Sieci,systemy,serwis PC,alarmy,kamery,domofony,sterowniki PLC.
http://www.uniprojekt.com mobile:wap.uniprojekt.com
Back to top
Jerry Avins
science forum Guru


Joined: 03 May 2005
Posts: 534

PostPosted: Sun Jul 16, 2006 4:24 pm    Post subject: Re: ladder logic question Reply with quote

Stanislaw Chmielarz wrote:
Quote:
Jerry Avins wrote:

...

Quote:
Stanislaw,

Don't you mean set-reset?

No, one input, output divide by 2. For set-reset You must use two
inputs of PLC.

Thanks for explaining. There are toggle flip-flops that aren't D types.
With your arrangement, I would demand an indicator output to make the
state of the toggle known. Working blind is not good practice.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
Mike Lamond
science forum beginner


Joined: 15 Sep 2005
Posts: 11

PostPosted: Sun Jul 16, 2006 4:52 pm    Post subject: Re: ladder logic question Reply with quote

"BFoelsch" <BFoelsch@comcast.ditch.this.net> wrote in message
news:6oWdnc90BcuJ1yfZnZ2dnUVZ_oudnZ2d@giganews.com...
Quote:

"bakerjw2000" <bakerjw@bakerjw.org> wrote in message
news:1153011576.513800.6760@h48g2000cwc.googlegroups.com...
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.

SOR XIC I:002/4 ONS B3/10 OTE B3/0 EOR
SOR BST XIC B3/0 NXB XIC B3/1 BND BST XIO B3/1 NXB XIO B3/0 BND OTE B3/1
EOR


That should do it for you.



I arrange my branches differently, but the effect is the same (corrected
for SLC addressing & instructions). The trick is remembering that ladder
logic executes instructions one at a time.
SOR XIC I:1.0/0 OSR B3:0/10 OTE B3:0/11 EOR
SOR BST XIC B3:0/11 XIO B3:0/12 NXB XIO B3:0/11 XIC B3:0/12 BND OTE B3:0/12
EOR

SOR XIO B3:0/13 OTE B3:0/13 EOR
alternates on every scan.

Mike
Back to top
bakerjw2000
science forum beginner


Joined: 16 Jul 2006
Posts: 2

PostPosted: Sun Jul 16, 2006 5:18 pm    Post subject: Re: ladder logic question Reply with quote

With the advice of a flip flop, I was able to locate a forum that
addressed multiple methods of performing the operation that I was tring
to perform. i.e. Press a button and a contact turns on. Press it again
and the contact goes off.

Really need a monospace font to view the ladder.
PB Target R1
--] [-+-]/[--+--------------------( )-
| |
R1 | PB |
--] [-+-]/[--+

PB R1 Target
--]/[-+-] [--+--------------------( )-
| |
Target| PB |
--] [-+-] [--+

Thanks for all of the advice. It always helps to see multiple ways of
doing things.
Back to top
BFoelsch
science forum beginner


Joined: 10 Jun 2005
Posts: 10

PostPosted: Sun Jul 16, 2006 5:24 pm    Post subject: Re: ladder logic question Reply with quote

"Mike Lamond" <NOSPAMm.lamond@worldnet.att.net> wrote in message
news:69uug.137664$mF2.86903@bgtnsc04-news.ops.worldnet.att.net...
Quote:
"BFoelsch" <BFoelsch@comcast.ditch.this.net> wrote in message
news:6oWdnc90BcuJ1yfZnZ2dnUVZ_oudnZ2d@giganews.com...

"bakerjw2000" <bakerjw@bakerjw.org> wrote in message
news:1153011576.513800.6760@h48g2000cwc.googlegroups.com...
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.

SOR XIC I:002/4 ONS B3/10 OTE B3/0 EOR
SOR BST XIC B3/0 NXB XIC B3/1 BND BST XIO B3/1 NXB XIO B3/0 BND OTE B3/1
EOR


That should do it for you.



I arrange my branches differently, but the effect is the same (corrected
for SLC addressing & instructions). The trick is remembering that ladder
logic executes instructions one at a time.
SOR XIC I:1.0/0 OSR B3:0/10 OTE B3:0/11 EOR
SOR BST XIC B3:0/11 XIO B3:0/12 NXB XIO B3:0/11 XIC B3:0/12 BND OTE
B3:0/12
EOR

SOR XIO B3:0/13 OTE B3:0/13 EOR
alternates on every scan.

Mike


That's a good way to do it.

I thought that your method might save a word or two of memory, but both your
example and mine compile down to 13 instruction words (in a SLC500, anyway.)

Actually, doing it the following way uses only 10 words of memory, but by
the time you add a rung to examine C5:0.ACC/0 you are back up to 13 words,
and then you are using 3 rungs, so I generally avoid it.

SOR XIC B3:0/0 OSR B3:0/10 CTU C5:0 2 0 EOR
SOR XIC C5:0/DN RES C5:0 EOR

Thanks for the tip.
Back to top
Peter Nachtwey
science forum addict


Joined: 06 Nov 2005
Posts: 68

PostPosted: Sun Jul 16, 2006 7:20 pm    Post subject: Re: ladder logic question Reply with quote

bakerjw2000 wrote:
Quote:
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.

I see you found one of the www.plcs.net threads on flip flops. Search
for tidbits and toggles too. There are many threads about this on
www.plcs.net because unlike you, the rookies can't search and think
they are the first to have this problem. BTW, beat this.

Output = Output xor ( Input and not LastInput )
LastInput = Input

This would translate into 4 instructions. You can get it down to 3 if
you change LastInput to NotLastInput

Output = Output xor ( Input and NotLastInput )
NotLastInput = not Input

This takes advantage of the fact that the not instruction can negate
and move at the same time. The downside is that NotLastInput must be
initialized at first scan. Perhaps initializing is necessary anyway.

Rockwell does not provide a bitwise xor or alternate function except on
the 5000 family. I use word or dword functions to process 16 or 32
bits at a time anyway instead of processing the bits one by one.
Back to top
Helmut Wabnig
science forum Guru Wannabe


Joined: 25 Mar 2005
Posts: 171

PostPosted: Sun Jul 16, 2006 7:24 pm    Post subject: Re: ladder logic question Reply with quote

On 15 Jul 2006 17:59:36 -0700, "bakerjw2000" <bakerjw@bakerjw.org>
wrote:

Quote:
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.

Huh? Just pick an address (some internal bit) like %V115.3 or what
ever your application uses.

The pushbutton address will be something like X22.3 depending on input
config.

Your kidding right?

Look it up on the net


Quote:


Daveb
Back to top
Helmut Wabnig
science forum Guru Wannabe


Joined: 25 Mar 2005
Posts: 171

PostPosted: Sun Jul 16, 2006 7:50 pm    Post subject: Re: ladder logic question Reply with quote

On 15 Jul 2006 17:59:36 -0700, "bakerjw2000" <bakerjw@bakerjw.org>
wrote:

Quote:
I have what is bound to be a very simple question. I am using AB
SLC500's but the logic will be there regardless of what platform I
would be using.

I am trying to take a normally open switch such as a push button and
make it toggle a binary bit on and off. SImple butI can't seem to grasp
what I need to do. I am sure someone has done it before.

Thanks for any assistance.


Sorry, I missed the point of the question

Daveb
Back to top
Jerry Avins
science forum Guru


Joined: 03 May 2005
Posts: 534

PostPosted: Sun Jul 16, 2006 8:01 pm    Post subject: OT ladder logic question Reply with quote

DaveB wrote:

...

Quote:
Sorry, I missed the point of the question

I often find that what at first seems like a dumb question is in fact a
deficient reading of the question. I'd embarass myself more often if I
didn't realize that.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
Helmut Wabnig
science forum Guru Wannabe


Joined: 25 Mar 2005
Posts: 171

PostPosted: Sun Jul 16, 2006 10:40 pm    Post subject: Re: OT ladder logic question Reply with quote

On Sun, 16 Jul 2006 16:01:58 -0400, Jerry Avins <jya@ieee.org> wrote:

Quote:
DaveB wrote:

...

Sorry, I missed the point of the question

I often find that what at first seems like a dumb question is in fact a
deficient reading of the question. I'd embarass myself more often if I
didn't realize that.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Funny thing is, everytime I do exactly what he was asking I always say

hmm how did I do it last time.

Regards
Daveb
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
The time now is Tue Jun 27, 2017 12:10 am | All times are GMT
Forum index » Science and Technology » Engineering » Control
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Question about Life. socratus Probability 0 Sun Jan 06, 2008 10:01 pm
No new posts Probability Question dumont Probability 0 Mon Oct 23, 2006 3:38 pm
No new posts Question about exponention WingDragon@gmail.com Math 2 Fri Jul 21, 2006 8:13 am
No new posts question on solartron 1260 carrie_yao@hotmail.com Electrochem 0 Fri Jul 21, 2006 7:11 am
No new posts A Combinatorics/Graph Theory Question mathlover Undergraduate 1 Wed Jul 19, 2006 11:30 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0323s ][ Queries: 16 (0.0064s) ][ GZIP on - Debug on ]