Ladder Logic & Programmable Controllers

Using Ladder Diagrams with PLC’s for Machine Tools and Industrial Processes.

With Illustrations.

by Frederick Hoehn, copyright 2014, all rights reserved.

Chapter 1

PLC’s are Programmable Logic Controllers.  They are used in many industrial machine tool applications, and in manufacturing process control.

For example, you can control a complex conveyor system with PLC’s.  FedEx and UPS package shipping companies have package sorting hubs in major cities of the U.S.

The packages come into the building and go onto the conveyor system.  As the packages move along, their bar codes are electronically read by machines.

The appropriate gates will open to divert the package to where it will be loaded onto the right outgoing truck that will go to the correct destination city.

This is a good example of a process that can be controlled by PLC’s.

PLC’s are programmed by Ladder Diagrams.  Ladder Diagrams use Ladder Logic, which basically is Relay Logic.  The program for the PLC is the Ladder Diagram.

Relay logic has “and” functions, and “or” functions.  These will be defined a little later in this book.

We’ll be getting into ladder diagrams and ladder logic in this book.

When we speak of logic here it doesn’t mean the kind of reasoning used in college debate class.

We’re talking about the way decisions are made for best control of the machine or process.

The Ladder Logic programmer (you, perhaps) writes his instructions into the program.  Ladder diagrams are so called because the diagram looks rather like a ladder, with two vertical pieces, and horizontal rungs.

Each rung usually has a circle toward the right side of the rung, representing a relay coil.

The ladder diagram could be built using actual physical relays, but there’s a better way.

You don’t need fifty actual physical relays to do the logic calculations, although some of the early NC (numerical control) Machine Tools actually did that very thing.

Giddings and Lewis manufactured NC Machine Tools that were controlled by large cabinets with perhaps two hundred relays.  But that was in the days before PLC’s.  Now, those hundreds of relays would be replaced with a comparatively small Programmable Controller (PLC.)

NC stands for numerical control.  CNC stands for computer numerical control.

Once the ladder diagram has been created and then downloaded to the PLC over a cable, the PLC performs most of those specified ladder logic functions without physical relays, but by keeping track of what’s happening with the “relays” using bits in memory.

A bit is a binary digit.  It can have the value of either 1 or 0.  A one represents an energized relay, a relay having electrical current flowing through its coil.

A zero would represent a deenergized relay, a relay with no electrical current flowing through its coil.

If you go on the Internet to Wikipedia.com, an online encyclopedia, and at the search box type “electrical relay,” and then press “Enter,”  it will come back with photos of relays and a write-up about how relays operate.

A relay is an electro-magnetic device that acts like a remotely controlled switch.

We used to make electro-magnetic devices back in Electric Shop, an elective class available in junior high school (middle school).

You take a piece of brass tubing about ¼ inch in diameter, and perhaps six inches long, and wind enameled copper wire around the upper part.

Inside the brass tube is an iron slug attached to a metal rod sharpened to a point at the bottom.

The device is used for engraving your initials on your wrenches and screwdrivers that you own.  You hold the engraver like a pen to write your initials on your tool.

One wire of the coil is connected to the brass tube.  The other end of the coil is connected to a dry cell battery.  The other terminal of the battery is connected to your wrench that you’re engraving.

When the metal stylus makes contact with your tool, electrical current flows through the coil.  The magnetic field produced by the current in the coil pulls the iron slug and stylus upward against a compression spring.

The upward movement of the slug and stylus causes an open circuit, and current flow stops.  Then, the spring pushes the slug and stylus downward, and the process repeats itself.  Move the stylus to write your initials.

A relay works like that except no slug and stylus.  The magnetic field created when the coil is energized pulls an armature toward the coil against a spring.  When the coil current stops flowing, the spring returns the armature to its deenergized position.

The movement of the armature toward the coil causes movable electrical contacts attached to the armature to close normally open contacts and to open normally closed contacts.  Closed contacts means electrical current can flow through them.  Open contacts allow no current to flow.

The two verticals in the ladder diagram represent your power source.  It might be a.c. or d.c.  You would use alternating current if the relays are a.c. relays.  You would use a direct current power source if the relays were d.c. relays.

