To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example allows the user to create markers in the data using a keypress event.
Description
The VI is adapted from the "Cont Acq&Graph Voltage-int clk.vi" DAQmx example.A zero value "marker" waveform is generated and inserted into the DAQmx waveform array. The marker waveform inherits its properties from the waveforms generated by the DAQmx read function, and its chunk size is determined by the "Samples to Read" control, ensuring that it will fit seamlessly alongside the measured data.When the user presses the "Enter" key on the numeric keypad, a "spike" of user-specified magnitude is inserted into the marker waveform, creating a visual marker in the graph. If the data is written to a file, this marker data can be used as a reference in the file, too.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Download and open the VI
Set the acquisition parameters.
Set the reference marker parameters.
Run the VI.
Press "Enter" (on the numeric keypad) to insert a spike in the marker waveform.
Additional Information or References
Additional Notes
The DAQmx Read VI must be set to "N Chan N Samp" with a waveform output type. The marker waveform is inserted into the DAQmx waveform array using the "Insert Into Array" function, and assumes that the DAQmx Read is passing a 1D array of waveform. If a single waveform is passed by DAQmx, "Insert Into Array" must be replaced by "Build Waveform."
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.