LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview DAQ assistant analog in digital output

Solved!
Go to solution

I am new to Labview. I am trying to convert analog signal to digital using NI USB 6251 DAQ. I am able to get the said task using 1 sample (on demand) only. Anyone please help me to do it for N samples such that I can change the sampling rate. I have attached the labview file.

0 Kudos
Message 1 of 9
(3,056 Views)
Solution
Accepted by topic author sujitc43

Hi sujitc,

 


@sujitc43 wrote:

I am new to Labview.


As can be seen by the content of your VI…

Did you notice the "Training resources" offered in the header of the LabVIEW board?

 


@sujitc43 wrote:

I am trying to convert analog signal to digital using NI USB 6251 DAQ.


What is the expected output of this conversion? What is the "digital" output for (let's say) 0.54V analog input, and what is the expected output for 7.89V?

 


@sujitc43 wrote:

I am able to get the said task using 1 sample (on demand) only. Anyone please help me to do it for N samples such that I can change the sampling rate.


You are able to convert that DDT wire into an array of float values.

But you seem not to notice that coercion dot afterwards…

Again: what is the expected digital output for those float voltage values you are reading?

 

Why do you configure one DAQ assistent to give you "1 sample on demand" when you want to acquire at a known sample rate?

 

Btw. instead of relying on those ExpressVIs you should read this!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,014 Views)

Respected Sir, thank you for your kind response. I am trying to convert simple analog signal of 14kHz into serial output. I dont understand "You are able to convert that DDT wire into an array of float values". If you don't mind will you please tell me which block I will add such that the connection get complete.

0 Kudos
Message 3 of 9
(2,977 Views)

Hi sujitc,

 


@sujitc43 wrote:

I am trying to convert simple analog signal of 14kHz into serial output.


I repeat my question from above: What is the expected output for some input voltage signal examples?

How should your "serial output" look like? Why do you need to output that "serial data" using a digital output of your DAQ device? Please explain the "big picture" of your task!

 


@sujitc43 wrote:

I dont understand "You are able to convert that DDT wire into an array of float values".


You get an array of float values: please explain how the corresponding output signal should look like!

We need to get more information about your task before we are able to help you…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(2,922 Views)

Thank you for your kind response.

I want to convert analog signal (sine or triangle) of maximum 14kHz into digital logic (TTL level 0-5V) to drive my circuit. I want the to use labview to convert the analog signal into digital one.

0 Kudos
Message 5 of 9
(2,919 Views)

Hi sujitc,

 


@sujitc43 wrote:

I want to convert analog signal (sine or triangle) of maximum 14kHz into digital logic (TTL level 0-5V) to drive my circuit.


Again: please provide some examples as requested above!

What is the expected output for an input of 0.5V and what is the expected output for 7.89V?

What kind of signal does "your circuit" expect?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(2,917 Views)

Hi sujitc,

 

I am trying to convert simple analog signal of 14kHz into serial output.

Which kind of "serial output"?

RS232, RS485, RS422, CAN/CANopen, Modbus/RTU, I²C, I²S, … ?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,893 Views)

Sorry for late rrsponse. I am using RS232 standard.

0 Kudos
Message 8 of 9
(2,879 Views)

Hi sujitc,

 

then why do you think you need to use the DaqAssistent to output data over the serial port?

Why don't you examine the example VIs on serial communication as provided by the example finder?

Best regards,
GerdW


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