Writing/Reading Multidimensional Arrays

6 posts / 0 new
Last post
Offline
Last seen: 6 years 2 months ago
Joined: 12/19/2017
Posts: 3
Writing/Reading Multidimensional Arrays

Does the LabVIEW add-on support writing/reading multidimensional arrays within a cluster?

This doesn’t seem to work for me, though I am able to write/read single dimensional arrays. 

Any help would be greatly appreciated. 

Thanks,

Max

Offline
Last seen: 2 months 15 hours ago
Joined: 04/23/2014
Posts: 57

Hi Balterm,

This is not currently supported by the RTI DDS Toolkit for LabVIEW. We have to investigate that possibility. Which kind of 2D array are you using?

Thanks,

Angel.

Offline
Last seen: 6 years 2 months ago
Joined: 12/19/2017
Posts: 3

Hi Angel,

Thanks for the response. I'm using a 4x4 array, with each element type double. It would be great if the RTI DDS Toolkit for LabVIEW could support this.

Thanks,

Max

Offline
Last seen: 2 months 15 hours ago
Joined: 04/23/2014
Posts: 57

Hi Max,

As the array is not so big, we can workaround it by using a cluster with 4 arrays of 4 elements. Then we can do a LabVIEW translation between this cluster and LabVIEW 2D arrays. The problem is that the IDL representation is not a 2D array. 

If you are using an IDL-based code using the 2D array type, you may want to use a Routing Service Transformation to communicate it with LabVIEW

Attached an example of this workaround for LabVIEW 2013 and RTI DDS Toolkit 2.0.0.104

I hope this helps,

Angel.

Offline
Last seen: 6 years 2 months ago
Joined: 12/19/2017
Posts: 3

Hi Angel,

Thanks for the example. How would I go about using a Routing Service Transformation to communicatie an IDL-based code with LabVIEW? Is there a specific example you could point me to?

Thanks again for your help,

Max

Ismael Mendez's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 07/03/2017
Posts: 74

Hi Balterm,

Here you can find a tutorial on how to create customs transformations using Routing Service   https://community.rti.com/howto/rti-routing-service-how-create-transformation-plugin 

to adapt to your purpose consider two transformations: 

 - First one from outside to your LabVIEW application. Use a 4x4 array as transformation input and a 4 1D arrays as the transformation output.

 - The second one from your LabVIEW application to outside. Use 4 1D arrays of four elements each one as transformation input and transform it to a 4x4 output array.

Regards

Ismael