Concept V2.5

19
Concept V2.5 Lesson 21 Objectives: After completing this lesson, the learner will be able to: Recognize IEC Derived Data Types Identify the types of Derived Data Types Recognize the elements of the Data Type Editor Distinguish between Global and Local Derived Data Types Use Derived Data Types in your project.

description

Concept V2.5. Lesson 21 Objectives: After completing this lesson, the learner will be able to: Recognize IEC Derived Data Types Identify the types of Derived Data Types Recognize the elements of the Data Type Editor Distinguish between Global and Local Derived Data Types - PowerPoint PPT Presentation

Transcript of Concept V2.5

Page 1: Concept V2.5

Concept V2.5 Lesson 21 Objectives:

After completing this lesson, the learner will be able to:

• Recognize IEC Derived Data Types• Identify the types of Derived Data Types• Recognize the elements of the Data Type Editor• Distinguish between Global and Local Derived Data

Types• Use Derived Data Types in your project.

Page 2: Concept V2.5

Concept V2.5 Example:

DFB “M_Logic” needs to send three signals of the data type BOOL to DFB “M_Alarm”

Page 3: Concept V2.5

Concept V2.5 Array Example

Declaration

Logic• 3 Values,

1 Link

Page 4: Concept V2.5

Concept V2.5 Array Example Cont’d

Page 5: Concept V2.5

Concept V2.5 STRUCT Example

DFB “M_logic1`” needs to send two signals of different data types to DFB “M_alarm1”

Page 6: Concept V2.5

Concept V2.5 STRUCT Example

Declaration

Logic• 2 Values,

1 Link

Page 7: Concept V2.5

Concept V2.5 STRUCT Example

Page 8: Concept V2.5

Concept V2.5 Example of Complex DDT

Declaration

Logic

Page 9: Concept V2.5

Concept V2.5 Example of Complex DDT

Page 10: Concept V2.5

Concept V2.5 Files use the .dty extension CONCEPT software supports only one

local data type file for each project folder (project\dfb\*.dty) and only one global data type file (concept\dfb\*.dty) for all projects.

In order to assure consistency between programming unit and the Quantum PLC, the project that contains one of the derived data types must be reloaded into the Quantum whenever one of these files has been edited.

Page 11: Concept V2.5

Concept V2.5 Keywords

TYPE END_TYPE Start / End of Data type definition

STRUCT END_STRUCT Start / End of DDT-Elements

ARRAY Several elements of same data type

Data types Names of defined Data types, conclusion with " ; "

Page 12: Concept V2.5

Concept V2.5 Syntax

Names of derived data types and elements, max. 24 characters, conclusion with separator " : "

Separator • : End of name• ; End of instruction• [ ] Embraces the range entry of the keyword

ARRAY.• . . Separates beginning and end of range of the

keyword ARRAYComment: (* at the beginning, comments, at the

end *)

Page 13: Concept V2.5

Concept V2.5 Creating the Derived Data Type File

Local

Global

Page 14: Concept V2.5

Concept V2.5 Creating the Derived Data Type File

Page 15: Concept V2.5

Concept V2.5 Declaring variables with a DDT

The new DDTs are automatically included in the Variable Editor under data type.

Assignment of an element of a Multi Element Variable:

• in FBD with FFB connection pins• in SFC with Step properties

Array Data Type displayed as: Variable_name[Index_number]

Structured Data Type displayed as: Variable_name.element_name

Page 16: Concept V2.5

Concept V2.5 Declaring variables with a DDT

Page 17: Concept V2.5

Concept V2.5 Assigning DDT variables

Page 18: Concept V2.5

Concept V2.5 Assigning DDT variables (subcomponents)

Page 19: Concept V2.5

Concept V2.5