RTI DDS Toolkit for LabVIEW Support

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I confirm whether my own "USER_QOS_PROFILES.xml " file has been loaded sucessfully?

Solved!
Go to solution

Hello all~

I have  "USER_QOS_PROFILES.xml " file which content has been edited according my device requirements. Picture1

 

I have changed the following config according LABVIEW:

(1)Add environment variable NDDS_QOS_PROFILES:C:\DDS_config\USER_QOS_PROFILES.xml. Picture2

(2)Copy the XML file to the path.

 

So,the next step,How can I confirm whether my own "USER_QOS_PROFILES.xml " file has been loaded sucessfully When VI using RTI DDS "Simple Create reader" or "Create advanced Reader"?

 

Can I use "Probe" to see the variables?

 

 

My Qos Profile file.PNG

environment variable.PNG

  

 

 

 

 

 

0 Kudos
Message 1 of 17
(4,546 Views)

You can check the content of the environment variables in LabVIEW so you can be sure that LabVIEW is getting it correctly with the following:

environment_variable_labview.png

Then, for checking if the toolkit is using the correct file you can insert a wrong character in one of the xml labels. Like <topic_qosZZZ>, this way you will get an error when creating a reader or writer if the file is loaded. However, if the QoS profile you set in the configuration when creating a reader or writer is not found (because the QoS file has not been loaded) you will get an error.

 

I observed in the second picture you have the variable name wrong. It is NDDS_QOS_PROFILES but you have NDDS_QOS_PROOFILES.

0 Kudos
Message 2 of 17
(4,532 Views)

Thank you very much for the reminder, you are so attentive~

 

I have test the environment variable,the  result is Picture 1.

environment variable test.PNG

Then I run the Example "RTI Connext DDS Read String.vi",and change the topic content.Picture 2.

RTI Connext DDS Read String.PNG

It pop-up error dialog,Picture 3.

 

Is the xml file loaded failed?or Is there some mistake in the xml file? But this file has already been used in C++ project Code。

error.png

/*************************************************************************/

Other Question:

As described above,I have written software in C++ environment first.Now I am trying to develop the same function in LabVIEW.

 

Question 1:

Because I read the participant config information in XML file in C++ environment, and then create the "paricipantQos".

How can I do this in LabVIEW? or Do I need to do this in LabVIEW?

 

C++ Code:

DDS_DomainParticipantQos participantQos;
retcode = DDSTheParticipantFactory->get_participant_qos_from_profile(participantQos,"BaseLibrary", "BaseProfile");

_0-1662449157406.png

 

Question 2:

In another "qos_library",there are some different "qos_profile" .I create topic with the profile in C++.

 

So do I use the "RTI Connext DDS Test Type Create Advanced Reader.vi" to config the "Qos Profile"?

 

_1-1662449546203.png

_0-1662450044916.png

 

Thank you very much for paying attention to my detailed questions!

 

 

 

  

 

 

 

0 Kudos
Message 3 of 17
(4,514 Views)

Hi 

 

You have to surround the with % the environment variable name. Like in the picture:

enviro2.png

Regarding your second question that error appears in both situations. When the QoS has errors or when it is not found. If you are using the same xml in another place, then most likely the error happens because it is not found. Surround the environment variables with % and check the NDDS_QOS_PROFILE value.

 

Regarding your questions:

 

1 -  Because I read the participant config information in XML file in C++ environment, and then create the "paricipantQos".

How can I do this in LabVIEW? or Do I need to do this in LabVIEW?

You don't need to call any function in LabVIEW for loading the QoS. You use the environment variable and then indicate the library::profile when creating the DataReader or DataWriter. The same as you have been trying to do. LabVIEW toolkit will use the participant QoS of the selected profile. The same for publishers and subscribers.

 

2 - In another "qos_library",there are some different "qos_profile" .I create topic with the profile in C++.

So do I use the "RTI Connext DDS Test Type Create Advanced Reader.vi" to config the "Qos Profile"?

Yes

 

 

 

 

Message 4 of 17
(4,509 Views)

