Вы находитесь на странице: 1из 30

PLC

NOTES

Preface
Definition of Control System:
A control system is set of electronic devices and equipment which are in place to ensure
stability, accuracy and smooth transition of a process or any manufacturing activity. As a
result of rapid development and advancement of technology, complicated control tasks
are accomplished with a highly automated control system, mostly a PLC (Programmable
Logic Controller) and if necessary a host computer.

Every single component plays an important role in a control system regardless of the size.

The process coordination, implementation in big scale and greater flexibility are realized
in modern control systems.

For any process, the PLC controls the whole process sequence. The various input devices
such as selector switches, push buttons, toggle switches, sensors are connected to the
input of the PLC through input terminal block. The output devices such as revolving
light, indicators, relays, contactors and solenoid valves are connected to output terminals
of the PLC. The whole process is controlled by ladder program which is loaded into the
PLC CPU memory. The program will execute a sequence automatically according to the
pre-defined sequence of operations.

Manual operation is also provided to allow the operator to activate the machine manually
by switches, emergency push buttons for the purpose of safety in case to stop the
operation abruptly.

Sensor

PLC Actuators
Sensor

Ladder / Actuators
Instructions

Concepts:
A PLC is digitally operated programmable electronic system, which is suitable to be used
at the industrial environment by its rugged construction the PLC continuously monitor
the status of the devices connected as inputs, based on the ladder program controls the
devices as outputs. These input and output devices can be different type with various
voltages and ranges.

Programmable Logic Controllers:

The PLC is the heart of the control system. The PLC constantly monitors the state of the
system through field input device signals. The ladder program logic determines the
course of action to be carried out by the field output devices. The PLC can be used to
control a simple and repetitive task.

Input devices:

The intelligence of an automated system is greatly depending on the ability of a PLC to


read in the signal from various types of automatic sensing and manual input field devices.
Push buttons, Keypad, Toggle switches are the types of manual input devices.

On the other hand, detection any work piece, monitoring of moving system, checking
pressure or liquid level and many other activities can be tapped from specific automatic
sensing devices like proximity switch, limit switch, photoelectric sensors, level sensors
and so on.

The input to the PLC can be of Digital or Analog type. The above input signals are
interfaced through various PLC input Modules.

Output Devices:

The most commonly used output devices are solenoids, motors, relay indicators, buzzers
etc. The PLC can control from simple Pick & Place Systems to complex Servo
Positioning Systems through activation of motors and solenoids. The output devices have
their direct impact over the control system performance.

The other output devices like, pilot lamps, buzzers, alarms are merely indicators and used
for notifying purpose.

BLOCK DIAGRAM OF PLC


Power Supply

CPU Output
Input
Module Module
Memory

Field
Input Control
Element
Process

Working of a PLC:

The microprocessor supervises system control through the ladder program. As per the
ladder program, reads the input signals and provide the output according to the solution.
The user program is stored in PLC’s memory.

A PLC simply follows the instructions stored in the memory. Each instruction is placed
in memory in ascending order. The PLC is interfaced through the RS 232 serial ports of
the PC and Ladder program could be created and down loaded using ladder development
software or the ladder program could be entered into the memory of a PLC using a
programming terminal. The programming terminal could also be used to edit the program
and monitor the status of the input devices.

When the entire ladder program has been developed, entered and verified for correctness,
the next step is to download the program into PLC memory. Downloading is nothing but
transferring the PLC program from PC or Terminal to PLC.

If all input and output devices are wired perfectly then the PLC could be put to RUN
mode. In Run mode, the program will be continuously run ans provide the solutions and
controls the automated operation.

NEED FOR THE PLC:


The PLC is the tool that provides the control of an automated process. The automation
will help the manufacturing facility to:

a. Gain complete control of manufacturing process.


b. Achieve consistency in manufacturing
c. Improve quality and accuracy
d. Work in difficult or hazardous environments
e. Increase productivity
f. Shorten the time to market
g. Lower the cost of quality, scrap and rework
h. Offer great productivity and greater product variety
i. Quickly change over from one to another product
j. Control inventory

Classification based on PLC size:

SIZE No. of I/O


MICRO Upto 32
Small 32 to 128
medium 128 to 2048
Large 1024 and above
The size of the PLC is reducing and
capabilities of the PLC are increasing enormously, more computing powers are
incorporated, features are multiplying as a result of advancements in microprocessor
technology.

 The PLC is an industrial computer designed to withstand the harsh factory


environment.
 PLCs are reusable. They contain changeable programs that eliminate rewiring and
component charges.
 PLC offer easy troubleshooting
 PLCs are small in size and easily installable.

Cycle Time:

The PLC’s CPU constantly calculates its mean cycle time, which will change according
to the programs running in the PLC. The Maximum and Minimum values are also
displayed for CS and CV PLCs.

You can reset the CPU cycle time to a default value by selecting the Reset button; the
CPU will immediately recalculate the mean value again during the next cycle.
Execution Time

This measures the time taken by the PLC to execute between two marked points in a
program.

You can access the PLC Settings either by double-clicking on a PLC folder in the Project
Workspace or by keying the Settings option in the PLC Menu (when you have selected a
PLC)

The PLC Settings dialog must also be set up to ensure that the PLC is working correctly.
Each PLC Settings dialog is unique to each PLC type selected, but most dialog displays
for each PLC series have some identical components which are described in this help in
general terms.

