PLC/Training Labs

< PLC

This will have a comprehensive set of labs to learn how to write ladder logic programs using the Free Automation Direct Do-More PLC software (Link to software), which has a built in PLC simulator.

Warning

edit

SEE Wikipedia: Electric shock AND UNDERSTAND THE RISKS. This warning is from the Electrical Circuit Analysis page and is especially applicable here, while building a PLC.

If you decide to put together a trainer board, please read this warning. As little as 10 mA AC current can cause temporary paralysis and an inability to let go or withdraw from the current source. If the current bypasses the skin, as little as 10 uA may cause heart failure. Direct current is much less dangerous, unless voltages are high or there is direct connection bypassing the skin. Wet skin has lower resistance, never approach AC-mains-connected electrical equipment or wiring with wet skin or bare feet. Pay special attention to proper grounding of AC power plugs and of anything which may be, deliberately or accidentally, connected to a hot (energized) wire. With good grounding, an accidental short circuit is likely to blow a fuse or circuit breaker, instead of maintaining a shock hazard. Low-voltage circuits, up to 12 VAC or DC may be handled quite safely, as long as the skin is not bypassed (such as with wide contact -- such as grasping non-insulated pliers -- or wet skin, or a metal ring). Working with higher voltages requires serious caution.


If using the Direct Do-More PLC and simulator see below, if using a different software, please see user manual:

edit

Download the software from the link above, and open a new project. Under hardware class, select the simulator. It will put you in Editor mode, and you will be able to start programming.

Discreet inputs start at X0 and go to X15. Discreet Inputs will be things like push buttons, selector switches. Things that are either on or off.

Discreet outputs start at Y0 and go to Y15. They will be things like relays, lights, motor starters.

Analog Inputs start at WX0, and go to WX7. They will be things like pressure sensors, temperatures sensors.

Analog output starts at WY0 and go to WY7. They can be used for things like Variable Frequency Drive (VFD) to control motor speed of Alternating Current Drives, or how open or closed a flow gate can be.

Counters are incremental counting devices that keep track of the count. CT0 through CT3 are the designations in the simulator.

Timers are used to counting second. T0 through T2 are the designations in the simulator,

Internal bits that can be used for logic are C0-C2047

Labs

edit

Assume all switches are discreet switches and lights, unless specifically mentioned.

Lab 1:

edit

Input 1 is a momentary normally open (NO) switch that when pressed will momentarily turn on output 1, which is a signal light.

 
Lab 1 Solution

Lab 2:

edit

Lab 2 builds on Lab 1.

Input 1 is a momentary normally closed (NC) button. Input 2 is a momentary NO button. Output 1 is a signal light. When input 2 is pressed, the light should turn on and stay on, until input is pressed.


There are two potential solutions. Both have similar looking logic, where something 'holds' the ladder logic on. Both are common uses of an 'or' solution in ladder logic. If the normally closed button is still closed, and If the push button or the bit holding the logic is on, the bit will be on. If the normally closed button is pushed, it will stop the power to either the NO push button, or the item holding power to the rung.

 
Lab 2 Solution 1
 
Lab 2, Solution 2

The reason this typically works is due to a quick 'scan time' or 'cycle time'. Cycle time is related to how fast the PLC checks the inputs, checks the logic based on those inputs, and turns on or off the outputs. The typical scan or cycle time is between 10ms and 50ms, depending on system complexity and external I/O.

The button being pushed for a second or two will be long enough for the PLC to recognize the button is pushed, turn on the light, and use the light as a second input to ensure the light stays on, until the NC button is pressed. The NC button will remove power to the light, and then turn off the light being used as an input, and will need the NO push button to turn the light back on.



Trainer Board Purchasing List:

edit

For those that want to build a small trainer board that they can physically interact with attached is a list of parts that can be used with the labs written below. This is not a comprehensive list, and some mounting hardware may be required. There is no sponsorship with automation direct. Automation Direct is a common industrial supplier in North America. Please consult with local suppliers if not in North America, or see here: Automation Direct International Suppliers

Product name Product Description Product Code
If not specifically indicated, the product is from https://www.automationdirect.com/
Productivity1000 AC/DC power supply Power supply for the modules P1-01AC
Productivity1000 CPU The 'core' of the PLC trainer. Handles all the logic instructions P1-540
Productivity1000 discrete input module The input module handles all push buttons, selector switches and other input items P1-08NA
Productivity1000 discrete output module The output module handles outputting signals to whatever outputs the PLC needs to interact with P1-08TA
ZIPLink feedthrough module (2x needed) The ZIPLink feedthrough module makes it easier to connect I/O items to the PLC. (If this is not used, terminal blocks will need to sourced for the I/O modules ZL-RTB20
ZIPLink PLC I/O cable (2x needed) This connects an I/O module to a Ziplink module ZL-P1-CBL10
USB A to microB-USB Programming Cable This is used to connect from your computer to the PLC USB-CBL-AMICB15
AutomationDirect standard memory card This SD card is not needed, but is useful if you want to mess around with logging MICSD-16G
DINnector DIN rail, slotted The PLC modules will be mounted onto the DIN rail DN-R35S1
Red Push Button This is a normally closed switch (used as a stand-in for an E-stop or a stop button) GCX1211-120L
Green Push Button (2x) This a normally open switch (Used as a standard input push button for various different items) GCX1202-120L
Red Selector Switch A normally open selector switch with a red LED indicator light GCX3251-120L
Green Selector Switch A normally open selector switch with a green LED indicator light GCX1252-120L
Push Button Enclosure A 5 hole push button enclosure to hold the selector switches and push bittons SA111
Industrial Signal Light 120v The Industrial Signal Light is a standard sort of light used in the auto industry. It can be used to indicate various states, or used as a stand-in for other outputs during testing Look on Amazon or other industrial sites for industrial signal light 120v.
White wire This will be used for the line side (Or Negative side) for returning voltage back to the power sorce AWM26WH10
Black Wire This will be used for the load side (Or positive side) for supplying the power to the Input or output items AWM26BK10