当前位置:文档之家› 施耐德PLC讲座13_导出数据类型(DDT)

施耐德PLC讲座13_导出数据类型(DDT)

Concept V2.6
Example:
z DFB “M_Logic”needs to send three signals of the data type BOOL to DFB “M_Alarm”
Concept V2.6 Array Example
z Declaration
z Logic
•3 Values,
1 Link
Concept V2.6 Array Example Cont’d
Concept V2.6
STRUCT Example
z DFB “M_logic1`”needs to send two signals of
different data types to DFB “M_alarm1”
Concept V2.6 STRUCT Example
z Declaration
z Logic
•2 Values,
1 Link
Concept V2.6 STRUCT Example
Concept V2.6 Example of Complex DDT z Declaration
z Logic
Concept V2.6 Example of Complex DDT
Concept V2.6
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 PLC whenever one of these files has been edited.
Concept V2.6
Keywords
z TYPE END_TYPE Start / End of Data type
definition
z STRUCT END_STRUCT Start / End of DDT-
Elements
z ARRAY Several elements of same data type
z Data types Names of defined Data types,
conclusion with " ;"
Concept V2.6
Syntax
z Names of derived data types and elements, max.
24 characters, conclusion with separator " :"
z 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
z Comment: (* at the beginning, comments, at the
end *)
Concept V2.6
Creating the Derived Data Type File
Local
Global
Concept V2.6
Creating the Derived Data Type File
Concept V2.6
Declaring variables with a DDT
z The new DDTs are automatically included in the
Variable Editor under data type.
z Assignment of an element of a Multi Element
Variable:
•in FBD with FFB connection pins
•in SFC with Step properties
z Array Data Type displayed as:
Variable_name[Index_number]
z Structured Data Type displayed as:
Variable_name.element_name
Concept V2.6 Declaring variables with a DDT
Concept V2.6 Assigning DDT variables
Concept V2.6
Assigning DDT variables (subcomponents)
Concept V2.6。

相关主题