M7 Reference Counter Function Library
12.9 M7CntLoadPrep
Function
Syntax
Description
Note
12
Return Value
See Also
12-12
www.gkbpx.com
Prepare Loading of the Counter Channel
#include <m7cnt.h>
M7ERR_CODE M7CntLoadPrep(
M7CNT_LOGCHANNEL LogChannel,
DWORD LoadVal);
Parameter
LogChannel
LoadVal
The function transfers the load value (LoadVal) specified when the call was
made, into the counter-internal load register. From there, the load value is
transferred into the counter channel and counted further from there if:
a hardware pulse is present at the SET or START input
an overflow or an underflow occurs (and a periodic operating mode is set)
the M7CntStart function is called
The load value is interpreted in accordance with the count mode set for the
counter channel. Please ensure that the load value specified is within the
count range of the count mode set (cf. Table 12-1).
You can then read the current load value with the M7CntReadLoadValue
function. However, the function only supplies the new load value when one
of the three conditions has occurred and one count pulse has been received.
0
The function has been executed successfully
0
An error has occurred
Error Code
M7CNTE_NO_LOGCHANNEL
Function: M7CntInit, M7CntLoadAndStart, M7CntLoadDirect,
M7CntReadLoadValue
Meaning
Logical channel number, detected by
M7CntInit
Load value
Meaning
The channel specified when calling (LogChannel
parameter) is not valid.
FM 450-1 Counter Function Module
C79000-G7076-C450-01
该文档是极速PDF编辑器生成,
如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/