The S7 CPU operating system executes periodically OB1. The operating system begins it again when OB1 has been performd. Cyclic execution of OB1 is started after the startup has been completed. You can identify other blocks function such as FBs, SFBs or functions such as, FCs, SFCs in OB1.
The Understanding OB1Operation
OB1 has the lowest priority of all of the OBs whose operate-times are observed, or all other OBs except for OB90 can break off the OB1implementation. The following occurrences reason the OB1operating system:
• The startup is completed.
• The OB1execution has ended.
The operating system transmits global data when OB1 has been implemented. The operating system engraves the output table of process-image to the modules of output, updates the process-image input table and accepts any global data for the CPU before restarting OB1. S7 checks the maximum scan time, make sure a highest response time. The value for the highest scan time is preset to 150 msec. You can put a new assessment or you can regenerate the monitoring time wherever within your program with SFC43 "RE_TRIGR." The operating system defines OB80 (time error OB); if OB80 is not programmed, the CPU adjusts to the mode of STOP if your program goes beyond the highest cycle time for OB1.
Separately from monitoring the highest scan time, it is also probable to assurance a lowest scan time. The operating system will wait the initiate of a new cycle until the lowest scan time has been achieved. It is referring the parameters ranges "highest" and "lowest" scan time. You adjust parameter settings with STEP 7.
Conditions That Affect Time of Day Interrupt OBs
As a time-of-day break off happens only at particular intervals, convinced conditions can influence the OB operation during the implementation of your program. Below shows some of these conditions and explains the consequence on the implementation of the time-of-day interrupt OB.
Your program defines as SFC29 (CAN_TINT) and terminates a time-of-day break off. The operating system clears the initiate event (DATE_AND_TIME) for the time-of-day break off. You have to set the initiate event again and make active it before the OB can be recalled again. Your program challenged to trigger a time-of day interrupt OB, but the OB was not saved on the CPU. The operating system defines as OB85. The CPU amends to the mode of STOP if OB85 has not been programmed.
Hardware Interrupt Organization Blocks OB40 to OB47 of Siemen STEP 7
S7 offers up to 8 interrupts of independent hardware each with its own OB. You identify the following for every module of signal that will activate hardware interrupts by allocating parameters with STEP 7:
• Which channels activate an interrupt of hardware under what conditions.
• Which interrupt of hardware OB is allocated to the individual channels groups, as default, all interrupts of hardware are processed by OB40.
You allocate these parameters with their own software using CPs and FMs. You choose the classes of priority for the individual interrupt of hardware OBs using STEP 7.
The Operation of Hardware Interrupt OBs Understanding
The operating systems recognize the slot and the communicating interrupt OB of hardware after an interrupt of hardware has been activated using the module. It will be initiated if this OB has a higher priority than the now active priority class. The channel definite acknowledgement is sent after this interrupt of OB hardware has been implemented. If a different event that activates an interrupt of hardware happens on the same module during the time between hardware interrupt classification and acknowledgement, the following concerning:
• If the event happens on the channel that formerly activated the interrupt of hardware, afterward the new interrupt is missing. The activating event is the increasing edge. The interrupt of OB hardware is OB40.
• If the event happens on a different channel of the similar module, then no interrupt of hardware can presently be activated. This interrupt, nevertheless, is not missing, but is activated after the currently active hardware acknowledgement interrupt.
• If an interrupt of hardware is activated and its OB is presently active because of an interrupt of hardware from a different module, the new application is recorded and the OB practiced when it is free.
You can delay or disable and re-allow interrupts of hardware with SFCs 39 to 42. You can allocate parameters for the interrupts of hardware a module not only with STEP 7 but also through SFCs 55 to 57.
Hardware Interrupt OBs Local Data
The temporary variables (TEMP) for an interrupt of OB hardware. The names of variable are the OB40default names. If you are using a DPV1 accomplished CPU you can acquire extra information on the interrupt with the SFB54 "RALRM" help which goes beyond the beginning OB information. These also apply when you run the DP Master in compatible mode of S7.
Labels:
Siemens PLC
Siemens PLC