Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

square generator on click

I need an information for the software LABVIEW
Is it possible to create a square generator wich generate a 5 Volts of amplitude when you push a button and stopped when release the same button?
the frequency must be 100k HZ and the device is an USB 6218.
thank you in advance for your help
0 Kudos
Message 1 of 2
(5,678 Views)

Hi Giakko,

 

let me check if I understood correctly: you wish to generat a 0-5V pulse train with a 100 kHz frequency that can be started and stopped by pressing a button? If so, start from the following example:

 

C:\Program Files\National Instruments\LabVIEW 8.6\examples\DAQmx\Counter\Generate Pulse.llb\Gen Dig Pulse Train-Continuous.vi

 

Once you checked that the purpose of this example si what you want to do, then add the start/stop functionality by first enclosing the DAQmx Start Task function into a case structure driven by your push botton. Once the generation is started you can control the end of pulse generation by connecting the wire out of the push button control directly to the stop condition of the while loop you see into the example. For example, if the button has been pushed when you started the generation, it assued a TRUE value. So you will set the while loop to "continue if true" condition in order to stop the loop when the button will be set again to FALSE value.  

 

Hope this helps,

 

Fabio

 

 

Fabio M.
NI
Principal Engineer
0 Kudos
Message 2 of 2
(5,667 Views)