Processing Interrupts - Siemens SIMATIC FM 450-1 Manual

Counter function module installation and parameter assignment
Table of Contents

Advertisement

7.8

Processing Interrupts

Registering at the
Depending on the parameters assigned, the counter module can initiate pro-
Interrupt Server
cess interrupts and/or diagnostics interrupts. In order to receive process inter-
rupts and diagnostics interrupts, the counter channel must be registered with
the interrupt server. For this purpose, you must call the following functions:
See the System Software for M7-300 and M7-400 Programming Manual for
details of how to work with the interrupt server.
Evaluating
Your parameter assignments determine if the counter module is to initiate
Process Interrupts
process interrupts and if so which process interrupts it is to initiate (see
Table12-1). If required, you define the responses to process interrupts in the
program.
Evaluating
If a diagnostics interrupt is signaled by the interrupt server you must evaluate
Diagnostics
the signal (data set DS0) in order to determine the cause of the interrupt. You
Interrupts
can call the following functions from the counter function library to get addi-
tional information:
M7CntReadDiag
By calling the M7CntReadDiag function, you can scan additional informa-
tion on the channel error. When the function is called, the diagnostics data set
DS1 is read. Data set DS1 contains the additional channel-specific diagnos-
tics information. The first 4 bytes of DS1 contain the current DS0 data set.
The diagnostics interrupts and data sets DS0 and DS1 are explained in
Chapter 13.
M7CntRead
If the cause of the diagnostics interrupt is a parameter assignment error, you
ParError
can scan more detailed information with the M7CntReadParError function.
The M7CntReadParError function returns an error number that indicates a
data error in the M7CNT_PARAM structure. From this you can determine
which parameterization datum contains the error or has been assigned an ille-
gal value and you can reparameterize the counter module accordingly.
FM 450-1 Counter Function Module
C79000-G7076-C450-01
www.gkbpx.com
Programming in M7 with the Counter Function Library
M7LinkIOAlarm, to receive process interrupts
M7LinkDiagAlarm, to receive diagnostics interrupts
M7CntReadDiag, if the diagnosis is 'Error in one channel'.
M7CntReadParError, if the diagnosis is 'Parameter assignment error'.
该文档是极速PDF编辑器生成,
如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
7
7-11

Advertisement

Table of Contents
loading

Table of Contents