From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Digital to analog conversion labview

If I have an analog signal on LabVIEW,  I have to convert the data to digital first???.. Do you have some example with the comunication I2C on LabVIEW to use a DAC?.

 

Help me . I'm trying to generate a finite triangule analog signal. And configurate the scan rate and other properties on LabVIEW. So at the end I need a real signal .

0 Kudos
Message 1 of 13
(5,399 Views)

Hi ykgr,

 

So at the end I need a real signal .

Would you please describe the DAQ hardware you currently use or want to use?

 

Do you have some example with the comunication I2C on LabVIEW to use a DAC?

How is "I2C" related to "DAC" and your general question of "outputting an analog signal"?

 

- Each DAQ hardware comes with example VIs (or should atleast).

- When you use DAQ devices from NI you should go through all those example VIs coming with LabVIEW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(5,386 Views)

@ykgr08 wrote:

If I have an analog signal on LabVIEW,  I have to convert the data to digital first???.. Do you have some example with the comunication I2C on LabVIEW to use a DAC?


1. If you are in any computer language, you have a digital signal.  Computers cannot manipulate analog signals.  That is what DACs are for.

2. What DAC are you using?  What are you using for an I2C interface?

 

You might want to look into using a cheap DAQ from NI since DAQmx will be easier to figure out and there are a lot fewer pieces to figure out.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 13
(5,362 Views)

How can I send the digital value to convert to analog to the DAC over the I2C bus??

 

Do you have some example?

0 Kudos
Message 4 of 13
(5,341 Views)

@ykgr08 wrote:

How can I send the digital value to convert to analog to the DAC over the I2C bus??

 

Do you have some example?


No, I don't but you might find some examples here.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 13
(5,334 Views)

Hi ykgr,

 

please stick with your own thread.

And please answer our questions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(5,330 Views)

Firs I´m using Labview to control an Arduino Uno and the DACMPC4725. 

I used the term "analog" by mistake.

I create an analog wave form in LabVIEW and I want to send that to a DAC using the I2C protocol.

 

In this moment I can send the value between 0-5 using an fill slide. The 819 is for get values of 0 to 4095 because the DACMPC4725 work wiht 12 bits.

But I want to chage the vertical fill slide for the "analog wave form2 that I made or other Labview wave form (sin, triangle, etc) 

Captura.PNG

 

 

 

 

Captura1.PNG

Download All
0 Kudos
Message 7 of 13
(5,186 Views)

@ykgr08 ha escrito:

Firs I´m using Labview to control an Arduino Uno and the DACMPC4725. 

I used the term "analog" by mistake.

I create an analog wave form in LabVIEW and I want to send that to a DAC using the I2C protocol.

 

In this moment I can send the value between 0-5 using an fill slide. The 819 is for get values of 0 to 4095 because the DACMPC4725 work wiht 12 bits.

But I want to chage the vertical fill slide for the "analog wave form2 that I made or other Labview wave form (sin, triangle, etc) 

Captura.PNG

 

Let me Know if I could explain me better. Because I´m new posting in this place and I´m learning how to speak in english.

Sorry for the inconveniences

Regards

 

0 Kudos
Message 8 of 13
(5,184 Views)

Hi ykgr,

 

the waveform function give you an array of values, so you need to use an autoindexing (FOR) loop to output each sample…

 

Hint: Play with those waveform function in a test vi to understand their behaviour. Some simple steps:

1. use a waveform function to generate an array of samples. Display the samples in a graph

2. use a loop to output each single sample to a chart.

3. when you have understand how this works you can incorporate the waveform function in your Arduino/DAC VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 13
(5,170 Views)

I have another question.

How can put in the output the values for get the correct frecuency. Because I have troubles with the timing

0 Kudos
Message 10 of 13
(5,158 Views)