SPS-XML-Import Plugin/en: Unterschied zwischen den Versionen
Alkurz (Diskussion | Beiträge) |
Cg (Diskussion | Beiträge) (→Call) |
||
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 34: | Zeile 34: | ||
=== No optimized block access === |
=== No optimized block access === |
||
Access to data blocks is only possible if the property attribute "Optimized block access" is |
Access to data blocks is only possible if the property attribute "''Optimized block access''" is disabled in the data blocks. |
||
PLC - Program blocks - Properties of the block - Attributes - Optimized block access |
PLC - Program blocks - Properties of the block - Attributes - Optimized block access |
||
= Call = |
= Call = |
||
Start the plugin via the expecco menu: "''Plugins''" |
Start the plugin via the expecco menu: "''Plugins''" → "''Import''" → "''SPS-XML-Import''" → "''Import SPS7-Definition (XML)...''" |
||
= Description = |
= Description = |
||
Zeile 133: | Zeile 133: | ||
All generated blocks are provided with the library name as a tag. |
All generated blocks are provided with the library name as a tag. |
||
Via ''Extras'' |
Via "''Extras''" → "''Settings...''" in the "''expecco Settings''" in the section "''Look & Feel''" → "''Tag Colors''" a color can be assigned to the library tag and thus the blocks of the library can be colored. |
||
If different colors are assigned to the various PLC7 libraries, it is easy to distinguish them in diagrams. |
If different colors are assigned to the various PLC7 libraries, it is easy to distinguish them in diagrams. |
Aktuelle Version vom 11. Juni 2025, 22:42 Uhr
Inhaltsverzeichnis
Overview[Bearbeiten]
Plugin reads the Siemens SPS7 definition file and creates an eXpecco library with type definitions and action blocks for reading and writing SPS7 data.
The plug-in reads a PLC7 definition file generated via TIA-Openess, for example, and generates a new library with blocks for reading and writing the S7 components.
Requirements / Restrictions[Bearbeiten]
Supported Types[Bearbeiten]
The following PLC7 basic types are currently supported:
- Bool
- Byte
- Int
- DInt
- Real
- LReal
- Date
- TimeOfDay
- DateTime
- DTL
- Time
- String
as well as structures from basic types and arrays.
Settings PLC 7[Bearbeiten]
Access via PUT / GET communication[Bearbeiten]
Access with PUT / GET communication by remote partners must be permitted:
PLC - Properties - Protection & Security - Connection mechanisms
No optimized block access[Bearbeiten]
Access to data blocks is only possible if the property attribute "Optimized block access" is disabled in the data blocks.
PLC - Program blocks - Properties of the block - Attributes - Optimized block access
Call[Bearbeiten]
Start the plugin via the expecco menu: "Plugins" → "Import" → "SPS-XML-Import" → "Import SPS7-Definition (XML)..."
Description[Bearbeiten]
After calling up the program, the following dialog opens to enter the parameters for generating the library:
Parameters[Bearbeiten]
Section: New Library[Bearbeiten]
- Filename
- XML file to be imported.
- Library Name
- Name of the generated library. The name of the import file is preset by default.
- DB-Number
- DB number for the generated actions.
- S7 Area
- S7 area for the generated actions.
- Memory
- Optimized block access (not implemented yet)
Section: Elements for Writing / Reading as[Bearbeiten]
- Datatypes;
- The access to the PLC7 elements can take place on the one hand via two generic write and read blocks. The element is determined by means of a generated data type, that has a value for each SPS7 element.
- Actions
- Alternatively, the PLC7 elements can also be accessed via generated actions. A read and write block is generated for each PLC7 element.
- Data types and actions
- Both types of access can be generated.
Section: Options[Bearbeiten]
- Prefix for elements
- A prefix can optionally be added to the name of the generated elements. It is made up of a user-defined text and the name of the library. In addition, the maximum length of the prefix can be limited (0 = unlimited).
- Valid prefixes must have an uppercase letter 'A' - 'Z' or '$', '_', '[' as the first character. Letters (upper and lower case, no umlauts), digits, '$', '_', and ']' are permitted as further characters. (Example: '[Praefix_Nr 1]').
- The resulting text is displayed under Resulting Prefix.
Generated Library[Bearbeiten]
The generated library is imported into the current test suite or, if none has been loaded yet, into a new test suite.
If a library with the same name has already been imported, it can either be re-imported or recreated. A corresponding query dialog appears.
Since blocks with the same name and their ID are retained when they are reimported, existing test cases can continue to be used without modification.
Structure[Bearbeiten]
The library created contains the following elements:
Connect Actions[Bearbeiten]
with the following actions:
- Connect (only with access via actions)
- Connect Generic (only with access via data types)
- Disconnect
Types[Bearbeiten]
- Data types for PLC7 blocks and structures (compound types) as well as actions for creating, changing and reading out the types.
- Enum data type, named after the name of the library, for access via the generic write and read actions (access via Datatypes).
Actions Generic[Bearbeiten]
(Only if the library is generated with read / write elements as Datatypes or Datatypes and Actions.)
One generic block each for the write and read operations on PLC7 values for this library. The address of the PLC7 module is determined by the enum data type (see above) at the input pin datatype.
Actions[Bearbeiten]
(Only if the library is generated with read / write elements as Actions or Datatypes and Actions.) Blocks for writing and reading operations of PLC7 values.
TypeMetadata[Bearbeiten]
(Only if the library is generated with read / write elements as data types or data types and actions.)
Internal file with metadata for the individual PLC7 accesses.
S7 XML[Bearbeiten]
PLC7 definition file used to create the library.
Coloring of the building blocks[Bearbeiten]
All generated blocks are provided with the library name as a tag.
Via "Extras" → "Settings..." in the "expecco Settings" in the section "Look & Feel" → "Tag Colors" a color can be assigned to the library tag and thus the blocks of the library can be colored.
If different colors are assigned to the various PLC7 libraries, it is easy to distinguish them in diagrams.