Note: You will have already created a PLC definition when you added this PLC to your
project. These definitions include a name for the physical PLC, details of its device type
and network type used to connect it to your network. These definitions define the
relationship of the PLC within your network, whereas the following settings define the
behaviour of the PLCs.

This dialog determines the operation of the PLC selected when it is turned on.

Mode

You can set the PLC startup operating mode for the selected PLC. Only one option can
be selected.

The Default mode is Program.


There are three PLC operating modes:

1 Program
2 Monitor
3 Run

Two additional modes available on some PLCs are:

1 Pre-Power down Mode - PLC uses the operating mode last used before the power
was turned off.

2 Use Programming Console - If an Omron Programming Console is connected at


the same time as power-up, the PLC will take the mode indicated by the console key
switch. If no console is attached at power-up, the PLC will start in program mode.
LADDER DIAGRAM:

A PLC executes programs of object code produced from a list of mnemonic instructions
that are executed in order. It is possible to view and edit the low-level mnemonic
instructions with the mnemonic view. It is possible to produce mnemonic instructions
from a higher-level language - the ladder language provided by Programmer is an
example. The Programmer ladder view below shows an example ladder program:

A ladder diagram is a graphical view of a PLC program and is concerned with power-
flow. In the diagram, power flows from the left (the left bus bar) to the right (the green
right bus-bar). A ladder rung is a logical connection between the left and right bus bars.
These rungs are executed by the PLC in order (i.e. from top to bottom).

The elements of a ladder rung that dictate power-flow are contacts, coils and
instructions

A contact ( ) behaves like an electrical contact and allows power to flow through
it if it is closed. A contact can be normally open or closed (a normally closed contact is
shown as ). It is given an address within the PLC as an operand. If the contents of the
address (a binary bit of data) is set (high, or 1) then the logic of the contact is inverted
when a normally open contact becomes closed, and a normally closed contact becomes
open.

A coil ( ) behaves similarly to a contact and is used to show output power. It can
only be used on the right of a rung. They can be normally open or closed (a normally
closed coil) is shown as ( ). Its operand is the PLC address (a single binary bit of data)
which will have power applied.

An instruction is used for all other types of data manipulation. They are
mnemonic instructions, and each PLC has a set that it can use. Each type of PLC has a
particular instruction set, but most instructions are common. Instructions may use zero or
more operands, each of which may be a PLC address or a direct literal numeric value. As
an example, the END instruction is common to all PLCs, and does not use an operand
and it must be present at the end of every PLC program.

It is possible to link up these elements logically, using horizontal and vertical connectors,
to give serial and parallel logical constructs.

On the left of the diagram, there is a rung margin that identifies the position of the rung
within the program. It shows the rung number (which is just a unique number
incremented from zero), and the step number, which shows the offset from the beginning
of the program in terms of number of instructions.

It is necessary to insert a rung into the editor before elements (contacts, coils, or
instructions) can be placed in it
In some cases, it is not possible to show parts of a mnemonic program as a ladder rung. In
these cases, a statement list box is used for the section, and other parts of the program
appear as ladder. A block program is a special part of a program that cannot be shown in
ladder form. The block program contains logical instructions that cannot be used in the
normal ladder format.

When on-line to a PLC and monitoring, it is possible to see power-flow executing. The
parts of the diagram where power is present are shown with a thick line of the power-
flow colour.

Software - Programmer can show the mnemonic instructions that are produced from the
ladder constructs. The mnemonics view displays these and updates the view whenever
the ladder diagram is changed. It is also write a program in mnemonic instructions and
observe the changes in the ladder view.

This is a simplified procedure for interface familiarization purposes only. For a PLC to
function, you will normally create a program off line (locally on your computer) then go
online and transfer it into the PLC’s memory. Before you start this task, it is best to
collect the following information:

1 Determine the PLC/CPU device type and PLC memory settings required to run
your program.
2 Determine the type of communications connection to the PLC.
3 Determine the input/output requirements for your program, and organise I/O units
into racks attached to your PLC.

PLC/Network Device Type Settings

Select the New option in the File menu.

A dialog box is displayed for selecting the PLC device type and connection settings. See
the Change PLC help for details.

The new project is created and the structure is shown in the project workspace .

Assigning I/O Points on the PLC’s Racks and Units

Select the I/O Table of the new PLC on the project workspace.

When a PLC is first switched on it will create a real I/O table based on the units which
are actually plugged into its racks.

You may need to create an I/O Table model on your computer which matches the
registered and real IO table in the PLC.
When you work online you may then transfer your created I/O Table to the PLC’s
registered IO Table (not all PLCs allow this). The PLC stores the registered I/O Table
separately from the real I/O Table, and will continually check that they match.

You can compare your local I/O Table on your computer with the registered I/O Table in
the selected PLC to check if there are differences.

When an I/O assignment has been made, addresses which are within the I/O table show
special prefixes on the ladder editor. An 'I' prefix shows that the address is mapped to an
input unit. A 'Q' prefix shows that the address is mapped to an output unit. The address
usage is also shown in the symbol tables.

Writing the Program

If you are using the mouse, ensure that you have the Diagram and Views tool bars
displayed.

The PLC is designed to respond to sensing (on or off) inputs to which the PLC is
connected. These inputs are graphically represented in the ladder diagram as contacts, for
example, allowing you place them in a logical sequence to control the output (a coil)
from the PLC or to trigger a function such as a timer. See ladder programming.

