Home
S7-PLCSIM V5.4
Contents
1. B 16 72 event entering state B 16 73 event leaving state Error Code OB70_FLT_ID BYTE Error code possible values B 16 A2 B 16 A3 You must also enter values for DP Master Base Address DP Master System ID DP Slave Base Address and DP Station Number Each field needs to match the value that was assigned in the STEP 7 hardware configuration of the project that you are simulating The DP Slave Base Address DP Station Number and the Input Output selection are only available for Error Code 0xA3 For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual 42 S7 PLCSIM V5 4 A5E00992424 01 Error and Interrupt OBs CPU Redundancy Error OB72 This dialog allows you to test a CPU redundancy failure and exists only with H CPUs The operating system of the H CPU calls OB72 when one of the following events occurs Loss of CPU redundancy Reserve master switchover Synchronization error Error ina SYNC module Updating aborted Comparison error for example RAM PIQ OB72 is executed by all CPUs that are in the RUN or STARTUP mode following a suitable event The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable ID Error Event Class OB72_EV_CLASS B 16 73 B 16 75 BH16 78 B 16 79 Error Code OB72_FLT_ID see fault ID table OB72 Fault
2. You can record events in STOP mode provided that you had previously been recording in RUN mode All events recorded in STOP mode have a Delta value of zero Therefore when you play back the recording all of the events that you recorded during a single scan are displayed in such rapid succession that they appear to occur simultaneously You must have an open event file before you can play back the recording of The Play e button e events Use the Open Event File button to select and open an event file is de activated and cannot play back a recording recorded a series of If you close S7 PLCSIM without saving the recorded events in an event file events and then closed S7 PLCSIM your work is lost Use the Save Event File button to save your work The next time before you close S7 PLCSIM opened S7 PLCSIM could not find the events recorded a series of Check the status bar of the Record Playback dialog box to see what mode it is events but when in If it says Playing watch the title bar to see when a numeric value appears tried to play them When events are played back a counter in the title bar keeps track of how back nothing many have been played back Note that if you start a recording but do not happened promptly begin to trigger events the recorder captures the time lag When you play back the recording the first event will take an equally long time to occur You can examine the event file to verify
3. 27 60 Manuals related iii Master control relay MCR 36 Maximum Scan Cycle Time 31 Maximum slider value MC commands 33 MCR master control relay Memory areas differences from a real S7 PLC 10 S7 PLCSIM V5 4 A5E00992424 01 peripheral 10 process 10 resetting clearing 26 Menus 54 edit 56 execute 60 file 54 help 64 insert 58 PLC 59 tools 62 view 57 window 63 Minimum slider value 25 Mode scan 23 Modifying hardware configuration for OB simulation 26 Monitoring scan cycle 31 simulated program 24 simulation from STEP 7 8 More windows 63 Motion control simulation MPI address configured in STEP 7 project 19 MRES 26 N Nesting stacks 36 Next scan executing 23 Numeric data formats 65 Numeric format slider view object 25 O OB100 60 OB101 60 OB102 60 OB40 to OB47 42 OB70 42 OB72 43 S7 PLCSIM V5 4 A5E00992424 01 Index OB73 45 OB80 45 OB82 46 OB83 48 OB85 49 OB86 50 OBs 41 cold restart 60 communication redundancy error OB73 45 CPU redundancy error B72 43 diagnostic interrupt OB82 46 hardware interrupt 0B40 0B47 42 hot restart 60 I O redundancy error B70 42 insert remove module interrupt OB73 48 priority class error OB85 49 rack failure OB86 50 time error OB80 45 using interrupt OBs 26 warm restart 60 Online help 17 browser buttons 17 F1 access 17 menu 64 What s This button 64 Op
4. If the project that you intend to simulate has no networked nodes S7 PLCSIM provides a default connection node The default node appears as MPI 1 adr 2 default S7 PLCSIM only provides this default node when no networked nodes exist 4 lf you do not want to use the symbols from this STEP 7 project deselect the Attach Symbols checkbox By default S7 PLCSIM uses the symbols for the STEP 7 project if symbols exist You also have the choice to use symbols from another project The Attach Symbols command on the Tools menu provides this functionality 5 Click OK S7 PLSCIM simulates the CPU of the selected node all nodes that belong to that CPU and the subnet of the selected node After your selection the subnet is visible from Accessible Nodes in the SIMATIC Manager Note S7 PLCSIM automatically changes the S7ONLINE Access Point to a simulation subnet Do not use Setting the PG PC Interface to change this access point during the simulation S7 PLCSIM will change the access point back to the original setting when you end the simulation S7 PLCSIM V5 4 21 A5E00992424 01 Simulation Tasks Opening an Existing Simulated PLC You can open a simulated PLC that you have previously saved providing that the file is not read only and it is not opened in another application The work that you did with this PLC such as downloading a program or hardware configuration or assigning values through a view object is saved in the archiv
5. Command You can choose from two modes of execution for your simulated program Single Scan and Continuous Scan UI Single Scan Command Select the menu command Execute gt Scan Mode gt Single Scan or click UI to set up the CPU for executing the program one scan at a time The CPU executes the complete program for one scan then waits for you to request the next scan iy Continuous Scan Command Select the menu command Execute gt Scan Mode gt Continuous Scan or click D i to set up the CPU for executing the program in a continuous cycle in the same way that OB1 is executed by the CPU The CPU executes the program when the operating mode is set to RUN and stops when the operating mode is set to STOP The scan starts by reading the peripheral inputs PI and updating the process image input I memory The CPU then executes the instructions of the program and updates the memory areas The scan ends by writing the process image output Q memory to the peripheral output PQ memory 1 Next Scan Command Click on Di or select the menu command Execute gt Next Scan to request that the simulated CPU execute the next scan if the simulation is set for Single Scan il Pause Command Click on Bu or select the menu command Execute gt Pause to momentarily halt the execution of the program in the simulated PLC without changing any of the data such as the state of the outputs To resume the execution of the program turn off the Pause
6. DBs 58 S7 PLCSIM V5 4 A5E00992424 01 Reference Information PLC Menu The S7 PLCSIM PLC menu contains the following commands Power On Command Select the menu command PLC gt Power On to simulate turning on the power to the PLC Power Off Command Select the menu command PLC gt Power Off to simulate turning off the power to the PLC Clear Reset Command Select the menu command PLC gt Clear Reset or click the MRES button on the CPU view object to reset the memory delete the program blocks and delete the hardware configuration of the simulated PLC When you perform a memory clear reset the CPU automatically goes to STOP mode and all existing connections to the module are disconnected S7 PLCSIM V5 4 59 A5E00992424 01 Reference Information Execute Menu The S7 PLCSIM Execute menu contains the following commands Key Switch Position Command Select the menu command Execute gt Key Switch Position and choose RUN P RUN or STOP to put the simulated PLC in the desired operating mode You can also change the mode by clicking the check boxes in the CPU view object Startup Switch Position Command Select the menu command Execute gt Startup Switch Position and pick a restart option to determine what the simulated CPU will do when it is switched from STOP to RUN mode e Warm Start the operating system calls OB100 e Hot Start the operating system calls OB101 e Cold Start the operating system calls OB102 Scan Mode
7. Discrepancy DP Station Return and DP Station OK the event class is set to B 16 38 outgoing event The two tabs of the dialog provide the following options Expansion Rack FailureTab The parameters that you select in this tab are passed to the following variables when the OB is called Parameter IM address Failure Return Return with discrepancy Expansion Rack operational again but error in module parameter assignment Rack Status 50 Variable Data Type OB86_MDL_ADDR WORD OB86_FLT_ID BYTE OB86_FLT_ID BYTE OB86_FLT_ID BYTE OB86_FLT_ID BYTE OB86_RACKS_FLTD ARRAY OF BOOL Value Address of the interface module to which expansion racks are connected BH16 C1 BH16 C1 BHI6 C2 BH16 C6 Shows the status of up to twenty one expansion racks connected to the interface module IM In the array you must select the rack with the fault conditions Green Good Red Fault Gray Not configured S7 PLCSIM V5 4 A5E00992424 01 Error and Interrupt OBs DP Failure Tab This tab allows you to test for DP system failure and view the status of the DP under various error conditions The parameters that you select in this tab are passed to the following variables when the OB is called Parameter Variable Data Type Value Subnet OB86_MDL_ADDR WORD Logical base address of the DP master system Failure of DP OB86_FLT_ID BYTE B 16 C3 master system Station failure OB86_FLT_ID BYTE B 16 C4 Station fau
8. Q memory area This view object opens with a default memory location of QBO al Bit Memory Command Click al or select the menu command Insert gt Bit Memory to create a view object that allows you to monitor and modify variables that are stored in the bit memory M area of the CPU This view object opens with a default memory location of MBO Timer Command Click or select the menu command Insert gt Timer to create a view object that allows you to monitor and modify the timers that are used by the program This view object opens with a default memory location of T O a Counter Command Click il or select the menu command Insert gt Counter to create a view object that allows you to monitor and modify the counters that are used by the program This view object opens with a default memory location of C 0 el Generic Command Click El or select the menu command Insert gt Generic to create a view object that allows you to monitor and modify any of the variables used by the program such as the input I or output Q memory areas You can also access the data stored in the data blocks DBs Vertical Bits Command Click or select the menu command Insert gt Vertical Bits to create a view object displays the symbolic or absolute address next to each bit and allows you to monitor and modify any of the variables used by the program such as the input I or output Q memory areas You can also access the data stored in the data blocks
9. System Functions SE Estgen iech geech eeehg tegt aces dicasjecncats sisseedeestuanstabsaceassdeouaeeaas Using Help seniii concn ee eee ae a ce ee ee ee elen Options Button Menu Commandes Help Ee UE EE Simulation CC DC SERA Selecting a CPU Access Node AAA Opening an Existing Simulated PLC vicsccisecartenceancnctozeaiadantvercdssancennihinteetndentecanceenettnedee IER Mee Rene ane rte Perera eee ons ee eee en cee eee ee ee ee ere ee Selecting Scan Mode Keng at Ces Edee geet EES Changing CPU Operating Modes s ssesesneeessnerssserrnreentntssrtrnsertrnnnrtnnntssrrnnseernnnnennnne Simulating a STEP 7 User Program eisccscescveccstuees acetetectieeed acta ceiaseeneteeietertilieldened Using te Slider COMM Ol ssis asacedcies setbncndensedimenaian coneeendaeceeiss e N i Re fteie Uried Tree LE LEE Using Interrupt OBS in Your Frootrapm 0gueseugteserena Esseg eege geEieEEEAEng Resetting the CPU Memory riisist idinikei ire aea ine KEE ERE EE ERENER EEEa EEn da Te DREI E Manual Timers Command Execute Menu Cycling Power for a Simulated CPU BE Using Symbolic Addressing E Using Record Playback EE Monitoring the Scan CY CIS ceccccdsactsccsssateienewscnemasiiarciaqassuet ened sateanwaniweandantennenareienians Saving ECH Saving a Simulated RER Ke Ending the Simulation Session EE Simulating a CPU E EE S7 PLCSIM V5 4 A5E00992424 01 Contents View OD C ER CPU View e CY E ACCUS amp Status Word View Object E Block Regs View EE S
10. an error or interrupt OB has been triggered and is executing S7 PLCSIM does not update the OB with the changed data To cause the OB to use the changed data you must close the OB dialog and reopen it S7 PLCSIM V5 4 41 A5E00992424 01 Error and Interrupt OBs Hardware Interrupt OB40 OB47 This dialog allows you to test the program that you downloaded in OB40 to OB47 The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable Data Type Description Module address OB4x_MDL_ADDR WORD Logical base address of the module that triggers the interrupt Module status OB4x_POINT_ADDR DWORD For digital modules bit field with the Hex status of the inputs on the module Bit 0 corresponds to the first input For analog modules CPs or FMs interrupt status of the module irrelevant to user Interrupt OB OB4x_OB NUMBR BYTE OB number 40 to 47 read only For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual UO Redundancy Error OB70 This dialog allows you to test the loss of redundancy of PROFIBUS DP and can only be used with H CPUs The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable Data Type Description Input Output Error Event Class OB70_EV_ CLASS BYTE Event class and IDs
11. appear to be locked up when application does not paused or in Single Scan mode respond and appears to be locked up You enter a peripheral Only the CPU 315 2DP CPU 316 2DP and CPU 318 2 CPUs download an variable and get an I O configuration If you download a program from another S7 300 CPU the Invalid Address error system data does not include the I O configuration This causes errors when even though the address you attempt to access peripheral I O in S7 PLCSIM value is valid To correct this create a CPU 315 2DP CPU 316 2DP or CPU 318 2 station or and put a copy of your hardware configuration into it Download the hardware configuration from the CPU 315 2DP CPU 316 2DP or CPU 318 2 to S7 You get a peripheral PLCSIM access error in your program even though your S7 300 project contains the correct configuration 66 S7 PLCSIM V5 4 A5E00992424 01 Index A Accumulators and Status Word viewing 36 Accumulators similarity to S7 400 CPUs 10 Address registers 36 Always on top command View menu Arranging minimized view objects 63 Attaching symbols to simulation 27 Autoconfigured I O 26 Automatic timers using 60 B Back button help browser 17 BCD Binary coded decimal numeric format 65 Binary numeric format 65 Bit memory 13 viewing and modifying 38 Bits numeric format 65 Block registers viewing and modifying 36 CG C counter Cascading windows 63 Changing CPU operating modes 23 C
12. choose the numeric data format for the output variable and you can also use symbolic addressing if you have attached symbols You can also view output variables with a Vertical Bits View Object S7 PLCSIM V5 4 37 A5E00992424 01 View Objects Bit Memory View Object To access this view object do one of the following e Choose the menu command Insert gt Bit Memory e Click on the Insert Bit Memory button al This view object allows you to monitor and modify bit memory you can access the variables stored in the bit memory M area of the CPU The bit memory M area provides storage for interim results calculated in the program You designate what data format to use to access the data You can choose the numeric data format for the bit memory and you can also use symbolic addressing if you have attached symbols You can also view bit memory with a Vertical Bits View Object Timer View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Timer e Click the Insert Timer button This view object allows you to monitor and modify any timer used by your program The timer view object displays the name of the timer the actual timer value and the time base Note If you change the time base the actual timer value changes while the displayed value remains the same This is because the actual timer value is the product of the displayed value and the time base For example if
13. function The program then starts at the instruction where execution had been halted If a STEP 7 application is connected to the simulated PLC using Pause may cause the application to time out and disconnect If this happens turn off the Pause function and reconnect the STEP 7 application 60 S7 PLCSIM V5 4 A5E00992424 01 Reference Information Automatic Timers Command The timers in the simulated PLC can be set to either automatic or manual Select the menu command Execute gt Automatic Timers to set up the CPU for executing the timers automatically in the program Manual Timers Command Select the menu command Execute gt Manual Timers to set up the CPU to allow you to enter a specific value or to reset the timers in the program To return to running the timers automatically select the menu command Execute gt Automatic Timers Reset Timers Command The menu command Execute gt Reset Timers opens a dialog box allowing you to set the time value for each timer to its default value You can reset all of the timers used by the program or you can reset timers individually To reset all of the timers in your program use the Reset Timers d toolbar button To reset an individual timer use the Reset Timer button on the view object for that timer Trigger Error OB Command The menu command Execute gt Trigger Error OB allows you to test how your program handles different interrupt OBs Scan Cycle Monitoring Command Th
14. in the topic to make it easy to locate the term To toggle highlighting off or on before displaying a topic use the Options button S7 PLCSIM V5 4 17 A5E00992424 01 Simulation Tasks Starting a Simulation You can use one of the following methods to start S7 PLCSIM e From the Windows Start menu select the menu command Simatic gt STEP 7 gt S7 PLCSIM Simulating Modules e From the SIMATIC Manager toolbar click the Simulation On Off Si button or select the Options gt Simulate Modules menu command When S7 PLCSIM starts for the first time you initially see an Open Project dialog Open Project x C Open project from a file Select CPU access node Je Display open project options on startup e lm You have the following choices for simulating a PLC e Open project from a file This option allows you to open a simulated PLC that you have saved from a previous simulation e Select CPU Access Node This option displays a dialog that allows you select a controller and communications interface from a STEP 7 project stored on your computer You can also select whether or not to display the Open Project dialog when S7 PLCSIM starts If you deselect the Display open project options on startup checkbox the Open Project dialog does not show up on subsequent S7 PLCSIM startups When the Simulation On Off button is turned on Le in the Simatic Manager any new connection goes automatically to the simulated PLC Any program th
15. new view objects or answer the telephone before you are finished generating events you can click Pause and thus avoid a long delay in your recording Pause allows you to minimize the time lag between events as you record in contrast to the Delta button which affects the overall rate at which the recording is played back m Click the Stop button to stop recording or playing back events Ci The Delta button allows you to select a rate of speed before you play back a recording Your selection affects the overall playback duration However if some events were recorded closer together or further apart than others the relative time intervals are preserved even as the overall playback time is reduced or increased by your Delta selection There are two ways for you to confirm that you are successfully recording or playing back events e Check the status bar of the Record Playback dialog box to see whether it is in Recording Playing or Idle mode e Watch the title bar of the Record Playback dialog box It should display a numeric value that increments each time you record or play back an event 28 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks If you are satisfied with your recording remember to save it by using the Save Event File button before you close S7 PLCSIM Troubleshooting Tips Problem Solution tried to record Change the mode of S7 PLCSIM from STOP to RUN events but when played them back nothing happened
16. program to S7 PLCSIM from an S7 300 CPU that autoconfigures I O the system data does not include an I O configuration Consequently when you use 7 PLCSIM with S7 300 programs if you want to define which modules are supposed to be available to the CPU you must first download a hardware configuration To download a hardware configuration to S7 PLCSIM you can create a project for one of the S7 300 CPUs that does not autoconfigure I O such as the CPU 315 2DP CPU 316 2DP or CPU 318 2 Put a copy of your hardware configuration into this project and download the hardware configuration to S7 PLCSIM Once you have done this you can download program blocks from any of your S7 projects and the UO will be handled correctly S7 PLCSIM V5 4 11 A5E00992424 01 Product Overview CPU Operating Mode Switch Positions RUN P The CPU runs the program and you can change the program and its parameters In order to use the STEP 7 tools for modifying any of the parameters of the program while the program is running you must put the CPU in RUN P mode You can use the view objects created within S7 PLCSIM to modify any data used by the program When you select RUN P the operating mode status indicator on the CPU view object and STEP 7 display RUN RUN The CPU runs the program by reading the inputs executing the program and then updating the outputs By default you cannot download any program or use the STEP 7 tools to change any parameters Such as i
17. that in fact your events have been properly recorded You can adjust the playback speed of the recording by using the Delta button cannot remember You can use long descriptive file names to help differentiate your event files which event file If necessary you can use a text editor to examine your files and locate the contains the sequence one with the correct sequence The default storage location for event files is of events that I want C Siemens PLCSIM S7wsi S7EVENTS However if you upgraded from to play back version 3 0 or 4 0 of S7 PLCSIM the default storage location is C Siemens STEP7 S7wsi S7EVENTS S7 PLCSIM V5 4 29 A5E00992424 01 Simulation Tasks changed a single bit If an Input Variable Output Variable Bit Memory Generic Variable or Vertical but when played Bits View Object shows only one bit e g Q0 0 Bits a bit change is recorded back my recording correctly as only a change in that particular bit However if the view object the entire byte displays all eight bits eg QBO Bits a change to a single bit is recorded as changed a change in byte value instead of a change in that bit only Consequently it becomes possible that during playback of the recording other bits within the byte could be represented as changing for instance process flags or Boolean inputs when in fact they would not be affected during operation of a real PLC am trying to record When recording events with t
18. the timers automatically select the menu command Execute gt Automatic Timers To reset all of the timers in your program use the Reset Timers d toolbar button To reset an individual timer use the Reset Timers button on the view object for that timer See also Automatic Timers Timers View Object Reset Timers Cycling Power for a Simulated CPU Select the PLC gt Power On and Power Off menu commands to simulate turning power on and off to the CPU Using Symbolic Addressing By default S7 PLCSIM uses the symbols of the STEP 7 project that you used to select a CPU access node If you did not attach symbols when you started the simulation or you want to use symbols from another STEP 7 project you can specify a symbol table to attach To use symbolic addressing in your simulated program 1 Select the menu command Tools gt Options gt Attach Symbols This menu command invokes a dialog Browse to the STEP 7 symbol table to be referenced Click the OK button Create view objects for variables that you want to address symbolically E oe Ak AS To turn on symbols for all view objects select the menu command Tools gt Options gt Show Symbols To hide the symbols select the command again For the Vertical Bits view object bit values are displayed vertically and the symbolic or absolute address is displayed beside each bit For all other view objects symbol tooltips are available for the address fields Point to
19. view objects select the menu command File gt Open Layout A layout is simply an arrangement of view objects In other words the LAY file archives only the position and selected data format of the view objects in your simulation the data values that are displayed in the view objects are not saved as part of the layout When you work in S7 PLCSIM you can open both a PLC file and a LAY file if you have previously saved your simulated PLC and the layout of your view objects These are not mutually exclusive actions you do not have to choose only one However it is more efficient to open the simulated PLC PLC file before the layout LAY file because any time you open a new or archived PLC simulation S7 PLCSIM automatically closes the open layout You can also save a layout save a simulated PLC and close a simulated PLC Selecting Scan Mode Options S7 PLCSIM offers you options for running the simulated program e Single Scan The CPU executes one scan and then waits for you to initiate another scan Each scan consists of the CPU reading the peripheral inputs Pl executing the program and then writing the results to the peripheral outputs PQ The CPU then waits for you to run the next scan using the Execute gt Next Scan menu command or 20 e Continuous Scan The CPU executes one complete scan and then starts another scan Each scan consists of the CPU reading the peripheral inputs Pl executing the program and then writin
20. 1 Click La The mouse pointer changes to a question mark pointer 2 Click the part of the screen about which you want more information S7 PLCSIM displays the help topic on that item 64 S7 PLCSIM V5 4 A5E00992424 01 Reference Information S7 PLCSIM Numeric Data Formats Refer to the table below for the numeric data formats supported by S7 PLCSIM Numeric Data Format Size Example Bits Bit Byte O off M on Binary Byte Word 1001_0011 Decimal Byte Word Double Word 232 Hex Hexadecimal Byte Word Double Word 9A S7 Format Byte Word Double Word dw 16 9a2ff23 Integer Word Double Word 632 2370 BCD Binary coded Decimal Word Double Word 400 Real Double Word 1 234567e 023 Char Character Byte Word Double Word IC AB String 254 Alphanumeric This is a string Characters DT DATE_AND_TIME 8 Bytes 2006 12 25 08 01 01 Note The DT numeric data format is does not support milliseconds If all 8 bytes are 0 the default DT display is 1999 11 30 00 00 00 S5TIME Word 3m5s00ms Date Word 1998 06 18 Time Double Word 9h26m53s703ms TOD Double Word 9 26 53 702 Slider Dec Byte Word Double Word MB O0 Slider Dec E p Value D Slider Int Word Double Word Mw O SliderInt e d eng p Value D Slider Real Double Word MD 0 SliderRee p 000 Value D S7 PLCSIM V5 4 Ge A5E00992424 01 Reference Information Troubleshooting Tips The following table describes some problems
21. 12 S7 PLCSIM V5 4 A5E00992424 01 Product Overview Memory Areas You access data in the S7 PLC by addressing specific areas of memory which perform specific functions Memory bits storage for data used 131 072 bits 16 Kbytes of M within the STEP 7 user program memory Addressable HO direct access to input and PI peripheral input 262 136 bits 82 Kbytes of I O output modules PQ peripheral memory Note The CPU updates output the peripheral outputs at the end of every CPU scan cycle Process image process image storage zi Maximum 131 072 bits 16 Kbytes configurable for inputs and outputs Note The CPU updates the inputs at the beginning of every CPU scan cycle Preset 131 072 bits 16 Kbytes storage used by logic Maximum 32 Kbytes configurable blocks including f temporary variables Preset 32 Kbytes You can also access data stored in the data blocks DBs S7 PLCSIM V5 4 13 A5E00992424 01 Product Overview Organization Blocks OBs S7 PLCSIM supports the OBs listed below OB1 free cycle OB10 to OB17 time of day interrupt OB20 to OB23 time delay interrupt OB30 to OB38 cyclic interrupt OB40 to OB47 hardware interrupt OB55 status interrupt OB56 update interrupt OB57 manufacturer specific interrupt OB60 multiprocessor interrupt OB61 to OB64 synchronous cycle interrupt OB65 technology synchronization interrupt OB70 I O redundancy error CPU redundancy e
22. IDs Error Codes The error code in OB72_FLT_ID indicates which event occurred that caused the OB72 call OB72_FLT_ID Start Event of OB72 B 16 01 Loss of redundancy 1 of 2 due to a CPU failure B 16 02 Loss of redundancy 1 of 2 due to STOP on the reserve triggered by user B 16 03 H system 1 of 2 changed to redundant mode B 16 20 Error in RAM comparison B 16 21 Error comparing process image output value B 16 22 Error comparing memory bits timers or counters B 16 23 Different operating system data recognized B 16 31 Standby master switchover due to master failure B 16 33 Standby master switchover due to operator intervention S7 PLCSIM V5 4 43 A5E00992424 01 Error and Interrupt OBs BH16 34 B 16 35 B 16 40 B 16 41 B 16 42 B 16 43 B 16 44 B 16 50 B 16 51 B 16 52 B 16 53 B 16 54 B 16 55 B 16 56 B 16 C1 B 16 C2 Standby master switchover due to sync module connection problem Standby master switchover triggered by 90 H_CTRL Synchronization error in user program due to elapsed wait time Synchronization error in user program due to waiting at different synchronization points Synchronization error in operating system due to waiting at different synchronization points Synchronization error in operating system due to elapsed wait time Synchronization error in operating system due to wrong data No SYNC module Modification at SYNC module without Power On SYNC module removed inserted Modification at SYNC module with
23. IM overview 7 S7ProSim iii Safe state not changed 10 Saving event file 28 layout 31 simulated PLC 32 Scan cycle monitoring 31 Scan mode options 23 Searching online help 17 Selecting maximum slider value 25 minimum slider value 25 numeric format 25 scan mode options SF indicator 12 Shortcut key combinations 53 Show button help browser 17 Showing and attaching symbols 27 SIMATIC manager 8 Simulated PLC 7 closing 32 ending session 32 S7 PLCSIM V5 4 A5E00992424 01 getting started monitoring 24 opening 22 saving 32 starting session Simulating a CPU 317 T 33 Simulation files recent 54 Simulation on off button 19 Single scan mode setting 23 use in debugging 25 Slider numeric format Slider view object Stacks view object 36 Standard toolbar 53 Starting the simulation 19 Startup switch position setting 60 Station errors 50 Status bar viewing 57 Status of record playback 28 Status word 36 STEP 7 getting started simulation simulation button 19 symbol table 62 STOP mode 12 difference from real S7 PLC 10 LED indicator setting keyswitch position 60 Stopping record playback 28 String numeric data format Strings 65 Switch position 60 Symbol table 27 62 Symbol tooltips 27 Symbolic addressing 27 T T timer S7 PLCSIM V5 4 A5E00992424 01 Index Technical support iii Telephone numbers support iii Tiling S7 PLCSIM windo
24. P 7 S7 PLCSIM displays that project If not you must select an entry point and project name from which to establish a connection The Select CPU Access Node dialog for an open project is shown below Select CPU Access Node E xi Entry point Project DI JV Attach Symbols Name Storage Path Line 1 x C Program Files Siemens Step7 s7proj Line_1 SIMATIC 300 1 OR CPU 317 2 PN DP ER PN b adr not networked RH vwure b MPI 1 adr 2 default E SIMATIC 400 1 J cru 416 3 DP RH pp b PROFIBUS 1 adr 3 a mero de MPI 1 adr 2 2 RB SIMATIC PC Station 1 E TE IE General h Ethernet 1 adr IP 192 168 0 1 l SOFTBUS adr 3 2 RB wintc RTX o RH cP s613 b PROFIBUS 1 adr 2 l SOFTBUS adr 2 SIMATIC PC Station 2 BR wintc RTX a Ok Cancel Help 20 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks To select a STEP 7 project and CPU access node follow these steps 1 Select either Project or Example Project from the Entry point drop down list 2 Select a project name or example project name from the Name drop down list The dialog then displays a node browser that shows the project configuration and all configured nodes Nodes are prefaced with this symbol 3 Select a node from the node browser Note You cannot select a non networked node for establishing a simulation connection
25. SIEMENS SIMATIC 7 PLCSIM V5 4 User Manual Edition 08 2007 Copyright and Safety Guidelines This manual contains notices which you should observe to ensure your own personal safety as well as to protect the product and connected equipment These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger Danger AN Indicates an imminently hazardous situation that if not avoided will result in death or serious injury Warning Indicates a potentially hazardous situation that if not avoided could result in death or severe injury Caution Used with the safety alert symbol indicates a potentially hazardous situation that if not avoided may result in minor or moderate injury Caution Used without the safety alert symbol indicates a potentially hazardous situation that if not avoided may result in property damage Notice Used without the safety alert symbol indicates a potential situation that if not avoided may result in an undesirable result or state Qualified Personnel The device system may only be set up and operated in conjunction with this manual Only qualified personnel should be allowed to install and work on this equipment Qualified persons are defined as persons who are authorized to commission to ground and to tag circuits equipment and systems in accordance with established safety practices and standards Correct Usage Note the following Ca
26. SIM V5 4 A5E00992424 01 Reference Information Open Layout Command To open a previously saved layout of S7 PLCSIM view objects select the menu command File gt Open Layout Close Layout Command To close the current layout of S7 PLCSIM view objects select the menu command File gt Close Layout Save Layout Command To save the current layout of S7 PLCSIM view objects select the menu command File gt Save Layout Save Layout As Command To save the current layout of S7 PLCSIM view objects as a new file select the menu command File gt Save Layout As Recent Simulation Command Use the menu command File gt Recent Simulation to open a list of your four most recently used programs Select file 1 2 3 or 4 from the list of recent simulations Recent Layout Command Use the menu command File gt Recent Layout to select from a list of your four most recently used layouts Select file 1 2 3 or 4 from the list of recent layouts Exit Command Select the menu command File gt Exit to close the simulated PLC and to exit the S7 PLCSIM application Exiting S7 PLCSIM can result in errors in applications which are currently connected to the simulator S7 PLCSIM V5 4 55 A5E00992424 01 Reference Information Edit Menu The S7 PLCSIM Edit menu contains the following commands Undo Command Select the menu command Edit gt Undo to reverse the last action you performed Undo only applies to editable text numeric fields and to
27. a field with the mouse to see its symbolic address and comment separated by a colon in a tooltip box S7 PLCSIM V5 4 27 A5E00992424 01 Simulation Tasks Using Record Playback The Record Playback dialog box allows you to record or play back a series of data changes Moe ry en a no file Idle To access this window do one of the following e Choose the Tools gt Record Playback menu command e Click the Record Playback button The key sequence Alt F5 toggles the display of the Record Playback toolbar button This topic discusses the following subjects e How to Record or Play Back an Event File e Troubleshooting Tips How to Record or Play Back an Event File m Click the New Event File button to create a new event file Click the Open Event File button to locate and open an existing event file Ly Click the Save Event File button to save the events that you have just recorded gt Click the Play button to play back an existing recording of events el Click the Record button to begin recording a series of events Use the view objects in your simulation to turn bits on and off or assign data values as desired The recorder captures every change you make to memory areas u Click the Pause button to temporarily suspend recording or playback The pause function is convenient because it allows you to pause the recording of events and resume later If you need to perform some other activity for instance add
28. am on a simulated programmable logic controller PLC The simulation executes on your computer or programming device such as a PG 740 Power PG or Field PG Because the simulation exists completely within the STEP 7 software you do not need to be connected to any S7 hardware CPU or I O modules You can use S7 PLCSIM to simulate STEP 7 user programs that were developed for S7 300 S7 400 and WinAC controllers S7 PLCSIM provides a simple interface to the STEP 7 user program for monitoring and modifying different objects such as input and output variables You can also use the various applications of the STEP 7 software while you are running your program on the simulated PLC This allows you to use such tools as the variable table VAT to monitor and modify variables S7 PLCSIM Features You can use S7 PLCSIM to perform the following tasks e Turn the simulation on or off from the SIMATIC Manager by clicking the simulation button Si When S7 PLCSIM starts up you can open an existing simulation or select a node in a STEP 7 project for CPU access When S7 PLCSIM is running any new connection from STEP 7 goes automatically to the simulated CPU e Run programs intended for S7 300 or S7 400 CPUs including the CPU 317 T on the simulated PLC S7 PLCSIM can also run programs intended for WinAC controllers e Create view objects that allow you to access the input and output memory areas accumulators and registers of the simulated PLC You can also ac
29. anges on the program S7 PLCSIM V5 4 9 A5E00992424 01 Product Overview Differences from a Real S7 PLC The simulated PLC provides the following features which are not available in a real PLC The Pause command halts the simulated CPU and allows you to resume the execution of the program at the instruction where the program was halted You can change the operating mode switch position to RUN RUN P or STOP When you put the simulated CPU in STOP mode S7 PLCSIM unlike a real S7 PLC does not change the state of the outputs In addition when you select the RUN operating mode switch position you cannot download a STEP 7 user program or use the STEP 7 tools to change any parameters Such as input values A real S7 PLC allows program download and parameter changes when the RUN operating mode switch is set Any change that you make with a view object immediately updates the contents of the memory location The CPU does not wait until the beginning or end of the scan to update any changed data Execution control options allow you to select how the CPU runs the program o Single Scan executes the program for one scan and then waits for you to start the next scan o Continuous Scan executes the program like a real PLC it starts a new scan immediately after the previous one finishes You can allow the timers to run automatically or you can enter timer values manually You can also reset timers globally or individually You can manual
30. ant CPUs are potentially incompatible with S7 PLCSIM V5 4 After you open an archived PLC simulation you can add or change the view objects displayed in S7 PLCSIM You can use the menu command File gt Open Layout to select a different layout if you have archived more than one layout Changes to your layout do not cause changes to your program information they only affect the way that the information is displayed Note When you open a new or archived PLC simulation any view objects that were displayed in S7 PLCSIM are automatically closed If you intend to open an archived layout as well as a new or archived PLC simulation open the simulated PLC before opening the layout What Is the Difference between a PLC File and a LAY File A PLC file is used to save information about work that you do with a CPU view object that is a simulated PLC It also records changes you make to data if you assign a value to a memory area using any view object that change is saved in the PLC file A LAY file is used to save the physical layout of your workspace in S7 PLCSIM If you arrange your view objects in a certain order and want to preserve that order for future work sessions save the layout before you close S7 PLCSIM If you open a new or archived PLC simulation during a work session S7 PLCSIM closes the current layout 22 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks Opening a Layout To open a previously saved layout of S7 PLCSIM
31. are for S7 300 400 System and Standard Functions manual 48 S7 PLCSIM V5 4 A5E00992424 01 Error and Interrupt OBs Priority Class Error OB85 This dialog allows you to test the program that you downloaded in OB85 Priority Class Error OB85 is automatically triggered if an error occurs while the operating system is accessing a block error code B 16 A3 Note that events B 16 A1 B 16 A2 B 16 B1 and B 16 B2 must be generated by other means for example by deleting one of the required blocks from your program The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable Data Type Value Integrated function OB85_Z1 WORD No error resolution W 16 0100 Block not loaded W 16 0101 Area length error W 16 0102 Write protect error W 16 0103 IEC timer OB85_Z1 WORD No error resolution W 16 0200 Block not loaded W 16 0201 Area length error W 16 0202 Write protect error W 16 0203 For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual S7 PLCSIM V5 4 49 A5E00992424 01 Error and Interrupt OBs Rack Failure OB86 This dialog allows you to test the program that you downloaded in OB86 Rack Failure For all fault conditions the event class OB86_EV_CLASS is set to B 16 39 incoming event If no fault condition is selected Rack Return Rack Return with
32. at does not autoconfigure I O namely a CPU 315 2DP CPU 316 2DP or CPU 318 2 project When you download the I O information from the project you can simulate interrupt OBs in S7 PLCSIM and S7 PLCSIM is also able to detect any I O referencing errors that your program may contain Resetting the CPU Memory To reset the memory of the simulated CPU select the menu command PLC gt Clear Reset or click the MRES button on the CPU view object This action resets the memory areas deletes the program blocks and deletes the hardware configuration of the simulated PLC When you perform a memory clear reset the CPU automatically goes to STOP mode and all existing connections to the module are disconnected Resetting Timers Select the Execute gt Reset Timers menu command to reset one or all of the timers in your program You can select All Timers to reset all of the timers in the program or you can specify a specific timer to reset The CPU Mode toolbar also provides buttons for resetting timers To reset all of the timers in your program use the Reset Timers toolbar button To reset an individual timer use the Reset Timers button on the timer view object for the specific timer 26 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks Manual Timers Command Execute Menu Select the menu command Execute gt Manual Timers to set up the CPU to allow you to enter a specific value or to reset the timers in the program To return to running
33. at you download goes to the simulated PLC If you click the Accessible Nodes button the Accessible Nodes window shows the node address for the simulated PLC When the simulation button is turned off Si any new connection goes to a real PLC If you click the Accessible Nodes button the Accessible Nodes window shows the network of real PLCs Notes Simulation mode is not available if you have any existing connections to real PLCs You can have only one simulated PLC active at a time S7 PLCSIM V5 4 19 A5E00992424 01 Simulation Tasks Selecting a CPU Access Node When you first start S7 PLCSIM you have the option of selecting a CPU access node for your simulation Open Project x Open project from a file Select CPU access node Iv Display open project options on startup coct_ zm _ You can also click SS or select the File gt Select CPU Access Node menu selection from S7 PLCSIM to select a CPU access node for your simulation Note In previous releases of S7 PLCSIM you could only simulate a PLC through an MPI connection With S7 PLCSIM V5 4 you can connect through any of the following connection types MPI DP Industrial Ethernet PC Internal If you select the option Select CPU Access Node from either the Open Project dialog or from the File menu or icon you see a dialog that allows you to select a node from a STEP 7 project that S7 PLCSIM will use to simulate a node and subnet If a project is open in STE
34. available for all view object fields that have symbols assigned to them You can point to a view object field with the mouse to see its symbolic address and comment separated by a colon in a tooltip box Note If you use an address in a view object that corresponds to F System peripheral I O S7 PLCSIM displays a yellow background for that view object S7 PLCSIM V5 4 35 A5E00992424 01 View Objects CPU View Object This view object is present by default when you open a new simulation It allows you to view the status and change the operating mode of the simulated CPU The operating modes on the CPU view object function like the key switch on a real CPU if you use the STEP 7 tools to change the operating mode or if the CPU automatically changes mode for example encounters an error condition that causes the CPU to change from RUN to STOP the RUN STOP indicators change but not the key switch This alerts you that the CPU changed operating mode possibly because of some error in the program The MRES button allows you to reset the memory and to delete the blocks and the hardware configuration of the simulated PLC ACCUs amp Status Word View Object To add this view object to a simulation do one of the following e Choose the menu command View gt Accumulators e Click the CPU Accumulators button al This view object allows you to monitor the information that the CPU uses to execute the program e Accumulators allows yo
35. both the layout LAY file and the PLC simulation PLC file when you work They are not mutually exclusive For information about what is archived if you save a PLC simulation PLC file see Saving a Simulated PLC S7 PLCSIM V5 4 31 A5E00992424 01 Simulation Tasks Saving a Simulated PLC You can store the current state of the simulated PLC in one of the following ways e Use the menu command File gt Save PLC to archive the configuration of the PLC to the current file name e Use the menu command File gt Save PLC As to archive the configuration of the PLC to a new file The following elements are saved when you save the PLC e Program e Hardware configuration e Simulated subnet and nodes e The checkbox selection for the operating mode key switch position of the CPU namely RUN P RUN or STOP e Execution control option continuous scan single scan e The status of the I O e Timer values T memory e Symbolic addresses e Power on off setting When you open a simulated PLC whether it is a new PLC simulation or an archived PLC simulation the simulated PLC is in STOP mode If you archived a simulated PLC in RUN or RUN P mode when you open the archive the checkbox of the CPU view object indicates your selection but the CPU indicators show that the actual mode of the simulated PLC is STOP mode To restore the simulated PLC to RUN or RUN P mode you must use the checkboxes in the CPU view object or the Execute gt Ke
36. cess memory through symbolic addressing e Run timers automatically or set and reset them manually You can reset timers individually or all at once e Change the CPU operating mode switch position STOP RUN and RUN P In addition S7 PLCSIM provides a Pause feature that allows you to halt the CPU momentarily without affecting the state of the program e Use interrupt OBs with the simulated PLC to test the behavior of your program e Record a series of events manipulate input and output memory areas bit memory timers and counters and play back your recording in order to automate program tests You can use all of the STEP 7 tools with the simulated PLC Although the simulated PLC exists entirely in software STEP 7 works as if the simulated PLC were a real S7 PLC with few differences S7 PLCSIM Simulation View Window The simulation view window of S7 PLCSIM includes the workspace title bar status bar and S7 PLCSIM menus and toolbars The S7 PLCSIM workspace is where you display view objects S7 PLCSIM V5 4 7 A5E00992424 01 Product Overview Getting Started If you are new to S7 PLCSIM the following procedures will help you get started Simulation mode is available from the SIMATIC Manager provided you don t have any existing connections to real PLCs To begin using S7 PLCSIM follow these steps to establish a connection to a STEP 7 example program 1 Open the SIMATIC Manager and open the ZEn01_09_STEP7_Zebra example p
37. control relay MCR stack Toolbars Command Select the menu command View gt Toolbars to choose which S7 PLCSIM toolbars you want to display From the Toolbars dialog box check or uncheck the selections corresponding to the following toolbars e Standard e insert e CPU Mode e Record Playback Files Status Bar Command Select the menu command View gt Status Bar to toggle on off the display of the S7 PLCSIM status bar The status bar as shown below appears at the bottom of the S7 PLCSIM window and contains information and messages that help you use S7 PLCSIM Press F1 to get Help MPi 2 2 Always On Top Command Select the menu command View gt Always On Top or click mal to keep S7 PLCSIM in front of any other concurrently running applications Repeat the action to return S7 PLCSIM to its normal state S7 PLCSIM V5 4 57 A5E00992424 01 Reference Information Insert Menu The S7 PLCSIM Insert menu contains the following commands for displaying view objects on the current layout Bl Input Variable Command Click Si or select the menu command Insert gt Input Variable to create a view object that allows you to monitor and modify variables in the process input I memory area This view object opens with a default memory location of IBO Bl Output Variable Command Click Bl or select the menu command Insert gt Output Variable to create a view object that allows you to monitor and modify variables in the process output
38. difying S7 PLCSIM V5 4 A5E00992424 01 Product Overview S7 PLCSIM also differs from a real PLC in the following ways e Diagnostic buffers S7 PLCSIM does not support all of the error messages written to the diagnostic buffer For instance bad batteries in the CPU or EEPROM errors cannot be simulated However most I O and program errors can be simulated e A transition in operating mode such as from RUN to STOP does not change the I O to a safe state e Function modules FMs are not supported e Peer to peer communication such as between two S7 400 CPUs in the same rack is not supported e S7 PLCSIM supports four accumulators like an S7 400 CPU does For certain special cases a program running on S7 PLCSIM with four accumulators can have different behavior from the same program running on an S7 300 CPU which uses only two accumulators e S7 PLCSIM does not support forcing variables e S7 PLCSIM executes some SFBs and SFCs the same as a real S7 PLC for others S7 PLCSIM validates input parameters and returns output that is valid but necessarily what a real S7 PLC with physical I O would return and for the remainder S7 PLCSIM treats as NOPs Differences with I O Most of the CPUs in the S7 300 family autoconfigure I O once a module has been inserted into a physical controller it is automatically recognized by the CPU It is not possible to replicate the autoconfiguration feature with a simulated PLC If you download a
39. e Click or select the menu command Insert gt Timer three times to insert three Timer view objects Type 2 3 and 4 for Timers T 2 T 3 and T 4 in their respective text boxes pressing the Enter key after each entry S7 PLCSIM will fill in the symbolic name for each of these three timers 2 Select the PLC menu in S7 PLCSIM and verify that there is a bullet e beside Power On 3 Select the Execute gt Scan Mode menu command and verify that there is a bullet e beside Continuous Scan 4 Putthe simulated CPU in RUN mode by clicking either the RUN or RUN P check box Click bit 0 of IBO to simulate turning on input 0 0 and watch the effect on the timers and on QBO 6 Click a or select the menu command File gt Save PLC As to save the current state of the simulated PLC as a new file 8 S7 PLCSIM V5 4 A5E00992424 01 Product Overview Using STEP 7 to Monitor Program Simulation You can also use the STEP 7 tools to monitor the simulation of your program as follows 1 When you have created the view objects step 7 above go to the SIMATIC Manager Click or select View gt Online to switch to online mode Navigate to the Blocks object in the ZEBRA example project and open FC1 This action invokes the LAD STL FBD application 4 When the simulated CPU is in RUN mode and you have turned on bit 0 of IBO step 11 above go to the LAD STL FBD application window and select Debug gt Monitor to see the effect of these ch
40. e following view objects e Input Variable e Output Variable e Bit Memory You can access the memory area with either a memory address or a symbolic address To specify a slider control for one of the variable view objects you select a slider format representation from the Select Numeric Format drop down list You also select whether to represent the values as decimal positive integers integer positive and negative integers or real numbers The selection options are determined by the size of the memory location being accessed e Byte B decimal e Word W decimal and integer e Double word D decimal integer and real You can use either the mouse or the arrow keys to change the position of the slider control indicator Changing the position of the indicator changes the value of the variable stored in the memory location You can also enter a specific value in the Value field You can also configure a minimum and maximum value for the slider control Selecting a range of values does not affect the values that can be stored in the variable the minimum and maximum values affect only the values that can be entered or displayed by the slider control Selecting a range of values provides the following benefits e You can simulate a specific range of values for example the range of values that would be generated by a specific analog module e By limiting the range of values between the minimum and maximum you can provide bett
41. e menu command Execute gt Scan Cycle Monitoring opens a dialog box allowing you to enable or disable scan cycle monitoring watchdog timer and set the maximum scan cycle monitoring time in milliseconds for the simulation The maximum scan cycle time is the maximum time the process is allowed to take for one full scan cycle of the S7 user program in OB1 and for the update of the relevant I O If this time is exceeded the simulated PLC goes into STOP mode S7 PLCSIM V5 4 61 A5E00992424 01 Reference Information Tools Menu The S7 PLCSIM Tools menu contains the following commands Record Playback Command Click on or select the menu command Tools gt Record Playback to record or play back a sequence of events The key sequence Alt F5 toggles the display of the Record Playback toolbar button Options Command The menu command Tools gt Options contains the following options e Attach Symbols e Show Symbols e Reference Data e Symbol Table Attach Symbols Select the menu command Tools gt Options gt Attach Symbols to use symbolic addressing in your simulated program This menu command invokes a dialog box where you can choose the STEP 7 symbol table to be referenced Once you have attached a symbol table you can use the Show Symbols Reference Data and Symbol Data options By default S7 PLCSIM attaches the symbol table of the STEP 7 project that you used to select a CPU access node Show Symbols Select the menu co
42. ed simulation so when you open the simulation you do not have to repeat those steps You can begin work where you left off the last time An archived simulation for S7 PLCSIM V5 4 contains the simulated subnet and nodes An archived simulation for S7 PLCSIM V5 3 is for a default MPI subnet at address 2 You can open an existing PLC simulation by any of the following methods e From the initial Project Simulation dialog select Load project from a file and then browse to and select an existing PLC file e Select the File gt Recent Simulation menu command and choose a simulated PLC project e Select the File gt Open PLC menu command and then browse to and select an existing PLC file If you see a dialog stating that the file is read only and cannot be opened you must use Windows Explorer to remove the read only designation for the file Then you can open it Note To open a file from S7 PLCSIM V5 3 or earlier S7 PLCSIM must convert the file to the current file format The conversion process makes a backup of the original file with a file extension of BAK that it then converts to the current PLC file format The conversion will fail if a read only backup file already exists If so use Windows Explorer to delete the pre existing backup file and then open the PLC file in S7 PLCSIM In some cases S7 PLCSIM will not be able to open an old PLC file Simulation files that included multiple DP networks hot backup systems or fault toler
43. ed with a double asterisk Support only an input parameter of 0 16 S7 PLCSIM V5 4 A5E00992424 01 Product Overview Using Help You can access the S7 PLCSIM Help through the Help menu or in any of the following ways e To get help about an object in the S7 PLCSIM window click the Help button on the toolbar and then click the object e To get help about any dialog or error message click the Help button in the dialog or message box or press F1 The Help window provides the following buttons menu commands and tabs Help Buttons Hide Button Show Button Toggles the display of the navigation area Table of Contents Index and Search tabs To reduce the overall size of the help window you can hide the navigation area when you are ready to view new topics click the Show button to restore the navigation area Back Button If you have examined more than one topic this button allows you to move back to the previous topic s Print Button Allows you to send a selected topic or an entire book to any printer that you have installed Options Button Menu Commands Hide Tabs Show Tabs Toggles the display of the Table of Contents Index and Search tabs To reduce the overall size of the help window you can hide the tabs when you are ready to search for new topics you can show the tabs Back If you have examined more than one topic this option allows you to move back to the previous topic s Forward If you have mo
44. en connection message 66 Opening event file layout 23 simulated PLC 22 Operating modes 12 changing 23 Options button help browser 17 Options command Tools menu Output 13 viewing and modifying 37 P Pausing recording or playback 28 69 Index Peripheral memory 13 access error 66 input 37 output 37 update differences from real S7 PLC 10 vertical bits 39 PI peripheral input 13 Playback 28 PLC closing 32 menu 59 saving 32 simulation Power on off for a simulated CPU 27 PQ peripheral output 13 Print button help browser 17 Priority class error OB85 49 Process image memory 13 input 37 output 37 update differences from a real S7 PLC 10 vertical bits 39 Product overview Program simulation ProSim ii Q Q output 13 R Rack failure OB86 50 Real numeric data format 65 Real S7 PLC S7 PLCSIM differences 10 Recent layouts accessing 54 Recent simulations opening 54 Record playback 28 Redundancy error Communication OB73 45 CPU OB72 43 IO OB70 42 70 Reference data command tools menu Remove module interrupt OB83 48 Resetting the CPU memory 26 Resetting timers 26 38 Restart switch position 60 RUN mode 12 LED indicator 12 setting keyswitch position 60 RUN P mode 12 setting keyswitch position 60 S S5TIME numeric format 65 S7 format numeric data 65 S7_ZEBRA project getting started S7 300 CPUs 28 S7 PLCS
45. er resolution for entering data with the slider You can always enter an exact value in the Value field of the view object To select a minimum value for the slider select Min from the Display Value Min or Max drop down list of the view object Then enter the numeric value for the minimum in the Min field To select a maximum value for the slider select Max from the Display Value Min or Max drop down list of the view object Then enter the numeric value for the maximum in the Max field Debugging Your Program S7 PLCSIM provides the following features to help you debug your program e The Pause command halts the simulated CPU immediately and allows you to resume the execution of the program at the instruction where the program was halted e Any change that you make with a view object immediately updates the contents of the memory location The CPU does not wait until the beginning or end of the scan to update any changed data e Execution control options allow you to select how the CPU runs the program o Single Scan executes the program for one scan and then waits for you to start the next scan o Continuous Scan executes the program like a real PLC it starts a new scan immediately after the previous one finishes S7 PLCSIM V5 4 25 A5E00992424 01 Simulation Tasks Using Interrupt OBs in Your Program You can use S7 PLCSIM to test how your program handles different interrupt OBs S7 PLCSIM supports the following error and i
46. format for the input variable and you can also use symbolic addressing if you have attached symbols You can also view input variables with a Vertical Bits View Object Output Variable View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Output Variable e Click the Insert Output Variable button Si This view object allows you to monitor and modify the following data e Peripheral external output variables you can access the peripheral output PQ memory areas of the CPU Any change to a PQ memory value immediately updates the corresponding output Q memory value S7 PLCSIM displays a yellow background for the view object if the variable address corresponds to F System peripheral I O e Process image output variables you can access the output Q memory areas of the CPU During the scan cycle the program calculates output values and places them in the process image output table At the end of the scan cycle the operating system reads the calculated output values from this table and sends them to the process outputs The process image output table maps the first 512 bytes CPU dependent of the peripheral output memory The CPU reacts immediately to any changes made with this view object Any modifications made with a STEP 7 variable table take effect at the proper time in the CPU scan inputs are read at the beginning of the scan and outputs are written at the end You can
47. g opens a dialog box that allows you to enable or disable scan cycle monitoring watchdog timer and set the maximum scan cycle monitoring time for the simulation The maximum scan cycle time is the maximum time the process is allowed to take for one full scan cycle of the S7 user program in the OB1 and update of the relevant I O If this time is exceeded the simulated PLC goes into STOP mode Because program execution may be significantly slower in S7 PLCSIM than with an actual CPU especially when other applications are running at higher priority you can experience annoying timeouts This dialog makes it possible for you to disable or extend the scan cycle monitoring without modifying the program for the target PLC Note that this dialog does not reflect the monitoring time set in the hardware configuration and any changes affect the simulation only If Enable Scan Cycle Monitoring is selected you can set the monitoring time to any value between 1 second 1000 ms and 1 minute 60000 ms inclusive The default scan cycle monitoring time is 6000 ms Saving a Layout To save the current layout of S7 PLCSIM view objects select the menu command File gt Save Layout A layout is simply an arrangement of view objects In other words the LAY file archives only the position and selected data format of the view objects in your simulation the data values that are displayed in the view objects are not saved as part of the layout You can save
48. g the results to the peripheral outputs PQ To choose Single Scan mode click UI or select the menu command Execute gt Scan Mode gt Single Scan Accessing a program one scan at a time allows you to see the changes in each scan While a real CPU can execute faster than the editor can display data the S7 PLCSIM Single Scan option allows you to freeze the state of the program from scan to scan To choose Continuous Scan mode click iy or select the menu command Execute gt Scan Mode gt Continuous Scan The default setting is Continuous Scan Changing CPU Operating Modes You can change the operating modes for the CPU The simulated PLC responds to changes in the operating mode just like a real PLC The checkboxes on the view object of the simulated PLC show the current operating mode To change the operating mode click the desired checkbox or use the menu command Execute gt Key Switch Position gt mode The CPU operating modes on the simulated CPU function like the key switch on a real CPU if you use the STEP 7 tools to change the operating mode or if the CPU automatically changes mode for example encounters an error condition that causes the CPU to change from RUN to STOP the checkboxes on the simulated CPU view object do not change The LED indicator changes but not the key switch This alerts you that the CPU operating mode changed possibly because of some error in the program S7 PLCSIM V5 4 23 A5E00992424 01 Simula
49. haracter Char 65 CiR elements 12 Clear Reset command PLC menu 26 Closing layout 54 simulated PLC 32 simulation with connections 66 Cold start startup switch position setting 60 Communication redundancy error B73 45 Contents command Help menu Contents tab help browser 17 Continuous scan mode setting 23 use in debugging 25 Control program monitoring 24 S7 PLCSIM V5 4 A5E00992424 01 Counter view object Counters 13 viewing and modifying 38 CPU 317 T simulation 33 CPU accumulators 36 CPU indicators 12 CPU mode toolbar 53 CPU operating modes 12 changing 23 CPU redundancy error B72 43 CPU view object 36 Creating new event file 28 Customer support iii Cycling power for a simulated CPU 27 D Data blocks 13 Data formats 65 Date numeric format 65 DATE AND TIME numeric format 65 DC indicator 12 Debugging with S7 PLCSIM 25 Decimal numeric format 65 Delta button record playback 28 Diagnostic buffer difference from real S7 PLC 10 Diagnostic interrupt OB82 46 Difference LAY and PLC file 22 Differences from a real S7 PLC 10 Documentation related iii Downloading 8 problems 66 DP failure tab 50 DP indicator 12 DT DATE_AND_TIME numeric format 65 E Edit menu 56 Enabling scan cycle monitoring 31 67 Index Ending the simulation session 32 Error OBs 41 OB70 I O redundancy error OB72 CPU redundancy error OB73 com
50. he CPU view object in Single Scan mode note events in Single Scan the following Ip mode but the e You cannot start a recording in Single Scan mode unless you click the recorder does not function as would expect Next Scan 1 button to increment the scan count The first event in your recording must have a Delta value of 1 or higher The Delta value is based on the number of scan cycles that have occurred since the previous event which in this case was when you clicked the Record button However if you are beginning the recording in Single Scan mode no scan cycles have elapsed You must increment the scan e When you record events in Single Scan mode they have a Delta value of zero because they are all occurring within the same scan Therefore when you play back the recording all the events that you recorded during a single scan are displayed in such rapid sequence that they appear to occur simultaneously To provide a discernable time lag between events you would have to click the Next Scan button or switch between Continuous Scan mode and Single Scan mode for each event My event file contains Events are recorded with German mnemonics in S7 PLCSIM regardless of German mnemonics your STEP 7 selection You can disregard this phenomenon even though that is not my selection in STEP 7 30 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks Monitoring the Scan Cycle The menu command Execute gt Scan Cycle Monitorin
51. iew objects view object icons along the bottom edge of the S7 PLCSIM window 1 2 3 9 Command You can activate an open view object by selecting it from an alphabetical list in the Window menu Select the number that corresponds to the desired view object The currently active view object is indicated by a check mark If you have more than 9 view objects open you can select More Windows to see a dialog box with a complete list S7 PLCSIM V5 4 63 A5E00992424 01 Reference Information Help Menu The S7 PLCSIM Help menu contains the following commands Contents Command The menu command Help gt Contents opens the Contents screen of the S7 PLCSIM Help From the table of contents you can expand any book and click any topic to view help on S7 PLCSIM Introduction Command The menu command Help gt Introduction opens a Help topic that gives a general overview of S7 PLCSIM and the tasks you can perform with it Getting Started Command The menu command Help gt Getting Started opens a Help topic that helps you get started when you begin working with S7 PLCSIM for the first time Using Help Command The menu command Help gt Using Help provides information on using the online Help system About Command The menu command Help gt About gives you information on the version of the software and on the copyright What s This Help Button To get information about S7 PLCSIM toolbars and features follow these steps d
52. ile Menu The S7 PLCSIM File menu contains the following commands DI New PLC Command Click D or select the menu command File gt New PLC to create a new simulated PLC SS Select CPU Access Node Click cd or select the menu command File gt Select CPU Access Node to select a CPU access node to a STEP 7 project S7 PLSCIM simulates the CPU of the selected node all nodes that belong to that CPU and all nodes on the subnet of the selected node Sl Open PLC Command To find and open an existing Saved simulation of a PLC click Si or select the menu command File gt Open PLC Show Open Project Dialog Select the menu command File gt Show Open Project Dialog to display the Open Project dialog You use this dialog to open a project when you start a simulation This dialog also has a checkbox that enables or disables the display of the Open Project dialog when S7 PLCSIM starts up Close PLC Command Select the menu command File gt Close PLC to close the currently open simulated PLC This command closes the CPU view object and all other currently open view objects Closing a simulated PLC can result in errors in applications which are currently connected to the simulator II Save PLC Command Click II or select the menu command File gt Save PLC to save the current state of the simulated PLC Save PLC As Command Select the menu command File gt Save PLC As to save the current state of the simulated PLC as a new file 54 S7 PLC
53. lt OB86_FLT_ID BYTE B 16 C5 Station return OB86_FLT_ID BYTE BHI 6 C4 Station OK OB86_FLT_ID BYTE B 16 C5 Station OB86_FLT_ID BYTE B 16 C7 operational again but error Station return OB86_FLT_ID BYTE B 16 C8 with discrepancy DP Status OB86_ RACKS _FLTD ARRAY OF Shows the status of up to 126 DP BOOL stations In the array you must select the rack with the fault conditions Green Good Red Fault Gray Not configured For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual S7 PLCSIM V5 4 51 A5E00992424 01 Reference Information S7 PLCSIM Toolbars S7 PLCSIM includes the toolbars pictured below You can use the View gt Toolbars command to hide or display any of the toolbars Standard The standard toolbar contains selected commands from the File Menu Edit Menu View Menu and Window Menu as well as What s This help Ose LBE sax The standard toolbar buttons correspond to the following menu commands File gt New PLC File gt Open PLC File gt Save PLC File gt Select CPU Access Node Edit gt Cut Edit gt Copy Edit gt Paste Window gt Cascade Window gt Tile Ordered View gt Always On Top and What s This Help Insert The insert toolbar contains selected commands from the Insert Menu or the View Menu The insert toolbar buttons correspond to the following menu commands Inse
54. lusive Or X and Exclusive Or Not XN e The MCR stack stores up to eight levels of nesting for a master control relay MCR Each level shows the status of the RLO bit for an MCR instruction which begins an MCR area 36 S7 PLCSIM V5 4 A5E00992424 01 View Objects Input Variable View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Input Variable e Click on the Insert Input Variable button il This view object allows you to monitor and modify the following data e Peripheral external input variables you can access the peripheral input PI memory areas of the CPU S7 PLCSIM displays a yellow background for the view object if the variable address corresponds to F System peripheral I O e Process image input variables you can access the input 1 memory areas of the CPU By default the CPU overwrites the memory with the PI memory at the beginning of every scan If you change an memory value the simulator immediately copies the changed value to the peripheral area This way the desired change is not lost when the peripheral value overwrites the process input value on the next scan The CPU reacts immediately to any changes made with this view object Any modifications made with a STEP 7 variable table take effect at the proper time in the CPU scan inputs are read at the beginning of the scan and outputs are written at the end You can choose the numeric data
55. ly trigger the interrupt OBs OB40 to OB47 hardware interrupt OB70 I O redundancy error OB72 CPU redundancy error OB73 communication redundancy error OB80 time error OB82 diagnostic interrupt OB83 insert remove module OB85 program sequence error and OB86 rack failure Process image and peripheral memory When you make a change to a process input value ina view object S7 PLCSIM copies it immediately to peripheral memory This way when the peripheral input value is written to the process image register at the beginning of the next scan the desired change is not lost Correspondingly when you make a change to a peripheral output value it is copied immediately to process output memory The following diagram illustrates the order of activities in the scan cycle Startup program Read the inputs from the modules and update the data in the process image input table Free Execute the user program OB1 and all the blocks called in it See ycle Transfer the values of the process image output table to the modules When modifying variables in a simulated CPU from a STEP 7 variable table you must ensure that process image updates do not overwrite or read over your intended modification Set the trigger points for modifying variables as follows e For inputs select Beginning of scan cycle as the Trigger Point for Modifying e For outputs select End of scan cycle as the Trigger Point for Mo
56. mmand Tools gt Options gt Show Symbols to display the symbolic addresses used in your program To hide the symbols select the command again This menu command is only available when a STEP 7 symbol table is attached to the simulation Reference Data Select the menu command Tools gt Options gt Reference Data to open the Displaying S7 Reference Data application of STEP 7 You can use this application to debug your simulated program This menu command is only available when a STEP 7 symbol table has been attached to the simulated program using the Attach Symbols option Symbol Table Select the menu command Tools gt Options gt Symbol Table to open the STEP 7 Symbol Editor and view the currently attached symbol table This menu command is only available when a STEP 7 symbol table has been attached to the simulated program using the Attach Symbols option 62 S7 PLCSIM V5 4 A5E00992424 01 Reference Information Window Menu The S7 PLCSIM Window menu contains the following commands S Cascade Command To arrange windows so that they overlap starting in the upper left corner of the S7 PLCSIM window click S or select the menu command Window gt Cascade E Tile Ordered Command To arrange the S7 PLCSIM view objects side by side with the CPU view object in the top left click Bl or select the menu command Window gt Tile Ordered Arrange Icons Command The menu command Window gt Arrange Icons arranges all minimized v
57. mulators allows you to display the data in the different accumulators within the simulated CPU as well as the status word and address registers This view object displays four accumulator fields to accommodate the four accumulators of the S7 400 CPU Programs for an S7 300 CPU use only two accumulators Block Registers allows you to display the contents of the data block address registers within the simulated CPU It also displays the number of the logic block that is currently being executed and the number of the previous logic block along with the number of the instruction step address counter or SAC being executed Stacks allows you to display the data stored in the nesting stack and the master control relay MCR stack within the simulated PLC You can also simultaneously monitor the program in the STEP 7 LAD STL FBD application 24 In the SIMATIC Manager click or select View gt Online to switch to online mode Navigate to the Blocks object of the STEP 7 project and open a logic block For example in the S7_ZEBRA example project open FC1 The LAD STL FBD application displays the program that the simulated PLC is executing Use the menu commands to view the status of the instructions S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks Using the Slider Control The slider control allows you to simulate values that change gradually or have a specific range such as analog values You can use the slider control for th
58. munication redundancy error OB80 time error OB85 priority class error OB86 rack failure Event file playback 28 Execute menu 60 Expansion rack failure tab 50 F Features S7 PLCSIM 7 File menu 54 Formats numeric data 65 F System peripheral VO 35 37 G Generic variables viewing and modifying 39 Getting started H Hardware configuration 26 Hardware interrupt OB40 0B47 42 Help 17 browser buttons 17 F1 access 17 menu 64 What s This button 64 Hexadecimal Hex numeric format 65 Hide button help browser 17 Highlighting search term online help 17 Hot start startup switch position setting 60 l I input 13 I O input output considerations interrupt OB simulation 26 differences from real S7 PLC 10 I O redundancy error OB70 42 68 input variable 37 output variable 37 Icons arranging minimized view objects 63 Index tab help browser 17 Indicators Input 13 variable viewing and modifying 37 Insert menu 58 Insert toolbar 53 Insert remove module interrupt OB83 48 Integer numeric format 65 Interrupt OBs 10 26 41 OB40 OB47 hardware interrupt 42 OB82 diagnostic interrupt 46 OB83 insert remove module interrupt 48 Introduction to S7 PLCSIM 7 K Keyswitch position 12 changing 23 L Layout 54 closing 54 opening 23 recent files 54 saving 31 LED indicators 12 Locked up S7 PLCSIM 66 M M bit memory 13 Manual timers using
59. nput values when the CPU is in RUN mode If you have configured CiR Configuration in Run elements in your STEP 7 project however you can download the CiR objects in RUN mode With the simulated CPU in RUN mode you can use the view objects created within S7 PLCSIM to modify any data used by the program STOP The CPU does not run the program Unlike STOP mode for real CPUs the outputs are not set to predefined safe values but remain at the state they were in when the CPU changed to STOP mode You can download programs to the CPU while the CPU is in STOP mode Changing from STOP mode to RUN mode starts execution of the program from the first instruction The CPU operating modes the CPU indicators and the Memory Clear Reset button are all displayed on the CPU view object You can set the CPU operating mode with the Key Switch Position command You can pause execution of the simulated PLC program when the CPU is in RUN or RUN P mode CPU Indicators The CPU view object provides a set of indicators that correspond to the LED indicators on a real CPU e SF system fault alerts you that the CPU encountered a system error causing a change in the operating mode e DP distributed peripherals or remote I O indicates the status of communication with distributed remote I O e DC power supply indicates whether power to the CPU is on or off e RUN indicates that the CPU is in RUN mode e STOP indicates that the CPU is in STOP mode
60. nterrupt OBs e OB40 to OB47 hardware interrupt e 0B70 I O redundancy error 417 H systems only e OB72 CPU redundancy error 417 H systems only e B73 communication redundancy error 417 H systems only e O B80 time error e OB82 diagnostic interrupt e O B83 insert remove module e OB85 priority class error e OB86 rack failure Use the menu command Execute gt Trigger Error OB to select a specific OB and enter the header information in the dialog box When you click the OK or Apply button the simulated PLC generates the appropriate event and runs the program in the associated OB The OBs that are available to be triggered from the Trigger Error OB menu depend on the I O configuration for the simulated PLC Input Output Considerations In order to simulate interrupt OBs you must download a hardware configuration that contains your I O For some cases your I O is automatically included in the system data that STEP 7 downloads to S7 PLCSIM in other cases you must modify the configuration to one that does 7 300 CPUs S7 300 CPUs such as the CPU 315 2DP CPU 316 2DP and CPU 318 2 download an I O configuration other CPUs autoconfigure the I O to match the physical I O installed in the rack Projects already configured for one of the CPUs named above do not require modifications to the hardware configuration For other CPUs you must copy your hardware configuration and put the data into a project for a CPU th
61. of the CPU S7 PLCSIM displays a yellow background for the view object if the variable address corresponds to F System peripheral I O e Process image input and output variables you can access the input 1 and output Q memory areas of the CPU By default the CPU overwrites the memory with the PI memory at the beginning of every scan If you change an memory value the simulator immediately copies the changed value to the peripheral area This way the desired change is not lost when the peripheral value overwrites the process input value on the next scan e Bit memory you can access the variables stored in the bit memory M area of the CPU e Timers and counters you can access the timers and counters used by the program e Data blocks you can access the data stored in the data blocks of the program for example DB1 DBX 0 0 or DB1 DBW 0 The CPU reacts immediately to any changes made with this view object Any modifications made with a STEP 7 variable table take effect at the proper time in the CPU scan inputs are read at the beginning of the scan and outputs are written at the end You can choose the numeric data format for the generic variable and you can also use symbolic addressing if you have attached symbols Vertical Bits Variable View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Vertical Bits e Click the Insert Vertical Bits button You can use the Ve
62. out reset SYNC module rack number assigned twice SYNC module error eliminated Illegal rack number set on the SYNC module Updating aborted Abort of update attempt because a monitoring time was exceeded during the nth attempt 1 lt n lt maximum possible number of update attempts after an abort due to the monitoring time being exceeded For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual 44 S7 PLCSIM V5 4 A5E00992424 01 Error and Interrupt OBs Communication Redundancy Error OB73 This dialog allows you to test when the first loss of redundancy occurs in a fault tolerant S7 connection and exists only with H CPUs The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable Data Description Type Error Event Class OB73_EV_CLASS BYTE Possible value of B 16 73 loss of redundancy in communication or B 16 72 problem eliminated Error Code OB73_FLT_ID BYTE Possible value of B 16 E0 For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual Time Error OB80 This dialog allows you to test the program that you downloaded in OB80 Time Error The parameters that you select with this dialog are passed to the following variable
63. r and Interrupt OBs S7 PLCSIM supports the following interrupt and error OBs OB40 to OB47 hardware interrupt OB70 I O redundancy error 417 H systems only OB72 OB73 OB80 OB82 OB83 OB85 OB86 rack failure CPU redundancy error 417 H systems only communication redundancy error 417 H systems only time error diagnostic interrupt insert remove module wee geeks oR Ce eee ee priority class error To simulate the triggering of any of these OBs select the S7 PLCSIM menu command Execute gt Trigger Error OB and the OB or OB group that you want to trigger Notice If values in the simulated PLC change after an error or interrupt OB has been triggered and is executing S7 PLCSIM does not update the OB with the changed data To cause the OB to use the changed data you must close the OB dialog and reopen it S7 PLCSIM supports the following interrupt and error OBs OB40 to OB47 hardware interrupt OB70 I O redundancy error 417 H systems only OB72 OB73 OB80 OB82 OB83 OB85 priority class error OB86 rack failure CPU redundancy error 417 H systems only communication redundancy error 417 H systems only time error diagnostic interrupt insert remove module a ee ep ee ee ee To simulate the triggering of any of these OBs select the S7 PLCSIM menu command Execute gt Trigger Error OB and the OB or OB group that you want to trigger Notice If values in the simulated PLC change after
64. rograms developed for a CPU 317 T with limitations The simulation does not access any motion control devices Calls to motion control function blocks simply return to the calling block with some limited error checking Error checking includes e Existence of instance DB e Existence of technology DB e Range checking of parameters with defined ranges S7 PLCSIM does set parameters for a few of the MC commands for the CPU 317 T as defined below providing the input parameters are valid MC Command Parameter Value s set MC Power Statusword DriveEnabled True for enabled false for disabled Statusword Standstill True Technology DB parameters MC_Stop Statusword Stopping True Statusword Standstill True Technology DB parameters MC_MoveAbsolute Position Input parameter position MC_MvAbs MC_ExternalEncoder Position Input parameter position MC_ExEnc S7 PLCSIM V5 4 33 A5E00992424 01 View Objects S7 PLCSIM provides several view objects that allow you to monitor and modify various components of the simulated PLC These view objects are listed below e CPU View Object e ACCUs amp Status Word View Object e Block Regs View Object e Stacks View Object e Input Variable View Object e Output Variable View Object e Bit Memory View Object e Timers View Object e Counters View Object e Generic Variable View Object e Vertical Bits Variable View Object You can use symbolic addressing with view objects If you do tooltips are
65. roject This is an example project that STEP 7 provides 2 Click S or select the menu command Options gt Simulate Modules This action starts the S7 PLCSIM application and displays the Open Project dialog 3 From the Open Project dialog select Select CPU access node and click OK S7 PLCSIM displays the Select CPU Access Node dialog and defaults to the example project that is open in STEP 7 4 Select the default MPI access node and click OK After you select the CPU access node from S7 PLCSIM download the STEP 7 project 1 From the SIMATIC Manager navigate to the Blocks object of the example project 2 Click or select the menu command PLC gt Download to download the Blocks object to the simulated PLC 3 Atthe prompt Do you want to load the system data choose No if you do not want to download a hardware configuration to the simulated PLC or Yes in order to download a hardware configuration for instance in order to use clock memory At this point you can use S7 PLCSIM to simulate program execution and to monitor and control the application 1 From S7 PLCSIM create additional view objects for monitoring information from the simulated PLC e Click Bl or select the menu command Insert gt Input Variable The view object displays IBO Input Byte 0 Set the data format to Bits e Click Si or select the menu command Insert gt Output Variable to insert a second view object QBO Output Byte 0
66. rror communication error time error OB81 power supply error OB82 diagnostic interrupt OB83 insert remove interrupt OB84 CPU hardware fault OB85 priority class error OB86 rack failure OB87 communication error OB88 processing interrupt OB90 background OB OB100 warm restart OB101 hot restart OB102 cold restart OB121 programming error OB122 I O access error OBs marked with an asterisk are NOPs They do not perform any operation You do not need to modify a program that calls a NOP S7 PLCSIM V5 4 A5E00992424 01 Product Overview System Function Blocks SFBs S7 PLCSIM supports the SFBs listed below so for be pm fw fo pe po soe ac prow pow brow pow sear bebe beef zo free pros poo ros few bor SFB41 SFB42 SFB43 SFB44 SFB46 SFB47 SFB48 SFB49 a E SFBs marked with an asterisk are NOPs They do not perform any operation You do not need to modify a program that calls a NOP S7 PLCSIM V5 4 15 A5E00992424 01 Product Overview System Functions SFCs S7 PLCSIM supports the SFCs listed below so ke ka be ke ka peor fro sor feos oor fore TI ES w re pc prow fro prom e Im SFCs marked with an asterisk are NOPs They do not perform any operation You do not need to modify a program that calls a NOP SFC102 SFC103 SFC126 SFC127 SFC80 SFC81 SFC82 SFC83 SFC84 SFC85 SFC87 SFCs mark
67. rt gt Input Variable Insert gt Output Variable Insert gt Bit Memory Insert gt Timer Insert gt Counter Insert gt Generic Insert gt Vertical Bits View gt Accumulators and View gt Block Registers CPU Mode The CPU Mode toolbar contains selected commands from the Execute Menu DD ua rg The CPU Mode toolbar buttons correspond to the following menu commands Execute gt Scan Mode gt Single Scan Execute gt Scan Mode gt Continuous Scan Execute gt Pause and Execute gt Reset Timers all timers Record Playback Files The Record Playback Files toolbar button is also accessible from the Tools Menu K The Record Playback toolbar button corresponds to the menu command Tools gt Record Playback Toolbar Shortcut Key Combinations You can toggle the display of any of these toolbars by concurrently pressing the Alt key and a function key The following shortcut key combinations are available ALT F1 Toggles the display of the Standard toolbar ALT F2 Toggles the display of the Insert toolbar ALT F3 Toggles the display of the CPU Mode toolbar ALT F4 Closes S7 PLCSIM ALT F5 Toggles the display of the Record Playback toolbar S7 PLCSIM V5 4 53 A5E00992424 01 Reference Information S7 PLCSIM Menus S7 PLCSIM includes the following menus for performing operations with the simulated PLC e File e Edit e View e insert e PLC e Execute e Tools e Window e Help F
68. rtical Bits view object with bit or byte addresses The Vertical Bits view object allows you to see the symbolic or absolute address of each bit and to monitor and modify the following data e Peripheral external input and output variables you can access the peripheral input Pl and peripheral output PQ memory areas of the CPU S7 PLCSIM displays a yellow background for the view object if the variable address corresponds to F System peripheral I O e Process image input and output variables you can access the input 1 and output Q memory areas of the CPU By default the CPU overwrites the memory with the PI memory at the beginning of every scan If you change an memory value the simulator immediately copies the changed value to the peripheral area This way the desired change is not lost when the peripheral value overwrites the process input value on the next scan e Bit memory you can access the variables stored in the bit memory M area of the CPU e Data blocks you can access the data stored in the data blocks of the program The CPU reacts immediately to any changes made with this view object Any modifications made with a STEP 7 variable table take effect at the proper time in the CPU scan inputs are read at the beginning of the scan and outputs are written at the end You can use symbolic addressing if you have attached symbols for variables represented with a Vertical View Object S7 PLCSIM V5 4 39 A5E00992424 01 Erro
69. s when the OB is called Parameter Variable Data Type Description Cycle time exceeded OB80_FLT_ID BYTE Error code B 16 01 Requested OB is still being OB80_ FLT_ID BYTE Error code B 16 02 processed OB call buffer overflow for the OB80 FLT ID BYTE Error code B 16 07 current priority class Expired time of day interrupt due to a time jump OB80_ FLT_ID BYTE Error code B 16 05 on return to run after hold OB80 FLT_ID BYTE Error code B 16 06 For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual S7 PLCSIM V5 4 45 A5E00992424 01 Error and Interrupt OBs Diagnostic Interrupt OB82 This dialog allows you to test the program that you downloaded in OB82 Diagnostic Interrupt Default Tests Optional In this drop down box choose from the list to set the fault conditions for the desired test automatically For all fault conditions the event class OB82_EV_CLASS is set to B 16 39 incoming event and OB82_FLT_ID uses the error code B 16 42 If no fault condition is selected Module OK the event class is set to B 16 38 outgoing event The parameters that you select with this dialog are passed to the following variables when the OB is called Module Address Parameter The module address is the logical base address of the module that triggers the interrupt It is the first input if any otherwise it is the first ou
70. tacks View e Input Variable View Object E Output Variable El EE Bit Memory View Object EEN Timer View Object geegent Counter View 8 3 To iene eege Generic Variable View ODjOCbrcvissniceccsssorsteweiznennnenstcecsiaeaticennsicouenensvenenteersReegbteonntvente Vertical Bits Variable View Obert Error and Joterrupt OBS scissciacessncnssesenseadevadsnadassnsiasasanendcawsncedsavedsnadavanauacawonsuades Hardware Interrupt OBAO OBA Z A O Redundancy Error OB70 EE CPU Redundancy Error OB72 egene Communication Redundancy Error OB73 Time Error OB BO EE Diagnostic Interrupt GEES Keeser iseinean iaae iini Insert Remove Module Interrupt OBO2 eect ee eeeeeeeeeeeeeeeeeeeeaaeeeeeeeaeeeeeees Priority Class el Rack tee EE ee Reference Information KKK KKK KEREN EEN RENE KEREN KEN KEN REENEN RENE KEREN KEREN Record Playback EE Toolbar Shortcut Key Combinations sssessseneessnneee et nsseet rnet tn tense tr nnnt tunnetan nanntu nnan tanane nennen S7 PEGSIM Menus srei a a aaa E SEO NN File MON snadne n a a aara een Edit Ve TEE VI E UE MISS WEE ege e ee D D Ae ad Bel EE Execute MENU sssrin na taaa ennea ENEE shavcds NNERENEEN dee EEN ege TOOS GEET Window GET Help MENU EE What s This Help BUTON siseseid anane aiiai aaaea eide aaa saada aaa aeai S7 PLCSIM Numeric Data Fommats Troubleshooting UE S7 PLCSIM V5 4 A5E00992424 01 vi Product Overview S7 PLCSIM enables you to run and test your STEP 7 user progr
71. test control programs with S7 PLCSIM without connecting to S7 hardware S7 PLCSIM provides a graphical user interface for viewing and modifying control program variables running the simulated PLC in single or continuous scan mode and changing the operating mode of the simulated controller S7 PLCSIM also includes a COM object called S7ProSim that provides programmatic access to a simulated PLC With S7ProSim you can write software to perform such tasks as changing the keyswitch position of the simulated PLC stepping through the control program a scan at a time reading or writing controller values and many other tasks S7ProSim is not documented within the scope of this S7 PLCSIM online help system and manual The S7ProSim online help system and PDF document the usage of S7ProSim Audience This manual is intended for engineers programmers and maintenance personnel who have knowledge and experience with S7 programmable logic controllers and STEP 7 programming Scope This document describes the features and the operation of S7 PLCSIM V5 4 Other Manuals You can find additional information in the online help for STEP 7 and in the following manuals e Programming with STEP 7 Manual This manual provides basic information on designing and programming control programs Use this manual when creating a control program with the STEP 7 automation software e System Software for S7 300 400 System and Standard Functions Reference Manual This man
72. that you can encounter when using S7 PLCSIM and lists possible causes of the problem and recommended corrective actions Problem Possible Causes or Corrections Your program does not Verify that the CPU is in either STOP mode or RUN P mode You cannot download to the download your program if the simulated CPU is in RUN mode unless you simulated CPU have configured CiR Configuration in RUN elements in STEP 7 CiR objects are the only objects that can be downloaded to S7 PLCSIM in RUN mode If your program contains a System Data Block SDB verify that the CPU is in STOP mode As with a real CPU you can download SDBs only when the CPU is in STOP mode Note If the CPU view object is in RUN P mode STEP 7 prompts you to change to STOP so that the hardware configuration can be downloaded Verify that the CPU and the program use the same node address and subnet name The node address defined for the program must match the node address of the CPU When you attempt to If you attempt to close the simulated CPU while one of the STEP 7 tools close the simulated such as S7 Status is monitoring the program STEP 7 alerts you to CPU a message alerts disconnect the STEP 7 tool from the simulated CPU Always disconnect any you that there is a STEP 7 tool by turning off the monitoring of the program status or by closing connection open the tool before closing the simulated CPU The S7 PLCSIM Check the execution mode S7 PLCSIM can
73. the commands of the Edit and Window menus The Undo command is also available from the right click menu of any editable text field Al Cut Command Select the Edit gt Cut command or click Al to remove selected text and put H on the clipboard Copy Command Se Select the Edit gt Copy command or click to copy selected text and put it on the clipboard Paste Command Select the Edit gt Paste command or click to insert the contents of the clipboard whatever was last cut or copied at the location of the cursor 56 S7 PLCSIM V5 4 A5E00992424 01 Reference Information View Menu The S7 PLCSIM View menu contains the following commands 5 Accumulators Command Select the menu command View gt Accumulators or click al to create an ACCUs amp Status Word view object This view object allows you to monitor accumulators status word bits and address registers fial Block Registers Command Select the menu command View gt Block Registers or click fal or to create a Block Regs view object that allows you to monitor the contents of the data block address registers DB1 and DB2 This view object also displays the number of the current logic block and the previous logic block along with the number of the instruction step address counter or SAC for each block el Stacks Command Select the menu command View gt Stacks or click Si or to create a Stacks view object that allows you to monitor the nesting stack and the master
74. the value of timer T 0 is 600 and the time base is 10ms this represents a timer of 6 seconds If you change the time base to 100ms then the actual timer value becomes 60 seconds 600 100ms 60 seconds To reset all of the timers in your program use the Reset Timers d toolbar button To reset an individual timer use the Reset Timers d button on the view object for that timer You can use symbolic addressing for the timer if you have attached symbols You can also configure the timers to be under either automatic or manual control from commands on the Execute menu Counter View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Counter e Click the Insert Counter button a This view object allows you to monitor and modify the counters used by your program It opens with a default memory location of C 0 You can choose the numeric data format for the counter and you can also use symbolic addressing if you have attached symbols 38 S7 PLCSIM V5 4 A5E00992424 01 View Objects Generic Variable View Object To add this view object to a simulation do one of the following e Choose the menu command Insert gt Generic e Click the Insert Generic Variable button al This view object allows you to monitor and modify the following data e Peripheral external input and output variables you can access the peripheral input PI and peripheral output PQ memory areas
75. tion refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Software for S7 300 400 System and Standard Functions manual S7 PLCSIM V5 4 A5E00992424 01 47 Error and Interrupt OBs Insert Remove Module Interrupt OB83 This dialog allows you to test the program that you downloaded in OB83 Insert Remove Module Interrupt For all fault conditions the event class OB83_EV_CLASS is set to B 16 39 incoming event If no fault condition is selected Module Ok the event class is set to B 16 38 outgoing event The parameters that you select with this dialog are passed to the following variables when the OB is called Parameter Variable DataType Value Description Module removed or not OB83_FLT_ID BYTE B 16 61 responding Module inserted module type OB83_FLT_ID BYTE B H16 61 OK Module inserted incorrect OB83_FLT_ID BYTE B 16 63 module type Module inserted type ID OB83_FLT_ID BYTE B 16 64 cannot be read Module inserted error in OB83_FLT_ID BYTE B 16 65 module parameter assignment Module address OB83_ MDL ADDR WORD Logical base address of the module affected if a mixed module it is the smallest logical address used in the module If the and O addresses in the mixed block are equal the logical base address is the one that receives the event identifier Example PQW 0 For further information refer to the STEP 7 Help on Organization Blocks help system or to the SIMATIC System Softw
76. tion Tasks Simulating a STEP 7 User Program You can display different types of view objects that allow you to monitor and modify the STEP 7 user program running in the simulated PLC S7 PLCSIM provides view objects that you use to monitor and modify program objects The following view objects are activated from the Insert menu Input Variable allows you to access the data stored in the process input 1 memory area The default address is byte 0 IBO Output Variable allows you to access the data stored in the process output Q memory area The default address is byte 0 QBO Bit Memory allows you to access the data stored in the bit memory M area The default address is byte 0 MBO Timer allows you to access the timers used by the program The default timer is T 0 Counter allows you to access the counters used by the program The default counter is C 0 Generic allows you to access any of the memory areas in the simulated CPU including the data blocks DBs for the program Vertical Bits allows you to see the symbolic or absolute address of each bit and to monitor and modify data The vertical bits variable view object can be used to show a bit representation of peripheral input and output variables process image input and output variables bit memory and data blocks You can also use symbolic addressing to address any of these view objects The following three view objects are activated from the View menu Accu
77. tput address Example PIB 0 Parameter Variable Data Type Module address OB82_MDL_ADDR INT Fault Conditions Check the following checkboxes to enable the following fault conditions Parameter Checkbox Variable Data Type Module defect read only OB82_MDL_DEFECT BOOL Internal fault OB82_INT_FAULT BOOL External fault OB80_EXT_FAULT BOOL Channel fault OB82_PNT_INFO BOOL External voltage failed OB82_EXT_VOLTAGE BOOL Front panel connector unplugged OB82_FLD_CONNCTR BOOL Module not configured OB82_NO_ CONFIG BOOL Incorrect parameters on module OB82_CONFIG_ERR BOOL Channel information exists OB82_MDL_TYPE BYTE Bit 4 User information exists OB82_MDL_TYPE BYTE Bit 5 Diagnostic interrupt from substitute OB82_MDL_TYPE BYTE Bit 6 Submodule missing or has an error OB82_SUB_MDL_FAULT BOOL Communication problem OB82_COMM_FAULT BOOL Operating mode is STOP OB82_MDL_STOP BOOL 46 S7 PLCSIM V5 4 A5E00992424 01 Watchdog timer responded Internal power supply failed Battery exhausted Entire backup failed Expansion rack failure Processor failure EPROM fault RAM fault ADC DAC error Fuse tripped Hardware interrupt lost OB82_WTCH_DOG_FLT OB82_INT_PS_FLT OB82_PRIM_BATT_FLT OB82_BCKUP_BATT_FLT OB82_RACK_FLT OB82_PROC_FLT OB82_EPROM_FLT OB82_RAM_FLT OB82_ADU_FLT OB82_FUSE_FLT OB82_HW_INTR_FLT BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Error and Interrupt OBs For further informa
78. u to monitor the contents of the CPU accumulators The view object displays four accumulator fields to accommodate the S7 400 CPU programs for the S7 300 CPU use only two accumulators e Status word allows you to monitor the bits of the status word e Address registers allows you to monitor the contents of the two address registers AR1 and AR2 These address registers are used for the indirect addressing of data Block Regs View Object To add this view object to a simulation do one of the following e Choose the menu command View gt Block Registers e Click the Block Registers button fal This view object allows you to monitor the contents of the data block address registers DB1 and DB2 This view object also displays the number of the current logic block and the previous logic block along with the number of the instruction step address counter or SAC for each block Stacks View Object To add this view object to a simulation do one of the following e Choose the menu command View gt Stacks e Click the Nesting Stacks button E This view object allows you to monitor information stored in the following stacks of the CPU e The nesting stack stores up to seven entries For each entry the nesting stack stores the states of the RLO and OR bits of the status word An entry in the nesting stack is made for each instruction that starts a new logic string These instructions are And A And Not AN Or O Or Not ON Exc
79. ual provides you with descriptions of the system functions organization blocks and standard functions that you use when developing a control program e Working with STEP 7 Getting Started Manual This manual explains how to use the STEP 7 automation software This manual provides you with an overview of the procedures used to configure a PLC and to develop control programs To find these and other manuals select the Start gt Simatic gt Documentation menu command from the Start menu of the computer where STEP 7 is installed Additional Assistance For assistance in answering technical questions for training on this product or for ordering contact your Siemens distributor or sales office North America and South America Europe and Africa Asia and Pacific region Telephone 1 800 333 7421 Telephone 49 0 180 5050 222 Telephone 86 10 64 75 75 75 Fax 1 423 262 2200 Fax 49 0 180 5050 223 Fax 86 10 64 74 74 74 simatic hotline siemens com adsupport siemens com adsupport asia siemens com S7 PLCSIM V5 4 iii A5E00992424 01 Contents Product OVC EE S7 PLCSIM Simulation View ie e Getting Started EEN Using STEP 7 to Monitor Program Simulation Differences from a Real S7 PLC crrcccsssmsssicsstinstaieaiqicddiesdeeenadanedeucdssaccevtucceaenidianidannes CPU Operating Mode Switch Positions ccccccccssssssssssscseeessssssssersssseeesseeessssnseees CPU Keele e EE Organization Blocks EE System Function Fleeg ASA aa
80. ution AN This device and its components may only be used for the applications described in the catalog or the technical descriptions and only in connection with devices or components from other manufacturers that have been approved or recommended by Siemens This product can only function correctly and safely if it is transported stored set up and installed correctly and operated and maintained as recommended Trademarks Siemens and SIMATIC are registered trademarks of SIEMENS AG STEP 7 and S7 are trademarks of SIEMENS AG Copyright Siemens AG 2007 Disclaimer of Liability All rights reserved We have checked the contents of this manual for agreement The reproduction transmission or use of this document or its with the hardware and software described Because contents is not permitted without express written authority deviations cannot be precluded entirely we cannot guarantee Offenders will be liable for damages All rights including rights full agreement However the data in this manual are created by patent grant or registration of a utility model or reviewed regularly and any necessary corrections included in design are reserved subsequent editions Suggestions for improvement are welcomed Siemens AG Siemens AG 2007 Automation and Drives l Postfach 4848 D 90327 Nuernberg Technical data subject to change Preface S7 PLCSIM allows you to simulate the operation of an S7 programmable logic controller You can
81. ved back in the sequence of topics examined this option allows you to move forward until you reach the topic that you were viewing when you started moving back Home Takes you to the web page that is defined as the home page for the S7 PLCSIM online help Stop Allows you to stop the browser from retrieving any more information pertaining to the current help page This command is useful if a page contains a great deal of information for example large graphic files that causes the page to take a long time to display completely Refresh Refreshes the display of the current help page Internet Options Allows you to define options for Internet browsing Print Allows you to send a selected topic or an entire book to any printer that you have installed Search Highlight Off Search Highlight On Toggles the display of highlighting for topics that contain a term that you have specified in the Search field The highlighting enables you to see exactly where ina given topic the term appears Help Browser Tabs Contents Tab Choose this tab to view the table of contents for the help system Double click any book icon to expand it and view the topics that it contains Index Tab Choose this tab to view an alphabetical list of index keywords for the help system Search Tab Choose this tab and type in a term that you wish to find Double click a topic from the list to view the topic By default the term is highlighted every place that it appears
82. ws 63 Time error B80 45 Time numeric format 65 Timers 13 automatic 60 difference from real S7 PLC 10 manual 27 60 resetting 26 viewing and modifying 38 Tips troubleshooting 66 Toolbars using 53 Tools menu 62 Tooltips 27 Triggering an error or interrupt OB 26 Troubleshooting PLC simulation 66 general 66 record playback 28 Turning simulation on off 19 U Using help 17 64 interrupt OBs in your program 26 record playback 28 S7 PLCSIM to debug your program 25 7 PLCSIM to monitor simulated program 24 slider control 25 symbolic addressing 27 view objects V Variable table 10 Variable view objects 35 F System variable indication 35 generic 39 input 37 output 37 vertical bits 39 71 Index Vertical bits variable viewing and modifying 39 View menu 57 View objects 35 ACCUs amp status word 36 arranging minimized icons bit memory block regs 36 cascading windows 63 counters 38 CPU 36 F System variable indication 35 generic variable 39 getting started input variable 37 72 output variable 37 slider 25 stacks 36 tiling windows 63 timers using 24 vertical bits variable 39 WwW Warm start startup switch position setting 60 Watchdog timer enabling disabling 31 Window menu 63 Z ZEBRA example project getting started S7 PLCSIM V5 4 A5E00992424 01
83. y Switch Position command to cycle the simulated PLC to STOP mode and then back to RUN or RUN P mode If you have attached symbols when you save the simulated PLC the symbolic addresses are saved However by default when you open the archived PLC simulation symbolic addresses are not displayed To display symbolic addresses use the Tools gt Options gt Show Symbols command To save the configuration of the view objects use the File gt Save Layout menu command Saving a simulated PLC does not close the simulated PLC Closing a Simulated PLC Use the menu command File gt Close PLC to end the simulation of the program This command closes the simulated subnet nodes and all opened view objects Closing a simulated program can result in errors in applications which are currently connected to the simulator Closing the simulated PLC does not end the simulation session You can either exit S7 PLCSIM or open another simulated PLC Ending the Simulation Session After saving any simulated PLC or layout configuration follow these steps to exit the S7 PLCSIM application 1 Close any STEP 7 applications involved in the monitoring of the simulation 2 Select the menu command File gt Exit Exiting S7 PLCSIM like closing a simulated PLC can result in errors in applications that are currently connected to the simulator 32 S7 PLCSIM V5 4 A5E00992424 01 Simulation Tasks Simulating a CPU 317 T S7 PLCSIM can simulate control p
Download Pdf Manuals
Related Search
Related Contents
平成19年2月15日判決言渡 同日原本交付 裁判所書記官 平成18年(ワ Adobe Premiere Pro Haier AS102AMARA User's Manual Technische Unterlagen PILOT A2, C/CE2, MCE2035 PROFIBUS DP MODULE - Eilersen Digital Load Cells Samsung GT-S7350/I Korisničko uputstvo Targus Chill Mat XC for Laptops MODEL MSPD3/MSPD8/MSPD10 - Pentair Water Literature Copyright © All rights reserved.
Failed to retrieve file