© National Instruments
|
3-5
Using a Pause Trigger
To configure the counter to pause counting based on a hardware signal, use a Pause Trigger.
1.
Set Pause.TrigType to Digital Level.
2.
Set Pause.DigLvl.Src to select what signal to use as the Pause Trigger.
3.
Set Pause.DigLvl.When to select whether to pause counting when the signal is high or low.
Figure 3-6 shows an example of a count edge task using a Pause Trigger.
Figure 3-6.
Edge Counting: Using a Pause Trigger
Using a Reset Trigger
To configure the counter to reset the count to a specific value in response to a hardware signal,
set the following DAQmx Channel properties:
1.
Set CI.CountEdges.CountReset.Enable to True.
2.
Set CI.CountEdges.CountReset.Term to select the signal that causes the count to reset.
3.
Set CI.CountEdges.CountReset.ActiveEdge to select whether the rising or falling edge of
the signal causes a reset.
4.
Set CI.CountEdges.ResetCnt to the value to change the count to in response to the signal.
Figure 3-7 shows an example using the Reset Trigger with CI.CountEdges.InitialCnt set to 6,
CI.CountEdges.CountReset.Active Edge set to rising edge, and CI.CountEdges.ResetCnt set
to 3.
Figure 3-7.
Edge Counting: Using a Reset Trigger
S
t
a
rt T
as
k
S
ign
a
l to Me
asu
re
P
aus
e Trigger
S
o
u
rce
Co
u
nt
1
0
5
4
3
2
6
S
t
a
rt T
as
k
S
ign
a
l to Me
asu
re
Co
u
nt Re
s
et Termin
a
l
Co
u
nt
7
6
5
4
3
8
6
9
3
5
4