Project data and editors for a PLC station

Một phần của tài liệu Automating with SIMATIC s7 400 inside TIA portal publicis (2013) (Trang 38 - 42)

If you add a PLC station (an S7-400 controller) to the project, STEP 7 creates the cor- responding structure in the project data (Fig. 1.18). A station is always required for editing in a project so that STEP 7 can create the data structures required for pro- gramming or configuration. If you wish to write a user program without previously selecting a specific CPU, you can select an “unspecified CPU 400” from the hardware catalog and replace it later with a “real” CPU 400, if necessary.

Fig. 1.16 Project components, libraries and programming device design Global libraries

Programming device design

Libraries delivered with STEP 7. Libraries configured by users themselves.

Global libraries contain elements for use across projects.

Contains the programming device resources relevant to the project.

All the data for the automation task is combined in a project.

A project includes at least one station. Contains cross-station data.

Contains all the data for a controller.

Contains text lists for system and user messages.

Contains all the data for an HMI device.

Contains all the data for a PC system or PC application.

Contains project texts, project languages, and graphics.

Contains the templates and settings for documentation of project data Project

Contains data compiled by the user

The user program which controls the machine or process is located in the Program blocks folder. The program comprises blocks (separate program components) which are either stored directly in the Program blocks folder or – if there is a large number – in subfolders which you can create and configure yourself. The Main block (“main program”, the name is the symbol for the block and can be changed) is the organization block OB 1 and is created automatically. The processing se- quence of the blocks is defined in the user program by “block calls” and can be made visible using the Program info editor (further down in the project tree) in a call and dependency structure.

Fig. 1.17 Project structure in the project tree

< Project

Online access

SIMATIC Card Reader Interface x1

< PLC station >

Common data

Documentation settings

Interface x2

< PLC ... >

< PLC station_1 >

Languages & resources Add new device

...

...

...

Devices & networks

Update accessible stations

Add user-defined card reader

Card reader

Folder with the data of a found station Folder for all data of an automation system

Folder for all LAN interface modules of the programming device

Folder for all SD card readers of the programming device LAN interface of programming device

Folder for all data of a PLC station

Folder for common data in the project

Folder for common data in the project

Further LAN interface modules if applicable Folder for the data of a further PLC station

Folder for language-dependent objects Project navigation with opened project

Fig. 1.18 Structure of the project data for a PLC station

< PLC_xxx >

Program blocks

PLC data types

Local modules Technology objects

PLC tags

< Group_1 >

< Group_1 >

Device configuration

Add new block

Add new watch table Add new data type

< PLC data type_1 >

PLC module

< Other modules >

Add new object

Add new external file

< External program source >

Show all tags Add new tag table Standard tag table [n]

< Tag table [n] >

Online & diagnostics

Main [OB1]

< Watch table_2

< Block_2 >

PLC tags (n)

< Block_1 >

< Watch table_1 >

Force table

Text lists PLC alarms Program info

Folder for all data of a PLC station (name can be freely selected)

Folder for all blocks of the user program

Folder for all watch and force tables Folder for all PLC data types

Folder for the local modules of the PLC station Folder for all technology objects

Folder for the program sources

Folder for all PLC tags Data structure of a PLC station

< Technology object_1 >

External sources files

< Group_1 >

Watch and force tables System blocks

The Program blocks folder has a System blocks subfolder with the system and stan- dard blocks used in the program. This is created automatically when a block of this type is used.

The Technology objects folder contains the configuration data for control loop objects (PID controllers). A new PID controller technology object can be generated as a technology object using the Add new object editor.

The External sources files editor contains the program sources for STL and SCL blocks. The Add new external file editor is used to import a program source and to save it in this folder. The External sources files folder can be configured using self- created subfolders.

The PLC tags folder contains the assignment of the absolute address to the symbol address (name) of inputs, outputs, and bit memories, as well as SIMATIC timer func- tions and SIMATIC counter functions. Example: The symbol address “Switch on mo- tor” can be assigned to the input with the absolute address %I1.0. A PLC tag is ap- plicable throughout the CPU, it is a “global” tag. The PLC tags folder can be config- ured using self-created subfolders. A subset of the PLC tags is listed in a tag table.

The Show all tags editor lists all PLC tags used from all tag tables.

The PLC data types folder contains user-defined data types. A PLC data type com- bines various data types in the form of a named data structure. A PLC data type can be assigned to a local tag in a block or serve as a template for the structure of a data block. The PLC data types folder can be configured using self-created subfolders.

All created watch tables and the forced table can be found in the Watch and force tables folder. A watch table is used during testing of the user program. It contains tags whose current value can be monitored and also changed during runtime.

The Force table can be used to assign a fixed value to peripheral inputs and outputs.

The Watch and force tables folder can be configured using self-created subfolders.

Program info provides information about

b the call structure shows the call sequence of the blocks – which block calls which other block

b the dependency structure – which block is called by which other block

b the assignment list – which global operands are already used, and which addresses are still unused

b the CPU Resources – how much space is required by the program in the load and work memory.

Under PLC alarms you see an overview of which PLC alarms, user diagnostic alarms, and system alarms are currently present and edit them.

Message texts are stored under Text lists. In the case of the user-defined text list, you can specify the value ranges which trigger the messages and the associated texts;

with a system-defined text list, the contents are specified by STEP 7. Text lists creat- ed under a PLC station contain station-specific texts, those created under a project contain cross-station texts.

The Local modules folder contains all configured modules of the PLC station. Open- ing a module initiates device configuration. The module properties are displayed in the inspector window.

You start configuration of a station using the Device configuration editor which is located in the first position in the project structure. There is no corresponding fold- er for the data of the device configuration in the project tree. The configuration da- ta is located “behind” the Device configuration editor. When you start the editor, the data is displayed in the form of a pictorial representation of the programmable con- troller in the working window and in a register-oriented representation of the mod- ule properties in the inspector window. The bottom section of the working window additionally displays the configuration table with the modules as a drop-down list.

Online & diagnostics starts the editor for the online connection and online func- tions. For example, you can use a (software) control panel in online mode to control the operating states of the CPU, to set the CPU's IP address and time, or read the CPU's diagnostic buffer.

Một phần của tài liệu Automating with SIMATIC s7 400 inside TIA portal publicis (2013) (Trang 38 - 42)

Tải bản đầy đủ (PDF)

(747 trang)