SPS-XML-Import Plugin/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
 
(22 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
= Overview =
= Overview =
Plugin reads the Siemens SPS7 definition file and creates a new Expecco library with action for reading and writing sps7 data.
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 =

== Supported Types ==

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 ==

=== Access via PUT / GET communication ===

Access with PUT / GET communication by remote partners must be permitted:

PLC - Properties - Protection & Security - Connection mechanisms

=== No optimized block access ===

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 =
= Call =
Start the plugin from the eXpecco menu: "''Plugins''" - "''Import''" - "''SPS-XML-Import''" - "''Import SPS7-Definition (XML)...''"
Start the plugin via the expecco menu: "''Plugins''" → "''Import''" → "''SPS-XML-Import''" → "''Import SPS7-Definition (XML)...''"


= Description=
= Description =


After the start a dialog is opening to define the parameters for the generation of the library:
After calling up the program, the following dialog opens to enter the parameters for generating the library:


== Parameters ==
== Parameters ==
Zeile 13: Zeile 49:
[[Datei:Sps-xml-import-screenshot-en.png]]
[[Datei:Sps-xml-import-screenshot-en.png]]


=== Section: New Library ===
'''Filename''':<br>

XML file to import.
;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 ===

;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 ===

;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 ==

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 ===

The library created contains the following elements:

==== Connect Actions ====

with the following actions:
* ''Connect'' (only with access via actions)
* ''Connect Generic'' (only with access via data types)
* ''Disconnect''

==== Types ====

* 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 ====

(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''.
'''Library Name''':<br>
Name of the generated Expecco library. By default initialized with the name of the xml import file.


==== Actions ====
'''DB-Number''':<br>
DB-Number.


(Only if the library is generated with read / write elements as ''Actions'' or ''Datatypes and Actions''.)
'''S7 Area''':<br>
Blocks for writing and reading operations of PLC7 values.
S7 Area.


==== TypeMetadata ====
'''Memory''':<br>
Optimised block access (not implemented yet)


(Only if the library is generated with read / write elements as data types or data types and actions.)
'''Generate Actions''':<br>
Creates actions for reading and writing.


Internal file with metadata for the individual PLC7 accesses.
'''Generate Types''':<br>
Creates datatypes.


==== S7 XML ====
'''Element Name:'''
* '''Hierarchy in Name''':<br>
If selected, the hierarchy of the elements is represented by the name of the elements, otherwise in the structure of folders.


PLC7 definition file used to create the library.
* '''Prefix of Elements''':<br>
Text to be inserted at the beginning of the name of the generated elements.<br>
Valid input values must have an uppercase letter 'A' - 'Z' or '$', '_', '[' as the first character. Letters (uppercase and lowercase, no umlauts), digits, '$', '_', '-', '' and ']' are permitted as further characters. The text can contain a maximum of 20 characters. (Example: '[Prefix_No 1]').


=== Coloring of the building blocks ===
== Genererated Library ==


The generated Library will be imported in the current or a new created Testsuite.
All generated blocks are provided with the library name as a tag.


Via "''Extras''" &rarr; "''Settings...''" in the "''expecco Settings''" in the section "''Look & Feel''" &rarr; "''Tag Colors''" a color can be assigned to the library tag and thus the blocks of the library can be colored.
If a library with the same name has already been imported, the library can either be re-imported or created on request.


If different colors are assigned to the various PLC7 libraries, it is easy to distinguish them in diagrams.
When reimporting, blocks with the same name are retained so that existing test suites can continue to be used.

Aktuelle Version vom 11. Juni 2025, 22:42 Uhr

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]

Sps-xml-import-screenshot-en.png

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.



Copyright © 2014-2024 eXept Software AG