The project workspace window shows the objects inside a Programmer project as a
hierarchical tree.

It is possible to add multiple PLCs to a single project. Each PLC on the tree can have the
following objects attached to it (depending on the PLC type):

1. Symbols - The PLC’s global symbol table.

2. IO Table - The PLC’s I/O table, which contains a map of racks and units to be
attached to the PLC in order for the PLC program/s to work properly.

3. PLC Settings - The PLC’s setup - all settings which are stored within the PLC.

4. Memory Card - The memory card / file device attached to the PLC (available only
when online)

5. Error Log - The PLC’s error log (available only when online).

6. Expansion Instructions- The PLC’s expansion instruction table (only for certain
PLC types).

7. Memory (Data Monitor) - The PLC’s memory.


The tree structure is similar to the Windows Explorer system and can be expanded (click
on +) or contracted (click on -) in the same way.

When you have selected the PLC in the tree and opened its branch (e.g. NewPLC1 shown
below) the following information is displayed in the Project Workspace.

GLOBAL & LOCAL SYMBOLS:

You will notice that there are two Symbol objects that you can select. The PLC Symbols
are the global symbols available to all PLC programs for the particular PLC. There is also
a set of symbols for each program, which are called local symbols. Other programs
cannot access local symbols. You can create your own local or global symbols A PLC
program consists of one or more sections.

The C series PLCs only have one program per PLC.The CV and CS series of PLCs allow
multiple programs per PLC. The CS series has true multitasking capability. Each program
is shown separately on the tree. The icon to the left of the program name shows the task
type of the program (e.g. an interrupt task , or a cyclic task ). Each program must have a
different assigned task.

To select a task, select and highlight the required program and either:

1. Select the Properties option from the View menu OR


2. Right-click your mouse while the cursor is on the program task icon and select the
Properties option from the drop-down menu.

The Program Properties dialog is displayed.

Select on the following task types from the Task drop-down list:

Task Type
Main (C) or Cyclic (CS1)
Interrupt
Schedule
Power off (C) or Power Failure (CS1)
Power On
Opening Existing Projects
In the File menu you can select either the Open option then select the required project file
or select the last worked file name above the Exit option.
When the project is opened, Programmer restores the views which were active when the
project was last open.

Hint: If a suitable window does not appear, select View, Project Workspace then
expand the Project folders and select the required PLC program to display a ladder
diagram.
Adding/Inserting a New PLC

Either right-click on the New Project icon or Insert Menu option and select Insert PLC.

The PLC Add Dialog is displayed.

Enter the details as described in the PLC Change Dialog help.


A PLC programmer uses addresses or numeric values as operands throughout a program.
Traditionally, an author of a PLC program referred to these addresses or numbers directly
throughout the program.

To maintain a program, it is desirable to document the program to show what is


represented by the addresses. Software packages have allowed for this in various ways.
One of the simplest ways is by associating a comment with an address. A more powerful
technique is to give the address a corresponding label name, i.e. a symbolic name. The
name can be used in place of the address. This makes it possible to change the address
(which may happen when an I/O configuration is changed) without having to modify the
program. Programmer allows an address or a literal value to be given a name and/or a
comment, giving good flexibility of documentation.

It is also possible to indicate the internal format of the data that is contained within an
address. Indicating this data type to Programmer allows it to automatically check that the
data is used consistently within a program.

Some PLCs support more than a single program at a time. For these PLCs, it may be
desirable for different programmers to write each program separately. To support this,
Programmer allows a set of symbols to be defined for each program in a local symbol
table. The names of these symbols are then private to a particular program and cannot be
seen from other programs. Programmer also allows a general set of symbols to be
defined for the PLC in a global symbol table. Global symbols can be used in any of the
PLC programs.

It is even possible to let Programmer automatically create an address for a symbol:


sometimes the address of an operand is not important as long it is unique - it may just be
used as an intermediate 'working' storage address.
The concept of data types is new for OMRON programming packages.

Previously, a PLC programmer has been able to associate a name or comment with an
address (to improve the documentation and readability of a program), Programmer also
allows the programmer to indicate the physical format of data that is stored at an address.
The additional data typing facility gives Programmer the ability to check whether the
address is used consistently within instruction operands.

For example, if an address is indicated as being used to store a BCD value, Programmer
will ensure that the address is not used for binary operations.
The available data types are listed below:

Data Type Data Type Description

BOOL Address of a binary bit - a logical Boolean on or off state.


This type is typically used for contacts or coils.
UINT Address of an unsigned, single binary word.
INT Address of a signed, single binary word.
UINT_BCD Address of an unsigned, single BCD word
UDINT Address of an unsigned, double binary word.
DINT Address of a signed, double binary word.
UDINT_BCD Address of an unsigned, double BCD word.
ULINT Address of an unsigned, quad binary word.
LINT Address of a signed, quad binary word.
ULINT_BCD Address of an unsigned, quad BCD word.
REAL Address of a double word floating point value
(IEEE format - use the UDINT type for the BCD, FDIV format).

NUMBER A literal numeric value. Not an address.

The value can be signed or floating point. Numbers are used for any literal value or for
timer/counter identifiers (in this case, only unsigned integer values are allowed).Floating
point values are only suitable within IEEE REAL type operands. Note: when used as
BCD number operands, the value is treated as a hexadecimal value (e.g. using a
NUMBER ‘1234’ is equivalent to typing ‘#1234’ as the operand, so that the decimal
interpretation is made of the value). The value of a NUMBER data type is assumed to be
decimal, unless it is prefixed with '#' for a hexadecimal value.

