Siemens SIMATIC FM 450-1 Manual page 122

Counter function module installation and parameter assignment
Table of Contents

Advertisement

M7 Reference Counter Function Library
See Also
Example
M7CNT_LOGCHANNEL LogChannel;
M7CNT_PARAM
/*******Initialisierung des DS128def*******/
DS128.IntMask=
DS128.EncSel=
DS128.WireBrk=
DS128.SigEval=
DS128.FilCnt=
DS128.FilDI=
DS128.CntMod=
DS128.SynMod=
DS128.SynZero=
DS128.SigInv=
DS128.ModHWG=
DS128.ConGate=
DS128.ConHWG=
DS128.ConSWG=
DS128.MethDQ0=
DS128.MethDQ1=
DS128.PulsDur=
DS128.HystVal=
DS128.OpMod=
DS128.Reserved12= 0x0;
DS128.Reserved13= 0x0;
DS128.Reserved14= 0x0;
DS128.Reserved15= 0x0;
/******Parameterization of the counter******/
if (M7CntPar(LogChannel,&DS128)!=M7CNT_DONE)
{
/*error handling*/ }
12
12-14
www.gkbpx.com
Function: M7CntInit
Structure: M7CNT_PARAM
#include
<m7cnt.h>
DS128;
M7CNT_NO_INT;
/*Int. mask bits: no interrupt enabled*/
M7CNT_ENC_5V;
/*Receiver select.: 5 V cnt signal*/
M7CNT_WIRE_NON;
/*Diagn. active: no diagn.*/
M7CNT_SIG_1;
/*Signal evaluation: single*/
M7CNT_FCNT_200KHZ;
/*Filter cnt inp.: 200 kHz*/
M7CNT_FDI_200KHZ;
/*Filter dig. inp.: 200 kHz*/
M7CNT_CNTMOD_32BIT; /*Cnt mode: 32 bits w/o sign*/
M7CNT_SYNMOD_ONE;
/*Synch. type: single*/
M7CNT_SYNZERO_NO;
/*Zero mark synch.: w/o zero mark*/
M7CNT_SIGINV_NO;
/*Direction change track B: not inv.*/
M7CNT_HWGATE_LEVEL; /*Gate setting HW gate: level-contr.*/
M7CNT_CONGATE_NO;
/*Gate contr. f. cont. cnt.: disabled*/
M7CNT_CONHWG_NO;
/*HW gate for cont. cnt: disabled*/
M7CNT_CONSWG_NO;
/*SW gate for cont. cnt: disabled*/
M7CNT_DQ_AB;
/*Behavior of output OUT0: switch off*/
M7CNT_DQ_AB;
/*Behavior of output OUT1: switch off*/
200;
/*Pulse duration: 200 ms*/
0x0;
/*Hysteresis: 0 pulses*/
M7CNT_CMOD_BA0;
/*Mode: continuous counting*/
该文档是极速PDF编辑器生成,
如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
FM 450-1 Counter Function Module
C79000-G7076-C450-01

Advertisement

Table of Contents
loading

Table of Contents