You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old March 9th, 2010, 10:47 PM   #1
davidd31415
Member
United States

davidd31415 is offline
 
Join Date: Mar 2010
Location: USA
Posts: 3
PLC State Machines / Sequences

Hi,

I am looking for basic ladder logic to create a PLC state machine or sequence. For starters I'd just like to alternate between different bits being turned one seconds after each other.

For instance, bit one on, delay one second, bit two on, delay one second, bit three on, and so on. Can someone point me to an example ladder logic code which accomplishes this?

Will I need to use a separate timer for each state or can a single timer be used?

Thanks!
  Reply With Quote
Old March 10th, 2010, 04:18 AM   #2
jstolaruk
Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: SE Michigan
Posts: 2,094
Welcome to the forum.

Homework, eh?

A starting hint will be to use separate timers. Now, give something a try & post what you've completed and you'll get some help without actually giving you the answer. Good luck!
__________________
"You can live to be a hundred if you give up all the things that make you want to live to be a hundred." Woody Allen
  Reply With Quote
Old March 10th, 2010, 06:13 AM   #3
davidd31415
Member
United States

davidd31415 is offline
 
Join Date: Mar 2010
Location: USA
Posts: 3
Homework? No. I studied PLCs for about two weeks back in the late 90s while working on my BSEE but it was the manufacturing engineering students who focused on them.

If you'd like to discuss the application feel free to send me a PM and I'll respond with my phone number. I'll buy you lunch if you're ever out in the Troy area. I might have some future work for you to, if you're looking.

Meanwhile, if this forum does not assist with simple questions then hopefully this thread can be deleted. I'd hate for anyone, student or professional alike, to search the internet, find this thread, and then read your response.
  Reply With Quote
Old March 10th, 2010, 06:24 AM   #4
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 4,624
AutomationDirect provides for some of its lines a helpful add-on to the Relay Ladder Logic called Stage Programming. They have a demo version of their software (DirectSoft - limited to a fairly small 100 steps). I use Stage Programming for our machines to control specific processing steps.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old March 10th, 2010, 06:48 AM   #5
mordred
Member
Canada

mordred is offline
 
mordred's Avatar
 
Join Date: Mar 2004
Location: Red Deer
Posts: 1,892
which processor ? I didn't see anything on processor type?
  Reply With Quote
Old March 10th, 2010, 06:55 AM   #6
jstolaruk
Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: SE Michigan
Posts: 2,094
Quote:
Originally Posted by davidd31415 View Post
Homework? No. I studied PLCs for about two weeks back in the late 90s while working on my BSEE but it was the manufacturing engineering students who focused on them.

If you'd like to discuss the application feel free to send me a PM and I'll respond with my phone number. I'll buy you lunch if you're ever out in the Troy area. I might have some future work for you to, if you're looking.
PM sent.

Quote:
Originally Posted by davidd31415 View Post
Meanwhile, if this forum does not assist with simple questions then hopefully this thread can be deleted. I'd hate for anyone, student or professional alike, to search the internet, find this thread, and then read your response.
This site is often a target for students that just want to complete the homework by having someone else provide the answers. Forum members are happy to assist the student in learning by trying to lead the student to the answers by themselves.
__________________
"You can live to be a hundred if you give up all the things that make you want to live to be a hundred." Woody Allen
  Reply With Quote
Old March 10th, 2010, 08:25 AM   #7
Bobbias
Member
Canada

Bobbias is offline
 
Join Date: Jan 2010
Location: Midland, Ontario
Posts: 231
Yes, sorry if we sounded like a bunch of grumpy old codgers trying to keep people from learning anything. If you do a search of the forums for State Machines, you'll see quiute a few posts discussing them, and the various uses, ways of programming, and such.

As for something like what your doing, if your using Allen Bradley PLCs, there's the SQO function. Using that, you could accomplish what you want. I did a quick google search and came across this, which looks helpful. However, it explains the function using tags, which are only available in RSlogix5000, not 500.
  Reply With Quote
Old March 10th, 2010, 08:36 AM   #8
mordred
Member
Canada

mordred is offline
 
mordred's Avatar
 
Join Date: Mar 2004
Location: Red Deer
Posts: 1,892
also do a search n this forum SQO has been under discussion numerous times
  Reply With Quote
Old March 10th, 2010, 08:50 AM   #9
Bobbias
Member
Canada

Bobbias is offline
 
Join Date: Jan 2010
Location: Midland, Ontario
Posts: 231
That too, lol. This forum has HUGE amounts of knowledge available for you to search through. It is quite possibly the best place to learn about PLCs online.
  Reply With Quote