CHANNEL This is a special data type, for backward compatibility. It is


an address (non-bit) to data of any type (unsigned or signed, one or more words), so can
be used in place of any of the above data-types except NUMBER and BOOL. The data
type is weak, and so checking is limited (e.g. Programmer cannot check if the address is
being used for BCD or binary values).

The data type is used to determine the monitoring format of an address when online.
Using your Keyboard

Programmer shows the shortcut-key for a particular operation to the right of the relevant
menu command or tool tip.

It is possible to change the shortcut keys. See Key Remapping.

1. Select a menu option by pressing the Alt key followed by the capital letter in the
menu. For example, Alt+F will display the File menu. Use the arrow keys to scroll up and
down and press Return at the highlighted option.
2 Some keyboards have a menu key which you can use to select a variety of pop-
up menus and dialogs.

Useful General Keys

1 Jump between the project workspace, the ladder diagram and any other selected
workspace views by pressing the Alt-O (zero) keys. Alt+Shift+0 move you to the
previous space.
2 Move between windows in the workspace using Ctrl+tab keys.
3 Move between the panes of a split editing window using the tab key.
4 Move between fields in any dialog using the tab and arrow keys.
5 Scroll up and down lists or left to right using the arrow keys.

6 Move around the Ladder diagram using the up/down/left/right arrow keys to mark
an item.
7 To display the dialog for editing the marked item (e.g. contact instruction) press
the Enter or Return key.
8 Display the online help by moving the cursor over the item concerned and
pressing the F1 key.
9 To access the Windows Start menu press the Ctrl+Esc keys.
10 To close a window, use the Ctrl+F4 keys.

11 Switch between applications using Alt+tab keys.

Ladder Diagram Keys

While in the Project Workspace (selected, if not visible, from the View, Project
Workspace option):

1 Move around using the arrow keys.


2 For Mnemonics display use Alt+M.
3 Display Local Symbols dialog by pressing Alt+S.
4 Display Global Symbols dialog by pressing Alt+G.
5 For the Address reference tool use Alt+R.
6 For the Cross Reference Report use Alt+X.
Mnemonics Editor Keys

While in the Mnemonics Workspace (select, if not visible, from the View, Mnemonics
option):

Use tab and arrow keys to move around.

To edit a line of mnemonics, use the arrow keys to move the selection box to the
required mnemonic line then hit Enter to start editing. The 'Esc' key comes back out of
edit 'mode. Hitting Enter when already in enter mode creates a new line below.

A PLC programmer uses addresses or numeric values as operands throughout a program.


Traditionally, an author of a PLC program referred to these addresses or numbers directly
throughout the program.

To maintain a program, it is desirable to document the program to show what is


represented by the addresses. Software packages have allowed for this in various ways.
One of the simplest ways is by associating a comment with an address. A more powerful
technique is to give the address a corresponding label name, i.e. a symbolic name.

The name can be used in place of the address. This makes it possible to change the
address (which may happen when an I/O configuration is changed) without having to
modify the program. Programmer allows an address or a literal value to be given a name
and/or a comment, giving good flexibility of documentation.

It is also possible to indicate the internal format of the data that is contained within an
address. Indicating this data type to Programmer allows it to automatically check that the
data is used consistently within a program.

Some PLCs support more than a single program at a time. For these PLCs, it may be
desirable for different programmers to write each program separately. To support this,
Programmer allows a set of symbols to be defined for each program in a local symbol
table. The names of these symbols are then private to a particular program and cannot be
seen from other programs. Programmer also allows a general set of symbols to be
defined for the PLC in a global symbol table. Global symbols can be used in any of the
PLC programs.

It is even possible to let Programmer automatically create an address for a symbol:


sometimes the address of an operand is not important as long it is unique - it may just be
used as an intermediate 'working' storage address.
Ladder Instructions
AND And
AND LD And Load
AND NOT And Not
LD Load
LD NOT Load Not
OR Or
OR LD Or Load
OR NOT Or Not
OUT Output
OUT NOT Output Not

Program Control Instructions


END (01) End
IL (02) Interlock
ILC (03) Interlock Clear
JME (05) Jump End
JMP (04) Jump
NOP (00) No Operation
STEP (08) Step Define
SNXT (09) Step Start
STOP (99) Run Stop

Bit Control Instructions


DIFU (13) Differentiate Up
DIFD (14) Differentiate Down
KEEP (11) Keep
RSET Reset
SET Set
TST (350) Test Bit
TSTN (351) Test Bit Not

Timer/Counter Instructions
CNT Counter
CNTR (12) Reversible Counter
CTBL (--) Register Comparison Table
INI (--) Mode Control
PRV (--) High-Speed Counter PV Read
STIM (--) Interval Timer
TIM Timer
TIML (--) Long Timer
TIMH (15) High-Speed Timer
TMHH(--) Very High-Speed Timer
TTIM (87) Totalizing Timer
Subroutine Instructions
CMCR (--) PCMCIA Card Macro
MCRO(99) Macro
PMCR (--) Protocol Macro
RET (93) Return
SBN (92) Subroutine Define
SBS (91) Subroutine Entry

Data Shifting Instructions


ASFT (--) Asynchronous Shift Register
ASL (25) Arithmetic Shift Left
ASR (26) Arithmetic Shift Right
ROL (27) Rotate Left
ROR (28) Rotate Right
SFT (10) Shift Register
SFTR (84) Reversible Shift Register
SLD (74) One Digit Shift Left
SRD (75) One Digit Shift Right
WSFT (16) Word Shift
RWS (17) Reversible Word Shift

Data Movement Instructions


BSET (71) Block Set
BXF2 (--) Block Transfer to Other EM Bank
BXFR (125) EM Bank Transfer
COLL (81) Data Collect
DIST (80) Single Word Distribute
EMBC (--) Select EM Bank
IEMS (--) Set EM Indirect Number
MOV (21) Move
MOVB (82) Move Bit
MOVD (83) Move Digit
MVN (22) Move Not
XCHG (73) Data Exchange
XDMR (--) Expansion DM Read
XFER (70) Block Transfer
XFRB (--) Transfer Bits
XFR2 (--) Block Transfer by Constant Value

Data Comparison Instructions


BCMP (68) Block Compare
CMP (20) Compare
CMPL (60) Double Compare
CPS (--) Signed Binary Compare
CPSL (--) Double Signed Binary Compare
MCMP (19) Multi-Word Compare
SRCH (--) Data Search
TCMP (85) Table Compare
ZCP (--) Area Range Compare
ZCPL (--) Double Area Range Compare

Data Conversion Instructions


ASC (86) ASCII Convert
BCD (24) Binary to BCD
BCDL (59) Double Binary to Double BCD
BCNT (67) Bit Counter
BIN (23) BCD to Binary
BINL (58) Double BCD to Double Binary
COLM (--) Line to Column
CTW (63) Column to Word
DMPX (77) 16-to-4 Encoder
HEX (--) ASCII to Hexadecimal
LINE (--) Line
MLPX (76) 4-to-16 Decoder
NEG (--) 2's Complement
NEGL (--) Double 2's Complement
SCL (--) Scaling
SCL2 (--) Signed Binary to BCD Scaling
SCL3 (--) BCD to Signed Binary Scaling
SDEC (78) 7-Segment Decoder
WTC (64) Word to Column

BCD Calculation Instructions


ADD (30) BCD Add
ADDL (54) Double BCD Add
DEC (39) Decrement
DIV (33) BCD Divide
DIVL (57) Double BCD Divide
INC (38) Increment
MUL (32) BCD Multiply
MULL (56) Double BCD Multiply
SUB (31) BCD Subtract
SUBL (55) Double BCD Subtract

Binary Calculation Instructions


ADB (50) Binary Add
ADBL (--) Double Binary Add
DBS (--) Signed Binary Divide
DBSL (--) Double Signed Binary Divide
DVB (53) Binary Divide
MBS (--) Signed Binary Multiply
MBSL (--) Double Signed Binary Multiply
MLB (52) Binary Multiply
SBB (51) Binary Subtract
SBBL (--) Double Binary Subtract

Special Maths Instructions


APR (--) Arithmetic Process
AVG (--) Average Value
FDIV (79) Floating Point Divide
MAX (--) Find Maximum
MIN (--) Find Minimum
ROOT (72) Square Root
SUM (--) Sum
VCAL (69) Value Calculate

Floating Point Maths Instructions


+F (--) Floating-Point Add
-F (--) Floating-Point Subtract
*F (--) Floating-Point Multiply
/F (--) Floating-Point Divide
ACOS (--) Cosine to Angle
ASIN (--) Sine to Angle
ATAN (--) Tangent to Angle
COS (--) Cosine
DEG (--) Radians to Degrees
EXP (--) Exponent
FIX (--) Floating to 16-bit
FIXL (--) Floating to 32-bit
FLT (--) 16-bit to Floating
FLTL (--) 32-bit to Floating
LOG (--) Logarithm
RAD (--) Degrees to Radians
SIN (--) Sine
SQRT (--) Square Root
TAN (--) Tangent

Input Comparison Instructions


= (300) Equal
=L (301) Double Equal
=S (302) Signed Equal
=SL (303) Double Signed Equal
<> (305) Not Equal
<>L (306) Double Not Equal
<>S (307) Signed Not Equal
<>SL (308) Double Signed Not Equal
< (310) Less Than
<L (311) Double Less Than
<S (312) Signed Less Than
<SL (313) Double Signed Less Than
<= (315) Less Than Or Equal
<=L (316) Double Less Than Or Equal

<=S (317) Signed Less Than Or Equal


<=SL (318) Double Signed Less Than Or Equal
> (320) Greater Than
>L (321) Double Greater Than
>S (322) Signed Greater Than
>SL (323) Double Signed Greater Than
>= (325) Greater Than Or Equal
>=L (326) Double Greater Than Or Equal
>=S (327) Signed Greater Than Or Equal
>=SL (328) Double Signed Greater Than Or Equal

Symbol Maths Instructions


+ (400) Signed Binary Add Without Carry
+L (401) Double Signed Binary Add Without Carry
+C (402) Signed Binary Add With Carry
+CL (403) Double Signed Binary Add With Carry
+B (404) BCD Add Without Carry
+BL (405) Double BCD Add Without Carry
+BC (406) BCD Add With Carry
+BCL (407) Double BCD Add With Carry
- (410) Signed Binary Subtract Without Carry
-L (411) Double Signed Binary Subtract Without Carry
-C (412) Signed Binary Subtract With Carry
-CL (413) Double Signed Binary Subtract With Carry
-B (414) BCD Subtract Without Carry
-BL (415) Double BCD Subtract Without Carry
-BC (416) BCD Subtract With Carry
-BCL (417) Double BCD Subtract With Carry
* (420) Signed Binary Multiply
*L (421) Double Signed Binary Multiply

*U (422) Unsigned Binary Multiply


*UL (423) Double Unsigned Binary Multiply
*B (424) BCD Multiply
*BL (425) Double BCD Multiply
/ (430) Signed Binary Divide
/L (431) Double Signed Binary Divide
/U (432) Unsigned Binary Divide
/UL (433) Double Unsigned Binary Divide
/B (434) BCD Divide
/BL (435) Double BCD Divide

Time Instructions
HMS (--) Seconds to Hours
SEC (--) Hours to Seconds
HTS (65) Hours to Seconds
STH (66) Seconds to Hours

Logic Instructions
ANDW (34) Logical AND
COM (29) Complement
ORW (35) Logical OR
XNRW (37) Exclusive NOR
XORW (36) Exclusive OR

Flag/Register Instructions
CLC (41) Clear Carry
STC (40) Set Carry

Advanced I/O Instructions


7SEG (--) 7-Segment Display Output
DSW (--) Digital Switch
HKY (--) Hexadecimal Key Input
MTR (--) Matrix Input
TKY (--) Ten Key Input

Pulse Instructions
ACC (--) Acceleration Control
PLS2 (--) Pulse Output
PULS (--) Set Pulses
PWM (--) Pulse With Variable Duty Ratio
SPED (--) Speed Output
SYNC (--) Synchronised Pulse Control

PID Instructions

PID (--) PID Control

Serial Communications Instructions


FCS (--) FCS Calculate
LMSG (47) Long Message
MSG (46) Message Display
RXD (--) Receive
STUP (--) Setup
TERM (48) Terminal Mode
TXD (--) Transmit
Network Instructions
CMND (--) Deliver Command
FILP (44) External Program Read
FILR (42) File Memory Read
FILW (43) File Memory Write
RECV (98) Network Receive
SEND (90) Network Send

ID Communications
IDAR (63) DC Autoread
IDAW (64) DC Autowrite
IDCA (65) DC Clear
IDMD (66) DC Manage Data
IDRD (61) DC Read
IDWT (62) DC Write

Interrupt Control Instructions


INT (89) Interrupt Control

I/O Instructions
IORD (--) I/O Read
IORF (97) I/O Refresh
IOWR (--) I/O Write
MPRF (--) Group-2 High-Density I/O Refresh
READ (88) Intelligent I/O Read
WRIT (87) Intelligent I/O Write

Error and Diagnostics Instructions


FAL (06) Failure Alarm
FALS (07) Severe Failure Alarm
FPD (--) Failure Point Detect
TRSM (45) Data Tracing

System Control Instructions


ENDW (62) End Wait
SCAN (18) Scan Time
FUN49 (49) Set System
WDT (94) Watchdog Timer Refresh

Block Programming Instructions


BEND <01> Block Program End
BPPS <11> Block Program Pause
BPRG (96) Block Program Begin
BPRS <12> Block Program Restart
CNTW<14> Counter Wait
ELSE <03> Else
EXIT <06> Conditional Block Exit
IEND <04> Block Branching End
IF <02> Block Branching If
LEND <10> Block Loop Control End
LOOP <09> Block Loop Control
RSET <08> Reset
SET <07> Set
TIMW <13> Timer Wait
TMHW <15> High-Speed Timer Wait
WAIT <05> One Scan and Wait

Comment Instructions
NETW (63) Notation Insert

®Property of Omron Corporation

Project Workspace

The project workspace window shows the objects inside a Programmer project as a
hierarchical tree.

It is possible to add multiple PLCs to a single project. Each PLC on the tree can have the
following objects attached to it (depending on the PLC type):

1 Symbols - The PLC’s global symbol table.


2 IO Table - The PLC’s I/O table, which contains a map of racks and units to be
attached to the PLC in order for the PLC program/s to work properly.
3 PLC Settings - The PLC’s setup - all settings which are stored within the PLC.
4 Memory Card - The memory card / file device attached to the PLC (available only
when online)

5 Error Log - The PLC’s error log (available only when online).
6 Expansion Instructions- The PLC’s expansion instruction table (only for certain
PLC types).
7 Memory (Data Monitor) - The PLC’s memory.

The tree structure is similar to the Windows Explorer system and can be expanded (click
on +) or contracted (click on -) in the same way.

When you have selected the PLC in the tree and opened its branch, the following
information is displayed in the Project Workspace.
GLOBAL & LOCAL SYMBOLS:

You will notice that there are two Symbol objects that you can select. The PLC Symbols
are the global symbols available to all PLC programs for the particular PLC.There is also
a set of symbols for each program, which are called local symbols. Other programs
cannot access local symbols. You can create your own local or global symbols A PLC
program consists of one or more sections.

The C series PLCs only have one program per PLC.(OMRON)

The CV and CS series of PLCs allow multiple programs per PLC (OMRON). The CS
series has true multitasking capability. Each program is shown separately on the tree. The
icon to the left of the program name shows the task type of the program (e.g. an interrupt
task , or a cyclic task ). Each program must have a different assigned task.
To select a task, select and highlight the required program and either:

1 Select the Properties option from the View menu OR


2 Right-click your mouse while the cursor is on the program task icon and select the
Properties option from the drop-down menu.

