21
Contents Page Debug - Moni tor (Status) ............................................................................................................... 2 Progra m Statu s Modes of Opera tion ................................................................................................ 3 Use of Trig ger Poi nts with Program Status …..………..................................................................... 4 Select ing th e Di splay In format ion of the Pr ogram St atus ............................................................... 5  Activating the “Monitor/Modify V ariables" Tool ……………........................................................... 6 Ent eri ng a Var iable Table ................................................................................................................ 7  ................................................................................................ Sett ing Tr igger Points .................................................................................................................... 9 Sav ing a Var iable Table ................................................................................................................ 10 Opening a Variable Table ................................................................................................................ 11 Establishing a Connection to the CPU ............................................................................................ 12 Mod ifying Out put s i n t he Sto p Mode ............................................................................................... 13 Forcing ............................................................................................................................................. 14  ......................................................................................................................... Breakpoints (Part 2) ......................................................................................................................... 16 Exerc ise: Moni tori ng and Modi fying Varia bl es .............................................................................. 17 Exercise: Modifying Variables in the Stop State .............................................................................. 18 Exercise: Using Trigger Poi nts for the Modify Variables F unction .................................................... 19 Exercise: Forcing ........................................................................................................................... 20 Ex er ci se: Co mb inin g Pr ogram St atus and Monit or Var iabl e ..................................................... 21 Training Center for Automation and Drives ST-7PRO1 Test Functions Page 1

PRO1_09E [읽기 전용] [호환 모드]

Embed Size (px)

Citation preview

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 1/21

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 2/21

Monitor  You can activate the “Monitor" ("Status") test mode for the block which is currentlyopen y c c ng e pec ac es con w e mouse or y se ec ng e menuoptions Debug -> Monitor.

In the test mode, the elements in LAD / FBD are displayed in different colors. Youdefine these by selecting the menu options Options -> Customize.

E.g.: • Status fulfilled -> "Element is displayed in green"

• Status not fulfilled -> "Element is displayed in blue"

Notes 1. When the “Monitor" test mode is activated, you cannot make any changes tothe program.You cannot change the view of the block (LAD, STL, FBD) either.

2. The status can only be displayed when the instructions are being executed.The status is not displayed when the CPU is in the STOP mode or when theblock is not called.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 2

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 3/21

Debug-> Operation There are two modes of operation for the test mode, which differ in their effect one scan cyc e me o e user program:

• Process operation and

• Test operation.

Process Operation In process operation, the test functions are restricted so that the permissible scancycle time increase that you select is not exceeded.The status of programmed loops is only determined the first time they are executed.

The test functions “Breakpoint” and “Single-step (program execution)” cannot beexecuted.

Test Operation In test operation, all test functions can be performed without restrictions.The status of programmed loops is determined every time they are executed.The scan cycle time can be increased considerably due to the updating of the testfunction “program status” with every loop execution.

arame er e a ove n orma on on y app es e mo e o opera on as no area y Assignment been defined in the hardware configuration.

The mode of operation can be defined on the “Protection” tab page when assigningthe CPU parameters. This setting can then no longer be changed in the “Operation”dialog box.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 3

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 4/21

Trigger Points  After you have selected the menu options Debug -> Call Environment, a dialog boxpops up see s e a ove . ere you can en er a a pa . s s e p u a ocis called several times in a program and you want to monitor only one specific call.

You can also specify data blocks as trigger conditions.The status display of the block begins from the point when the specified DB isopened.

Call Path In the example, FC 1 is called three times (see program structure). So that you canspecifically monitor a call, enter the three blocks that are found immediately beforethe status block. A requirement for this is that the call takes place through different

oc s. o a you can mon or e r ca , en er n e examp eFC 30 at 3rd Block.

Open Data Blocks In the example, FB 1 is called several times by the same FC 40 block. In this case,the Call path cannot be used for testing. Here you use the opened data block as atrigger for testing. Since, as a rule, an instance DB is also used with an FB, you can

use this instance DB in the DB2-number field as the trigger condition. In theexample, DB 1 was used for the first call, DB 2 for the second call and DB 3 for thethird call. You have to enter DB 2 in order to see the second call.

Note The "Test Operation" mode is a prerequisite for testing with the Call path.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 4

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 5/21

Introduction In the block status, you can select which information is to be displayed on thescreen. y e au , you see a us , , an an ar s a us.If you want to display additional information, select the menu options Options ->

Customize -> STL.

Dialog Box In the screen you can see the dialog box for putting together the information.In addition to the information displayed by default, the following is also possible:

• AR1 Address register 1, only meaningful with register indirect addressing• AR2 Address register 2, only meaningful with register indirect addressing• ccumu a or• DBR1 Data block register 1 (global or first DB opened)• DBR2 Data block register 2 (local or second DB opened)• Indirect, meaningful with memory indirect addressing (shows the contents of

MD and DD e.g. with the instruction L IW [MD 100] ).

Note With a running program status, you can hide and show additional information, youcan change the representation (decimal, hexadecimal, real) or display separators.To do so, click with the right mouse button on the title RLO, STA .. and choose themenu op on you wan see screen .

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 5

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 6/21

General “Monitor/Modify Variables" is another STEP 7 tool which enables you to monitor thevar a es o a program n se ec a e orma s.It also allows you to modify the status or contents of variables in the CPU.

Toolbar  You can change the toolbar by selecting the menu options View -> Toolbar . Thereare three different toolbars which you can activate/deactivate:

• Standard

• View

• Variable

View You can adjust the number of columns in the variable table by selecting the menuoptions

ew -> ym o ym o ommen on or orma on or a ue o y a ue

or by using the “View" toolbar.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 6

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 7/21

Creating a VAT There are two different ways of creating a variable table:. n e or, y se ec ng e menu op ons -

Monitor/Modify Variables. You can work directly online with this table.

2. in the SIMATIC Manager, by selecting the menu options Insert New Object ->Variable Table when the “Blocks” folder is open. This table is created

offline. You can save it and open it again later, switch to online mode andthen test it.

Table Each address to be monitored or modified takes up one line of the variable table.The meanings of the columns of the variable table are as follows:

 Address The variable‘s absolute address is found in this column.

Symbol The variable‘s symbolic name (identifier) is found here. It is identical to the nameentered in the symbol table.

Symbol Comment The symbol comment from the symbol table is displayed in this column.

on or orma s co umn con a ns a s an ar se ng, e.g. .You can change the format as follows:

• click an entry in the format column with the right mouse button. The list offormats pops up.

• or keep clicking on the entry in the format column with the left mouse buttonuntil the format you want appears.

Monitor Value The contents of the variable at the last update is displayed here.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 7

Modify Value You enter the new value for the variable (the modify value) in this column.

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 8/21

Monitor  You can monitor variables in two ways:

• The monitor values can be updated once by selecting the menu optionsVariable -> Update Monitor Values or by clicking on the icon.

• The monitor values can be updated every cycle by selecting the menuoptions Variable -> Monitor or by clicking on the icon

Modify Procedure for modifying variables:

1. With the left mouse button, click the line in the “Modify Value” column forthe variable that you want to modify.

2. Enter the value in the correct form for the data type.

3a. To activate the modify values once, select the menu options Variable -> Activate Modify Values or click the icon (or item 3b).

3b. To activate the modify values every cycle, select the menu optionsVariable -> Modify or click the icon.

4. Use the “Monitor” test function to check whether the modify value has beenentered in the variable.

Modify Value Valid You can make the modify value entered in the table invalid by clicking on theicon.

The invalid value is optically displayed like a comment. You make the modifyvalue “valid” again by clicking on the icon again.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 8

n y va mo y va ues can e ac va e .

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 9/21

Trigger  You set the trigger points in the “Monitoring and Modifying Variables” tool byse ec ng e menu op ons ar a e - e r gger... or y c c ng eicon.

Trigger Points The “Monitor Trigger Point” specifies when the values of the variables beingmonitored are to be updated.

The “Modify Trigger Point” specifies when fixed values are to be assigned to thevariables being modified.

“ ” once only when the trigger point is reached or every cycle (every time the triggerpoint is reached).

The “Modify Trigger Frequency” specifies whether the new values are to beassigned to the variables being modified once only or every cycle.

 At tention ! When the “Monitor Trigger Frequency” is set to “Once”, a click on the iconsor has the same effect: the values are updated once.

When the “Modify Trigger Frequency” is set to “Once”, a click on the iconsor has the same effect: the values are activated once.

When the trigger frequencies are set to “Every Cycle”, the above-mentioned iconshave the different effects previously described.

When the same trigger points are set for Monitor and Modify, Monitor has priority,that is, monitoring is done first.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 9

Note For some CPU versions (e.g. CPU 314-1AE03), the modify function is not carried

out with every cycle when the “Modify Trigger Frequency" is set to “Every cycle".Remedy: Using the test function "Force".

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 10/21

Save When you cancel or finish a test phase, you can save the variable table.

The name of a variable table consists of the letters "VAT" followed by a numberfrom 0 to 65535 (with no space in between), e.g. "VAT5".

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 10

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 11/21

