This book is a masterpiece in teaching PLC in simple steps. In this book, you will learn the ins and outs

of PLC hardware and software (Allen-Bradley SLC 500 series PLC).

The concept of PLC is fully explained step by step with many lab experiments





Alireza H. Fassih



New Generation Publishing


Easy, Hands On Electronics Books



Second Edition




A Practical Handbook to

Programmable Logic Controller

-----------[ P L C ]------------







Copyright 2011, 2012 2nd edition by Alireza H. Fassih


All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, xerography, recording, or by incorporating into any information storage or retrieval system, without the written permission from the author. Making copies of any part of this book for any purpose is a violation of United States copyright laws.


The author or the publisher does not warrant the accuracy of the materials in this book. Neither the author nor the publisher is liable or responsible for any damages or injuries

as a result of using the materials in this book directly or indirectly.




Visit our web sites at


Printed in the United States of America



ISBN 0-9776054-9-3 / 978-0-9776054-9-1







This handbook can be a supplemental tool to a Programmable Logic -Controller (PLC) textbook. The main purpose of this handbook is a HANDS-ON APPROACH in learning PLC hardware and software.

In this book, Allen-Bradley SLC 500 series PLC will be explored.


The main goal of this handbook is to create a vast visualization of the working function of the PLC hardware and learn how to write a Ladder Program.


This handbook is a COMPREHENSIVE COVERAGE of the practical working with the PLC and its applications in industry.

This handbook can be used as a PLC textbook/lab-manual in Programmable Logic Controller course.








Chapter 1: PLC Hardware


1.1 What is a Programmable Logic Controller (PLC)?


1.2 SLC 502 Programmable Logic Controller (PLC) hardware


1.3 How to Interconnect a PLC to a Personal Computer (PC)?


1.4 How to Configure DH485 Adaptor?


1.5 How to Configure SLC 502 Programmable Logic Controller (PLC)?


Chapter 1: Exercise and Lab


Chapter 2: Ladder Programming



2.1 How to Label the 4-Inputs in the PLC?


2.2 How to label the 8-Inputs in the PLC?


2.3             How to Label the 8-Outputs in the PLC?


2.4             How to Simulate a Flash-light in Ladder programming?


2.5             How to Simulate an AND Gate in Ladder programming?


2.6             How to Simulate an OR Gate in Ladder programming?


Chapter 2: Exercise and Lab




Chapter 3: Electromagnetic Relay and Bit-Relay


3.1 Electromagnetic Relay


3.2 How to Simulate an Electromagnetic Relay in Ladder programming?


3.3 Bit-Relay and its application?


Chapter 3: Exercise and Lab



Chapter 4: How to program Timers?


4.1 What is a Timer?


4.2 Timer On-Delay (TON)


4.3 Timer Off-Delay (TOF)


4.4       Retentive Timer-On (RTO)


Chapter 4: Exercise and Lab



Chapter 5: How to program Counters?



5.1 What is a Counter?


5.2       Counter-Up (CTU)


5.3       Counter-Down (CTD)


Chapter 5: Exercise and Lab



Chapter 6: Math and Compare Instructions



6.1 ADD instruction


6.2 Greater Than (GRT) instruction


6.3 Limit Test (LIM) instruction


Chapter 6: Exercise and Lab



Chapter 7: Jump, Subroutines



7.1 Jump (JMP) to Label (LBL) instruction


7.2 Subroutine (SBR) and Jump to Subroutine (JSR)


7.3         Master-Control Reset (MCR) and its application


Chapter 7: Exercise and Lab


Chapter 8: Output Sequencer and Shift Register

8.1 What is an Output Sequencer (SQO)?

8.2 What is a Shift Register?


8.3 Bit Shift Left Register (BSL)


Chapter 8: Exercise and Lab