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 do I create a 2D array using my data type?

Solved!
Go to solution

Hi,

 

I would like to modify my existing program to take out the polynomial functions, acquire an array, and export the results to Microsoft Excel. The data types of the wires are really confusing to me.

 

Here is the program I would like to modify;

workingarraymodel.PNG

The array looks exactly how I'd like it to, one data input is in column 1, and the other data input is in column two.

exportexcelexample.png

From here I can export to Excel no problem.

 

Here is my modified program;

new confusing array.PNGnewconfusingaray.PNG

'Numeric' = one data input         'Numeric 2' = the other data input

This array looks very weird to me. I see one data input in the array but not the other, and I am unable to export the results to excel because the option is grayed out.

 

Before, there were orange wires going into the array. With my modified program, the wires are blue which seems to change everything up.

 

How can I make my modified program produce an array that looks like it did before? 

 

Any feedback is highly appreciated.

 

Thank you.

0 Kudos
Message 1 of 4
(3,967 Views)

The dynamic data type contains more information that just the raw values - think of it as a composite data type whereas you are after only a sub-set - the floating-point number values. You can extract just the values using the Get Waveform Components node (http://digital.ni.com/public.nsf/allkb/B965F316364DE17B862572DF00363B10). You want just the "Y" array of the waveform on the wire for each "column" of your array.

 

Edit: Bob's solution is better.

Message 2 of 4
(3,930 Views)
Solution
Accepted by topic author belae1ka

Ahhh, the Dreaded DAQ Assistant and its Evil Twin, the Dynamic Data Wire, claim another victim!  [It's not really all that bad -- you just used some "simplfied" NI constructs designed to "hide the details" and make it "easy" for beginners to really get totally confused when they want to do Real Work.

 

In addition, you made the other Beginner mistake of putting a "picture" in your question instead of either using a Snippet or attaching a VI, something we can modify and show you.  More work for us ...

 

Well, do you see those Evil Dynamic Data Wires coming out of the Dreaded DAQ Assistant?  Right-click it, choose Signal Manipulation Palette, and Slay the Monster by using From DDT (ooh, DDT, how evil!).  Note it lets you export a 2D array with columns as Channels, just what you want.

 

Bob Schor

 

 

Message 3 of 4
(3,927 Views)

You are awesome Sir

0 Kudos
Message 4 of 4
(3,911 Views)