User`s guide
4 Advanced Procedures
4-20
1 Double-click the Counter Input block.
The
Block Parameters: Counter Input dialog box opens.
2 In the Sample time box, enter the same value you entered in the Fixed step
size
box from the Configuration Parameters dialog box. For example,
enter
0.001
3 In the Input channels box, enter a channel vector that selects the counter
input channels you are using on this board. The vector can be any valid
MATLAB vector form. For example, to select all four counter input channels
on the MF604 board, enter
[1,2,3,4] or [1:4]
4 From Reset after read, which determines if the counter should be reset to
zero after its value has been read, choose one of the following options:
-
never — Do not reset after reading.
-
always — Always reset after reading.
-
level — Reset after reading if block input is nonzero. This will add an
input to the Counter Input block.
-
rising edge — Reset after reading if block input changes from zero to
nonzero between the last two successive readings. This will add an input
to the Counter Input block.
-
falling edge — Reset after reading if the block input changes from
nonzero to zero between last two successive readings. This will add an
input to the Counter Input block.
-
either edge — Reset after reading if the block input changes either from
zero to nonzero or from nonzero to zero between the last two successive
readings. This will add an input to the Counter Input block.