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: 

How to display dynamic datas and double datas (chart)

Hi all !

 

I would like to display dynamic datas and double datas by using charts.

However, it doesn't work and I don't understand why.

Can you help me to fix that ?

 

Best regards,

 

- John

0 Kudos
Message 1 of 9
(2,768 Views)

Hi John,

 

it "doesn't work" because you used DDT! Using simple datatypes it works as expected…

Best regards,
GerdW


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

Hi !

 

Thanks for your reply !

Question :  What is the difference between dynamic datas and simple datatypes (in this case, double datas) ?

 

Actually, I have used Dynamic data type in order to simulate an signal.

In a few weeks, I will receive a sensor. I will use in LabView 'DAQ Assistant' whose the ouput is a Dynamic Data. 

That's why, I used in first place, the 'Simulate signal'. So I think I should keep Dynamic Data Type

 

Is there another solution ?

 

Thanks

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

I have tried something

We can see two plot but the sine plot is strange...

0 Kudos
Message 4 of 9
(2,729 Views)

Hi John,

 

the sine looks like it should look with your VI!

 

You convert the DDT to a scalar DBL. That conversion will only use the first sample of the generated sine waveform - usually this is always the same (offset) value when you generate full periods… Or to put it in a mathematical expression: sin(0°)+4 = 4!

 

When you want to display waveform you should work with waveforms!

 

Actually, I have used Dynamic data type in order to simulate an signal.

Well, I also simulated a signal in my example VI. I didn't use any ExpressVI to do so…

 

In a few weeks, I will receive a sensor. I will use in LabView 'DAQ Assistant' whose the ouput is a Dynamic Data.

Nobody forces you to use the DAQAssistent ExpressVI. There are nice DAQmx functions available and LabVIEW comes with a lot of ready-to-use example VIs…

 

That's why, I used in first place, the 'Simulate signal'. So I think I should keep Dynamic Data Type

I do think you don't need to use the DDT. I think it's better to understand what is going on in your VI. And I think the DDT will be no help for you…

Best regards,
GerdW


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

Hi  !

 

Sorry for taking so long to reply.

Anyway, Here I am now !

 

I do think you don't need to use the DDT. I think it's better to understand what is going on in your VI. And I think the DDT will be no help for you…

There are nice DAQmx functions available and LabVIEW comes with a lot of ready-to-use example VIs…

 

Actually, I have never used an sensor with Labview.  A friend told me I could use the DAQAssistent ExpressVI with Dynamics Data type.

So, I assume it was the only way.

If there is a simplier way, it will be great  !

Can you show me an example that simulate datas from sensor (so without DDT) and display it with double datas ?

 

Thank you for your help !

 

 

 

0 Kudos
Message 6 of 9
(2,667 Views)

John.B,

 

While the DAQ Assistant can get you started quickly, it forces the use of DDT. DDT obscures the data it contains. There is no way to look at the DDT wire and figure out whether it contains one boolean or an array of waveforms or any of several other data types. The FromDDT node may let you coerce data into a meaningless form without warning you.  I do not know of any highly experienced LV programmer who uses DDT by choice.

 

The DAQ Assistant is just a wrapper around the lower level DAQmx VIs. You can opne the front panel of a DAQ Assistant (or most other Express VIs) and then look at the block diagrams. Even better is to use the Example Finder (under the Help menu). Search for examples related to the kinds of measurements you want to make. A few of the examples in older versions of LV were not too well written but most of the newer ones are quite good. When you find an exmaple which is close to what you want to do, make a copy of it in a different location with a new name and then modify the copy to meet your needs.

 

Some place on the NI web site is a document which shows how to use a small portion of the available DAQmx VIs and functions to do most of the common things.

 

Lynn

0 Kudos
Message 7 of 9
(2,649 Views)

johnsold wrote:

Some place on the NI web site is a document which shows how to use a small portion of the available DAQmx VIs and functions to do most of the common things.


I belive you are referring to this paper: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications


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
Message 8 of 9
(2,640 Views)

Exactly. Thanks, crossrulz.

 

Lynn

0 Kudos
Message 9 of 9
(2,637 Views)