AutomationDirect
Login | Register
Accounts & Orders
Cart
3
$221.00

Recent Orders

View and Manage | Request Cancellation
Loading Order History
Loading...

Your Account

Account Home

Checkout   $221.00


  • My Orders
  • Product Returns (RMAs)
  • Pay Proforma Invoices
  • Pay Freights
  • Pay Invoices / Invoice Reprint
  • Quotes / Favs / BOMs
  • Packing List Reprint
  • Purchase History Reports
  • My Product Docs
  • Manage / Apply for Credit
  • Tax Exemption
| Direct Sales US & Canada | 800-633-0405 | About | Contact | Line Card |
Products | Support
| Compare
  
Ordering Tools  
warning Cookies are not enabled on your browser.
Cookies are required for our site. Please enable cookies in your browser preferences to continue.
+
Navigation
+
Shopping Categories
  • Barcode / RFID / Vision
  • Bulk Wire & Cable
  • Cables (Terminated)
  • Circuit Protection / Fuses / Disconnects
  • Communications
  • Drives & Soft Starters
  • Enclosure Thermal Management & Lights
  • Enclosures & Racks
  • Field I/O
  • HMI (Human Machine Interface)
  • Hydraulic Components
  • Motion Control
  • Motor Controls
  • Motors
  • Pneumatic Components
  • Power Products (Electrical)
  • Power Transmission (Mechanical)
  • Process Control & Measurement
  • Programmable Controllers
  • Pushbuttons / Switches / Indicators
  • Relays / Timers
  • Safety
  • Sensors / Encoders
  • Stacklights
  • Structural Frames / Rails
  • Tools & Test Equipment
  • Valves
  • Water (Potable) Components
  • Wire & Cable Management
  • Wire & Cable Termination
  • Retired Products
+
Learn More
  • Brand Line Card
  • What's New
  • E-newsletter
  • Online PDF Catalog
  • E-books / White Papers
  • Video Tutorials
  • Company Reviews
  • Learning Library
  • Affordable Training
  • Free Online PLC training
  • Cybersecurity
+
In Depth Product Sites
  • Programmable Logic Controllers
  • Productivity1000 PLCs
  • Productivity2000 PLCs
  • Productivity3000 PLCs
  • ProductivityCODESYS
  • LS Electric XGB Series PLCs
  • ProductivityOpen
  • CLICK PLCs
  • Do-more BRX PLCs
  • C-more Touch Panels
  • AC & DC Drives
  • Motion Control Components
  • Servos
  • StrideLinx
  • Pneumatics
+
Product Selectors &
Configuration Utilities
  • PLC Family Selector
  • P1000 PLC Systems
  • P2000 PLC Systems
  • P3000 PLC Systems
  • ProductivityCODESYS
  • CLICK PLC Systems
  • Do-more® BRX PLC Systems
  • LS-Electric® XGB PLC Systems
  • Productivity®Open Systems
  • Datalogic® Safety Light Curtains
  • LS-Electric® Servo Systems
  • Nitra® Pneumatic Grippers
  • Object Detection (Sensors)
  • PAL Controller Configurator
  • Precision Gearbox Selector
  • Protos X® Field I/O
  • Pyrometers Selector
  • Quadritalia® Modular Enclosures
  • Soft Starters
  • Stepper System Selector
  • SureFrame T-slot Extrusion
  • SureMotion® XYZ Gantry
  • SureServo2® System Selector
  • SureStep® Linear Actuators
  • Timing Belts & Pulleys
  • Werma® Stacklights
  • ZIPLinks
  •    Videos   
  •    PLC Training   
  •    My Product Docs   

Educational And Training Videos


Videos Home > BSA Programming Merit Badge - ...

BSA Programming Merit Badge - Jamboree - Automation Station Ladder Logic from AutomationDirect



https://www.automationdirect.com/adc/home/home

(VID-BS-0009) Follow along with this tutorial to learn how to program a factory PLC for the new Programming Merit Badge!

AutomationDirect donated time and equipment for the creation of these Boy Scouts of America Merit Badge videos.


Hide Transcript
View Transcript

