SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Set the amplitude of a generated square waveform

Hi everybody,

I write you again, hoping you could give me an useful idea for my problem as you did the last time.

I`ve written a program to generate a square waveform with duty cycle sweeping and it works.
The only thing I`m not able to do is to set the peak to peak amplitudite of the waveform and its offeset Smiley Mad

In the end of the post you can find it.

I`m quite sure my problem is really easy to solve but I don`t know how!!! Smiley Sad

Thank you really much for the help!




Message Edited by Jacopo on 03-31-2008 04:41 AM

Message Edited by Jacopo on 03-31-2008 04:43 AM
0 Kudos
Message 1 of 4
(6,348 Views)
The amplitude or the offset of a counter output can't be changed ! But you could solve your task by using an analog output.

Which DAQ board do you use ? Has it an analog output ?
0 Kudos
Message 2 of 4
(6,340 Views)
Hi,

my DAQ board is
PCI 6259.

I think I could use the analog output to generate the  square wave with the offset and the amplitude I want, but is still possible to
change the duty cycle as I do in the program I posted ? Smiley Indifferent

I ask you, cause my final purpose is to have a square waveform with the duty cycle changing in a continuos way... Smiley Sad

0 Kudos
Message 3 of 4
(6,335 Views)
Dear Jacopo,
JB correctly pointed out that counter output are digital TTL so you can't change amplitude nor offset.
 
However you can change Output frequency in analog output tasks and rewrite new analog waveform while the task is running (M series board 62xx are needed).
 
Please check the examples Hardware InputAndOutput>>DAQmx>>Analog Generation>>Current>>Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi and Cont Gen Voltage Wfm-Int Clk-Variable Rate.vi you should be able to get all the information you need from them.
 
Best Regards
 
FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 4 of 4
(6,322 Views)