Are you using NI hardware? What is going to use the signal? There is a VI called squarewaveform.vi . It is found at functions >> waveform >> waveform generation >> squarewaveform.vi. It has a terminal for frequency. You will need to put this VI in a loop and generate small portions of the wave at a time so that you can vary the frequency.