3.3 - LJfg [U12 Datasheet] | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


3.3 - LJfg [U12 Datasheet]

This application allows the LabJack U12 to be used as a simple function generator. The DLL function “AOUpdate” is called every 25 milliseconds providing an update rate of 40 Hz, and thus a maximum reasonable signal frequency of a few Hertz.

Figure 3.3-1. LJfg



I try to create a PWM signal (withadjustable amplitude and frequency) with U12 & LabView but i didn't succeed

so i am using this exemple but the amplitude and the frequency of the signal i measure in my oscilloscope are not the frequency and the amplitude that i put on labview interface.

Coul you help me please.


Ronan SY

If you run LJfg with the default settings, shown above, does that work?  If not, what do you see on the scope?


i m wondering if there is something like the Ljfg for the U3 and how much is the maximum frequency on the U3?


Best regards

The short answer is no, there is no utility for the U3.  However, you can program the DAC0 and DAC1 analog output lines to output a sine wave in almost any software environment using the sin() function.  The max frequency is on the order of 1kHz, based on typical USB transit times.  If you're interested in outputting a digital waveform, there is a tool in LJControlPanel.


i m trying to use an U3 to generate an analog output( square form or triangular), i succesed to run some of the examples given in your website.

Is here an example of how to generate an analog output or some function that could do that?


Thank you

Digital I/O lines(FIO, EIO, CIO) can produce square waveforms from 0V to 3.3V.  These are handled by what we refer to as 'timers and counters'.  Please reference example code for timers and counters.

The DAC0/DAC1 analog outputs can output any voltage between 0 and ~5V.  Thus, you could create a 0 to 5V square wave, but it would not be as fast (lower output frequency than the digital I/O timers/counters).  The DAC0/DAC1 lines are the only lines that can create sine waves and triangle waves.  Please reference documentation and example code about the DAC0/DAC1 analog outputs for further information.

Thank you for your response :)
Yes i use the timers and counters on LJControlPanel to generate an output but how can we change the amplitude of the signal because all what i got is a 3.3V output with different frequency but i d like to have something with 1V


Best regards

Note that this web page is for a U12 example application called LJfg.

For good general information see the Waveform Generation App Note.

For the "Software Timing, Command-Response Updates" technique with a DAC output in LabVIEW, look at the example "U3 DAC Function Generator.vi".

For the "Square or Rectangular Output at Voltages other than 3.3V" technique with a Timer output on a DO, you would set DAC0 to 1.0V and then use the Timer DO to control some external switch that is gating DAC0.  There are various options for such switches, but a likely option is a RIRO op-amp with shutdown feature.