LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there something to solve the problem of connecting two terminals of different types?

The type of the source is 1-D array of cluster of 2 elements (source is "Waveform to XY pairs.vi").
The type of the sink is 1-D array of single [32 bit real( b digit precision)] (the sink is 1-D Data terminal of "Write to Spreadsheet File.vi").
Is there something (a data type converter, a merger, a splitter) to help me?
0 Kudos
Message 1 of 4
(2,729 Views)
If you have 1-D array of XY-clusters and you want to extract all the X or Y values as a 1-D array just wire the cluster array to a for-loop with auto-indexing on, then wire the cluster element inside the loop to an unbundle function, and wire the element you want an array of out of the loop with auto-indexing on...the array you get from the loop can be given to the write to spreadsheet function.

If you really want to write both the X and Y values the method is the same only you join the two values inside the for-loop to a row or column of the 2D array using the build array function, or have a 2D array predefined in a shift register and use the replace array element function. The write to spreadsheet function will then accept the 2D array. You need to make su
re both the X and Y values are of the same type to get them into the same array though, if they are not - convert them using the convert functions from the numeric palette.

I assume you are aware that there are waveform file IO functions as well so unless you need to save the data as text for other reasons you could feed the waveform to those instead.
Message 2 of 4
(2,729 Views)
You wrote:
<
I assume you are aware that there are waveform file IO functions as well so unless you need to save the data as text for other reasons you could feed the waveform to those instead."
>

Can you give me more informatio about this?
My clue is acquiring data and saving it. The file appearence should be:

Header (Initial time)
X Y
values values

I can't use "Write LabVIEW Measurement File" Express VI because I need a specific enable function. (I have already posted a question on this matter)
0 Kudos
Message 3 of 4
(2,729 Views)
That's me again. I am going to add an attachements. It is my SubVI Block Diagram. Is it correct? Do you think it will produce a file the way I want?
0 Kudos
Message 4 of 4
(2,729 Views)