Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Pulse Train with Frequency Update using Event Structure

Overview
The example is to demonstrate how to insert the frequency parameters while the VI is already running

Description:
Using the event structure, the VI would work to generate a pulse train signal with a pre defined frequency and would change the output's frequency as soon as the user change the parameters while the VI is running

Steps to Implement or Execute Code:

To implement this example:

  1. Define the Output Physical Channel
  2. Set the value of the parameters as needed
  3. Run the VI
  4. (Optional) Turn on the Highlight Execution to see the flow of the VI


To execute this example:

  1. Install the required software.
  2. Connect the DAQ hardware that supports the Counter features
  3. Confirm the connection with the MAX with TestPanel
  4. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 16.0 or compatible

Hardware
cDAQ with C series Counter Output Module

 

fp.PNG

 

bd.PNG

 

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

Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

Comments
Member MathMach
Member

I implemented this VI with a SensorDAQ interface. One problem is that the SensorDAQ does not support on-the-fly frequency changes, so that I have to stop the task, change the frequency and restart the task--not terribly serious for my application. More serious is the fact that the actual frequencies I get are all integral fractions of the interface's maximum frequency. That means I get either 366.2109 Hz or 183.1055 with nothing in between. Is there any way to get arbitrary frequencies (say, 200 Hz 250 Hz)