1 / 24

Concept V2.5

Concept V2.5. Lesson 18 Objectives: After completing this lesson, the learner will be able to: Program control logic using the Instruction List Editor. Demonstrate an understanding of the Instruction List Editor. Concept V2.5.

bethan
Download Presentation

Concept V2.5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Concept V2.5 • Lesson 18 Objectives: • After completing this lesson, the learner will be able to: • Program control logic using the Instruction List Editor. • Demonstrate an understanding of the Instruction List Editor.

  2. Concept V2.5 • Instruction List (IL) is a low level textual language which has a structure similar to a simple machine assembler. • The IEC has developed IL by reviewing the many low level languages offered by PLC manufacturers. • IL provides a wide range of operators that represent those most commonly found in proprietary instruction list languages of current day PLCs

  3. Concept Programming in IL • Advantages: • The basic structure of IL is very simple and easy to learn • Ideal for solving small straight-forward problems where there are few decision points and a limited number of changes in program execution flow • Tight, optimized and fast code for performance critical sections of a program (e.g., DFBs) • Disadvantages: • Difficult to write, read and understand the program • Difficult to follow the program flow

  4. Concept V2.5 • With IL the following operations can be executed: • logical (AND...), arithmetic (ADD...), compare (GT...) operations and assignments (ST, S, R). • Jumps within a section unconditioned / conditioned (JMP / JMP C, JMP CN) • Functions and function blocks unconditioned / conditioned (CAL / CAL C, CAL CN) • Before invoking an FFB, it has to be declared usingVAR and END_VAR. • Each FFB instance must be invoked once. • Multiple invocation (instantiation) is allowed! • FFB-call: • with CAL and a list of input parameters or • with CAL and Load/Save of the input parameters or • by using the input operators.

  5. Concept V2.5 • LD N Loads the value of the operand into the Accumulator Literal, variable, direct address from data type ANY • ST N Saves the value of the Accumulator in the operandLiteral, variable, direct address from data type ANY • S Sets the operand to 1 if the Accumulator content is 1Literal, variable, direct address from data type BOOL • R Sets the operand to 0 if the Accumulator content is 1 Literal, variable, direct address from data type BOOL OperatorModifierOperand / Significance

  6. Concept V2.5 AND N, N(, ( Logic AND 1 OR N, N(, ( Logic OR 1 XOR N, N(, ( Logic exclusive OR 1 ADD ( Addition 2 SUB ( Subtraction 2 MUL ( Multiplication 2 DIV ( Division 2 OperatorModifier Significance 1 Literal, variable, direct address of data type ANY_BIT 2 Literal, variable, direct address of data type ANY_NUM or TIME

  7. Concept V2.5 GT ( Compare : > GE ( Compare : >= EQ ( Compare : = NE ( Compare : <> LE ( Compare : <= LT ( Compare : < OperatorModifierSignificance Literal, Variable, Direct Address of data type ANY_ELEM

  8. Concept V2.5 JMP C, CN Jump to label Label CAL C, CN FBNAME (name of instance) Invoking a FFB FUNCNAME Executing a function Literal, variable, direct address (data type is subject to function) ) Editing reset operations OperatorModifierOperand/Significance

  9. Concept V2.5 Input Output Default Data Type Possible Data Types %IX, %QX BOOL BOOL%I %Q %IB %QB BYTE BYTE %IW %QW INT INT, UINT, WORD %ID %QD REAL REAL, DINT, UDINT, TIME

  10. Concept V2.5 • When entering keywords, separators and comments, there is an immediate spell check • If a keyword, a separator or a comment is detected, it is identified with a color shading. • If unauthorizedkeywords (instructions or operators) are entered, this will be identified through color shading as well. • Spaces and tabs have no effect on syntax, they can be used anywhere.

  11. Concept Programming in IL • Pull Down Menus

  12. Concept V2.5 • Example: Entering a direct function call • No declaration is required!

  13. Concept V2.5 • Example: Entering a function block IN, PT, Q, and ETare the labels of thepins on a TON timer

  14. Concept V2.5 • Tool bar Compare with FBD CAL FFBs: Declaration Invocation Assignments

  15. Concept V2.5 • Create or open IL Section • Type or select operator and modifier: Objects... • Type or select operand:  Edit  Lookup variables • Type or select FFB:  Objects  Insert FFB or click on • Insert FFB see next slide

  16. Concept Programming in IL • Insert FFB • Browse and select FFB • Declaration • Invocation • Assignment

  17. Concept V2.5 • Use Expand statement to complete e.g.,VAR ... END_VAR • Use Go to counterpart to find e.g.,second bracket ( ) • Enter comments, consider Options, Preferences! • Syntax check: Project  Analyze Section. • Any errors found are displayed in the message window. • Double click on the first line means: go to the line with the first error in IL.

  18. Concept V2.5 • Handling, syntax check

  19. This area used for Upload function Concept V2.5 • Before closing the IL section, go to  Project  Code generation options creates additional information forprocess diagnosis during code generation generates a runtime­optimized code Tests loops within ST (and IL) sections • Code generation together with the syntax check will be performed when the section is closed.

  20. Concept Programming in IL IL example • Comments • FFB-Declaration • AND-Function • Assignment • FFB call • Assignment • AND-Function • FFB call • Assignment

  21. Concept V2.5 Inspect Selected Watch Selected Inspect Selected

  22. Concept V2.5 • Select variable with double click • Animation Selected mode or • Go to Online  Watch Selected • Repeat for next variable • Remains open until it is closed or the animation is terminated • A dialog box can be opened for each section

  23. Concept V2.5 • Select variable with double click • go to menu Online  Inspect Selected • set cursor to any position on section • click left mouse button • Set cursor into cyan field • depress right mouse button • select operation mode: • Move field to another position • Delete field or • Options... see next slide

  24. Concept V2.5 • Select operation mode options... • Enter Minimum/Maximum • Notice the color change Yellow Magenta

More Related