Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get a continuous square wave of 50% duty cycle out on one of the analog lines?

Solved!
Go to solution
Hello, I recently just had to buy an analog card  to our system and I am still very new to labview.  I have the PXI-6723, and I need to output a square wave from 0 to 5 volts continuosly.  I have used the square wave generator, and used a write funtion to one of the ports.  This produces a momentary wave and this is it.  I have tried putting a while loop around the square wave function and monitored that.  It continuosly produces the plots but the write function still does the same.  If I stick the write function inside the loop I get errors.   Any help would be greatly appreciated.  Thanks, Fred
0 Kudos
Message 1 of 5
(7,321 Views)

Have you tried any of the shipping examples? A basic one is called Con Gen Voltage Wfm-Int Clk. You don't need any type of while loop to continuously output a waveform. You can specify that with the DAQmx Timing function.

 

p.s. You don't have an NI Signal Generator board. It is probably more appropriate to post to the multifunction DAQ board if you have new questions.

0 Kudos
Message 2 of 5
(7,319 Views)
Yes I have already tried that, but there is no offset to stop it from going below 0.  I need the square wave to stay from 0 to 5 volts. 
0 Kudos
Message 3 of 5
(7,309 Views)
Solution
Accepted by topic author wana be prog
Use a different function to generate the square wave, modify the Waveform Buffer Generation (the subVI used) and connect a control to the offset input of the Basic Function Generator. or just use the add function on the output waveform.
0 Kudos
Message 4 of 5
(7,306 Views)

HA!!  Thanks by the way.  I never entered that VI.  It helped alot. KUDOs to you sir

 

0 Kudos
Message 5 of 5
(7,302 Views)