RTI DDS Toolkit for LabVIEW Support

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I locate why the data is not available?

Solved!
Go to solution

I create my own custom type,and use RTI DDS Toolkit ComplexType Generator to generate the reader/writer examples.

Then I modify the reader example, set the Advanced Reader Configuration to config my QoS.but this VI could not read anything from another device.

DDS Sample Info:

DDS_SampleStateKind:DDS_INVALID_SAMPLE_SATE

DDS_ViewStateKind:DDS_INVALID_SAMPLE_SATE

DDS_InstanceStateKind:DDS_INVALID_SATE

 

In C++ program,my program gets an instance response(on_liveliness_changed) after the configuration of participants and reader. My program could get data from this topic too(data_avaliable).

 

 

I can't pinpoint exactly what the cause of the problem is. Is there something wrong in my QoS? Or is it because the configuration is still missing in the VI program?

 

I've been stuck on this issue for a long time.I really need your help,Thanks!

0 Kudos
Message 1 of 6
(3,521 Views)

If I understand, your issue is that using that QoS your LabVIEW and C++ applications don't communicate between them. But your C++ DataReaders and DataWriters are able to communicate. Do your LabVIEW DataReaders and DataWriters communicate between them?

 

If so, that might happen because types in your C++ and LabVIEW application mismatches. The LabVIEW toolkit creates a DataType based on the ctl used. This Datatype might not be exactly the same as the one in the idl you used in your C++ application (but they can be equivalent) specially if you have enums. That would lead to mismatching and avoids communication.

 

You can use match analysis in Admin Console and see the reason of mismatching. If the reason is type mismatching, then do the following:

  • In Admin Console select your LabVIEW Datareader have a look at its DDS DataType

adminidl.png

  • Double check that your types are the same or equivalent (same structure, number o elements, same arrays or sequences, same types...) also the typenames are the same. In LabVIEW you set the typename in the Advanced Reader/Writer configuration.
  • If the types are the same with the only difference of names (like struct types with different names or example). Then we only need to disable sharing the type so endpoints are able to communicate despite some elements have different names.

You can do it with the QoS:

<participant_qos>
    <resource_limits>
        <type_code_max_serialized_length>0</type_code_max_serialized_length>
        <type_object_max_serialized_length>0</type_object_max_serialized_length>
    </resource_limits>
</participant_qos>
0 Kudos
Message 2 of 6
(3,487 Views)

Hi ismael,

I think you are right, that might happen because types in product application LabVIEW application mismatches. 

Let me add one more piece of information:

The system of our product is Vxworks.And the tester used for testing it is written in C++, and now we want to  develop the tester in Labview.Other information is the same as that in my other case.

 

Q1:If I have a type defined like this in IDL file:

sequence<Product::ACCEL,200> accel_data;

struct ACCEL {
unsigned long min_speed_um_per_sec;
unsigned long max_speed_um_per_sec;
unsigned long accel_distance_um;
};

 

In LabVIEW, I  firstly define a cluster according to struct ACCEL.Picture1 .

Then define array according to accel_data,and set initial value in index 199,making the lenght of sequence equal to 200.
Is it right?

But when I save and exit this ctl, and open it again,the value in index 199 is gone.So I want to know whether the lengh of sequence need to be set?

_0-1666860050225.png

At the end, I run this data reader VI, pictrue 2 is the information in Admin Console.

Let me take the accel data as an example, I define it  a data type of U32  in ctl, but in Admin Console,it is a double type in Equivalent IDL.I don't know why?

 


Q2:Different Version

You know that my product uses a lower version of Connext, Ver 5.2.3.
I can't get the status of the data bus by using the Admin Console of Connext 6.1.1, even the topics can't be seen.

Then I installed Connext 5.2.3, which enabled me to obtain topics information, but could not monitor real-time data. Even if I use the C++project to communicate with my product normally, the Admin Console does not obtain any dynamic data.

 

This is the interface  when I use C++ communicating with product. All the topics can be seen, and the Equivalent IDL in DDS Data Type can be seen too.but there is no dynamic data.

_0-1666861117400.png

 

Therefore, I'm confused. What version of Admin should I use to monitor the bus status between my product and tester? Is there a best solution?
What's more,Is there a toolkit suitable for Connext 5.2.3 in LabVIEW?

 

At last, I want to say thank so much, ismael!Thank you for your patient explanation.

0 Kudos
Message 3 of 6
(3,459 Views)
Solution
Accepted by 池子

Hi,

 

Here are some answers:

 

Q1: But when I save and exit this ctl, and open it again,the value in index 199 is gone.So I want to know whether the lengh of sequence need to be set?

The value you set in a ctl is not saved in the unless you set it as default value before saving. This way LabVIEW saves the value in the .ctl file. You can do it by right click in the array->Data Operations->Save current value as default.

arraydefault.png

Then you have to save the VI. Note that every change you do on your .ctl file requires to regenerate the VIs with Complex Type Generator. Please have a look at the RTI DDS Toolkit Getting Started Guide (LabVIEW window -> Help->RTI DDS Toolkit->Open Getting Started Guide) sections 3.4.2 "Preventing 'Type Code Incorrect' Error when Working with Arrays" and 6.10 "Setting Up Arrays"

 

Q2: I can't get the status of the data bus by using the Admin Console of Connext 6.1.1, even the topics can't be seen.

Admin Console requires the DataType to be sent for being able to subscribe to a topic. If the DataType is not sent, then Admin Console allows to load an XML of your DataType (you can convert your IDL to XML using rtiddsgen) so it can get the DataType from the XML and subscribe to it. Please have a look at Admin Console GSG about subscription here.

 

If you are using the QoS I suggested in my previous answer the DataType is not being sent. So you have to load the XML of your DataType  in Admin Console.

 

Therefore, I'm confused. What version of Admin should I use to monitor the bus status between my product and tester? Is there a best solution?

Since your application C++ runs in VxWorks, I assume that you are running Admin Console in the same Windows machine as you are running LabVIEW and it communicates with VxWorks using UDP. In that case, you should use Admin Console 6.0.1 or 6.1.1. So LabVIEW and Admin Console communicates through shared memory. Just keep in mind that you have to use XML of your DataType as described above.

 

Since disabling sending the DataType will not allow to see the LabVIEW type IDL in Admin Console. I recommend to get the idl of your LabVIEW type in Admin Console before disabling it and double check that it is equivalent to your C++ application one.

 

What's more,Is there a toolkit suitable for Connext 5.2.3 in LabVIEW?

Version 2.2.0.107 uses Connext 5.3.1. But is quite old and there are features like compatibility arrays of cluster, arrays of strings, blocking read and more features that are not supported. I recommend you to stay in 3.1.1.

 

Hope this answers help you.

 

 

 

 

0 Kudos
Message 4 of 6
(3,439 Views)

Hi ismael,

 

I checked the reader.vi generated using the Generator and it may indeed be that there was a problem choosing a file path or matching, making the U32 type seem to "inexplicably" change to the double type.

 

Also, I would like to thank you very much. Because I'm currently having a discussion with Grayson, I heard him talk about it with you the other day. I also asked him to say thank you to you on my behalf.

I'll attach this post to the case discussion with Grayson.

 

In addition to the ctl file selection problem mentioned above, you also mentioned the problem of TypeName consistency. I suspect the current problem may arise here. Can I ask Grayson to discuss it with you? Thank you!

0 Kudos
Message 5 of 6
(3,372 Views)

Sure!! You are welcome.

0 Kudos
Message 6 of 6
(3,367 Views)