LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Creating a Dynamic Data for Plotting a Graph

Hello NI Support team,

 

I work with GE Healthcare. I would like some assistance/advice with regard to a difficulty that I have encountered in Labview Programming. Since I am new to Labview please excuse me if my query is very elementary.

 

We would be building an application with reads data from an Ethernet port and plots the data. This is one functionality of the application. As a starting point I picked up the “Continuous Measurement and Logging” sample project in Labview 2012 and I am trying to make a minor customization in the project as part of prototyping phase.

 

In the “Generate Simulated Data.vi” which is part of the “Acquisition.lvlib”, I want to replace the sine waveform with actual data. Let us assume that after the actual data is read from the Ethernet port, we will have three basic components, i.e. value, date & time stamp. I want to plot this data instead of the sine wave.

 

Here is the change that I have made

 

I have disconnected the Sine wave generator. I then used a hardcoded a double constant of 10, converted this to a dynamic data type. When I run this application I see a constant data of value “10” being plotted. My question is along with the value, I will also have a date & time stamp for this value. How can I combine this date, time stamp & value into a dynamic data type just like the output of the existing sine wave generator (instead of the  “t0” component being set to System Time).

 

I have attached the screen shot of the change. 

 

Maybe I am following an incorrect approach. If this is so, please let me know the ideal way this should be implemented.

 

I hope I was able to explain the query to the team. Please let me know for any clarifications.

0 Kudos
Message 1 of 3
(2,022 Views)

You don't need the Dynamic Data Type at all.  You can wire a waveform output directly to a graph.  If you do need to build a waveform from its components (t0, dT and Y values) you can use the build waveform VI in the waveform palette.

 

The DDT should really be avoided.  It's a shortcut data type for people who don't wan't to be bothered learning how to program.  It's limited and you'll have to move past it someday so why not just learn the right way from the start?  Same with the Express VIs. They're convenient but you're better off knowing what's under the hood unless you intend to remain a very casual programmer.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 3
(2,005 Views)
Hello, thanks for the pointers. I shall try this out.
0 Kudos
Message 3 of 3
(1,997 Views)