Interrupts - Siemens SIMATIC FM 452 Manual

Electronic cam controller installation and parameter assignment
Table of Contents

Advertisement

Programming the FM 452
6.7

Interrupts

Interrupt Handling
The FM 452 can trigger hardware interrupts and diagnostic interrupts. You service
these interrupts in an interrupt OB. If an interrupt is triggered and the
corresponding OB is not loaded, the CPU changes to STOP (refer to the manual
Programming with STEP 7).
You can enable interrupt servicing at the following levels:
1. Enabling general interrupts for the entire module:
– Select the module in HW Config
– Using the menu command Edit > Object Properties > Basic Parameters,
enable diagnostic and/or hardware interrupts.
– Select the OB number for the hardware interrupt using Edit > Object
Properties > Addresses.
– Save and compile the hardware configuration.
– Download the hardware configuration to the CPU.
2. Enabling events for hardware interrupts in the machine data.
3. Setting parameters for hardware interrupts in the cam data for cams 0 to 7.
Evaluation of a Hardware Interrupt
If a hardware interrupt is triggered by the FM 452, the following information is
available in the variable OB40_POINT_ADDR (or in the corresponding variable of
a different hardware interrupt OB):
Table 6-2
Contents of the Double Word OB40_POINT_ADDR
Byte
Bit 7
0
0
1
0
2
Cam 7
on
3
Cam 3
on
You can see the cause of the interrupt in Byte 1:
Cam:
Evaluate byte 2 and byte 3 according to the table.
Measurement start/measurement end:
Using the CAM_MSRM function, you can read the current measured values
from the module.
6-16
Bit 6
Bit 5
Bit 4
0
0
0
0
Start of
0
meas.
Cam 7
Cam 6
Cam 6
off
on
off
Cam 3
Cam 2
Cam 2
off
on
off
Bit 3
Bit 2
Bit 1
0
0
0
0
Cam
End of
meas.
Cam 5
Cam 5
Cam 4
on
off
on
Cam 1
Cam 1
Cam 0
on
off
on
FM 452 Electronic Cam Controller
C79000-G7076-C452-04
Bit 0
0
0
Cam 4
off
Cam 0
off

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents