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: 

1D Array of 1D Arrays

I am Controlling a device that requires an 1d Array of 1d Arrays as Input. It does not work if I connect an 1d or a 2d Array to it. When i automatically "create Control", it produces an empty Array and the error remains.

How can i create the correct data type or circumvent the Problem?

Thanks a lot!

 

 

 

Error Msg: "You have connected an array data type to its element data type. This type conflict may be resolved by indexing the array to access individual elements of the array. Check for a tunnel on a loop that has indexing incorrectly enabled.
The type of the source is 1D array of
    long [32-bit integer (-2147483648 to 2147483647)].
The type of the sink is 1D array of
    1D array of
        long [32-bit integer (-2147483648 to 2147483647)].
"

0 Kudos
Message 1 of 9
(2,896 Views)

You can't create an array of arrays directly in LV, you either have to create an array of clusters containing arrays, or an array of variants that can be arrays. I don't think either works as input to this function though, but it's worth a try.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 9
(2,881 Views)

That argument has both an input and output node. If you click create indicator on the output node, does it also make an error wire?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 3 of 9
(2,869 Views)

Thanks for the Suggestion. Unfortunately you were Right and it doesn't work either:

 

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1D array of
    cluster of 1 element.
The type of the sink is 1D array of
    1D array of
        long [32-bit integer (-2147483648 to 2147483647)].

0 Kudos
Message 4 of 9
(2,863 Views)

yes, creating an indicator at the Output also produces an empty Array and the error remains.

0 Kudos
Message 5 of 9
(2,861 Views)

I don't think this will work either, but the absolutely closest match much be an array of array-DVRs. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 9
(2,855 Views)

Solved - I found an extra function from the device manufacturer that converts the LabVIEW Array cluster into the correct type of "jagged Array". It seems to be impossible on a fundamental Level in LabVIEW to define the correct data type directly.

Thanks everyone

Message 7 of 9
(2,852 Views)

Hi, could you please tell me the name of the function that converts the LabVIEW Array cluster into the correct type?

0 Kudos
Message 8 of 9
(2,397 Views)

The thing that worked for the OP is unlikely to help you, as that seems to be a function which is specific to that driver and seems from the documentation to use a separate C++ or .NET class to allow that functionality for the LabVIEW wrapper - https://www.swabianinstruments.com/static/documentation/TimeTagger/sections/api.html#coincidences

 

You can create the relevant data type in LV using a 1D array inside a cluster inside a 1D array. That way, each internal array can have a different size.


___________________
Try to take over the world!
0 Kudos
Message 9 of 9
(2,353 Views)