+ All Categories
Home > Documents > Definition of Control System:

Definition of Control System:

Date post: 18-Nov-2014
Category:
Upload: seshanramanujam
View: 4,518 times
Download: 0 times
Share this document with a friend
41
PLC NOTES
Transcript
Page 1: Definition of Control System:

PrefaceDefinition of Control System:

PLCNOTES

Page 2: 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.

Concepts:

Sensor

Sensor

PLC

Ladder / Instructions

Actuators

Actuators

Page 3: Definition of Control System:

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

Page 4: Definition of Control System:

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:

Power Supply

CPU

Memory

Output Module

Input Module

Field Input ControlElement

Process

Page 5: Definition of Control System:

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 manufacturingc. Improve quality and accuracyd. Work in difficult or hazardous environmentse. Increase productivityf. Shorten the time to marketg. Lower the cost of quality, scrap and reworkh. Offer great productivity and greater product varietyi. Quickly change over from one to another productj. Control inventory

Classification based on PLC size:

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

SIZE No. of I/O

MICRO Upto 32

Small 32 to 128

medium 128 to 2048

Large 1024 and above

Page 6: Definition of Control System:

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:

Page 7: Definition of Control System:

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

Page 8: Definition of Control System:

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.

Page 9: Definition of Control System:

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.

Page 10: Definition of Control System:

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 OR2. 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 TypeMain (C) or Cyclic (CS1)InterruptSchedulePower off (C) or Power Failure (CS1)Power OnOpening Existing ProjectsIn 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.

Page 11: Definition of Control System:

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.

Page 12: Definition of Control System:

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 wordUDINT 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.

Page 13: Definition of Control System:

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.

Page 14: Definition of Control System:

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.

Page 15: Definition of Control System:

Ladder InstructionsAND AndAND LD And LoadAND NOT And NotLD LoadLD NOT Load NotOR OrOR LD Or LoadOR NOT Or NotOUT OutputOUT NOT Output Not

Program Control InstructionsEND (01) EndIL (02) InterlockILC (03) Interlock ClearJME (05) Jump EndJMP (04) JumpNOP (00) No OperationSTEP (08) Step DefineSNXT (09) Step StartSTOP (99) Run Stop

Bit Control InstructionsDIFU (13) Differentiate UpDIFD (14) Differentiate DownKEEP (11) KeepRSET ResetSET SetTST (350) Test BitTSTN (351) Test Bit Not

Timer/Counter InstructionsCNT CounterCNTR (12) Reversible CounterCTBL (--) Register Comparison TableINI (--) Mode ControlPRV (--) High-Speed Counter PV ReadSTIM (--) Interval TimerTIM TimerTIML (--) Long TimerTIMH (15) High-Speed TimerTMHH(--) Very High-Speed TimerTTIM (87) Totalizing Timer

Page 16: Definition of Control System:

Subroutine InstructionsCMCR(--) PCMCIA Card MacroMCRO(99) MacroPMCR (--) Protocol MacroRET (93) ReturnSBN (92) Subroutine DefineSBS (91) Subroutine Entry

Data Shifting InstructionsASFT (--) Asynchronous Shift RegisterASL (25) Arithmetic Shift LeftASR (26) Arithmetic Shift RightROL (27) Rotate LeftROR (28) Rotate RightSFT (10) Shift RegisterSFTR (84) Reversible Shift RegisterSLD (74) One Digit Shift LeftSRD (75) One Digit Shift RightWSFT (16) Word ShiftRWS (17) Reversible Word Shift

Data Movement InstructionsBSET (71) Block SetBXF2 (--) Block Transfer to Other EM BankBXFR (125) EM Bank TransferCOLL (81) Data CollectDIST (80) Single Word DistributeEMBC (--) Select EM BankIEMS (--) Set EM Indirect NumberMOV (21) MoveMOVB (82) Move BitMOVD (83) Move DigitMVN (22) Move NotXCHG (73) Data ExchangeXDMR (--) Expansion DM ReadXFER (70) Block TransferXFRB (--) Transfer BitsXFR2 (--) Block Transfer by Constant Value

Data Comparison InstructionsBCMP (68) Block CompareCMP (20) CompareCMPL (60) Double CompareCPS (--) Signed Binary CompareCPSL (--) Double Signed Binary Compare

Page 17: Definition of Control System:

MCMP (19) Multi-Word CompareSRCH (--) Data SearchTCMP (85) Table CompareZCP (--) Area Range CompareZCPL (--) Double Area Range Compare

Data Conversion InstructionsASC (86) ASCII ConvertBCD (24) Binary to BCDBCDL (59) Double Binary to Double BCDBCNT (67) Bit CounterBIN (23) BCD to BinaryBINL (58) Double BCD to Double BinaryCOLM(--) Line to ColumnCTW (63) Column to WordDMPX(77) 16-to-4 EncoderHEX (--) ASCII to HexadecimalLINE (--) LineMLPX (76) 4-to-16 DecoderNEG (--) 2's ComplementNEGL (--) Double 2's ComplementSCL (--) ScalingSCL2 (--) Signed Binary to BCD ScalingSCL3 (--) BCD to Signed Binary ScalingSDEC (78) 7-Segment DecoderWTC (64) Word to Column

