Using a cluster with multiple arrays simple numerics as a topic

2 posts / 0 new
Last post
Offline
Last seen: 7 years 11 months ago
Joined: 08/11/2014
Posts: 2
Using a cluster with multiple arrays simple numerics as a topic

I am attempting to define a cluster as a DDS topic that contains multiple numerics and multiple arrays interspersed throughout the cluster.  However, if I attempt to add a numeric after the array definitions (see attached photo), that the topic is no longer being generated (i.e. I can't examine the topic in Admin Console).  Is it a requirement that all arrays must be grouped at the end of a cluster definition in order to be used as a topic?  Thank you and forgive me in advance as I am relatively new to RTI DDS and very new to LabView.

AttachmentSize
Image icon clusterissue.png12.06 KB
Keywords:
Offline
Last seen: 2 months 12 hours ago
Joined: 04/23/2014
Posts: 57

Hello germantree,

In order to generate a DDS type which contains an array, you need to set up the size of that array. However, LabVIEW doesn't allow configuring the array size when it is inside of a cluster. LabVIEW arrays are resized run-time depending on the data they need to store. So, when you are creating the DDS Type with an empty array, it is created with size 0. Note that your arrays are grayed, so they are not initialized yet. You can avoid this problem if you write a value on position you want the length is. E.g. if you want an array of 3 elements, initialize the 3rd value to anything, for instance, to 0. The attached picture shows an array with 3 initialized elements although LabVIEW is showing 4.

You also may want to take a look into the next community solution: https://community.rti.com/kb/why-my-labview-array-not-working-properly

Regarding the visualization problem with Admin Console, what version of the LabVIEW toolkit and Admin Console are you using?

I hope this is useful to you,

Angel.

 

File Attachments: