1 Introduction. Schneider Electric FTX117, Terminal
જાહેરાત
જાહેરાત
1 Introduction
1.1
General
The control decisions a PLC makes are based on a control program that you create.
Creating a TSX Nano PLC control program consists of writing a program in one of the control languages supported by the TSX07 PLCs.
The FTX 117 Handheld Terminal supports the List Programming Language. The List language is a line based textual boolean-like language which can also process numerical operations.
The PL7-07 PC Programming Software supports the List and Ladder programming languages. Ladder is a rung-based graphical Boolean language. Further, PL7-07 allows you to reverse a program from Ladder to List and from List to Ladder.
In addition, the TSX Nano PLCs support Grafcet List instructions.
B
1.2
Instruction List (List or IL)
Program structure
A program in PL7 language comprises a series of instructions (up to 1000 instructions) of various types.
Each program line has a number which is generated automatically, an instruction code and a bit or word type operand.
Example of an instruction : 003 LD %I0.1
Number
Instruction code
Operand
Ladder diagrams are a graphical means of displaying a logical expression. An alternative to a Ladder diagram is an Instruction List program. An Instruction List program is a series of logical expressions written as a sequence of Boolean instructions. All the Boolean instructions, except for LOAD, STORE and NOT, operate on two operands, which can be either TRUE or FALSE, and produce a single value, either
TRUE or FALSE.
As written, List instructions have only one explicit operand; the other is implied. The implied operand is the Boolean accumulator. In operation, a List instruction performs the specified operation on the contents of the accumulator and the operand, and replaces the contents of the accumulator with the result.
For example, the operation AND %I1.2 would perform a logical AND between the contents of the accumulator and Input 1.2, and would replace the contents of the accumulator with that result.
___________________________________________________________________________
1/1
B
The LOAD and STORE instructions either load the accumulator with the value of the operand, or store the accumulator to the operand, respectively. The NOT instruction has no explicit operands and simply inverts the state of the accumulator.
Instructions
Types of instruction
• Bit instruction
• Block instruction
• Word instruction
• Program instruction
• Grafcet instruction
Example
004 LD %M10
008 IN %TM0
Reads internal bit %M10
Starts the timer %TM0
010 [%MW10 := %MW50+100] Addition
015 SR5 Calls up subroutine #5
020 -*-8 Step #8
___________________________________________________________________________
1/2
Introduction 1
1.3
Grafcet
Grafcet is an analytical method which divides any sequential control system into a series of steps, with which actions, transitions and conditions are associated.
PL7-07 language has specific Grafcet instructions.
Graphical Grafcet is not supported in PL7-07 PC Programming Software.
B
3
%M10
4 5
%I0.7
%M15
6 7
=1
Graphical Grafcet
LD
#
-*-
LD
#
...
-*-
LD
#
#
-*-
4
5
4
3
%M10
%I0.7
6
5
%M15
7
Grafcet list
Grafcet Ladder
___________________________________________________________________________
1/3
B
1.4
Ladder diagrams
Ladder diagrams are similar to relay logic diagrams used to represent relay control circuits. The main differences between the two are that in ladder programming, all inputs are represented by contact symbols ( -| |- ) and all outputs are represented by coil symbols ( -( )- ), and that numerical operations are included in the graphical Ladder instruction set.
LS1 PB1 CR1
LS2 SS1
M1
LS1
%I0.0
PB1
%I0.2
CR1
%I0.4
LS2
%I0.1
SS1
%I0.7
M1
%Q0.4
The figure above illustrates a simplified wiring diagram of a relay logic circuit and its equivalent Ladder diagram. Notice that in the Ladder diagram, all inputs associated with a switching device in the relay logic diagram are shown as contacts. The M1 output coil in the relay logic diagram is represented with an output coil symbol in the Ladder diagram. The address numbers appearing above each contact/coil symbol in the
Ladder diagram reference the location of the external input/output connections to the
PLC.
A program written in Ladder is composed of rungs—sets of specific graphical instructions drawn between the two vertical outer bars representing potential—that are executed sequentially by the PLC. The set of graphical instructions represent:
• the inputs/outputs of the PLC (push buttons, sensors, relays, pilot lights...),
• the functions of the PLC (timers, counters...),
• the math and logic operations (addition, division, and, xor...),
• the comparison operators and other numerical operations (A < B, A = B, shift, rotate...),
• the internal variables in the PLC (bits, words...).
___________________________________________________________________________
1/4
Introduction 1
These graphical instructions are arranged with vertical and horizontal connections leading ultimately to one or several outputs and/or actions.
A rung cannot support more than one group of linked instructions.
For example, this Ladder program is composed of two rungs.
%I0.1
%I0.3
%M42
%M42 %Q1.2
%MW22 := %MW15 + KW1
B
___________________________________________________________________________
1/5
B
Lines
1
2
3
4
5
6
7
1.4-1 Programming principles
Each Ladder rung is comprised of 7 lines and 11 columns and are organized in two zones:
Columns 1 2 3 4 5 6 7 8 9 10 11
MAIN
Programming Worksheet Ladder Diagram
SR PRE POST
RUNG
%
Test zone
Action zone
• a test zone which contains the conditions that must be true for an action to take place.
• an action zone which contains the output or operation that results from the tests connected to it.
The rung is visualized by a 7 by 11 programming grid, starting in the upper-leftmost cell of the grid. You program test instructions, comparisons, and functions in the test zone and these test instructions are left-justified. This test logic then provides continuity to the action zone where you program coils, numerical operations and program flow control instructions. These action instructions are right-justified. The rung is solved, or executed
(tests made and outputs assigned), from top to bottom and from left to right.
In addition to the rung, there is the Rung Header that appears directly above the rung.
The rung header is used to document the logical intent of the rung. The rung header contains the rung number, any labels (%Li:) or subroutine declarations (SRi:), the rung title, and rung comments. For more information about the Rung Header, and its correspondence to List Line Comments, see section B.1.4-2.
___________________________________________________________________________
1/6
Introduction 1
• Contacts, coils and program flow instructions
Contacts, coils and program flow (jump and call) instructions occupy a single cell of the programming grid. Function blocks,
Comparison blocks and Operate blocks occupy multiple cells.
• Function Blocks
Function blocks are placed in the Test
Zone of the programming grid. The block must appear in the first line; no Ladder instructions or lines of continuity may appear above or below the Function block.
Ladder test instructions lead to the Function block's input side, and test instructions and/or action instructions lead from the block's output side.
Function blocks are vertically orientated and occupy 2 columns by 4 rows of the programming grid.
• Comparison Blocks
Comparison blocks are placed in the Test
Zone of the programming grid. The block may appear in any line or column in the test zone as long as the entire length of the instruction resides in the test zone.
Comparison blocks are horizontally orientated and occupy 2 columns by 1 row of the programming grid.
R
S
%C0
E
D
CU
CD
F
%MW0 = %SW50
• Operate Blocks
Operate blocks are placed in the Action
Zone of the programming grid. The block may appear in any line in the action zone.
The instruction is right-justified; therefore, it appears on the right and ends in the last column.
Operate blocks are horizontally orientated and occupy 4 columns by 1 row of the
%MW120 := SQRT (%MW15)
1/7
B
B
1.4-2 Reversibility
In this manual, the term reversibility refers to the ability of the PL7-07 Programming software for the TSX Nano to convert TSX Nano application programs from the Ladder programming language to the List language and back again. PL7-07 programs can be displayed in either format at will by setting a preference for one or the other. You can even convert (reverse) individual Ladder rungs to List and back simply by selecting the
Tools menu’s Toggle Ladder/List option.
%Q0.4
%I0.5
%I0.4
LD %I0.5
OR %I0.4
ST %Q0.4
Understanding of reversibility lies in the relationship of the “Rung”—the collection of
Ladder programming instructions that constitute a logical expression—and the
“Sequence”—the collection of List programming instructions that accomplish the same.
The figure above demonstrates an example of a common rung in Ladder in any user program. Next to the Ladder rung is the equivalent program logic expressed as a List sequence.
In essence, the program you write, whether it be in Ladder or List, is kept internally as
List. PL7-07 takes advantage of the program structure similarities between the two languages and uses this internal List image of your program to display it in the List /
Ladder Viewer and Editors as either a List program (its basic form), or graphically as a
Ladder diagram, depending upon the preference you select. Therefore, everything created in Ladder can always be reversed to List, but some List logic may not reverse to Ladder. To ensure reversibility from List to Ladder, it is important to follow the set of
List programming conventions contained in section B.1.4-3.
___________________________________________________________________________
1/8
Introduction 1
1.4-3 Reversible List programming conventions
The structure of a reversible function block in List language requires the use of certain specific instructions. They are :
- BLK which marks the block start, and defines the beginning of the rung and the start of the input portion to the block,
- OUT_BLK (marks the beginning of the output portion of the block)
- END_BLK (obviously, marks the end of the block and the rung).
The use of the reversible Function Block instructions are not mandatory for a properly functioning List program. For some instructions it is possible to program in List which is not reversible. Non-reversible List programming is described in the Function Block descriptions in section B2.2.
Another important convention is to avoid the use of certain List instructions, or certain combinations of instructions and operands, which have no equivalence in Ladder. For example, the N instruction (bit Not inverses the boolean accumulator) has no equivalent
Ladder instruction. In the table below is a listing of all the List programming instructions that will not reverse to Ladder.
List Instruction
JMPCN
N
ENDCN
XORN
Operand
%Li none none any
Description
Jump Conditional Not
Negation (NOT)
End Conditional Not
XORN preceded by OR logic
B
Unconditional rungs also follow a List programming convention to ensure List-to-Ladder reversibility. An unconditional rung is a rung in which there are no tests or conditions; the output and/or action instruction(s) is (are) energized, or executed, all the time. The figure below illustrates unconditional rungs and List equivalent sequences.
%MW5 := 0
%Q0.4
LD
ST
1
%Q0.4
LD 1
[%MW5 := 0]
JMP %L6
>>
%L6
___________________________________________________________________________
1/9
B
Notice that each of the unconditional List sequences, with one exception, begin with a
Load instruction followed by the number 1. The combination sets the boolean accumulator value to one, and therefore sets the coil (store instruction) to one and sets %MW5 to zero on every scan of the program. The exception is the unconditional jump instruction. This List instruction is executed regardless of the value of the accumulator, and consequently does not need the accumulator set to one as do the previous two examples.
If you try to reverse a List program that is not completely reversible, the reversible portions are displayed in Ladder and the irreversible portions are displayed in “Ladder
List Rungs.” Ladder List Rungs function just like a small list editor, enabling you to view and modify the irreversible parts of a Ladder program.
Program Documentation
The List editor allows you to document your program with List Line Comments. These comments may appear on the same line as programming instructions, or they may appear on lines of their own. The Ladder Editor allows you to document your program with Rung Headers found directly above the rung.
PL7-07 uses these comments for reversibility. When reversing a program from List to
Ladder, PL7-07 uses some of the List comments to construct a Rung Header. Simply, the comments that may be found between List sequences are used for the Rung
Headers.
___________________________________________________________________________
1/10
Introduction 1
The first comment found on a line by itself (no instruction appears on the line with it) after the end of a List sequence is used for the Rung Title. Then, the next comments found after the first, if any exist, are used for the body of the rung. Once the body lines of the header are occupied, then the rest of the line comments between List sequences are ignored, as are any comments that are found on List lines that also contain List instructions.
When a Ladder rung that contains a Rung Header is reversed to List, the Rung Header documentation is inserted between the List sequences. Any labels or subroutine declarations (%Li: or SRi:) are placed on the next line following the header, immediately prior to the beginning of the List Sequence. If the rung that is reversed was originally written in List, and there were comments ignored when List was reversed to Ladder, those comments will reappear in the List Editor.
B
___________________________________________________________________________
1/11
B
___________________________________________________________________________
1/12
ડાઉનલોડ કરો
જાહેરાત