This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Frequency of generated output


When working with counter input channels, use the Frequency property to set the pulse repetition rate of a counter input channel.

When working with function generation channel, data acquisition sessions, the rate of a waveform is controlled by the channel Frequency property. To synchronize all operation sin the session, set each channel generation rate individually, and change the session Rate to match the channel generation rate.

The frequency value must fall within the specified FrequencyLimit values.


Specify the frequency in hertz.


Set the Frequency of a Counter Input Channel

Create a session object and add a 'PulseGeneration' counter output channel:

s = daq.createSession('ni');
ch = addCounterOutputChannel(s,'cDAQ1Mod5', 'ctr0', 'PulseGeneration')

Change the Frequency to 200 and display the channel:

ch.Frequency = 200;


ans = 

Data acquisition counter output pulse generation channel 'ctr0' on device 'cDAQ1Mod5':

       IdleState: Low
    InitialDelay: 2.5e-008
       Frequency: 200
       DutyCycle: 0.5
        Terminal: 'PFI12'
            Name: empty
              ID: 'ctr0'
          Device: [1x1]
 MeasurementType: 'PulseGeneration'

Set the Frequency of a Function Generator Channel

Create a waveform generation channel, and change the generation rate to 20000 scans per second.

s = daq.createSession('digilent'):
fgenCh = addFunctionGeneratorChannel(s, 'AD1', 1, 'Sine'
fgenCh.Frequency = 20000
fgenCh = 

Data acquisition sine waveform generator '1' on device 'AD1':

              Phase: 0
              Range: -5.0 to +5.0 Volts
     TerminalConfig: SingleEnded
               Gain: 1
             Offset: 0
          Frequency: 20000
       WaveformType: Sine
     FrequencyLimit: [0.0 25000000.0]
               Name: ''
                 ID: '1'
             Device: [1x1 daq.di.DeviceInfo]
    MeasurementType: 'Voltage'


You can change the channel frequency while the session is running when using counter output channels.

Was this topic helpful?