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

download PRO1_12E [읽기 전용] [호환 모드]

of 46

Transcript of PRO1_12E [읽기 전용] [호환 모드]

  • 8/10/2019 PRO1_12E [ ] [ ]

    1/46

    Contents Page

    System Diagnostics - Overview ...................................................................................................... 2

    Searching for Errors, that Cause the CPU to go into Stop ............................................................. 3-13

    Logical Errors ................................................................................................................................. 14-27

    Sporadic Errors ........................................................................................................................... 28-38

    System Information ........................................................................................................................ 39-46

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 1

  • 8/10/2019 PRO1_12E [ ] [ ]

    2/46

    What is Diagnostics? Diagnostics is the integral detecting functions and recording functions of the CPU.e area n w c e error n orma on s recor e s ca e e agnos c u er.

    The size of this buffer depends on the type of CPU (e.g. CPU 314 = 100

    messages).

    What Happens, when When an error or an event, for example a change of operating mode, occurs, thean Error Occurs? following happens:

    A message stamped with the date and time is entered in the diagnosticbuffer. The most recent message is stored at the beginning of the buffer. If

    , .

    Entry of the event in the system status list.

    If necessary, the event activates a relevant error OB (Organization block).

    Types of Errors With the help of the CPU diagnostics, the following types of errors can be identified:

    System error in the CPU or error in a module

    Program errors in the CPU.

    Troubleshooting In troubleshooting, a distinction is made between the following error classes:

    Errors, that cause the CPU to go into the Stop mode.Troubleshooting with the "Module Information" tool.

    Logical errors, that is, the CPU executes the program, but the function is notfulfilled.Troubleshooting with the "Referece Data" and "Program Status" tools.

    Sporadic errors, that only occur in particular system states. These caneither cause the CPU to go into Stop or occur as a logical error.

    " " "

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 2

    rou es oo ng w e essages oo or y crea ng your owntrigger point".

  • 8/10/2019 PRO1_12E [ ] [ ]

    3/46

    Contents Page

    Calling the "Module Information" Tool ................................................................................... 4

    Module Information Tab: "Diagnostic Buffer" ................................................................................. 5

    Interpreting Error Messages .......................................................................................................... 6

    Opening a Block Containing an Error .............................................................................................. 7

    Diagnostics with I Stack, B Stack, L Stack ...................................................................................... 8

    B Stack ............................................................................................................................................. 9

    .............................................................................................................................................

    L Stack ............................................................................................................................................. 11

    Exercise: Finding Stop Errors and Eliminating Them ................................................................. 12

    Exercise: Troubleshooting with I Stack, B Stack .............................................................................. 13

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 3

  • 8/10/2019 PRO1_12E [ ] [ ]

    4/46

    Introduction The information that you need for troubleshooting is stored in all tools in the function- o u e n orma on. ou can open s unc on, or examp e, rom e

    SIMATIC Manager or through the Program Editor.

    SIMATIC Manager If the project structure is not available on the PG, you click on the "AccessibleNodes" icon and then on MPI=x (x = MPI address on the connected CPU).Now select the menu options PLC -> Module Information.If you have opened a project on the hard disk with the SIMATIC Manager, you canselect the menu options PLC -> Module Information after you have chosen the S7program.

    Program Editor As soon as you open a block, the information function for troubleshooting appears.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 4

  • 8/10/2019 PRO1_12E [ ] [ ]

    5/46

    Diagnostic Buffer The diagnostic buffer is is a FIFO buffer in a battery-backed memory area in thea canno even e e e e y a memory rese . con a ns a agnos c

    events in the order in which they occurred.

    All events can be displayed on the programming device in plain text and in thesequence in which they occur.

    Details on Event When you select an event, additional information is supplied in the "Details onEvent" box:

    Event ID and event number,

    additional information, depending on the event, such as the address of theinstruction that caused the event,

    etc.

    Help on Event When you click on the box, help on the event selected in the list isopened.

    (Example: a programming error has occured, the relevant OB (OB121) is not loadedor activated, however.)

    Open Block When you click on the box, the block in which the error occurredcan be opened in the CPU.(in the above example: "FC number: 10").

    Opening the Tool You open the diagnostic buffer by selecting the menu options PLC --> ModuleInformation --> Diagnostic Buffertab in the SIMATIC Manager or Program Editor.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 5

  • 8/10/2019 PRO1_12E [ ] [ ]

    6/46

    General The last entry appears at the top of the list. The time shows you which errormessages e ong oge er even no. an n e s e .

    Interpreting Errors In our example, a complete restart was performed before the error occurred (event no.

    3 to 5). After the restart, the error occurred and caused entries no. 1 and 2.Event no. 1: The CPU went into Stop mode because no error OB was

    programmed. The "Details on event" box shows the executionlevel (priority class), e.g. OB1 (cycle) and the location of the errorin the program (FC 10, module address 24).

    Event no. 2: The actual cause of the error appears here, e.g. BCD conversionerror. The "Details on event" box shows that there is an incorrect

    va ue n accumu a or an w c error s respons e or(OB 121).

    Error OBsType of error Example Error OB

    Programming Error Called block not in the CPU OB 121

    Access Error Direct access to module that is eitherfaulty or not present

    OB 122

    me error ax mum scan cyc e me excee e

    Power supply fault Backup battery failure OB 81

    Diagnostic interrupt Wire break at input of diagnostics-capablemodule

    OB 82

    CPU hardware fault Incorrect signal level at the MPI interface OB 841)

    Program execution error Error in updating the process image (modulefaulty)

    OB 85

    1) only forS7-400

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 6

    Rack failure Distributed rack or DP Slave failure OB 86

    Communication error Incorrect frame ID OB 87

  • 8/10/2019 PRO1_12E [ ] [ ]

    7/46

    Opening a Block You can open the block containing the error directly by clicking the "Open Block"u on. e oc s opene on ne. n , e cursor s pos one n ron o e

    instruction where the error occurred. In LAD/FBD, the network containing the error

    is displayed.

    In our example, we tried to convert the value from the pushwheel buttons from BCDto Integer. An invalid BCD number was presumably in accumulator 1. In this case,reading out the I stack (see following pages) will help you to make a more exacterror analysis.

    , .

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 7

  • 8/10/2019 PRO1_12E [ ] [ ]

    8/46

    Introduction To obtain additional information about the error location, you can read out the stackcon en s ac , ac , ac . s ena es you o e erm ne, or examp e,which values were stored in the accumulators before the CPU went into the Stop

    state.

    B Stack The B Stack contains a list of all blocks executed up to the transition to the Stopstate.

    I Stack The I Stack contains the data of the registers at the interrupt location, such as:

    contents of the accumulators and address registers which data blocks are open status word contents program execution level (e.g. cycle) interrupted block specifying the network and instruction number next block to be executed

    L Stack The L Stack contains the values of the temporary variables of the blocks. You needsome experience to evaluate this data.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 8

  • 8/10/2019 PRO1_12E [ ] [ ]

    9/46

    Stacks In order to display the stack information, the CPU must have gone into the STOPmo e:

    because of a program error

    because of a STOP instruction

    on reaching a breakpoint.

    B Stack The block stack (B Stack) is a graphic representation of the call hierarchy, that is,the sequence and nesting of the called blocks up to the interrupt location.

    The B Stack contains all interrupts through interrupt OBs and error OBs as well asthe open DBs.

    You will find the direct cause of the STOP mode in the block that is displayed last.

    In our example, you can see that the error occurred in the first call of the FC 10block.

    Open Block To open a block online, you select the block in the B Stack list and then click on the"Open Block" button. You can then edit this block. The cursor is located after the

    .

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 9

  • 8/10/2019 PRO1_12E [ ] [ ]

    10/46

    I Stack The interrupt stack (I Stack) always refers to an execution level. Before you canopen e ac , e organ za on oc concerne mus e se ec e n e ac .

    Register The contents of all relevant registers at the time of the interruption are displayed in

    the I Stack screen:

    AccumulatorsYou can select the numbers format for displaying the accumulator contentsin the "Display format" list.

    Address registerYou can select the numbers format for displaying the address register

    " " .

    Status wordBits 0 to 8 of the status word are displayed. They are identified withabbreviations according to their meaning.

    Point of Interruption The "Point of Interruption" field gives you information about:

    the interrupted block, with the option of opening it directly (the cursor is thenlocated directly in front of the faulty instruction),

    , ,

    open data blocks with their number and size.

    Error Example From our example, you can see that the hexadecimal number 0000 000F is storedin accumulator 1. This is not a valid BCD number and for this reason a conversionerror occurred during the conversion from BCD to Integer (BTI instruction).This error can occur during the switching of the pushwheel button due to themechanical contacts. To remedy this, confirm the input by pressing a momentary-contact switch before carrying out the conversion.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 10

  • 8/10/2019 PRO1_12E [ ] [ ]

    11/46

    L Stack The current values of the temporary variables for blocks not ended at the time ofn errup on are con a ne n e ac .The local data displayed in the L Stack window refer to the block selected in the

    B Stack.The blocks not yet ended when the CPU switched to the STOP mode are listed inthe block stack (B Stack).

    Error Example In our example, the two temporary variables, variable1 and variable2 are defined inthe FC 10 block.

    The declaration table of the FC 10 block shows the relative address in the L Stack inthe address column. The variable, variable1 is stored in byte 0 and 1 of the L Stackand the variable, variable2 in byte 2 and 3.

    Thus the variable variable1 contains the value 78H, which corresponds to theInteger number 120. The variable was described in the program with the

    instructions L 120, T variable1 .The variable, variable2 has the value 08H and this is the result of the last error-freeconversion from BCD to Integer.

    In the following picture, you can see the relevant program section of the FC 10block:

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 11

  • 8/10/2019 PRO1_12E [ ] [ ]

    12/46

    Goal Troubleshooting a faulty program.

    What to Do 1. Carry out a CPU memory reset.

    2. Copy the S7 program "ERROR" from the project "ERROR_16" or"ERROR_32" into the HW station "My Station".

    3. Download all the blocks from the S7 program "ERROR" from the project "MyProject" into the CPU.

    4. Perform a complete restart.

    5. Read out the diagnostic buffer by selecting PLC -> Module Information.You must select the project "My Project" and the S7 program "ERROR", sothat the correct comments are displayed.

    6. Determine the errors and eliminate them.

    Result You are now familiar with the diagnostic facilities for troubleshooting. The CPUexecutes the program, but the function is not yet fulfilled. The logical errors areeliminated in a later exercise.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 12

  • 8/10/2019 PRO1_12E [ ] [ ]

    13/46

  • 8/10/2019 PRO1_12E [ ] [ ]

    14/46

    Contents Page

    Displaying Reference Data ............................................................................................................... 15Filtering Reference Data ................................................................................................................... 16

    Cross References ............................................................................................................................ 17

    Filtering Cross References .............................................................................................................. 18

    Reference Data: Find ....................................................................................................................... 19

    Block Correction using Cross References ........................................................................................ 20

    Go to Location .................................................................................................................. 21

    Assignment of I,Q,M,T,C ................................................................................................................... 22

    Unused Symbols / Addresses without Symbols .......................................................................... 23

    Program Structure ............................................................................................................................. 24

    Comparing Blocks (1) ......................................................................................................................... 25

    Comparing Blocks (2) ... ..................................................................................................................26

    Exercise: Eliminating Logical Program Errors .................................................................................. 27

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 14

  • 8/10/2019 PRO1_12E [ ] [ ]

    15/46

    Introduction For logical errors, you use the "Program Status" and "Reference Data" toolsn ens ve y. n e rogram a us you ave, or examp e, recogn ze a amemory is not fulfilled as a condition. Using the Reference Data, you can determine

    where this bit memory is created.A frequent cause of errors is the multiple assignment of addresses. This means thatan address is assigned from several locations in the program. Such errors are easyto find when you use the "Reference Data" tool.

    Reference Data The Display Reference Data is triggered in the SIMATIC Manager (with the "Blocks"folder opened offline) by selecting the menu options Options -> Reference Data ->

    sp ay or- er. .

    Filter The reference data are displayed as filtered data (regardless of whether the itemDisplay or Filter was selected in the menu Options.

    The narrower you define the filter, the faster the reference data is displayed.When you open the Display Reference Data, a message pops up that filtered data

    will be displayed. For this reason, check how the filter is currently set.

    Lists The Reference Data can be found in 6 different lists:

    Cross References

    Assignment of I/Q/M

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 15

    ss gnmen o

    (User) Program Structure Unused Symbols

    Addresses without Symbols

  • 8/10/2019 PRO1_12E [ ] [ ]

    16/46

    Filter You can open the window for filtering the reference data two different ways:

    1. In the SIMATIC Manager by selecting the menu options Options ->Reference Data -> Filter.

    2. In the SIMATIC Manager by selecting the menu options Options ->Reference Data -> Display and in the "Display Reference Data" windowselecting the menu options View -> Filter or by clicking on theFilter icon

    " " " "us om ze n ow er you open e oo , e us om ze w n ow appears.In it, you can select which of the 6 reference data lists are to be opened first.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 16

  • 8/10/2019 PRO1_12E [ ] [ ]

    17/46

    Cross References You open the cross references in the "Display Reference Data" window by selectinge menu op ons ew - ross e erences or y c c ng on e re evan con.

    The Cross References is a list of used addresses pertaining to a user program:

    - inputs,- outputs,- bit memories,- counters,- timers, etc.(see next page)

    Table The cross references list is structured as a table. It has the following columns:

    Column Contents / Meaning --------------------------------------------------------------------------------------------------------

    Address absolute address of the operand(address)

    Symbol symbolic name of the address

    Block blocks in which the address is used

    Type read-only (R) or write-only (W) access

    Language programming language in which the block was created

    Details instruction with which the address is addressed

    Cross Reference When you select an address in the cross references list, you can open a newfor Address window by selecting the menu options View -> Cross Reference for Address. This

    window contains only the cross references for the selected address.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 17

  • 8/10/2019 PRO1_12E [ ] [ ]

    18/46

    Addresses You determine which type of address is to be listed by activating the appropriatec ec ox.

    Filter Area The filter area establishes the address area to be displayed. You can also enterseveral part areas.The filter area entry "10-50; 70; 100-130" means that the address 70 and theaddress areas from 10 to 50 and from 100 to 130 are to be displayed.

    Access Type In the standard setting, all access types are displayed. You can also choose theoption "Selected" and then select the access type, for example, W, write-onlyaccess, with the checkboxes.

    Columns You determine the number and the contents of the columns for the tabular structureof the cross references list using check boxes.

    Standard If the settings you have planned are to be accepted for the next start of theapplication "Display Reference Data", you must activate the checkbox"Save as standard".

    "Default" button.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 18

  • 8/10/2019 PRO1_12E [ ] [ ]

    19/46

    Find While reference data are displayed, you can start a search for a character string.e w n ow can e oun n one o e o ow ng v ews:

    Cross References

    Assignment

    Unused Symbols

    Addresses without Symbols.

    Note The search is a pure text search, that is, the entries must be "exact - including every", .

    Additional settings are:

    search for address, symbol, block or language,

    the character string entered as search term is a whole word or part of aword,

    capital/small letters are to be taken into account or ignored,

    the search range and the direction of the search can be specified.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 19

  • 8/10/2019 PRO1_12E [ ] [ ]

    20/46

    What to Do With a double-click on an address in the cross references list, you open theor an sp ay e oc w ere e se ec e a ress s use . e

    cursor is located in the network in which the address is used.

    Note Please note that the reference data are only formed from the blocks in the offlinedata management. For that reason, modified blocks are always to be saved.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 20

  • 8/10/2019 PRO1_12E [ ] [ ]

    21/46

    Introduction In troubleshooting, it is often only necessary to determine where one address is"use or ass gne n e program. n s case, ma es more sense o use e o

    to Location" function instead of the cross references list. The Go to Location is

    called directly from the Program Editor and gives you an excerpt from the crossreferences list for the specific address.

    Handling Select an address in the Program Editor and click on it with the right mouse button.Then choose the menu option Go to Location.In the "Go to Location" window, all program locations are displayed where thisaddress is used in the program. In the "Details" column, you can see whether thea ress s quer e or ass gne . n e examp e, e program oca on w ere eoutput Q 8.2 is set and reset is of interest. After selecting the relevant line, you canjump to this program location by selecting the "Go To" button. By selecting the"Starting Point" button, you return to the starting point.

    Access Type By default, all accesses to the address are displayed. By selecting the "Selected"

    button, you can, for example, display write-only accesses (assignment, set, reset).With the "Overlapping access to memory areas" option, word-by-word accesses tothe address are displayed as well, for example.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 21

  • 8/10/2019 PRO1_12E [ ] [ ]

    22/46

    Assignment I/Q/M You open the Assignment of I/Q/M by selecting the menu options View ->ss gnmen - npu s, u pu s an emory or y c c ng on e re evan con.

    This assignment list gives you an overview of which bit is used in which byte of the

    memory areas input (I), output (Q) and bit memory (M).Every line contains a byte of the memory area, in which the eight bits are identifiedaccording to access. You can also see whether the access is byte-oriented, word-oriented or doubleword-oriented.

    Meanings of the IDs in the Assignment List I/Q/M:

    - the address is not addressed and therefore still free o bit-oriented access x byte-, word- or doubleword-oriented access

    Assignment T/C You open the Assignment of T/C by selecting the menu options View ->Assignment -> Timers and Counter or by clicking on the relevant icon.This assignment list gives you an overview of which timers and counters are used inthe program.

    Ten timers or counters are displayed in every line.

    Filter By selecting "Filter", you can choose the memory areas to be listed and restrict theindividual address areas.The same rules as for filtering in the Cross References list apply.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 22

  • 8/10/2019 PRO1_12E [ ] [ ]

    23/46

    Unused Symbols When you select the menu options View -> Unused Symbols or click on there evan con, a s o a resses appears. ese a resses are e ne n esymbol table but are not used in the S7 user program.

    Addresses When you select the menu options View -> Addresses without Symbols or clickwithout Symbols on the relevant icon, a list of addresses appears. These addresses have been used

    in the S7 user programm but are not defined in the symbol table.

    A line consists of the address and the number of times it was used.

    " "er ou use er o ma e se ec ons o e a e n orma on or e sp ay o unusesymbols (see slide).

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 23

  • 8/10/2019 PRO1_12E [ ] [ ]

    24/46

    Program Structure The program structure describes the call hierarchy of the blocks in an S7 userprogram.

    Filter Depending on the settings of the filter, the program paths are displayed in a Treestructure (see slide) or as "Parent/child structure" (in each case the calling and thecalled block are displayed).

    Symbols The following symbols are only possible in the tree structure display:

    < maximum : nnn > the maximum memory requirement (in bytes) of the local data is given in theroo o e ree s ruc ure.

    [ nnn ] per path, the maximum memory requirement (in bytes) of the local data isstated at the last block of every program path.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 24

  • 8/10/2019 PRO1_12E [ ] [ ]

    25/46

    Introduction You can compare blocks between online and offline data management or betweenwo user programs on e ar s o e .With this function, you can determine whether, for example, program corrections

    were made in the CPU later on and in which network the blocks differ.

    What to Do With the right mouse button, select the block folder of an S7 program.

    Select the menu option Compare Blocks.

    Choose whether you want to compare online/offline or between 2 offlineprograms and acknowledge with the "OK" button.

    n e o ow-up screen, e oc s a er are s e .

    Select the line in which a difference was determined and then select the"Details" button.

    In the "Compare Blocks - Details" window you can ascertain when the blockwas modified and if the block length was changed.

    After selecting the "Go To..." button, the differing block, for example, isopened online and offline in two windows and the network, in which the firstdifference was determined is displayed.

    Note: Program corrections can only be made in the offline window.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 25

  • 8/10/2019 PRO1_12E [ ] [ ]

    26/46

    Differences After selecting the "Go To..." button (see previous page), the Program Editor isopene w wo w n ows s e- y-s e, n w c e ne wor w e rs erenceis displayed.

    Example In the above example, M8.5 is used in the offline block and M8.6 is used in theonline block as the auxiliary memory marker for the RLO edge detection of I 8.5.That means, that after the block was downloaded into the CPU, a correction wasmade either to the offline or to the online block.

    You can identify which of the two blocks was modified last by reading out the thetime stamp in the "Compare Blocks - Results" screen (see previous page).

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 26

  • 8/10/2019 PRO1_12E [ ] [ ]

    27/46

    Goal So far you have corrected all the errors which caused the CPU to go into the Stopmo e.Now you are to check the function of the bottling plant and eliminate any remaining

    logical errors. You are to use the checklist in the slide to do so.The functioning of the plant corresponds to the program which you yourself havecreated up until now.

    What to Do Check the functions of the bottling plant according to the checklist and eliminate theremaining errors. Use the program for troubleshooting (Errors that lead to the Stopmode), which can still be found in the CPU and eliminate the errors.

    Result The bottling plant is fully functional.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 27

  • 8/10/2019 PRO1_12E [ ] [ ]

    28/46

    Contents Page

    Displaying CPU Messages ............................................................................................................ 29Writing User Messages in the Diagnostics Buffer ......................................................................... 30

    Configuring Your Own Message Texts ............................................................................................ 31

    Calling the SFC 52 Block ................................................................................................................. 32

    Structure of the EVENTN Parameter of the SFC 52 Block .............................................................. 33

    Diagnostics-Capable Modules ......................................................................................................... 34

    Displaying the Hardware Diagnostics in the SIMATIC Manager .............................................. 35

    Exercise: Enabling Diagnostic Messages ........................................................................................ 36

    Exercise: Outputting User Messages ............................................................................................. 37

    Exercise: Enabling Diagnostic Interrupts and Simulating Hardware Faults .................................. 38

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 28

  • 8/10/2019 PRO1_12E [ ] [ ]

    29/46

    CPU Messages With this function you can immediately display an error message for sporadic errors ine sys em on a programm ng ev ce or an ev ce. message w n ow pops up

    on the PG or OP as soon as the connected CPU goes into Stop because of an error

    (see bottom left of the slide).User messages can also be output with a system function.

    Registered Modules The list contains all CPUs called in the SIMATIC Manager with the menu optionsPLC -> CPU Messages. The list is divided into four columns:

    1. In the first column, an icon displays whether a connection was interrupted bythe external partner.

    2. In the column "W", system diagnostic and user diagnostic messages areactivated /deactivated.

    3. In the column "A", interrupt messages are activated / deactivated.The "CPU Messages" application checks if the module in question evensupports diagnostic and interrupt messages. If this is not the case, a messageis output.

    4. In the column "Module", the name of the module or the path of the S7 programis entered.

    Incoming Messages Top: As soon as a message is received, the "CPU Messages" window pops upon top, the message is displayed and at the same time it is entered in themessage archive.

    Background: The receiving of the messages takes place in the background.Messages are displayed in the window, but the window remains in thebackground. The messages are archived and can be displayed as required.

    Ignore: Messages are neither displayed nor archived.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 29

    selecting the "Archive" button.

  • 8/10/2019 PRO1_12E [ ] [ ]

    30/46

    Introduction The FC 52 system function permits you to write your own messages, for example,ower m or y rau c pressure v o a e , n e agnos c u er. ara e o s,the message can also be displayed on the programming device or OP. The

    diagnostics messages must be enabled for this purpose.

    Program The SFC 52 system function is called and assigned parameters in the userprogram. Certain standard texts are stored in the CPU. A parameter of SFC selectsthese texts. You will find more information in the Standard and System Functionsmanual, or in the Online Help.

    Example SFC 52 is called in the program example, if the analog value of peripheral inputword 352 exceeds the value of 2000 units. The message is output only once as aresult of logic edge detection. The block is assigned parameters in such a way thata diagnostic message is also output on the PG (SEND = TRUE). The EVENTNparameter determines the text to be output.

    L PIW 352 // Read in analog valueL 2000 // analog value >2000>I

    . e ge e ec onJCN nonecall SFC 52 // User entry in the diagnostic buffer

    SEND: TRUEEVENTN: W#16#9B83 // external, incoming, limit value exceededINFO1: MW 100 // Additional information 1INFO2: MD 102 // Additional information 2RETVAL: MW 31 // Return value with error information

    none: BE

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 30

  • 8/10/2019 PRO1_12E [ ] [ ]

    31/46

    Aufruf With the right mouse button, click on an S7 program and select the menu optionspec a ec roper es - essage.

    Configuring Message You begin with the "New Message" button. The next free message number, forexample, A003 is suggested.In the "Text" tab, you can enter the message text for incoming and outgoingmessages.You can change the message number in the "Identification" tab.

    Wildcards Up to two wildcards can be inserted in the message text. These values are passedvia the parameter "INFO1/INFO2" of the SFC 52.In the example, the value of INFO 2 is output as a real number.To insert a wildcard, you begin with the @ character. This is followed by 1 or 2,depending on whether you want to display the value from INFO1 or INFO2. Theformat declaration then follows with, for example, %e.

    The following format declarations are possible:

    %ix hexadecimal number with i places u uns gne ec ma num er w p aces %id signed decimal number with i places %e normalized floating-point number, signed value of the form %E normalized floating-point number, as for format %e, but an upper-case

    letter stands before the exponent (E instead of e)

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 31

  • 8/10/2019 PRO1_12E [ ] [ ]

    32/46

    Introduction In the slide you can see a program example, in which a user message is entered ine agnos c u er an s sp aye roug e messages.

    Description The SFC 52 block is called conditionally through the input "EN" if the analog valueexceeds the limit value of 5000.

    The "SEND" input has the signal state "1" and as a result, the message is sent to aPG logged-in with CPU Messages.

    At input "EVENTN" it was specified that the first message of group A is to bedisplayed as an incoming event.

    " "ou can en er w car s n e message ex roug e npu s . nthe example, the analog value is to be displayed as well.

    The "RET_VAL" output delivers an error message if:

    the message cannot be sent because no node is logged-in or the buffer isfull, or

    the SFC52 was assigned parameters with invalid values or formats in thecall.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 32

  • 8/10/2019 PRO1_12E [ ] [ ]

    33/46

    General You can see the structure of the EVENTN parameter in the slide. It is an inputparame er o e oc , w w c you spec y w c message ex s o eentered in the diagnostic buffer.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 33

  • 8/10/2019 PRO1_12E [ ] [ ]

    34/46

    General The signal modules also have modules with diagnostics capability. Errors on the" "mo u e or ex erna errors suc as w re rea , are en e an n ca e y an

    LED on the module. In case of an error, the module triggers a diagnostic interrupt

    OB 82 on the CPU. You can refer to the technical data in the ST 70 catalog or themanuals to determine which modules have diagnostics capability.

    Parameter To activate the diagnostics on a module, click on the box in front of DiagnosticAssignment Interrupt when assigning parameters and specify which channels are to be monitor.

    Then the fields with the errors to be monitored, for example, wirebreak, are enabled.The slide shows the example of the diagnostics capable analog module 335, whichs use n ers on o e ra n ng un .

    Diagnostic Interrupt If no OB 82 is present in the CPU, the CPU goes to the Stop state if there is amodule error.

    The start information for OB 82 contains additional information about the errorcause, which can be evaluated by the software (see Online help).

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 34

  • 8/10/2019 PRO1_12E [ ] [ ]

    35/46

    Introduction With this function, you obtain a quick overview of the state of the PLC system. If, forexamp e, ere s a ar ware au n a agnos cs-capa e mo u e, you can en y,through the use of a symbol, which module is faulty and where it is located. When you

    double-click on the faulty module, additional information is displayed.

    Opening the Tool Select the menu options PLC -> Diagnose Hardware in the SIMATIC Manager or inthe HW Config tool, by opening the station online with a click on the icon inthe toolbar.

    Description When you open the system diagnostics, the hardware configuration is read out fromthe CPU (see left-hand screenshot). In this view, all modules present (even those inexpansion racks or distributed I/O) are displayed.If the CPU is in Stop mode or if there is a fault in a module, this is indicated withsymbols.You can double-click the CPU or a faulty module to obtain further diagnosticinformation (see right-hand screenshot). In the example, there is a power failure in the

    analog module.

    Note If you have selected the menu options Options -> Customize -> View in the SIMATICManager and activated (checked) the "Display Quick View when DiagnosingHardware" checkbox, only a list of faulty modules will be displayed instead of the full"Diagnosing Hardware" window.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 35

  • 8/10/2019 PRO1_12E [ ] [ ]

    36/46

    Goal When the CPU goes into STOP because of a sporadic error, a message is toappear mme a e y on e . ou en ave e c ance o carry ou an erroranalysis right away.

    What to Do Switch over to the SIMATIC Manager and choose the S7 program "MyProgram" from the "My Project" project and select the menu options PLC =>CPU Messages.

    In the window that now appears "Customize - CPU Messages", activate the"W" option in front of the project.

    , ,on the PG.

    Result A screen pops up with the cause of the Stop.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 36

  • 8/10/2019 PRO1_12E [ ] [ ]

    37/46

    Goal A system is to be monitored as to whether and when manual operation wassw c e on. message s o e en ere n e agnos cs u er or an e ge a e"Manual" flip-flop.

    What to Do Use the reference list for the S7 program "FILL" to determine which output isused as the memory for the manual operating mode.

    Insert a new network at the end of FC 15 (S7 program "FILL").

    Create a program that enters a message in the diagnostics buffer when themanual operating mode is switched on (RLO edge detection).

    the exception of the call condition).

    Download the FC 15 to the CPU and test the program.

    Result A message is entered in the diagnostic buffer when the manual operating mode isswitched on. If the "CPU Messages" tool is still active, the user message is also

    displayed on the PG.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 37

  • 8/10/2019 PRO1_12E [ ] [ ]

    38/46

    Goal The diagnostics are to be activated at the analog module so that hardware faults,suc as power supp y a ure, can e e ec e .

    What to Do Carry out the steps given in the slide.

    Result You obtain additional information about hardware faults through the "DiagnoseHardware" tool.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 38

  • 8/10/2019 PRO1_12E [ ] [ ]

    39/46

    Contents Page

    System Information - Overview ........................................................................................................ 40Module Information: "Memory" Tab ............................................................................................. 41

    Module Information: "Scan Cycle Time" Tab ..................................................................................... 42

    Module Information: "Time System" Tab ........................................................................................ 43

    Module Information: "Performance Data" Tab ................................................................................. 44

    Performance Data: Blocks .............................................................................................................. 45

    Exercise: Reading Out System Information ..................................................................................... 46

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 39

  • 8/10/2019 PRO1_12E [ ] [ ]

    40/46

    Module Information The display of system information is started in the SIMATIC Manager or in theor y se ec ng e menu op ons - o u e n orma on... .

    Information about module information is summarized in the following tabs:

    General

    Diagnostic Buffer

    Memory

    Scan Cycle Time

    Time System

    Communication

    Stacks

    "General" Tab This tab gives you information about: Module data (Version, Order No.)

    Location

    Module Status

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 40

  • 8/10/2019 PRO1_12E [ ] [ ]

    41/46

    Load Memory The load memory is integrated in the CPU (RAM). The usage is displayed in the

    left bar graph.If a memory card is inserted in the CPU, the middle bar graph is relevant.

    Additional information is also stored in the load memory. For that reason, theusage of the load memory is always higher than that of the work memory.

    Work Memory Only the information required for program execution in the CPU is stored in the.

    Compressing Gaps that exist in the work memory can be eliminated by selecting the"Compress" button.

    These gaps are caused by program corrections in the CPU. With blockcorrections, the old blocks are not overwritten, rather they are only declared as

    invalid. The modified blocks are added to the free end of the memory and thusoccupy new memory after every correction.

    ompress ng s on y requ re w e - . e wor memory s au oma ca ycompressed with the S7-300.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 41

  • 8/10/2019 PRO1_12E [ ] [ ]

    42/46

    General Scan cycle time is defined as the time that the CPU requires to update the processmage a es, execu e e user program, carry ou a agnos c unc ons, ancommunicate with the programming devices.

    "Scan Cycle Time" The "Scan Cycle Time" tab gives you the following information about cyclicTab program execution:

    Longest cycle time duration since the last switch from STOP to RUN,

    Shortest cycle time duration since the last switch from STOP to RUN,

    Current / previous cycle time duration,

    Display of the Configured scan cycle monitoring time (maximum scan cycletime) and

    Display of the Configured minimum scan cycle time (only for S7-400).That way, you can implement constant cycle times. A new cycle alwaysbegins when the minimum scan cycle time has run out.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 42

  • 8/10/2019 PRO1_12E [ ] [ ]

    43/46

    Clock This box only displays the data from the integrated real-time clock in the CPU. (Seee ow or no es on se ng e me.

    Correction Factor The correction factor for adjusting the clock is entered in the "HW_Config" window(see the chapter "Hardware Configuration").

    Clock There are several ways of synchronizing the clock:Synchronization within a PLC system, for example, with multicomputing,

    on the MPI network between Master and Slave

    w mu unc ona n er ace or po n - o-po n connec on.

    Run-time meter For measuring the operating time of an apparatus.The following system functions exist in the CPU for a run-time meter:

    SFC2 set to a default value

    SFC3 starting and stopping

    SFC4 reading out the current elapsed hours.

    e num er o run- me me ers epen s on e ype o max. . e va uerange lies between 0 and 32767 hours.

    Set Date and Time There are two ways of setting the date and time on the module:

    1. In the SIMATIC Manager by selecting the menu options PLC -> Set Dateand Time

    2. Using the system function SFC0 to set the date and time.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 43

  • 8/10/2019 PRO1_12E [ ] [ ]

    44/46

    Appl ication The information on the available memory lets you determine before you downloadyour program, w e er e program you eve ope o ne can e execu e y etarget CPU.

    Performance Data This tab page contains the following information:

    size of the work memory

    size of the integrated load memory

    size of the maximum slot-in load memory

    , ,memory, timers, counters and local data

    Properties You can determine how much memory the user program requires in the CPU by"Block Folder" selecting the Properties of the block folder in the SIMATIC Manager.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 44

  • 8/10/2019 PRO1_12E [ ] [ ]

    45/46

    Blocks When you click on the "Blocks" button, the Performance Data tab also gives youn orma on a ou w c oc s can e own oa e n o e ava a e .

    The following information is displayed:

    Organization blocks

    System functions

    the maximum possible number of FCs, FBs, DBs, and

    the maximum length of the blocks.

    Training Centerfor Automation and Drives

    ST-7PRO1TroubleshootingPage 45

  • 8/10/2019 PRO1_12E [ ] [ ]

    46/46

    Goal Becoming familiar with the available system information using the menu options- o u e n orma on.

    What to Do 1. In the SIMATIC Manager or in the LAD/STL/FBD Editor, select the menuoptions PLC -> Module Information.

    2. Choose the tab page you want.

    3. Ascertain how much memory is still available in the work memory.

    4. Determine what the longest scan cycle time has been up until now.

    Result You become familiar with a tool that will give you important diagnostic informationwhen dealing with faults.