Real-Time Windows Target | ![]() ![]() |
Counter Input Block
This Real -Time Windows Target I/O blocks allow you to select and connect specific counter input channels to your Simulink model.
After you have added a Counter Input block to your Simulink model, you can enter the parameters for this I/O driver. This procedure uses Humusoft's MF604 I/O board as an example:
never
-- Do not reset after reading.
always
-- Always reset after reading.
level
-- Reset after reading is 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.
none
-- Gate is disabled.
enable when high
-- Counting is disabled when the gate is low and enabled when the gate is high.
enable when low
-- Counting is disabled when the gate is high and enabled when the gate is low.
start on rising edge
-- Counting is disabled until low to high transition of the gate occurs.
start on falling edge
-- Counting is disabled until high to low transition of the gate occurs.
reset on rising edge
-- Counter is reset when low to high transition of the gate occurs.
reset on falling edge
-- Counter is reset when high to low transition of the gate occurs.
latch on rising edge
-- The count of the counter is remembered when low to high transition of the gate occurs.
latch on falling edge
-- The count of the counter is remembered when high to low transition of the gate occurs.
latch & reset on rising edge
-- The count of the counter is remembered and then the counter is reset when low to high transition of the gate occurs.
latch & reset on falling edge
-- The count of the counter is remembered and then the counter is reset when high to low transition of the gate occurs.
![]() | Digital Output Block | Encoder Input Block | ![]() |