WECON Technology Co., Ltd.
2
Basic Program Instructions
1. What is a Program?
A program is a connected series of instructions written in a language that the PLC can
understand. There are two forms of program format; instruction, ladder.
panels only work with instruction format while most graphic programming tools will
work with both instruction and ladder format.
2. Outline of Basic Devices Used in Programming
There are six basic programming devices. Each device has its own unique use. To
enable quick and easy identification each device is assigned a single reference letter;
- X: This is used to identify all direct, physical inputs to the PLC.
- Y: This is used to identify all direct, physical outputs from the PLC.
- T: This is used to identify a timing device which is contained within the PLC.
- C: This is used to identify a counting device which is contained within the PLC.
- M and S: These are used as internal operation flags within the PLC.
All of the devices mentioned above are known as ‘bit devices’. This is a descriptive
title telling the user that these devices only have two states; ON or OFF, 1 or 0.
3. How to Read Ladder Logic
Ladder logic is very closely associated to basic relay logic. There are both contacts
and coils that can be loaded and driven in different configurations. However, the basic
principle remains the same.
A coil drives direct outputs of the PLC (ex. a Y device) or drives internal timers,
counters orflags (ex. T, C, M and S devices). Each coil has associated contacts.
These contacts are available in both “normally open” (NO) and “normally closed” (NC)
configurations.
The term “normal(ly)” refers to the status of the contacts when the coil is not
energized.
Using a relay analogy, when the coil is OFF, a NO contact would have no current flow,
that is, a load being supplied through a NO contact would not operate. However, a NC
contact would allow current to flow, hence the connected load would be active.
Activating the coil reverses the contact status, that is, the current would flow in a NO