Relays are also rated as to their coil voltage, which should agree with the power source.  I’m talking about a ladder diagram if it were to be built using actual physical relays.

Your two rails of power are like the two terminals on your car battery that power the car’s whole electrical system.

Current flows out the negative terminal of the battery, through the external circuits, and back into the positive terminal of the battery.

The word circuit comes from the same root word as circle.  The current flows in a circle.  Break the circle of flow, and the current stops flowing.  Break the current to the relay coil, and the relay deenergizes, and its n.o. contacts open, and its n.c. contacts close.

Houston, TX is rather an oil town.  Many major oil companies have facilities there, including refineries in Houston, and next door in Pasadena, TX.

I worked at a company in Houston where they manufactured large cabinets of relays that were used for relay logic for some of the oil companies.    The schematic diagram for those relays that were doing the relay logic would be a ladder diagram.

When I saw that they were using all these relays for logic functions, I went to my boss and told him that the TTL 7400 family of integrated circuit logic devices using the older bipolar, junction transistors, would do the same job in a lot less space, and for a small fraction of the cost.

A newer kind of transistor is the field effect transistor, from which we get the CMOS logic chips.  (Complementary Metal Oxide Semiconductor.)

My boss answered that the relays were what the customer wanted, and so we would give the customer what they wanted.

I guess the customer’s Engineers were old-school fellows who had learned relay logic in college, but then graduated before TTL integrated circuits became available. TTL stands for transistor-transistor logic.

Programmable Controllers are just the kind of thing that I was trying to tell my boss about, although at the time, I don’t think they were available yet.  But the TTL logic integrated circuits were available.

Machine tools and manufacturing processes can of course be controlled by computers.  You would need an interface to the input/output circuits of the computer so that it can turn on motors and solenoids and solenoid valves, and also receive information back from the machine or process.

But machine control by computer program isn’t done so much.  A better way is to use a Programmable Controller, the reason being that Plant Maintenance Personnel are usually not also Computer Programmers, and would therefore not be able to understand the computer program that controls the machine or process.

But a decent Plant Maintenance Electrician should be able to understand a ladder diagram because it’s just relay coils and contacts and switches, which Electricians are supposed to understand, and generally do.

The PLC is somewhat like a computer in that it has its own microprocessor that is executing a program that is stored in ROM (read only memory).

That microprocessor program is for the purpose of executing the program that is the ladder diagram.  It goes down the ladder rung by rung.  There is a bit in memory for each relay coil represented in the ladder diagram.  Each of those bits show whether a relay coil is energized or deenergized.

To the left of the coil on a particular rung are the contacts and switches that determine whether current will flow through the coil on that rung.  If the various contacts and switches on that rung are in a condition that will allow current flow, then the relay coil on that rung is energized, and its bit in memory will be set to “1” to show an energized relay. Otherwise, the bit will be reset to “0” to show a deenergized relay.

But remember that just because you see on the ladder diagram a set of normally open contacts, that doesn’t mean that no current can flow because the contacts are open.  Actually, those contacts are closed, if at that time the coil controlling those contacts is energized.

So, the microprocessor goes and looks at the bit for that coil to see whether it’s energized or deenergized.

Similarly, a set of normally closed contacts is open if its coil is energized.

Then the PLC looks at the next rung.  If the contacts in their present condition allow current flow, the bit will be set for that coil.

Then the next rung.

After the microprocessor program has looked at all the rungs, it goes back and starts over with the first rung, in a continuous loop.

Chapter 2

Although many of the relays represented on the ladder diagram are not actual physical relays, but just bits in memory, a few of the relays are actual physical relays to provide outputs to the outside world, the world outside the PLC, which would be the machine or process being controlled.

I referred to “and” gates, and “or” gates.

The “and” function is where two or more conditions must be met before a relay can be energized.

The “or” function is where either of two conditions, or any one of several conditions can be met to energize a relay.

Figure 1 shows two rungs of a ladder.  On the top rung are two sets of contacts in series with the coil of relay K1.  So this is an “and” function.  Both sets of contacts must be closed for K1 to energize.

