Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set the amplitude of complete pwm example?

Solved!
Go to solution

I have successfully downloaded and executed the sample program shown here:

 

http://www.ni.com/white-paper/2991/en

 

and see the pulse train generate in my oscilloscope.  When measuring the value of a pulse high, the oscilloscope says 5V. 

 

How do I change it to 3?

 

Looking at the DAQ Create Channel node I don't see any inputs for amplitude, only frequency and duty cycle.

Where is the amplitude of 5volts being set and how can I change it to 3V?

0 Kudos
Message 1 of 8
(6,990 Views)

Counter outputs are typically TTL level (~0-5V) and cannot be changed programatically.

 

You could use a resistive divider to scale it down to 3V.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 8
(6,981 Views)

Are you suggesting I feed the counter output into a breadboard and then use two resistors in a voltage divider circuit to get my 3V?

 

Also, is there any other way to do this besides using counters? Is it possible to use Analog Output? If so, is there an example?

0 Kudos
Message 3 of 8
(6,976 Views)

I modified one of Analog Output the shipping examples, adding a duty cycle and offset control.

 

-AK2DM (applies well here!)

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 8
(6,964 Views)

Did not attach, trying again.

 

Cant attach 😞

 

Search examples for: Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi and add controls for duty cycle and offset and adjust as needed to get your desired waveform.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 5 of 8
(6,962 Views)

Hi AK2DM -

 

Are you talking about this:

 

https://decibel.ni.com/content/docs/DOC-3545

 

I will certainly try this out when I get to my lab and make another posting.

 

This may be a stupid question, but does this function get generated in hardware or software? I prefer hardware because it's supposed to be more exact.

 

0 Kudos
Message 6 of 8
(6,957 Views)
Solution
Accepted by topic author invasion2121

Very similar. On the icons above the step 5 text box, you have to right click on the appropriate terminals to add controls for Offset and Duty Cycle.

Timing/generation is done via hardware in this case.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 7 of 8
(6,949 Views)

Still can't attach, egh, probably my outdated browser, never had this issue before.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 8 of 8
(6,948 Views)