Siemens TIA Portal: Creating a ProDiag function block

Publisher:清晨微风Latest update time:2024-05-10 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction

In this example, objects for visualization and monitoring of program code are connected to the control program. You have previously created a program in STEP 7 for transporting production units on a conveyor. You also created a ProDiag function block in which you set up the monitoring of the operands.


Require

The "Overview" screen has been created.

A GRAPH overview and a ProDiag overview have been created in the screen.

A ProDiag function block has been created in the control program.

A GRAPH instance data block "Conv_Seq_DB" has been created in the control program.

The GRAPH instance data block "Conv_Seq_DB" contains the "OFF_SQ" tag which can be displayed in and accessed from the HMI.

step

Select the GRAPH overview.
In the Inspector window, click the selection button under "Properties> General> Process > Tag".

A dialog box opens.

Click the GRAPH instance DB "Conv_Seq_DB" in the "Program blocks" folder.

Select the PLC tag "OFF_SQ" of the GRAPH instance DB and confirm your selection.



Note The process tags for the GRAPH overview must be visible in the HMI and accessible via the HMI. To mark the tags of the GRAPH data block as visible in the HMI and accessible via the HMI, open the GRAPH function block, select the block in the work area and select "Edit > Internal parameters visible/accessible from HMI" in the menu bar. Then compile the program block. The 36f53fd4-4af3-11ee-97a6-92fbcf53809c.png

GRAPH instance DB and the "GRAPH overview" object are connected.

Select the ProDiag overview "Overview_Conveyor".

In the Inspector window, click the selection button under "Properties> General> Process > Tag".

A dialog box opens.

Click the data block "Coveyor_DB" in the "Program blocks" folder.

Select the state tag "State" of the "Conveyor_DB" data block.

3742b5ac-4af3-11ee-97a6-92fbcf53809c.png

The ProDiag data block and the "ProDiag Overview" object are connected.

result

GRAPH Overview and ProDiag Overview are connected to the data blocks of the control program. In runtime, this object displays incoming monitoring errors and the current status of the GRAPH sequencer.

Configuring the alarm view of ProDiag

Introduction

In this example, an alarm view is configured for displaying monitoring alarms and jumping to the PLC code view with the program code.

Require

The "Alarm" screen has been created.

The alarm view "ProDiag_Alarm" has been created.

The "PLC code view" is created in the "Program code" screen.

step

Open the "Alarm" screen and select the alarm view.

In the Inspector window, select "Properties > General".

Select the alarm classes to be displayed in the alarm view, for example, the system-internal alarm classes "Acknowledgement" and "No Acknowledgement".

You can choose to also display alarms of alarm classes previously defined in STEP 7.

376a18c2-4af3-11ee-97a6-92fbcf53809c.png
376a18c2-4af3-11ee-97a6-92fbcf53809c.png

Under "Properties > Display > Control tag for PLC code view" specify the Boolean tag that will control the jump from the last active ProDiag alarm to the PLC code view.

This tag is used to evaluate whether a jump from the selected alarm to the PLC code view is possible.

37b00486-4af3-11ee-97a6-92fbcf53809c.png

Drag-and-drop the button from the "Tools" task card to the "Alarm" screen.

In the Inspector window, under "Properties > Properties > Miscellaneous > Name", enter the name "Program code".

In the Inspector window, select "Events > Click".

Select the "ActivatePLCCodeView" system function under "Add function".

Enter the screen name "Program code" and the object name "PLC code view" as parameters.

Under "Properties > Animation > Visibility > Under "Properties > Animations > Visibility > Tag", select the Boolean control tag of the previously specified PLC code view.

37cfd68a-4af3-11ee-97a6-92fbcf53809c.png

If it is possible to jump to the PLC code view from entering the ProDiag alarm, the "Program code" button is visible.

result

You activated the alarm display of the defined alarm classes in the alarm view. In Runtime, the alarms of the corresponding alarm class are displayed in the alarm view.

Using the configured button, you jump to Runtime in the PLC code view with the program instance that triggered the ProDiag alarm.

Configuring a jump from the GRAPH overview

Introduction

In this step, you configure the basic navigation between the GRAPH overview, alarm view and PLC code view.

Configuring a jump from the GRAPH overview

Select the GRAPH overview "GRAPH_Sequence".
In the Inspector window, select "Events > Alarm view button click".
Select the "ActivateScreen" system function under "Add function".
Specify the name of the "Alarm" screen that contains the alarm view.
In the Inspector window, select "Events > PLC code view button click".
Select the "ActivatePLCCodeView" system function under "Add function".
Enter the name of the "Program code" screen and the "PLC code view".
37e7c7fe-4af3-11ee-97a6-92fbcf53809c.png

You have connected the GRAPH overview to the PLC code view. By clicking the "PLC code view" button, a screen is displayed in Runtime that contains a display of the GRAPH sequencer.

result

Use the GRAPH overview in runtime to monitor the current status of the sequencer. You have the option of viewing the GRAPH sequencer in the PLC code view at any time.

3806e9f4-4af3-11ee-97a6-92fbcf53809c.png

In the event of a fault, you can use configured buttons to jump to the corresponding alarm in the alarm view or directly to the PLC code view with step sequencer display.

38241470-4af3-11ee-97a6-92fbcf53809c.png

Configuring jumps in the ProDiag overview

Introduction

Here, configure the basic navigation between the ProDiag overview, alarm view and PLC code view.

Configuring jumps in the ProDiag overview

Select the ProDiag overview "Overview_Conveyor".
In the Inspector window, select "Events > Alarm view button click".
Select the "Activate screen" system function under "Add function".
Specify the name of the "Alarm" screen that contains the alarm view.

result

Diagnostic objects are already related to each other.

In Runtime, use the "ProDiag Overview" to monitor the status of ProDiag. If an error occurs, the corresponding monitoring button will be highlighted.

By clicking the "Alarm view" button, the screen with the alarm view and currently pending alarms is displayed. Via a configured button, you can jump from the ProDiag alarm to the display of the program network in the PLC code view.

38437ed2-4af3-11ee-97a6-92fbcf53809c.png


Reference address:Siemens TIA Portal: Creating a ProDiag function block

Previous article:Why does bldc use square wave control? Can bldc be controlled by sine wave?
Next article:Siemens TIA Portal S7-1200: How to add modules to the rack

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号