zsom:control:examples:dac_waveform

Example: DAC waveform

This example generates a pattern (for example a sine wave) and sends it via FIFO to channel 1 of the analog outputs of the ZSOM-Control.

Project: ZSOM-Control_DAC_waveform.lvproj. In LabVIEW, open Help → Find Examples and search for “ZSOM”.

DAC waveform example, front panel
RT code: front panel

Control Function
type Shape of the pattern, for example sine or square
Frequency Frequency of the pattern in Hz (default 1000)
Amplitude Amplitude in V (default 4)
Offset Offset in V (default 0)
Indicator Function
generated pattern The pattern that is sent to the DAC
acheivable frequency The frequency that can be reached with the generated pattern
sampling periode [us] Time between two samples in µs
update DAC Lights up while a new pattern is transferred to the FPGA
  • RT (DAC_waveform_RT_main.vi): Loads and starts the FPGA. When a setting changes, the VI DAC wave generator.vi calculates a new pattern and the RT writes it to the FIFO of DAC channel 1.
  • FPGA (DAC_waveform_FPGA_main.vi): Reads the pattern from the FIFO into a memory block and outputs one value after the other at the calculated sampling period. All channels are updated simultaneously.
  • DAC wave generator (DAC wave generator.vi): Calculates the pattern from type, frequency, amplitude and offset. The pattern has at most 1024 samples and at least 10 samples, the minimum sampling interval is 5 µs. The output is limited to ±10 V.

Front panel of DAC wave generator.vi
RT code: front panel (SubVI DAC wave generator.vi)

Block diagram of the RT VI
RT code: block diagram

Block diagram of DAC wave generator.vi
RT code: block diagram (SubVI DAC wave generator.vi)

Block diagram of the FPGA VI
FPGA code: block diagram

  • Last modified: 4 weeks ago