Download Display - Siemens

Transcript
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 interrupt OBs:
•
OB40 to OB47 (hardware interrupt)
•
OB70 (I/O redundancy error) {417-H systems only}
•
OB72 (CPU redundancy error) {417-H systems only}
•
OB73 (communication redundancy error) {417-H systems only}
•
OB80 (time error)
•
OB82 (diagnostic interrupt)
•
OB83 (insert/remove module)
•
OB85 (priority class error)
•
OB86 (rack failure)
Use the menu command Execute > 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.
S7-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 that
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 S7PLCSIM is also able to detect any I/O referencing errors that your program may contain).
15