What to Do 1. Activate the menu options Table -> Open.

2. Choose the project name in the “Open" dialog window.

3. Select the relevant program in the project pane underneath and click the“Blocks” folder.

4. Select the table you want in the right-hand pane.

5. Confirm with "OK".

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 11

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 12/21

PLC The variables in a VAT are variable parts of a CPU program.e ore you can mon or or mo y e var a es, you mus es a s a connec on o

the CPU concerned. It is possible to connect each variable table to a different CPU.

You select the menu optionsPLC -> Connect To . . .

or click the appropriate icons in the toolbar to establish a connection to one of thefollowing CPUs:

• Configured CPU

• Direct CPU

• Accessible CPU . . .

Configured CPU The variables of the CPU, in whose S7 program (H/W Station) the variable table isstored, are displayed.

Direct CPU The variables of the CPU, which are directly connected to the PG, are displayed.

 Accessible CPU The variables of the CPU, which are selected in the dialog box, are displayed.

You select the menu options PLC -> Connect To -> Accessible CPU... to establisha connection to an accessible CPU.Thus, you can establish a connection to every CPU in the network.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 12

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 13/21

Overview The “Enable Peripheral Outputs" function switches off the output disable of the.

CPU is in the STOP mode.

Selection To enable the peripheral outputs, proceed as follows:

1. Select the menu options Table -> Open to open the variable table (VAT) thatcontains the peripheral outputs you want to modify, or, activate the windowfor the relevant variable table.

2. Select the menu options PLC -> Connect to to establish a connection to theCPU you want, so that you can modify the peripheral outputs of the activevariable table.

3. Select the menu options PLC -> Operating Mode to open the OperatingMode dialog box and switch the CPU to the STOP mode.

4. Enter the appropriate values for the peripheral outputs you want to modify inthe “Modify Value" column.

Examples: PQB 7 Modify Value: 2#0001000011PQW 2 W#16#0027

5. You switch on the “Enable Peripheral Outputs" mode by selecting the menuoptions Variable -> Enable Peripheral Outputs.

6. You modify the peripheral outputs by selecting the menu options Variable -> Activate Modify Values. The “Enable Peripheral Outputs" remains active untilyou select the menu options Variable -> Enable Peripheral Outputs again toswitch off this function.

7. To assign new values, start again with step 4.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 13

Note • If the CPU changes its operating mode and goes from STOP to RUN or

STARTUP, for example, a message pops up.• If the CPU is in the RUN mode and the “Enable Peripheral Outputs" function isselected, a message also pops up.

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 14/21

Forcing You can establish predefined values for user program variables with the Forceunc on. e - , npu s, ou pu s, memor es an per p era s can eforced. With the S7-300, only inputs and outputs.

Notes for Forcing You can only open one Force Values window for a CPU.

• You will find the name of the variable table for the current online connection inthe titlebar of the Force Values window.• You will find the date and time of the current force task in the CPU in the

statusbar.•

active.

Before you start the "Force" function, you should make sure that no one else iscarrying out this function at the same time on the same CPU. You can only cancelor end a force job by selecting the menu options Variable > Stop Forcing.

You cannot cancel the force task by closing the Force Values window or by exitingthe “Monitor/Modify Variables" application.

You cannot undo "Forcing" with the menu options Edit -> Undo. Take the time tofind out about the differences between forcing variables and modifying variables.

 At tention! Please note, that incorrect handling when executing the "Force" function can

• endanger the life or the health of persons or • cause damage to a machine or the entire system.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 14

Note This function is only possible as of a specific version of the CPU(e.g. CPU 314-1AE03).

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 15/21

Breakpoints With the help of this test function, you can test a program you have created in theprogramm ng anguage n s ng e-s ep mo e. s s on y necessary n program

creation so that you can, for example, test programmed loops.

You can set several breakpoints, depending on the CPU.

Breakpoint You can choose the breakpoint functions in the Program Editor by selecting theFunctions menu option "Test" or through the Breakpoint Bar.

Breakpoint Bar  You can activate the breakpoint bar by selecting the menu options View ->.

Note In order to carry out these test functions, you must have fulfilled the followingrequirements:

• The "Test Operation" mode must have been assigned parameters.

• The block to be tested must be opened online.

 At tention! If a breakpoint is activated, the CPU stops at this statement. The outputs aredeactivated for safety reasons.

Note This function is only possible as of a specific version of the CPU

!

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 15

e.g. - .

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 16/21

Breakpoint Bar e e e e rea po n rea po n s c ve

Show Next Breakpoint

Execute Call

Delete All Breakpoints Resume Next Statement

Set/Delete Breakpoint With “Set/Delete Breakpoint" you determine where the program execution is to behalted. The breakpoint‘s statement is not executed.

Breakpoints Active With “Breakpoints Active" you activate all breakpoints; not only those already set butalso those still to be set.

Show Next With “Show Next Breakpoint“, the Editor jumps to the next selected breakpoint,Breakpoint without executing the program.

Resume With “Resume“, the program runs until the next active breakpoint.

Next Statement With "Next Statement“, you execute the program in single-step. If you reach a blockcall, you jump to the first statement after the block call with "Next Statement".

Execute Call Here, when you reach a block call you branch into the block with “Execute Call". Atthe end of the block you jump back to the next statement after the block call.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 16

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 17/21

Goal You have already worked with the conveyor model. Now you are to check all thesensors an ac ua ors on e conveyor mo e .

What to Do • In the S7 program "My Program“ insert a variable table VAT 1.• Enter the addresses that you see in the slide above into the table. The

symbols are only for orientation and are not displayed for you, since youhave not as yet created a symbol table for this S7 program.

Note: to save typing, you can use the menu options Insert -> Block, to enter eightlines for e.g. the inputs I 8.0 to I 8.7 in the table.

• Save the variable table.

• Establish a connection to the CPU.

• As the trigger point for monitor and modify select “Start of cycle" and as thetrigger frequncy select “Every cycle".

• Activate the “Monitor Variable“ function.

• Check all the sensors on the conveyor model.• Exit the monitor function.

• e ou pu s, en er one a er e o er n e o y a ue co umn. Activate the “Modify“ function. Now you have checked all actuators on theconveyor model.

Result You now know if your conveyor model is fully functional. If it is not, please let yourinstructor know.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 17

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 18/21

Goal The CPU has gone into the Stop mode because of a fault. Now, your system is toe rans one n o a e ne s a e. ou are o move e conveyor mo e up o e

light barrier by using the modify function while in the Stop mode.

What to Do • Switch the CPU to STOP.

• In the variable table VAT 1, enter a new line with the address PQB 20(PQB 8).

• Switch the Monitor Format to "BIN".

• Enter "00100000" as the Modify Value for the new address.

• Use the menu options Variable -> Enable Peripheral Outputs.

• Trigger the monitoring function by using the menu options Variable -> Activate Modify Values.

• Move the conveyor model to the right until the bottle reaches the light barrier.

• When the light barrier is reached press the "Esc" button to end the modifying of

the conveyor model.

.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 18

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 19/21

Goal You are to understand the meanings of the trigger points while using Modifyar a es.

What to Do • Enter a new network in OB 1 of the S7 program "My Program" (see slide).

• Transfer all blocks from the S7 program "My Program".

• Switch the CPU to RUN, if it is still in the STOP mode from the last exercise.

• In the variable table VAT 1, enter the additional address Q 8.6 (Q 4.6).

• Set the Modify Trigger Point as shown in the slide.

• " "  .

• If this is not possible, try it with another trigger point.

Result You now know how the trigger points operate with the Modify Variable function.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 19

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 20/21

Goal Sensor signals have failed in the system. You are to simulate these using the" "orce es unc on.

What to Do • In the “Monitor and Modify Variable" tool select the menu options Variable ->Display Force Values.

• In the "Force Values" window, enter the addresses I 0.0 to I 0.2 with theforce values (see slide).

• Trigger the force function by selecting the menu options Variable -> Force.

• Close the "Force Values“ window.

• Determine how the CPU behaves.

Result The force values are now assigned to the input signals.

Training Center for Automation and Drives

ST-7PRO1Test FunctionsPage 20

8/10/2019 PRO1_09E [ ] [ ]

http://slidepdf.com/reader/full/pro109e- 21/21

Goal You are to carry out several test functions at the same time.

What to Do • In one window, open the “Monitor and Modify Variable" tool and in another

window open the LAD/STL/FBD Editor (with an open FC 1 block, S7program "My Program").

• Arrange the two windows so that they are both visible at the same time.

• In the “Monitor and Modify Variable" window add the addresses I 0.0 to I0.2.

• Activate the Monitor Variable function.

• In the “LAD/STL/FBD Editor" window activate the program status.

• Determine what effect the "Force" test function has on the program in theFC 1 block.

• Cancel the force task by selecting the menu options Variable -> DisplayForce Values and then Variable -> Stop Forcing.

Result You have now become familiar with working with several windows. This could behelpful in troubleshooting.