Pretty much every product you touch was made in a factory that uses machines that are controlled by a special kind of computer called a programmable logic controller, or PLC for short. Your uniform, the electronic devices you use, your tent, your flashlight, your knife, your shoes, water bottle, pen, paper, notebook, handbook, this table, this computer, just about everything you use every day was made possible because somebody programmed a PLC to do it. And in about 15 minutes, you're going to know how to do it, too. PLCs come in all shapes and sizes, but they all share the same characteristics. They're reliable and rugged enough to work in a factory environment, and they're used to control machines that keep doing the exact same thing over and over again all day long. And most PLCs are programmed using something called ladder logic. The ladder logic programming language was created to make it easy for factory workers, who were mostly electrical guys, to learn how to program. That explains why ladder logic looks a lot like a wiring diagram, so it'd be easy for them to learn and understand. Of course, it looks a lot like a ladder, too, which explains the name, right? Remember, before computers, they had to control machines with electronic devices that were all wired together in a cabinet. It was a mess and really hard to rewire and maintain when changes had to be made. They would have to shut down a factory for days just to make a change. When the PLC came along, it changed everything, and life got a whole lot easier for the factories. Here's a simple example. Think of this vertical line on the left as your power source. We call that a power rail. We connect the power source to a switch, which is then wired to a motor or a light or something like that. When the switch connects the power to the motor, it turns on. We call this guy a contact because it generically refers to anything that connects or contacts these wires together. There's all kinds of input devices as put here. It could even be something like a temperature or pressure sensor. The inputs on this PLC are labeled with X's. We have eight inputs on this PLC labeled X1 through X8. We're using X1 and X2 for these two push buttons here. X3 and X4 for this joystick switch, and X5 is a proximity sensor. It detects metal objects. This guy's called a coil because you're usually energizing the coil of wire on a motor or a heater or a light bulb or relay or something like that. The outputs on our PLC are labeled with Y's. We have six on this PLC, Y1 through Y6. These two fan motors and this light are connected to three of our outputs. When you buy a PLC, you specify how many IOs you want and you can always add more with extra modules. This line of code is called a rung, like the rung on a ladder. As we add more lines of code, we get more rungs on the ladder. Let's try this program. Your laptop should already be connected to the PLC. You can tell that by seeing that we're online and that the PLC's currently running. So, all we need to do to transfer this program down to the PLC is hit the transfer button right here. Go ahead and do that. Click on the transfer button. This dialog tells me how much memory I'm using. Blue is the memory I've used. Red is the memory that's available. As you can see, we're not using very much memory, are we? This looks good, so hit okay. It's asking if we want to save the project. You can just put the word temp in here and say save. The software's telling us that the project in the PLC is different from the project we're getting ready to send down there. Are we sure we want to overwrite that? This is really important. Remember, you could be controlling a big machine or even a whole factory with this PLC. You better be pretty sure you want to make changes, right? We do, so hit yes. And this dialog's telling us the PLC's running. Are we sure we want to stop it? Again, we want to make sure it's okay to shut down the factory when we do this. We're good, so hit yes. Program downloads. The transfer is complete, so hit okay. And one more time, it's asking us, are we sure we want to put this PLC back in run mode? We are, so we say okay. And that's it. We've transferred the program down to the PLC. Well, try it. Press button X1. Did the fan turn on? Great. Well, that's it. That's an entire PLC program. Pretty easy, isn't it? Now, pretend you're the factory PLC programmer, and your boss just told you he wants you to change it so the button X1 controls the fan that's hooked up to Y2, not Y1. How do you do that? Well, easy. Just double-click on this guy, change it to Y2, the fan on Y2, and transfer it down to the PLC. Go ahead and do that. Hit the transfer button. Answer all the questions. Okay, the memory looks good. Yes, we want to change the project. Yes, we want to stop the PLC. Program transfers down. Transfer is complete. Are we sure we want to run the PLC? Yes, we are. And our program's ready to go. Okay, now when you press switch X1, does it turn on fan Y2? It sure does. Good job. Now, if that's all PLCs did, they wouldn't be worth spending the money on cuz you could do all of that with simple wires and switches, right? But PLCs can do so much more. Okay, your boss just gave you a new assignment. When you press button one, he wants fan one to turn on for 2 seconds, and then turn off by itself. Well, things just got a lot more complicated, didn't they? That's going to be a lot harder to do with wires, isn't it? But guess what? Doing it with the PLC is easy. Look, instead of switch one controlling fan one directly, what we're going to do is we're going to replace that with a timer. Drop the timer on that. And we'll use timer one. There's lots of timers you can use. We want the timer to run for 2 seconds. And let's see. This says when the switch turns on turn the fan on 2 seconds after the switch turns on. That's not what we want. This one says turn the fan on when you press the switch, and when you release the switch, wait 2 seconds and turn the fan off. That's close to what we want. We'll take that one. Great. Now the button press kicks off a timer. Well, look. All we do is grab another contact, put it down here on rung two. Go ahead and do that. Now we want this contact to be controlled by the timer. So now you press the button, it kicks off a timer, and then the timer now controls what? The fan. So grab an output coil. And we wanted fan one to be controlled by that timer. Now the PLC program needs to know when it's done. So grab an end statement and put it down here on the last rung. Great. That's our complete program, but we missed one important thing. Go back into the timer, double-click on it. And we said 2 milliseconds. No, we want 2 seconds, don't we, guys? So make that 2 seconds and say okay. Great. Now we have a whole program. The button press kicks off a timer. The timer then controls the fan. Try it. Hit the transfer button. Memory looks good. Do we want to change the PLC? Yes, we do. The PLC is currently in run mode. Do we want to change it to stop mode? Yes, we do. It's downloading the program, downloading the project. It's all set. Do we want to run the PLC? Yes, we do. And away we go. Now if you reach down and press and release button one, does the fan stay on for 2 seconds? It sure does. How cool is that? Did you notice that you can see when things happen right on the screen? For example, when I press the button, I actually see it light up. And I also see the timer light up. And then when I release the button, watch this. You can see the timer starts to count up to 2 seconds, and then releases the fan. So, since you can see everything that's going on right here on the screen, it makes it really easy to debug your PLC program. Okay, well, guess what? That's not what your boss asked for, is it? He wants the fan to turn off 2 seconds after you start pressing the switch, not after you let go. Well, how do you do that? Easy. This contact here stays active the whole time you hold the button down, right? What we're going to do is we're going to replace that with something called an edge contact. That detects either the rising edge or the falling edge of the button. That is, it detects when you press the button, or when you release the button. Well, we want to detect when we press the button. So, we'll say, "Okay." So, it has a little arrow in there now. So, it says, "Only send a signal to the timer when you first press the button." So, the timer will immediately start timing, and we'll see the fan turn on for just 2 seconds, regardless of how long you hold the button down. Okay, let's try it again. Transfer the program. Memory looks good. Do we want to transfer the project? Do we want to stop the PLC? Transfer's in process. Good. Do we want to run the PLC? Yes, we do. Okay, we're up and running. Now, this time I want you to hold the button down, and see if the fan turns off after 2 seconds anyway. Here we go. And sure enough, it does. Awesome. Mission accomplished. Okay, well, guess what? Your boss just came in, and he said he wants button two to turn on the fan that's on output Y2, and he wants that same button to turn on the light, which is on output Y3, at the same time. How do we do that? Well, it's the same as before. We're going to take a regular contact, drag this one down on the rung three. We want that to be the button that's on input X2, so we put that there. And then this guy is going to control both the fan and the light. So, let's do the fan first. We grab an output coil, drop it right here. And let's see that second fan, he's located at Y2. And the light is located at Y3. But how do we get this button to control both of them? Well, it's easy. Make sure this guy's highlighted, hold down the control key, and look, it says we can add a coil here, right? So, while you're holding down the control key, press the down arrow once, and let go. Now we can add another output coil in here. And we can say we want that to drive the output at Y3, which is our light. Don't forget your end statement down here at the bottom. And now we have another complete program. X1 runs a timer, which controls fan one. The button at X2 controls both the fan at Y2 and the light at Y3. And go ahead and transfer the program. There's our memory, we're okay. Do we really want to transfer this project? Yes, we do. Do we want to stop the PLC? Yes, we do. It transfers the program down to the PLC. And we really want to run this project? Yes, we do. Okay, well, button one should still turn on fan one for two seconds, and it does. And now the button at input X2 should turn on the fan at output Y2 and the light at output Y3 while it's held down. And it does. Well, that's how you program a PLC. You just keep adding more and more contacts and coils. The bigger the factory, the more of these you'll need, but it's still the same kind of thing. Please understand PLCs can do a lot more than we covered here, but hopefully you see that PLC programming is definitely something you can do. After all, you just wrote four PLC programs from scratch, didn't you? And keeping our factories running is a pretty important and rewarding job, so you might even want to consider it as a career someday. We want to thank Automation Direct for supplying the PLC hardware and software for this demo and for hosting the Programming Merit Badge tent at the Jamboree.



No data returned!
An error has occurred! Please contact support
Contact, Connect & More
Sign Up
to receive:
FREE e-Newsletter
sign up today!
Connect With Us
Social Media Channels:
linkedin    facebook    x    instagram    youtube
Company Information
About Us
Brand Line Card
System Integrator Program
International Sales
Panel Builder Program
Site Help
Company Reviews
Download Price List
Contact Us
Contact Options
1-800-633-0405
Monday - Friday
9 a.m. - 6 p.m. ET
excluding holidays
Career Opportunities
We're a great place to work!
Check out our job openings

Need Training?
Affordable Training by Interconnecting Automation
Free Online PLC Training
FREE Video Tutorials
Information & News
What's New / In The News
FREE e-Newsletter
Automation Notebook
Product Literature
White Papers
News, Product and Training Bulletins
E-Books
payment methods
AutomationDirect

BBB Accredited

Voted #1 mid-sized employer in Atlanta
Check out our job openings

Copyright © 1999-2026 AutomationDirect.  ALL RIGHTS RESERVED.
Site Map    Send Us your Feedback    Unsubscribe    Email Preferences    Legal & Business Policies    Cookie Preferences    YouTube Terms of Service    AutomationDirect Product API
Clear login credentials
Back to Top


 Updating...
Info