From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Implement FSK with X-Series and DAQmx

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

Code and Documents

Attachment

 

Overview
This VI shows how to configure the pulse in terms of Frequency/Duty Cycle, but can easily be modified to generate a pulse in terms of Time or Ticks.

 

Description

With a cluster named Frequencies,it is easy to change frequency and duty.Frequency shift keying takes place when a counter generates a pulse train of one frequency and duty cycle when the gate is low and a pulse train with different parameters when the gate is high. It is possible to generate similar behavior using NI-DAQmx by monitoring a digital line rather than the counter gate and changing the pulse specifications in software.

 

Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 9.5.5 or compatible
Hardware
NI Multifuntion DAQ Device X series

Steps to Implement or Execute Code
1. Select the Physical Channel which corresponds to the counter you want to output your signal to on the DAQ device. You can also change the Idle State to determine the beginning and end states of the output. If the Idle State is High, the generation will use inverted logic. Additionally, you can set the Initial Delay (in seconds) which will delay the beginning of the pulse train from the start call; this is currently wired to 0.0 on the diagram.
2. Enter the Sample Clock Rate, samples per channel and clock source to configure the timing.
Note: The sample clock rate should be less than half the output PWM Frequency to avoid an over run error.
3. Enter the Frequency and Duty Cycle Min to define the initial pulse parameters.
4. Enter the Signal type, Frequency Duty Cycle Min and Duty Cycle Max to define the pulse train generated.

Note: Use the Measure Period example to verify you are outputting the pulse train on the DAQ device.

 

Additional Information or References

Change detection is only supported on port 0.

 

KnowledgeBase 3NPAIJBP: Can I Perform Frequency Shift Keying (FSK) with NI-DAQmx?

http://digital.ni.com/public.nsf/allkb/270630645F79A49A8625704A005B1DBC

FSK X-Series.png

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

PBear
NI RF

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.