BCD Calculation InstructionsADD (30) BCD AddADDL (54) Double BCD AddDEC (39) DecrementDIV (33) BCD DivideDIVL (57) Double BCD DivideINC (38) IncrementMUL (32) BCD MultiplyMULL (56) Double BCD MultiplySUB (31) BCD SubtractSUBL (55) Double BCD Subtract

Binary Calculation InstructionsADB (50) Binary AddADBL (--) Double Binary AddDBS (--) Signed Binary DivideDBSL (--) Double Signed Binary DivideDVB (53) Binary DivideMBS (--) Signed Binary Multiply

Page 18: Definition of Control System:

MBSL (--) Double Signed Binary MultiplyMLB (52) Binary MultiplySBB (51) Binary SubtractSBBL (--) Double Binary Subtract

Special Maths InstructionsAPR (--) Arithmetic ProcessAVG (--) Average ValueFDIV (79) Floating Point DivideMAX (--) Find MaximumMIN (--) Find MinimumROOT (72) Square RootSUM (--) SumVCAL (69) Value Calculate

Floating Point Maths Instructions+F (--) Floating-Point Add-F (--) Floating-Point Subtract*F (--) Floating-Point Multiply/F (--) Floating-Point DivideACOS (--) Cosine to AngleASIN (--) Sine to AngleATAN (--) Tangent to AngleCOS (--) CosineDEG (--) Radians to DegreesEXP (--) ExponentFIX (--) Floating to 16-bitFIXL (--) Floating to 32-bitFLT (--) 16-bit to FloatingFLTL (--) 32-bit to FloatingLOG (--) LogarithmRAD (--) Degrees to RadiansSIN (--) SineSQRT (--) Square RootTAN (--) 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

Page 19: Definition of Control System:

<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

Page 20: Definition of Control System:

/BL (435) Double BCD Divide

Time InstructionsHMS (--) Seconds to HoursSEC (--) Hours to SecondsHTS (65) Hours to SecondsSTH (66) Seconds to Hours

Logic InstructionsANDW (34) Logical ANDCOM (29) ComplementORW (35) Logical ORXNRW (37) Exclusive NORXORW (36) Exclusive OR

Flag/Register InstructionsCLC (41) Clear CarrySTC (40) Set Carry

Advanced I/O Instructions7SEG (--) 7-Segment Display OutputDSW (--) Digital SwitchHKY (--) Hexadecimal Key InputMTR (--) Matrix InputTKY (--) Ten Key Input

Pulse InstructionsACC (--) Acceleration ControlPLS2 (--) Pulse OutputPULS (--) Set PulsesPWM (--) Pulse With Variable Duty RatioSPED (--) Speed OutputSYNC (--) Synchronised Pulse Control

PID Instructions

PID (--) PID Control

Serial Communications InstructionsFCS (--) FCS CalculateLMSG (47) Long MessageMSG (46) Message DisplayRXD (--) ReceiveSTUP (--) SetupTERM (48) Terminal ModeTXD (--) Transmit

Page 21: Definition of Control System:

Network InstructionsCMND (--) Deliver CommandFILP (44) External Program ReadFILR (42) File Memory ReadFILW (43) File Memory WriteRECV (98) Network ReceiveSEND (90) Network Send

ID CommunicationsIDAR (63) DC AutoreadIDAW (64) DC AutowriteIDCA (65) DC ClearIDMD (66) DC Manage DataIDRD (61) DC ReadIDWT (62) DC Write

Interrupt Control InstructionsINT (89) Interrupt Control

I/O InstructionsIORD (--) I/O ReadIORF (97) I/O RefreshIOWR (--) I/O WriteMPRF (--) Group-2 High-Density I/O RefreshREAD (88) Intelligent I/O ReadWRIT (87) Intelligent I/O Write

Error and Diagnostics InstructionsFAL (06) Failure AlarmFALS (07) Severe Failure AlarmFPD (--) Failure Point DetectTRSM (45) Data Tracing

System Control InstructionsENDW (62) End WaitSCAN (18) Scan TimeFUN49 (49) Set SystemWDT (94) Watchdog Timer Refresh

Block Programming InstructionsBEND <01> Block Program EndBPPS <11> Block Program PauseBPRG (96) Block Program BeginBPRS <12> Block Program Restart

Page 22: Definition of Control System:

CNTW<14> Counter WaitELSE <03> ElseEXIT <06> Conditional Block ExitIEND <04> Block Branching EndIF <02> Block Branching IfLEND <10> Block Loop Control EndLOOP <09> Block Loop ControlRSET <08> ResetSET <07> SetTIMW <13> Timer WaitTMHW <15> High-Speed Timer WaitWAIT <05> One Scan and Wait

Comment InstructionsNETW(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.

Page 23: Definition of Control System:

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 OR2 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)InterruptSchedulePower Off (C) or Power Failure (CS1)Power OnOpening 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 PLCEither 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.

Page 24: Definition of Control System:

Ladder Programming ViewA 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

Page 25: Definition of Control System:

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 PrecautionsThe 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.

Page 26: Definition of Control System:

WARNINGIt 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.

Page 27: Definition of Control System:

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.

Page 28: Definition of Control System:

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).InstructionsA 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 InstructionsA 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.

Page 29: Definition of Control System:

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).

Page 30: Definition of Control System:

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.


Recommended