Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to continuously generate a triangle shaped signal with a time interval between the consecutive generated triangle signals

Hi 

 

I want to generate a triangle-shaped signal continuously a having slope of 1v/s, starting voltage 0v, a peak voltage of +5v. The next triangle signal should start 1 sec after the prior triangle finishes. The resting voltage should be 0v, I need the highest resolution possible. I am using PCI-MIO-16E-1 board. 

 

Thanks

0 Kudos
Message 1 of 5
(1,210 Views)

Are you talking about "highest" time resolution or voltage resolution? Your hardware is just 12 bits. The output speed can be up to 1MS/s, but since you only have 12 bits you can go much slower without losing anything in each ramp. Do the math.

 

What software are you trying to use (LabVIEW? Something else?)

0 Kudos
Message 2 of 5
(1,200 Views)

Building on the points already made by altenbach, 12 bits means 2^12=4096 discrete digitized voltage levels.  The most appropriate voltage range your device supports is 0-10 V.  You'll only be using half that range, so you'll have 2048 discrete voltage levels to work with in the 0-5 V range.  That makes discrete increments of about 2.5 mV.

 

You'll be going up and back down that triangle in 5 seconds, so you can *usefully* change output levels at a rate of only 4096 changes / 5 sec = 819.2 Hz.  Like altenbach said, nowhere near 1 MHz.

 

So if you set your sample rate for 819.2 Hz, you can hit every available voltage level with a single sample as you ramp up from 0 to 5 and back down again.  Then append another 819 zero values at the end to occupy the 1 second between triangles.

 

Here's how it'd look in LabVIEW:

 

Kevin_Price_0-1632797740364.png

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 5
(1,182 Views)

If you like to use the full 12-bit resolution, you can wire an external +5V reference on AO_EXT_REF terminal, this would give you a resolution of 1.22mV.

santo_13_0-1632801843774.png

 

The downside is the stability and accuracy of the external 5V reference.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 5
(1,174 Views)

Or simply use a voltage divider to get down to 5V 🙂

Just keep in mind that the input impedance of whatever is following add to the divider 😉

 

To increase the resolution one would switch to other hardware .. however to push it with the stuff you have, you can think about a PWM modulation with max DA samplerate and toggle the least significant bit... followed by a lowpass filter...

 

To get the cleanest ramps (no steps), the classical way would be a adjustable current source driving a capacitor...

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(1,164 Views)