04-11-2025 12:15 PM
Hi everyone,
I'm new to LabVIEW and I'm trying to create a simple voltage pulse generator using the PCI-6115.
What I need is to apply a positive or negative voltage bias for a specified duration. Essentially, I want to generate a single, user-defined voltage pulse — something like a half-period square wave. For example, when I start the generator, the output should jump to +10V (or any custom amplitude), stay at that level for 10 ms (customizable pulse width), and then return to 0V. After that, the program can stop.
So the key features I'm looking to implement are:
Configurable pulse amplitude (e.g., +10V or -10V)
Configurable pulse width (e.g., 10 ms)
One-shot behavior (not continuous waveform)
Could anyone provide some guidance or example code on how to implement this with the PCI-6115 in LabVIEW?
Thanks in advance for your help!
04-11-2025 02:01 PM
Look at this example:
<examples>\DAQmx\Analog Output\Voltage - Finite Output.vi
Also, this post may also be relevant:
https://forums.ni.com/t5/LabVIEW/Ramp-signal-generation-using-NI-9263-module-with-selectable/td-p/44...
Try this VI to compute the pulse:
Multiply time-based parameters by sample rate to convert from time to samples.
04-11-2025 03:25 PM - edited 04-11-2025 03:26 PM
Hi Doug,
thanks for your quick reply. I tried, LabVIEW is actually quite fun. I was able to output a voltage, hurray. However, could you provide me guidance on turning off the voltage immediately after the specified pulse duration, as the output would stay at the same value after the pulse duration? (for 10s pulse duration I would need a 1000 sampling rate and 10000 samples?).
Thanks!
04-11-2025 08:54 PM - edited 04-11-2025 08:57 PM
Always end your ramp with a zero-value sample.
And yes, you would need 10000+1 samples to generate 10 s pulse (with a trailing zero) at 1 kHz sample rate.