LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write 1 D array of a cluster of 3 elements to an excel file

Solved!
Go to solution

Hi,

 

Could you please help me with exporting "1D array of a cluster of 3 elements" into an excel file? I have tried a few things, including the use of "cluster to array" function", but it's clear that I am make some fundamental mistake. I am attaching a screenshot for reference. Any suggestion will be very helpful.

 

Ketan31_0-1652669657660.png

 

 

Kind regards,

Ketan

0 Kudos
Message 1 of 12
(1,213 Views)

(We can provide more specific help once you decide attach a simplified version of your VI instead of a picture. Your array element is a cluster of two scalars and an array. We don't know what kind of result you want out of it later. Please describe!)

0 Kudos
Message 2 of 12
(1,207 Views)

Hi altenbach,

 

Thank you so much for your reply. Please find attached the VI I am using. It is an example VI from Picotech (I am using their oscilloscope). I need the labview program to automatically save the scan from the oscilloscope into an excel (or csv) file.

 

This is actually the first of the two issues I am trying to find the solutions to. Once this is clarified, I will get on the next one.

 

Please let me know if there is more information you need from my end.

 

Kind regards,

Ketan

0 Kudos
Message 3 of 12
(1,190 Views)

Hi Ketan,

 

a very simplistic approach:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 12
(1,172 Views)

So you have two "fake waveforms" (Cluster of t0, dt, [y]). and I can probably assume you want three colums (time, signal 1, signal 2). Here's what I would do.

 

Note that instead of an array of clusters, you can equally well do a 2D array as Y.

 

altenbach_0-1652727438572.png

 

Message 5 of 12
(1,145 Views)

Hi GerdW,

 

Thank you for your suggestion. I will try it today and let you know how i go. I really appreciate your help!

 

Regards,

Ketan

0 Kudos
Message 6 of 12
(1,135 Views)

Hi altenbach,

 

Thank you so much for you suggestion. I will apply it to my work and let you know how it goes. Really appreciate your help.

 

Kind regards,

Ketan

0 Kudos
Message 7 of 12
(1,133 Views)

Hi GerdW,

I tried your suggestion and it works. However, it only outputs 2 (Voltage 1 and Voltage 2) out of 3 datasets (Time, Voltage 1 and Voltage 2). Any suggestions to get all the three data output?

 

Regards,

Ketan

0 Kudos
Message 8 of 12
(1,124 Views)

Hi altenbach,

 

Here is a very dumb question. What part of your PNG file am I supposed to incorporate into my labview program? From my understanding of your file, the section circled in blue is your attempt to produce two voltage signals (to mimic my scenario). Then, the area circled in red is where the voltage signals are stored with respect to time as a Bundle. Then they are getting unbundled in the 'for loop' and being stored in a csv file using the write delimiter vi. However, I am bit confused on how to execute this on my existing program because I am receiving the signals (shown in the attached PNG) from two different bundles, which are then stored as an a array. I don't have, or i don't see any, VI that is doing anything with Time.

Ketan31_2-1652757939053.png

 

 

Ketan31_0-1652757839338.png

My file, with suggestions from GerdW (however, in this case, the output is only the two voltages; missing Time)

 

 

Kind regards,

Ketan

0 Kudos
Message 9 of 12
(1,117 Views)

Hi Ketan,

 


@Ketan31 wrote:

Hi GerdW,

I tried your suggestion and it works. However, it only outputs 2 (Voltage 1 and Voltage 2) out of 3 datasets (Time, Voltage 1 and Voltage 2).


That's why I wrote "simplistic": I just prepend the t0/dt values before the voltage samples for each signal…

 


@Ketan31 wrote:

Any suggestions to get all the three data output?


Follow Christians (Altenbach) suggestion. The FOR loop in his suggestion creates your "time column"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(1,102 Views)