Industrial Training - The Best for Less

PLC Programming Example: Automatic

  1. Home >
  2. articles >
  3. automation >
  4. plc programming example automatic

PLC Programming Example, simple manual and automatic control.

 

PLC programming example - Automatic
Tap picture to see complete PLC programming example.

 

This PLC programming example below was written to answer a specific request by a learner, so we thought we would also share it with our website visitors. This PLC programming example is for manual control and automatic control. The manual rung jogs motor only when a momentary jog push button is pressed. The automatic control rung is a simple seal-in circuit. We use even this most simple PLC programming example to pass along and/or re-enforce some of the PLC programming best practices we teach. If you would like to have your employees learn more best practice PLC programming, please request a quote for our on-site PLC training.

 

Best practice PLC programming would have all real-world input and output addresses (like I:1/0 [I0.0] or O:3/6 [Q0.0]) in their own Cross-Reference subroutine (XREF Sub). But for our classroom purpose, in this programming example, we used real-world I/O in a single subroutine so all logic can be seen on one screen.

 

Rung 0 comment: Boolean Logic for this rung below is ... If JOG_PB or JOG_HMI then JOG_MOTOR_1

 

Instruction List - { BST XIC I:1.0/0 NXB XIC B3:0/10 BND OTE B3:0/9 }

 

PLC programing example rung 0

 

Best practice PLC programming requires the seal-in element (instruction/contact) to be the last element in the branch of the seal-in circuit. We used seal-in for this logic because best practice states NEVER use a latching instruction (or set/reset or negate) unless needed. Always defaulting to a seal-in type circuit/logic which helps ensure a safe start-up condition on machine power-up.

 

Rung 1 comment: Boolean Logic for this rung below is ... If AUTO_PB or AUTO_HMI or RUN_MODE and not STOP_PB, then RUN_MODE

 

Instruction List - { BST XIC I:1.0/1 NXB XIC B3:0/12 NXB XIC O:3.0/6 BND XIO I:1.0/2 OTE O:3.0/6 }

 

PLC programing example 2

 

We will end with a couple more best practice PLC programming tips that will save end-users (company using the finished equipment and PLC program for the next 10 years) millions of dollars in reduced downtime…

#1 Best Practice PLC programming rule: Keep your program easy for the layman to understand.

#2 Best Practice PLC programming rule: Document, document, document!

Every rung should have a detailed description, every element/instruction in rung should have a detailed descriptor too.

#2.a Best Practice PLC programming rule: Do NOT use acronyms in descriptions, spell them out.

 

Rung 2 comment: Boolean Logic for this rung below is ... If JOG_MOTOR_1 or RUN_MODE and not ESTOP_1, then MOTOR_1_RUN

 

Instruction List - { BST XIC B3:0/9 NXB XIC O:3.0/6 BND XIO B3:0/8 OTE O:3.0/7 }

 

PLC programing example 3

 

Legend: BST=Branch Start, NXB=Next Branch, BND=Branch End

 

 

The video below will show you this PLC programming example running in a real PLC for you to better understand the ladder logic processing.

plc programming example video

 

 

 

Please share this article:
The more we see people share our content, like and comment on our YouTube video channel, etc., the more we are inspired to share more. So please spread the word. Thanks


Linkedin Join 4600+ other professionals who follow us on LinkedIn.
Youtube Please subscribe while on Youtube. 35.3K+ subscribers learn from our hundreds of educational videos.
Twitter 3800+ followers keep up to date on our Twitter feed. Won't you join them?
Facebook Over 3000 friends like our Facebook feed, which you may want to follow also.
Pinterest Over 4000 followers find interesting pictures on our 74 Pinterest channels, you may too.