Data Exchange with the SM 335
3-5
SM 335 – High-Speed Analog Input/Output Module for the SIMATIC S7-300
6ES7 335-7HG00-8BA1
Number of end-of-cycle interrupts ( 8)
A user program can be synchronized via OB 40 using the end-of-cycle interrupt.
Fast processing of the user program is also possible via the interrupt (e. g., for ad-
justment routines).
There are however situations in which the SM 335 cannot send an interrupt:
•
when several hardware interrupts occur simultaneously, or
•
in the special “Comparator” mode.
The SM 335 suppresses end-of-cycle interrupts when the Comparator mode is en-
abled.
The SM 335 enters the number of suppressed end-of-cycle interrupts (1 + number
of suppressed end-of-cycle interrupts) in byte 8 when the “Comparator
mode” is exited.
Example: Content of byte 8 = 5, i. e., for 5 end-of-cycle interrupts, OB 40 is called
only once.
The value is also stored in the local data of OB 40 (see Subsection 3.4.1, Hard-
ware interrupt). Evaluation via OB 40 has the advantage of ensuring the consis-
tency of the measured value and the number end-of-cycle interrupts.
Return code ( 9)
When the “Comparator” or “Measuring Only” mode is activated, the SM 335
SM 335 enters the return code in byte 9. Figure 3-1 shows the format of
the return code:
Error code
Measuring Only is active/was last active mode
Comparator is active/was last active mode
Measured value not current
Measuring Only/Comparator mode activated
7
6
5
4
3
2
1
0
Parameter assignment error
Fig. 3-1
SM 335 Return Codes
The return code bits, with their descriptions, are shown in Table 3-2.
Comparator mode is displayed instead of the return code on power-up of the
SM 335.