05-15-2022 09:55 PM
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.
Kind regards,
Ketan
Solved! Go to Solution.
05-15-2022 10:19 PM - edited 05-15-2022 10:26 PM
(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!)
05-15-2022 11:50 PM
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
05-16-2022 02:44 AM - edited 05-16-2022 02:45 AM
05-16-2022 01:58 PM - edited 05-16-2022 01:59 PM
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.
05-16-2022 07:27 PM
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
05-16-2022 07:28 PM - edited 05-16-2022 07:29 PM
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
05-16-2022 09:16 PM
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
05-16-2022 10:26 PM
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.
My file, with suggestions from GerdW (however, in this case, the output is only the two voltages; missing Time)
Kind regards,
Ketan
05-17-2022 12:51 AM
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"…