Concept V 2 5 n Lesson 21 Objectives

Concept V 2. 5 n Lesson 21 Objectives: l 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.

Concept V 2. 5 n Example: l DFB “M_Logic” needs to send three signals of the data type BOOL to DFB “M_Alarm”

Concept V 2. 5 n Array Example l Declaration l Logic • 3 Values, 1 Link

Concept V 2. 5 n Array Example Cont’d

Concept V 2. 5 n STRUCT Example l DFB “M_logic 1`” needs to send two signals of different data types to DFB “M_alarm 1”

Concept V 2. 5 n STRUCT Example l Declaration l Logic • 2 Values, 1 Link

Concept V 2. 5 n STRUCT Example

Concept V 2. 5 n Example of Complex DDT l Declaration l Logic

Concept V 2. 5 n Example of Complex DDT

Concept V 2. 5 n Files use the. dty extension n CONCEPT software supports only one local data type file for each project folder (projectdfb*. dty) and only one global data type file (conceptdfb*. dty) for all projects. n 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.

Concept V 2. 5 n Keywords l TYPE END_TYPE Start / End of Data type definition l STRUCT END_STRUCT Elements Start / End of DDT- l ARRAY Several elements of same data type l Data types Names of defined Data types, conclusion with " ; "

Concept V 2. 5 n Syntax l Names of derived data types and elements, max. 24 characters, conclusion with separator " : " l Separator • : End of name • ; End of instruction • [ ] Embraces the range entry of the keyword ARRAY. • . . Separates beginning and end of range of the keyword ARRAY l Comment: (* at the beginning, comments, at the end *)

Concept V 2. 5 n Creating the Derived Data Type File Local Global

Concept V 2. 5 n Creating the Derived Data Type File

Concept V 2. 5 n Declaring variables with a DDT l The new DDTs are automatically included in the Variable Editor under data type. l Assignment of an element of a Multi Element Variable: • in FBD with FFB connection pins • in SFC with Step properties l Array Data Type displayed as: Variable_name[Index_number] l Structured Data Type displayed as: Variable_name. element_name

Concept V 2. 5 n Declaring variables with a DDT

Concept V 2. 5 n Assigning DDT variables

Concept V 2. 5 n Assigning DDT variables (subcomponents)

Concept V 2. 5
- Slides: 19