Specify direction of counter channel
When working with the session-based interface, use the CountDirection
property
to set the direction of the counter. Count direction can be 'Increment',
in which case the counter operates in incremental order, or 'Decrement',
in which the counter operates in decrements.
Create a session object, add a counter input channel, and change
the CountDirection
.
s = daq.createSession('ni'); ch = addCounterInputChannel (s,'cDAQ1Mod5', 0, 'EdgeCount')
ch = Data acquisition counter input edge count channel 'ctr0' on device 'cDAQ1Mod5': ActiveEdge: Rising CountDirection: Increment InitialCount: 0 Terminal: 'PFI8' Name: empty ID: 'ctr0' Device: [1x1 daq.ni.DeviceInfo] MeasurementType: 'EdgeCount'
Change CountDirection
to 'Decrement'
:
ch.CountDirection = 'Decrement'
ch = Data acquisition counter input edge count channel 'ctr0' on device 'cDAQ1Mod5': ActiveEdge: Rising CountDirection: Decrement InitialCount: 0 Terminal: 'PFI8' Name: empty ID: 'ctr0' Device: [1x1 daq.ni.DeviceInfo] MeasurementType: 'EdgeCount'