| Contents | Index |
| On this page… |
|---|
Use the addCounterOutputChannel method to add a channel that generates pulses on a counter/timer subsystem. You can generate on one channel or on multiple channels on the same device using daq.Session.startForeground.
This example generates pulse data on an NI USB-9402 with device ID 'cDAQ1Mod5'.
Step 1. Create a session object and save it to the variable s:
s = daq.createSession('ni');Step 2. Add a counter output channel with a PulseGeneration measurement type:
ch = s.addCounterOutputChannel('cDAQ1Mod5', 0, 'PulseGeneration')
ch =
Data acquisition counter output pulse generation channel 'ctr0' on device 'cDAQ1Mod5':
IdleState: Low
InitialDelay: 2.5e-008
Frequency: 100
DutyCycle: 0.5
Terminal: 'PFI0'
Name: empty
ID: 'ctr0'
Device: [1x1 daq.ni.CompactDAQModule]
MeasurementType: 'PulseGeneration'
Step 3. Generate pulses in the foreground:
s.startForeground;
![]() | Generating Analog Output Signals | Acquire Data and Generate Signals Simultaneously | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |