Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Queued Message Handler (QMH) and Asynchronous Message Communication (AMC) Reference Library

Asynchronous Message Communication (AMC) Library: http://www.ni.com/example/31091/en/

0 Kudos
Message 101 of 104
(2,349 Views)

Hi everybody and a happy new year 2020!

 

I consider to use the AMC library to implement  the process communication in general as well as QMHs on a realtime system (cRIO 9035). I used both techniques successfully on a normal desktop application but my new project is a true realtime application that must run 24h and 365 days a year. So I am asking myself if AMC is appropriate for such applications.

I don't expect that CPU load is even a small problem but rather the risk of creating a slowly growing memory leak that is hard to identify. Should I better make entirely use of data types that are fixed in size (e.g. enums to specify states in state machines) rather than to use strings? And instead of sending messages via AMC to use RT-FIFOs?

 

Best regards,

Georg

 

 

0 Kudos
Message 102 of 104
(1,971 Views)

Hi,

 

I discovered a bug in the implementation of the UDP dispatcher which makes it unusable without a little change to the library.

 

The process where it sends a message over the network converts the cluster content to XML before sending it into the UDP write function. On arrival on the target system, however, it uses the Unflatten From String function which of course fails.

I was able to do a quick fix by flattening to string when sending instead of XML.

 

Here is where it sends (XML normally, but I changed it to Flatten to String)

jtagg_0-1601451975793.png

 

And here is where it receives:

jtagg_1-1601452076203.png

String to message vi is simply an Unflatten from String.

 

 

Message 103 of 104
(1,733 Views)

jtagg,

 

I also noted the same thing in a post on 02-18-2010 04:58 PM. I just neglected to post my fix as you did (and you described it better). Kudos to you!

 

0 Kudos
Message 104 of 104
(1,679 Views)