Frequency

Frequency of generated output

Description

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's Frequency property. To synchronize all operation sin the session, set each channel's generation rate individually, and change the session Rate to match the channel's generation rate.

The frequency value must fall within the specified FrequencyLimit values.

Values

Specify the frequency in hertz.

Examples

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;

ch

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 daq.ni.DeviceInfo]
 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'
Was this topic helpful?