The first set of n.o. contacts will close if the coil that controls those contacts energizes.  That coil would be somewhere else on the ladder diagram.

The second set of contacts are normally closed, and will pass current through them unless the coil (somewhere else on the ladder diagram) energizes.

The two vertical rails at the left and right are your power rails that supply operating voltage for the coils of the relays if actual physical relays were being used.

On the second rung of Figure 1, two sets of n.c. contacts are drawn in parallel, one above the other, and both ends of each set of contacts connected with the other set of parallel contacts.

So this is an “or” function.  Either set of contacts can pass current to the coil if the contacts are closed.  But in series with the parallel contacts is another set of n.c. contacts.  So we have the “and” function and the “or” function on the same rung.

The circles at the right of the rungs are relay coils.  The contacts for those coils are elsewhere in the ladder diagram.  There will be a number at each set of contacts to show what relay they’re part of.  That’s how you know which coil is controlling which contacts.  Relay designations often start with a K.  Depends on the manufacturer of the P.L.C.

When you get the contacts on a rung in the condition where current can flow through the coil, that coil energizes.  When that coil energizes, the contacts that it controls will change state.  The n.o. contacts close, and the n.c. contacts open.

When that happens, it’s likely that a relay on another rung will energize if it was not energized, or deenergize if it was energized because of the changed state of contacts.

If you’re working around electrical apparatus, it’s good to wear safety glasses of glass or plastic to protect the eyes.

Beside “and” and “or” functions, we can also do an inversion.  You use a set of n.c. contacts on a relay.  When you energize that relay, its n.c. contacts turn something off.  And when you deenergize that relay, those n.c. contacts turn that something on.

Open contacts stop current flow.  Closed contacts allow current flow.

If the ladder diagram were built with all physical relays, you could use a voltmeter to measure the voltage between the two rails.

On the voltmeter, select a.c. or d.c., as appropriate.

Some voltmeters are auto-ranging, they will automatically select the range for you.  If yours doesn’t do that, it’s usually best to start with the highest range (perhaps 500 volts) and then gradually go to a lower range.

The use of the word “normally” regarding relay contacts means the condition of the contacts when the relay is deenergized.  Normally open contacts are open when there’s no current passing through the coil that operates those contacts.

The ladder diagram is created using a “personal computer,” either desktop or laptop, with the software installed on the computer from the manufacturer of the PLC that you’re programming.  Software that allows you to write the ladder diagram, and modify ladder diagrams, and download them to the PLC over an electrical cable.

Read the instruction manual for that software.  And read the instruction manual for the PLC.

I worked at a factory where one of the production machines had been refurbished by an outside contractor.  They had converted an older machine to be controlled by one of the newer PLC’s.

But the machine operator complained that the machine was taking too much time to warm up.  The PLC included count-down timers that could be used by the programmer.

This is like a set of normally open contacts on a rung that will close to allow current flow after the specified period of time.  If you tell it to count down for nine hundred seconds, then you have a fifteen minute delay.  All I had to do was decrease the number to allow a shorter warm up period.

Another thing the production people didn’t like (Machine Operators are usually Machinists) was that when the machine’s carriage would travel to and activate any of the four limit switches in either of two axes of travel, X or Y, the carriage would also not travel along the other axis of travel.

The axis of travel, X axis or Y axis, was selected by a mechanical lever that the operator would use.  A limit switch at the lever would show whether the X or Y axis had been selected.

That particular limit switch was connected to an input at the PLC, but the ladder diagram showed that its input was not being used.

I changed the ladder diagram so that that limit switch would select the travel limit switches for the X axis when the carriage was traveling the X axis, or the travel limit switches for the Y axis when traveling the Y axis.

My lead man said, “You catch on fast.”  But of course, I had studied relay logic, ladder diagrams, and was quite computer literate.

My main electronics education was as a student of U.S. Navy Electronics Technician “A” School, where the Navy sent me after Boot Camp.

The U.S. Navy has training books for Electronics Tecnician 3rd class, Electronics Technician 2nd class, and Electronics Technician 1st class.  If you don’t find them at the Public Library, I think they’re available from the U.S. Government Printing Office.

But I had some prior knowledge of electrical theory from reading the Radio Amateur’s Handbook, published by the American Radio Relay League.  I’ve seen that at Public Libraries.

I had also been a Ham Radio Operator in my youth, and you had to learn a little electronic theory to pass the test to get the F.C.C. license.

They had a free class for that at an electronics store on Magnolia Blvd. in Burbank, CA.  Perhaps it was “Valley Electronics.”

Public libraries often have free classes on computers.

You can get a library card and read up on what will help your career.

At the library, the Dewey decimal number for electronics books is 621.38.  But in Chicago, they use the Library of Congress numbering system instead of the Dewey.  Ask the Librarian where the electronics books are.

Chapter 3

Below is Figure 2, a ladder diagram for a pallet wrapping machine.

A forklift driver brings a pallet loaded with merchandise to be shipped out and sets it on the table of the pallet wrapper.  The forklift goes away.

The machine operator attaches some of the plastic wrap (like Saran Wrap, only thicker and stronger) to one of the boxes of merchandise near the bottom, and closes the gate so that people won’t get hurt in the wrapping process.

The operator sets the height limit at which height the wrapping will stop.

The start and stop pushbutton switches are external to the PLC and are attached to input terminals on the PLC.

The gate closed limit switch and the height limit reached switch are also external to the PLC and come in on input terminals.

If the gate closed limit switch isn’t closed, K4 won’t energize.  K4 and K6 are physical relays so that their contacts will control the contactor for rotation and the vertical movement motor.

K5 is an internal “soft” relay represented by a bit in the PLC’s memory.

The operator presses Rotation Start, and the table rotates the pallet and its load.  A set of n.o. contacts of K4 is used to latch the relay in the energized position as though someone were holding down the start button.

The operator presses the Vertical Start button, and as the pallet rotates, the plastic wraps the contents of the pallet, overlapping a little the previous wrap.

When the height limit is reached, everything shuts down.

A fairly simple machine.  We’ll find something a little more complex.

Chapter 4

Figure 3 is a ladder diagram for a PLC Elevator Control.

This elevator is the old-fashioned kind that has manually operated doors.

They had an elevator like that at a place I lived at in Los Angeles.  They couldn’t upgrade it to a fully automated elevator because the place was designated a “Historical Landmark.”

President Teddy Roosevelt had stayed there when he visited Los Angeles.

The building with the elevator is a two floor building:  Ground floor, and 2nd floor.

So there are three doors for the elevator:  one on the ground floor, one on the second floor, and one on the elevator car.

Limit switches sense whether those doors are closed.

The top rung of figure 3 shows those three limit switches connected in series.  The three switches are designated S4, S5, and S6.

If they are all closed, they’ll energize relay K1.  A little lower on the diagram, n.o. contacts of K1 must be closed in order to energize Relay K4 and K5.

Mounted on the elevator shaft wall are limit switches that sense when the elevator car is present at second or at ground floor.  Those switches are operated by a cam projecting from the elevator car.

Those limit switches are designated S7 and S8.  They will energize K2 or K3, respectively.  S7 is for “Elevator present at ground floor.”  S8 is for “Elevator present at second floor.”

There are additional contacts on those elevator present limit switches not shown on the ladder diagram that will energize door unlock solenoids and an electric light at each floor that will indicate, when illuminated, that the elevator car is present at that floor.

The door unlock solenoids activate so that the door can be opened when the elevator car is present, and deactivate when the car goes away so that people don’t open the door on either floor to find an open elevator shaft.

Switches S1, S2, and S3 are pushbutton switches.  S1 is the elevator call button from the ground floor.

S3 is the elevator call button from the second floor.

S2 is the “Go to Other Floor” button on the elevator car.

S1 and S3 have holding contacts in parallel with those pushbuttons from the relay that they will energize.  These holding contacts keep the relay energized when the finger is removed from the pushbutton.

No holding contacts are necessary for S2 because the other holding contacts will do the job.