The Program Properties dialog is displayed.

Select on the following task types from the Task drop-down list:

Task Type
Main (C) or Cyclic (CS1)
Interrupt
Schedule
Power Off (C) or Power Failure (CS1)
Power On
Opening Existing Projects

In the File menu you can select either the Open option then select the required project file
or select the last worked file name above the Exit option.

When the project is opened, Programmer restores the views which were active when the
project was last open.

Hint: If a suitable window does not appear, select View, Project Workspace then
expand the Project folders and select the required PLC program to display a ladder
diagram.
Adding/Inserting a New PLC
Either right-click on the New Project icon or Insert Menu option and select Insert PLC.
The PLC Add Dialog is displayed.
Enter the details as described in the PLC Change Dialog help.
Ladder Programming View
A PLC executes programs of object code produced from a list of mnemonic instructions
that are executed in order. It is possible to view and edit the low-level mnemonic
instructions with the mnemonic view. It is possible to produce mnemonic instructions
from a higher-level language - the ladder language provided by Programmer is an
example. The Programmer ladder view below shows an example ladder program:

A ladder diagram is a graphical view of a PLC program and is concerned with power-
flow. In the diagram, power flows from the left (the left bus bar) to the right (the green
right bus-bar). A ladder rung is a logical connection between the left and right bus bars.
These rungs are executed by the PLC in order (i.e. from top to bottom).

The elements of a ladder rung that dictate power-flow are contacts, coils and instructions:

1 A contact ( ) behaves like an electrical contact and allows power to flow through
it if it is closed. A contact can be normally open or closed (a normally closed contact). It
is given an address within the PLC as an operand. If the contents of the address (a binary
bit of data) is set (high, or 1) then the logic of the contact is inverted when a normally
open contact becomes closed, and a normally closed contact becomes open.

2 A coil ( ) behaves similarly to a contact and is used to show output power. It can
only be used on the right of a rung. They can be normally open or closed (a normally
closed coil). Its operand is the PLC address (a single binary bit of data) which will have
power applied.

3 An instruction is used for all other types of data manipulation. They are
mnemonic instructions, and each PLC has a set that it can use. Each type of PLC has a
particular instruction set, but most instructions are common. Instructions may use zero or
more operands, each of which may be a PLC address or a direct literal numeric value. As
an example, the END instruction is common to all PLCs, and does not use an operand
and it must be present at the end of every PLC program.

It is possible to link up these elements logically, using horizontal and vertical connectors,
to give serial and parallel logical constructs.

On the left of the diagram, there is a rung margin that identifies the position of the rung
within the program. It shows the rung number (which is just a unique number
incremented from zero), and the step number, which shows the offset from the beginning
of the program in terms of number of instructions.

It is necessary to insert a rung into the editor before elements (contacts, coils, or
instructions) can be placed in it

In some cases, it is not possible to show parts of a mnemonic program as a ladder rung. In
these cases, a statement list box is used for the section, and other parts of the program
appear as ladder. A block program is a special part of a program that cannot be shown in
ladder form. The block program contains logical instructions that cannot be used in the
normal ladder format.

When on-line to a PLC and monitoring, it is possible to see power-flow executing. The
parts of the diagram where power is present are shown with a thick line of the power-
flow Colour.

Programmer can show the mnemonic instructions that are produced from the ladder
constructs. The mnemonics view displays these and updates the view whenever the
ladder diagram is changed. It is also write a program in mnemonic instructions and
observe the changes in the ladder view.

This is a simplified procedure for interface familiarization purposes only.

For a PLC to function, you will normally create a program off line (locally on your
computer) then go online and transfer it into the PLC’s memory. Before you start this
task, it is best to collect the following information:

1 Determine the PLC/CPU device type and PLC memory settings required to run
your program.
2 Determine the type of communications connection to the PLC.
3 Determine the input/output requirements for your program, and organise I/O units
into racks attached to your PLC.

General Precautions
The user must operate the product according to the performance specifications described
in the operation manuals.

Before using the product under conditions which are not described in the manual or
applying the product to nuclear control systems, railroad systems, aviation systems,
vehicles, combustion systems, medical equipment, amusement machines, safety
equipment, and other systems, machines, and equipment that may have a serious
influence on lives and property if used improperly, consult your PLS Supplier.

Make sure that the ratings and performance characteristics of the product are sufficient
for the systems, machines, and equipment, and be sure to provide the systems, machines,
and equipment with double safety mechanisms. Be sure to read the manual before
operation and keep the manual close at hand for reference during operation.
WARNING
It is extremely important that a PC and all PC Units be used for the specified purpose and
under the specified conditions, especially in applications that can directly or indirectly
affect human life. You must consult with your PLC supplier before applying a PC system
to the above mentioned applications.

* Observe the following precautions before starting the Programmer Software

* Close all software programs not related to the Programmer Software. It is


particularly important to close all programs that start periodically or intermittently, such
as screen savers, virus checkers, email and other communications programs, and
schedulers.

* Do not share hard disks, printers, or other devices with other network computers
while running the programmer Software.

* Some notebook computers set the RS-232C port to modem or infrared application
by default. Change the settings according to the operating instructions for your computer
so that the RS-232C port can be used as a normal serial communications port.

* Some notebook computers set the RS-232C port to not supply power (5 V) to the
port to save energy by default. Change the settings according to the operating instructions
for your computer to provide power to the port. (There are Windows settings and also
possibly settings for computer-specific utilities or BIOS settings to save power.)

