03-20-2026 05:57 AM
Hi everyone, this problem might be trivial to most of you, but I was just not able to solve it in any way shape or form... I consolidated with ChatGPT, it could not help me either.
I used LabVIEW to read from a .txt File and I extracted data I needed. My goal is to plot the data, but LabVIEW constantly complains that my "source" data type does not match the "sink" data type.
The "sink" is 1D Array of Cluster of 2 Elements. That is the exact data type of the "source", but LabVIEW complains nontheless. Both "phase angle" and "time" are 1x200 structures without any further unwanted input. I literally have no idea how to make this very simple request work.
Help is appreciated,
Thanks!
03-20-2026 06:16 AM - edited 03-20-2026 06:18 AM
Addressing *only* the datatype issue...
The datatype of your source is *actually*: 1D Array of Cluster of 2 Arrays of N Elements
Supposing your 2 arrays have the same length, auto-index them through a For Loop where you build a cluster from individual array elements. Then auto-index that cluster into an output 1D array. See below:
-Kevin P
03-20-2026 09:25 AM
03-20-2026 09:32 AM - edited 03-20-2026 09:41 AM
There are so many things wrong with your code that I would recommend a few basic tutorials.*
You are NOT using an xy graph, but wire to the plotXY subVI which requires a picture indicator (missing!) as output and only accepts a single type of xy data (an array of points). I would strongly recommend to use an xy graph, which would accept your data (and much more!).
*footnote:
03-20-2026 04:24 PM
@GerdW wrote:
you can replace the FOR loop by Index&BundleClusterArray with 2 inputs…
D'oh! Good call. (I forgot there even is such a function, I don't think I've ever used it.)
-Kevin P
03-24-2026 07:32 AM
I did not ask you to comment on the overall quality of my code. Please be professional
03-24-2026 07:51 AM
Hi KLS,
@KLS93 wrote:
I did not ask you to comment on the overall quality of my code. Please be professional
So we aren't professional because we comment on the quality of your code?
You're the one who wrote:
@KLS93 wrote:
I literally have no idea how to make this very simple request work.
To become "more professional" you might think about: