Waveform

10 posts / 0 new
Last post
Offline
Last seen: 1 year 8 months ago
Joined: 01/10/2022
Posts: 14
Waveform

I want to publish the labview waveform by dds. But if I set the "dataReaderQoSProfile" to empty before when the reader created, the waveform might lost. If I set the  "dataReaderQoSProfile" to "LabVIEWLibrary::ReliableProfile", the waveform can't receive. So how can I receive all the waveform data?

Organization:
Ismael Mendez's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 07/03/2017
Posts: 74

Hi Yugonghui,

The toolkit uses best-effort delivery model by default. In this case, you don't set the reader or writer QoS it is using best effort. So we have two different scenarios here.

1) Best-effort DataReader & Reliable DataWriter

In this case, the loss of samples you are observing is normal. If the DataReader is created after the DataWriter starts publishing samples the samples sent in this timelapse are lost because the DataRreader won't request them. Best-effort DataReaders ignore lost DDS samples in favor of the latest DDS sample. Please have a look at the user manual Chapter 10 "Reliable  Communications".

2)  Reliable DataReader & Reliable DataWriter

In this case, the data is not being sent because the size of the samples is too large and needs to be fragmented. If you open Administration Panel you'll see the message:

"COMMENDSrWriterService_canSampleBeSent:!write. Reliable fragmented data requires asynchronous writer"

You can enable asynchronous writer in the QoS with the following:

<datawriter_qos>
    <publish_mode>
        <kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
    </publish_mode>
</datawriter_qos>
 
Or increase the resources so it is not necessary to fragment samples. Please have a look at the following resources:
- User's Manual sections:
  6.4.1 "ASYNCHRONOUS_PUBLISHER QosPolicy"
  6.5.22.1 "Configuring Resource Limits for Asynchronous DataWriters"
  10.1.2 "Reliable Delivery Model"
- Forum

 

 

 

 

Offline
Last seen: 1 year 8 months ago
Joined: 01/10/2022
Posts: 14

Hi Ismael Mendez

Not all array failed. I try to publish the Waveform、1D Array I8、1D Array I16、1D Array I32、1D Array I64、1D Array U8、1D Array U16、1D Array U32、1D Array U64、1D Array SGL、1D Array DBL、1D Array Boolean.

The length of array is 10000。Same length, same config.

Yesterday, the 1D Array I64、1D Array U64、1D Array DBL、1D Array Boolean failed, others success.

Today, 1D Array U64、1D Array DBL、1D Array Boolean failed, others success.

Why?

Ismael Mendez's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 07/03/2017
Posts: 74

What do you mean by failing? In which context? Can you run Administration Panel (Tools->RTI DDS Toolkit-> Administration Panel), enable the core notifications, and execute your test and check the log?

So it works with I64, U64, DBL and fails with booleans, correct? I64, u64, and DBL have the same size (8 bytes) while booleans have one byte. Are you generating the VIs with Complex Type Generator of all those types or just changing the representation of the array type in the inputs of the VIs you already have? The VIs that Complex Type Generator generates only work with the type you used for creating them. If you change the representation of the array you have to generate VIs for that type.

Offline
Last seen: 1 year 8 months ago
Joined: 01/10/2022
Posts: 14

Hi Ismael Mendez,

You can see it in file attachments.

File Attachments: 
Ismael Mendez's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 07/03/2017
Posts: 74

Hi yugonghui,

I see a few things:

1- Your ctls are just arrays. This is wrong. Everything in your ctl must be inside a cluster.

2- You used uninitialized arrays for generating the VIs with Complex Type Generator. That causes errors. All the arrays must be initialized at the maximum desired size in the .ctl before generating the VIs. To do it initialize the arrays in the ctl right click on the top-level cluster Data Operations->Make Current Value Default. Then save the ctl and use it in Complex Type Generator.

3- In the Create Advanced Reader/Writer you use an I32 array as an input parameter everywhere. I recommend you use the correct type for each VI.

I attach an example ctl of how a type with a 10000 DBLs array should be. As you can see the array is inside a cluster and initialized as default value 10000 elements. Try generating code with it.

Regards

Ismael

 

File Attachments: 
Offline
Last seen: 1 year 8 months ago
Joined: 01/10/2022
Posts: 14

Hi Ismael Mendez,

It's not work. You can see the code in attachments.

When I set the "dataReaderQoSProfile" empty, the data can be received. But the data might loss.

When I set the "dataReaderQoSProfile" "LabVIEWLibrary::ReliableProfile", the data can't be received.

The problem happened by data type "1D Array DBL", "1D Array I64" and "1D Array U64".

 

File Attachments: 
Ismael Mendez's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 07/03/2017
Posts: 74

Hi Yugonghui,

You are experimenting the issues I described in my first answer in this thread. DBL, u64 and I64 are 8 bytes long. Arrays of 10000*8 are bigger than the default maximum sample size (64k) that uses the Reliable profile. It can be solved by changing the QoS. Please review the comment.

Offline
Last seen: 2 years 9 months ago
Joined: 08/18/2021
Posts: 4

為什麼找不到一維數組?正確的位置在哪裡?

Howard's picture
Offline
Last seen: 2 days 3 hours ago
Joined: 11/29/2012
Posts: 608

Sorry, not sure what you are talking about.  Also, please use English.