* Confirm that no adverse effect will occur in the system before attempting any of
the following. Not doing so may result in an unexpected operation.

* Changing the operating mode.

* Setting and resetting bits in memory.

* Changing bit status or parameter settings.

• Check the user program for proper execution before actually transferring it to
or running it on the Unit. Not checking the program may result in an
unexpected operation.
PLC Settings

PLCs generally have internal options which control their behavior, and are important for
the proper running of the program/s. The PLC Settings component
allows the PLC setup to be viewed and edited.
PLC settings can be stored within a CX-Programmer project and downloaded with the
PLC program/s.
Some types of PLC do not have PLC settings.

You can access the PLC Settings either by double-clicking on a PLC folder in the Project
Workspace or by keying the Settings option in the PLC Menu (when you have selected a
PLC):
The PLC Settings dialog must also be set up to ensure that the PLC is working correctly.
Each PLC Settings dialog is unique to each PLC type selected, but most dialog displays
for each PLC series have some identical components which are described in this help in
general terms.

Note: You will have already created a PLC definition when you added this PLC to your
project. These definitions include a name for the physical PLC, details of its device type
and network type used to connect it to your network. These definitions define the
relationship of the PLC within your network, whereas the following settings define the
behavior of the PLCs.
Ladder Information Options

It is possible to set the format of the elements on the ladder display.

The elements of a ladder display - contacts, coils, instructions and instruction operands -
can display a configurable set of information. The more information is displayed, the
larger each cell of a ladder diagram becomes. Ideally, only the necessary information
should be shown so that the maximum number of cells can be seen on the screen.
The name and comment parts of the operand information can be individually shown or
not, using the Show check boxes.

Name

It is possible to determine how many lines are to be shown for a symbol name, and
whether they are shown above or below the element (i.e. above or below a contact or coil
image).

Address

Various options are available for showing the address of an operand. The If name empty
option will only show the address of an operand if there is no symbol attached to the
address, or if the symbol is unnamed. The after name option shows the address after the
name, separated by a comma. The Above and below options show the address on a
separate line, above or below the element respectively.

Comment

It is possible to determine how many lines are to be shown for a symbol comment, and
whether they are shown above or below the element (i.e. above or below a contact or coil
image).
Instructions
A range of options are given to determine the information and format of data within
instructions.
The Show data with option allows a choice of where monitoring data will be shown
within the operand box of an instruction. It can be shown below the name, address or
comment of the symbol. It can also share the line of the name, address or comment, so
that the monitoring data is shown before the information on the same line. This allows the
size of the instruction box to be minimized.

Output Instructions
A range of information can be shown on the right of output instructions (e.g. 'MOV').
The Symbol Comment of the symbol used within the operand can be shown.
The Attached Comment (comment property of the instruction element on the diagram)
can be shown.
The Instruction Description (shorthand description of the instruction, the same as that
shown in the Instruction dialog) can be shown.
The Operand Description (shorthand description of the operand purpose, the same as that
shown in the Instruction dialog) can be shown.

Note that it may not be possible to fit all of the requested information on the right of the
instruction - the size of the instruction box is not determined by these choices. The
'Attached comment' is always shown first (i.e. highest priority), followed by the 'Symbol
Comment' and then the descriptions.

Instruction

The instruction dialog is available in the ladder view to enter details of a PLC instruction.
Note: Some instructions are not available for use when programming in ladder language -
they must be used directly in a mnemonic list.
There are three ways to select an instruction:

1. Type its name into the Instruction edit box. CX-Programmer attempts to complete
the function name as it is typed, and displays details of the required operands below the
instruction edit box.

2. Type the instruction number into the Instruction edit box. Use the correct number
of digits for the PLC (some PLCs use 2 digits, the others use 3 digits). When an
instruction number has been recognised, CX-Programmer fills in the instruction name
and displays details of the required operands below the instruction edit box.

3. Select an instruction from a list by selecting the Find Instruction button. When the
Find Instruction dialog appears, select the instruction category in the left side of the
displayed dialog then the required instruction in the category from the right side of the
dialog.

Note that it is possible to get full help on a particular instruction by typing its mnemonic
into the Instruction field, and pressing Instruction Help. If the instruction exists on more
than one family of PLCs (i.e. C-series, CV-series, or CS1-series), a choice of family will
first be given.

Note than certain instructions have dependencies between operands, so that the value of
one operand will determine the valid range of another. For these instructions, it is
possible to check whether the operands are valid by pressing the Check button.

Operands

The number of operands available for selection will depend on the instruction selected.

Use the keyboard up/down cursor keys to select the operand number to edit (the example
CNT instruction below contains two operands).
The valid range for the selected operand is indicated below the operand box. This updates
as information is typed. Initially (when the information for the operand is empty), it
shows the address ranges which are valid. When beginning to type the operand details,
the information is updated to show the valid range for the address type chosen.

It is possible to use a symbol for the operand. The symbol name may be typed directly or
the symbol can be selected using the find symbol dialog. To browse for a symbol, press
F2 when entering the operand, or press the browse button to the right of the edit box.

See operand types for an explanation of how to enter a correct operand.

Symbol Information

Whenever CX-Programmer finds a symbol associated with the typed operand, symbol
information is displayed in this box. The name, address/value and comment are shown,
together with the data type of the symbol and its scope (global or local).

Expansion Table

You can use this table to define the expansion instructions.