Hi ismaelrti!

 

It's so happy to meet you to discuss and solve my questions!

 

I think the " Environment variable" has been set correctly.

 

 

About my Question2 I'm a little confused by my XML file.

Because as you see, the "participant_qos" information is in "qos_library name="BaseLibrary"  " and " qos_profile name="BaseProfile"  ".

 

_0-1662540109976.png

 

But the “qos_profile” I want to publish/subscribe is in another "qos_library". 

qos_library name="CtQosLib"

 

So, is it right to create  publisher/subscriber in  " qos_library name="CtQosLib"  " and different "qos_profile name" included , and don't care the "participant_qos"?

 

 

Question 3

I have create my own type named "TableConfiguration" by "RTI DDS ComplexType Generator".Then Run Reader and Writer, the data's communication is OK.

 

_2-1662540335749.png

 

 

 

Next I changed the Reader config according to xml Qos Profile.but an error occurs.

what's meaning of this prompt?

 

_1-1662540233247.png

 

 

 

 

 

0 Kudos
Message 5 of 17
(4,496 Views)

In Question 3

I have create my own type named "TableConfiguration" by "RTI DDS ComplexType Generator".Then Run Reader and Writer, the data's communication is OK.

 

 

Can this successful communication mean that the xml file has been loaded successfully and the configuration in XML is used successfully?

0 Kudos
Message 6 of 17
(4,490 Views)

Yes. If the reader and writers are created and able to communicate without any errors that means the xml file has been loaded successfully. I recommend you to use Administration Panel for debugging when you get errors. There you can see a full error log that will provide much more detailed information that the popups. You have it available at Tools->RTI DDS Toolkit->RTI DDS Administration Panel. If you enable the core notifications you will get even more detailed information. Please have a look at the RTI DDS Toolkit Getting Started Guide (Help->RTI DDS Toolkit->Open Getting Started Guide) section 4.9.1 "Debugging an Application Using the Administration Panel".

0 Kudos
Message 7 of 17
(4,464 Views)

Hi ismaerit,

 

Thanks for your suggestion. I have used "RTI DDS Administration Panel" to debug my VI.

_0-1663235984326.png

 

It pop up a prompt.

_1-1663236041499.png

I watch the information in "RTI DDS Administration Panel" .

_2-1663236079028.png

 

I think the "qos_library" named "CtQosLib" I want to load is right. And "participant_qos" behind "qos_library" have decribed the information we need too.

So, is there something wrong in my XML file?

_3-1663236122464.png

 

 

 

0 Kudos
Message 8 of 17
(4,420 Views)

Hi,

 

The XML file looks fine to me. If you are using it on a C++ application and works it is fine. Also, the VI seems to be correct. I cannot see the text in the administration panel. The image resolution is too low. But for the text that I can barely distinguish it is complaining about your profile. Can upload the log messages?

0 Kudos
Message 9 of 17
(4,416 Views)

Hi ismaelrti,

 

Yes,I used this XML file on a C++ application and it works well.

Remark:

In C++ application, I create the participant by "BaseLibrary:BaseProfile" .

In LabVIEW, I add the participant information to "CtQosLib:TableConfigurationProfile" such like it has been described in "BaseLibrary:BaseProfile" section.

 

But  I try the same VI today,the error has changed.

_0-1663296994897.png

_1-1663297415039.png_1-1663297415039.png

the log messages:

LVDDS_ReaderNode_create_with_params: Error when asserting Domain Participant.

 

LVDDS_DdsManager_assert_participant: Unable to create participant.

 

[CREATE Participant] DDS_DomainParticipantFactory_create_participant_disabledI:ERROR: Inconsistent QoS

 

[CREATE Participant] DDS_DomainParticipantQos_is_consistentI:inconsistent QoS policy: resource_limits

 

[CREATE Participant] DDS_DomainParticipantResourceLimitsQosPolicy_is_consistent:inconsistent QoS policy: max_gather_destinations

0 Kudos
Message 10 of 17
(4,403 Views)