But the up or down relay (K5 or K4) will deenergize when the elevator arrives at the destination floor.  This is accomplished by n.c. contacts on relays K2 and K3.

N.C. contacts on relays K4 and K5 are used with each other’s coil rung to ensure that both relays won’t energize at the same time.

K4 and K5 are physical relays that have a set of their n.o. contacts connected to the output terminals of the PLC.  They are connected to external contactors (heavy duty relays for large motors) for up or down movement of the elevator car.

If you walk up to the elevator and see that the lamp is illuminated to indicate the elevator car is present at that floor, there’s no need to press the elevator call button, or if you do, nothing happens electrically.  If the car is not present, press the call button.

When the elevator comes, open the outer door, and then the door on the elevator car.  Enter the elevator.  Close the outer door, and then the elevator car door.  Then press “Go to other floor” button on the elevator.

There is also an alarm button that will ring a bell if the person on the elevator needs assistance.

Pressing the “Go to other floor” button (S2) activates either K4 or K5 to send the elevator down or up.  The correct choice will be made by n.o. contacts on K2 and K3.  If you’re on the 2nd floor, you’ll go down.  If you’re on the ground floor, you’ll go up.

Someone might say, “But how can the n.o. contacts on K2 and K3 choose whether to go up or down?”

One set of those n.o. contacts will be closed.  You can’t get on the elevator between floors.  You get on the elevator at either the ground floor, or the second floor.  In either case, an “Elevator Present” switch will be closed, energizing either K2 or K3, and closing its n.o. contacts.

But if the person on the elevator says, “Well, wait a minute, I don’t want to go to the other floor, I need to go back to my office on this floor and get my memo pad,”  then he doesn’t press to “Go to other floor” push button.  He gets off the elevator and goes and gets his memo pad.

Another way to get the elevator moving is from the hallway when you press the elevator “call” button.

Auxiliary contacts on the up and down contactors will energize a third contactor for the brake when the elevator is not moving.  These are not shown on the ladder diagram because they are not under PLC control.

The way that the up or down contactors choose the direction of motor rotation is by swapping two of the three power wires to the three phase motor.

For one direction of rotation, the power connections go straight through the contactor to the motor.  For the other direction, two of the power connections are swapped with each other.

That’s how you choose the direction of rotation of a three phase motor.  And most of your large, high horse power motors are three phase motors.

If you think that you could probably do a better elevator control, I think you’re probably right.

And you could also do the ladder diagram for the elevator that has automatic opening and closing of the doors if you want.

Chapter 5

But you don’t have to be an expert at electrical theory to work with ladder diagrams.

You’ve used flashlights, haven’t you?  It’s good to have a flashlight in your car for use at night.

Beside the case of the flashlight, the three electrical components are the light bulb, the switch, and the batteries.  Also, the metal strips that conduct the current flow from the batteries.

When you turn on the flashlight’s switch, current flows out the negative terminal of the battery, through the switch and light bulb, and back into the positive terminal of the battery (often, two batteries in series.)

It’s very simple.  And that’s what we’re doing with ladder diagrams.  You get the contacts closed to the left of the coil on a rung, and then the coil energizes, changing the state of the contacts that it operates.  Its n.o. contacts close, and its n.c. contacts open.

Where things get a little bit tricky is when tracing back contacts to their coils to see how the process operates.  Just be careful, be diligent, don’t get in a big hurry.  You’ll figure it out.  And I believe it helps if I ask God to help me.

A question might be, “How do I know whether a relay on the ladder diagram is a soft relay or an actual physical relay?”

The actual physical relays connect to output terminals.  Look at the manual for the PLC.  It will tell you which relays you can use for soft relays, and which relays you can use for output relays.

Perhaps the designations will be K1 through K199 for soft relays, and R1 through R8 for output relays.  When you choose the designation of the relay, you’ve chosen whether it’s a soft relay or a physical relay connected to output terminals on the PLC.

Another question might be, “What if the software I’m using to create or modify the ladder diagram only lets me put six sets of contacts horizontally on the rung to the left of the coil, but I have more than six conditions?”

No problem.  Put your first six conditions on that rung, and then put a set of n.o. contacts from the coil on that rung on a new rung.  Now add your seventh, eighth, ninth conditions.  Still not enough?  Then add a third run in the same way.

I’ve been to schools for, and done maintenance on million dollar machine tools controlled by computers.  But those very complex machines usually have a ladder diagram that can be displayed at the machine tool, so that people can understand what’s going on without being computer programmers.

On many of the ladder displays, a contact or relay will be highlighted to show that it’s open or closed.  This is a significant help in troubleshooting a problem.

At one employer, I worked with an Allen-Bradley PLC that had ten inputs and six outputs.  But you can have many more inputs and outputs if needed, depending on the complexity of the machine or process being controlled.

Outputs from the PLC can turn on small motors, energize solenoids, operate solenoid valves, and about anything else that can be turned on or off electrically.

Large horsepower motors require more current, and are turned on by a large relay called a contactor, external to the PLC.  But that contactor can be turned on by a physical relay in the PLC.

Inputs to the PLC can be limit switches, pressure switches, humidity sensors, photocells, whose inputs have been programmed into the ladder diagram.

On some ladder diagrams, dashed lines have been used between a relay coil and sets of contacts to show that those contacts get operated by that coil.

At one employer, I wrote a ladder diagram to control the air compressors that provided approximately one hundred pounds per square inch air for use in the plant.  Some of the machines needed the compressed air to work right.

My program would alternate the two large compressors each week, and use the smaller compressor on weekends, when not as much compressed air was needed.  But if a fault developed with the operating compressor, the program would automatically switch over to a different compressor.

In working with PLC’s, if one of the relays in the ladder diagram is an actual, physical relay to provide an output to the outside world, you can use a multimeter to see what’s happening with that output.

One does not use an ohmmeter in any energized circuit.  If there’s power in a circuit, it could damage your ohmmeter.  If there’s power, use the voltmeter function for a.c. or for d.c. as appropriate.

If there are two terminals at the PLC for that output, if the same voltage is present at both terminals (with reference to ground or common), you have a closed set of contacts at that output.  If there are two different voltages at the two terminals (with reference to ground or common) then you have an open set of contacts.

But if you just have a set of “dry” contacts (no voltage), then you could use the ohmmeter function.  Zero ohms between the two terminals would mean closed contacts.  A high resistance reading would mean open contacts.

You can also measure inputs to the PLC.  For example, that limit switch I mentioned that would show whether X or Y axis was selected.

You would go to the switch and use an ohmmeter to see whether the contacts are closed for X axis and open for Y axis, or vice versa.  Then write it down for future reference.  A good place to write it down would probably be a printout of the Ladder Diagram for that Machine Tool.

I was troubleshooting a machine at one employer where the problem seemed to be with a certain relay or solenoid.  One side of the power source was connected to ground.  Voltage could be measured at one coil terminal of the relay or solenoid, and then the same voltage was present at the other terminal.

What does it mean?

Like most machines, the switching of the relay or solenoid on was done on the power side, not the ground side.  The fact that I was measuring the same voltage on both sides of the coil meant that the device had lost its ground.

The ground wire for the coil had come loose from a clamp that was supposed to hold it.

On another machine, using an oscilloscope to check waveforms, there were no waveforms where there should have been.  Crystal oscillators were supposed to generate timing signals used to control the machine.

I noticed that the quartz crystals were the plug-in kind.  They plugged into sockets.  I moved them up and down a few times in their sockets, and the machine started working.

The metal on the pins on the crystals can begin to oxidize from oxygen in the air.  Oxidized metal doesn’t make good electrical connections.

A Maintenance Mechanic at one place had been working on a lathe for probably more than an hour to solve a problem.  He came and got me.  I was the Electrician.

I noticed that the control for the lathe used a plug-in relay, with an octal socket, I think (eight pins).  I moved the relay up and down a few times in the socket, and the lathe started to work.

Electricians are able to understand ladder diagrams because the diagrams follow the rules of electrical current flow.

A co-worker of mine and I were sent by our employer in California to a CNC machine tool school at the manufacturer in Wisconsin.

Sometimes people who try to write ladder diagrams are not familiar with the rules of electrical current flow.

Some programmer there, not understanding current flow, tried to make a rule for the ladder diagram that violated the rules of electrical current flow.

When the instructor tried to explain it to us, both my co-worker and I burst out laughing.  You don’t change the rules of current flow.  God has already established those rules.

Best thing to do is try to learn those rules and then apply them.  And it’s not really that difficult.

Speaking of classes, I took a college class on relay logic, and we used an excellent textbook titled, “Arithmetic Operations in Digital Computers.”  Don’t remember the author, but I recommend that book.  I believe that book has both Venn and Veitch diagrams used to clarify logic functions.

Author Malvino has written some excellent electronics books.  He is apparently a professor at one of the colleges in the U.S.

A CNC machine tool uses ladder logic to control a very sophisticated million dollar machine tool.

For each part that will be manufactured using a CNC machine tool, a Part Program is written for the machine to make that part.

The machine operator mounts a solid block of steel or aluminum or titanium on the machine’s table.

Milling bits remove areas of metal.  Drill bits drill holes.  Taps are used to thread holes that have been drilled.  Many of the machines have automatic tool changing.

After a milling operation has completed, perhaps the next step is to drill a hole.  The machine will automatically remove the tool holder with the milling bit, and put it back in the tool holder rack, and get the tool holder with the drill bit and place the tool holder in the chuck of the machine.

The Part Program tells the CNC machine tool how many revolutions per minute the chuck should rotate at.

A CNC machine tool can be as productive as ten conventional (non-CNC) milling machines with their Machinist operators.

DNC is Direct Numerical Control.  That’s where a central computer at a machine shop downloads Part Programs to the CNC Machine Tools when the next Part Program is needed for the next part to be manufactured by the machine.

Care must be used in troubleshooting machines.  I heard of a maintenance man who was trying to find an electrical problem.  He climbed into the machine looking for the bad connection.

He found the bad connection, and made it a good connection, and the machine began to operate and crushed him to death.

He should have been following the lockout, tag out procedures for safety.  You padlock the three phase, 440 volts a.c. disconnect for that machine.

But wait!  Don’t trust the disconnect switch to do the right thing when you move the lever from “On” to “Off.”  In at least one case, I heard of a disconnect that was placed in the “Off” position, but the knife switches inside didn’t open as they should have.

After throwing the disconnect switch to the off position, open the door and use your eyes to make sure that the knife switches have opened.

While the door is open, use your voltmeter to measure the incoming voltage at the top of the disconnect switch inside the box.

You should be able to measure voltage coming in there.  If you can’t measure voltage there, you may have a bad voltmeter.  If you rely on a bad voltmeter, you could get hurt.

Find a good voltmeter that will measure the voltage.

Now close the disconnect switch door, and padlock the switch in the “Off” position.

Now go back to the machine you’re working on, and use the same voltmeter that you just proved was working, and measure the three phases of incoming power.

Three phase power will come into the machine’s electrical box on three wires.  There’s probably also a green ground wire.

When you have three wires, you have three pairs of wires. Let’s call the three wires A, B, and C.

With your a.c. voltmeter, measure between A and B.  Then measure between A and C.  Then measure between B and C.  All three measurements should be zero.

But if you didn’t prove the voltmeter was working properly as suggested above, then how will you know whether you really have zero volts, or whether there’s 440 volts present, and the reading is zero simply because of a defective voltmeter?

And don’t forget that just because you’ve locked out the 440 volt three phase power doesn’t mean you can’t have some single phase 115 v.a.c. power coming into the machine.  If you find where it’s coming into the machine, you could just temporarily disconnect that wire.

440 volts can kill a man, so use caution.  For that matter, ordinary house voltage of 115 volts a.c. can kill people.

A related subject to the “and” and “or” functions and logic circuits is Boolean Algebra which you might want to read up on.

My Boolean Algebra book is called, “Boolean Algebra & Logic I.C.’s,” and is available at Amazon.com

Every prudent man deals with knowledge.