Old March 10th, 2010, 11:47 AM   #10
davidd31415
Member
United States

davidd31415 is offline
 
Join Date: Mar 2010
Location: USA
Posts: 3
Bobbias,

Actually I've been using DL PLCs but I'd like to be able to quickly write state machines regardless of what PLC I'm using.

Using the term SQO should help narrow my searches.

I found this book online this morning: http://webbooks.net/freestuff/plc.pdf which shows a few different state machine design examples on pages 289-298. I'll take a look at other discussions on here tonight.

Regards,

David

Last edited by davidd31415; March 10th, 2010 at 12:33 PM.
  Reply With Quote
Old March 10th, 2010, 11:58 AM   #11
Bobbias
Member
Canada

Bobbias is offline
 
Join Date: Jan 2010
Location: Midland, Ontario
Posts: 231
Also, searching Washing Machine may bring up a lot of stuff about state machines, lol.
  Reply With Quote
Old March 10th, 2010, 12:37 PM   #12
Doug-P
Member
United States

Doug-P is offline
 
Doug-P's Avatar
 
Join Date: Jun 2003
Location: Pa
Posts: 609
A common method of doing what you want is to use an integer register to enable various sections of logic as the sequence progresses.

When the register EQUals '1' say, some logic is enabled causing a machine to do something. At some preprogrammed point a condition will be met (limit switch made, timer done, etc.). When this happens a new value is loaded to the integer register thus enabling a new section of logic to accomplish the next step and disabling the previous step. Each step will have this EQU comparison - using different values, of course, to enable the various sections. This is very similar to the stage programming mentioned by bernie_carlton.

Sequential Function Charts are another form of sequencing. If you can draw out your sequence with an SFC the conversion to ladder is straightforward.

I would dissuade you from SQOs.
__________________
...the person that had took a bull by the tail once had learnt sixty or seventy times as much as a person that hadn't, and said a person that started in to carry a cat home by the tail was getting knowledge that was always going to be useful to him, and warn't ever going to grow dim or doubtful.
-Tom Sawyer Abroad
  Reply With Quote
Old March 10th, 2010, 12:41 PM   #13
jstolaruk
Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: SE Michigan
Posts: 2,094
Quote:
Originally Posted by Doug-P View Post
A common method of doing what you want is to use an integer register to enable various sections of logic as the sequence progresses.

When the register EQUals '1' say, some logic is enabled causing a machine to do something. At some preprogrammed point a condition will be met (limit switch made, timer done, etc.). When this happens a new value is loaded to the integer register thus enabling a new section of logic to accomplish the next step and disabling the previous step. Each step will have this EQU comparison - using different values, of course, to enable the various sections. This is very similar to the stage programming mentioned by bernie_carlton.

Sequential Function Charts are another form of sequencing. If you can draw out your sequence with an SFC the conversion to ladder is straightforward.

I would dissuade you from SQOs.
Agreed.

Sequencers can be a bear to figure out by others or even by the author at later dates. Plus, they are not necessarily transportable between plc mfgs (some plcs don't support them). In my case, customers specifically disallow them.
__________________
"You can live to be a hundred if you give up all the things that make you want to live to be a hundred." Woody Allen
  Reply With Quote
Old March 10th, 2010, 12:41 PM   #14
PLCRookie
Member
United States

PLCRookie is offline
 
PLCRookie's Avatar
 
Join Date: Dec 2005
Location: Right here
Posts: 299
This may be of help also.
__________________
"Quality, Delivery, Price..........Choose two."
  Reply With Quote
Old March 10th, 2010, 12:44 PM   #15
PLCRookie
Member
United States

PLCRookie is offline
 
PLCRookie's Avatar
 
Join Date: Dec 2005
Location: Right here
Posts: 299
It would be more helpful with the attachment, but is is too big. I will zip it. Sorry.

__________________
"Quality, Delivery, Price..........Choose two."
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 12:56 PM
Hard wiring the PLC Doug Hylton LIVE PLC Questions And Answers 46 October 23rd, 2007 12:21 PM
OMRON CPM2A PLC and RS-232C to the PC vislab LIVE PLC Questions And Answers 7 April 12th, 2007 01:02 PM
PLC to PLC communication srik LIVE PLC Questions And Answers 10 April 4th, 2006 06:38 AM
Sequential state machines kebaldwin LIVE PLC Questions And Answers 15 January 1st, 2003 08:00 PM


All times are GMT -5. The time now is 12:46 PM.


.