Components

cancel
Showing results for 
Search instead for 
Did you mean: 

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

I ran into this thread as I was searching for an API that caters 3d party message queue software (so-called middleware) like IBM websphere MQ. This thread seemingly refers to a native labview message queue implementation.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 61 of 104
(7,008 Views)

That is correct. AMC is a LabVIEW-centric messaging mechanism based on the LabVIEW queue primitives for interprocess communication. For network communication as well as communication between different application/programming environments, a UDP based communication link is available. Using this UDP link you can create an AMC interface in other programing environments by parsing and formatting message packets according to the AMC definition.

 

Open standard messaging mechanism that are used with LabVIEW include DDS (Data Distribution Service, http://www.rti.com/products/dds/labview.html), RabbitMQ/AMQP (http://sine.ni.com/nips/cds/view/p/lang/en/nid/211065), and ZeroMQ (http://zeromq.org/bindings:labview).

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Message 62 of 104
(6,991 Views)

I am trying to encourage my fellow LabVIEW programs to use more common architecture. And, I think the AMC framework could help with this. Unfortunately change is hard. I see that LabVIEW has several examples of how to use the AMC, and there are several help files, but I have not found one central source in a printable format.

 

Is there a book out there or a printable format that starts with the theory of QMH and AMC and progresses through practical applications.

 

~thanks,


Engineering - The art of applied creativity  ~Theo Sutton
0 Kudos
Message 63 of 104
(6,906 Views)

@MrQuestion wrote:

Is there a book out there or a printable format that starts with the theory of QMH and AMC and progresses through practical applications.


This document is probably the best resource for understanding the theory of operation of the AMC library:

http://www.ni.com/example/31091/en/

 

Chris M

0 Kudos
Message 64 of 104
(6,905 Views)

Hello all! It would be very helpful for a beginner like me to get some expert knowledge regarding QMH. Here, I've attached a picture of my VI and ideally it should change the case to 'start' when you press the true button 'start' of the dialouge box but it doesn't work in this case. Any suggestions please..

0 Kudos
Message 65 of 104
(6,703 Views)

Hi kvee,

 

If you attach your code I can show you how to accomplish what you are trying to do.  I see a few issues with the code, the most pressing issue is that once the operator hits the "Start" button on the popup dialog box, the while loop nested within the case structure will stop, which will cause the "Test Setup" case to finish executing, which means that a hard coded "True" will be wired to conditional terminal of the outer while loop, which will stop the entire consumer loop.  Changing that hard coded "True" to a "False" will get you the functionality you are looking for in the short term.  

 

I am guessing that there is a while loop with an event struture up above the loop I see in the PNG.  If you move the functionality containted in the nested while loop within the "Test Setup" case to the even structure up top then your code would be greatly improved.  In general, the even structure should be used anytime you need to capture input from the operator on the front panel.

 

I hope this helps.

 

-Jon

Message 66 of 104
(6,681 Views)

Hello, Jon_mcbee

 

Thanks for your reply and that exactly was the case. I figured out later on about the stop condition of nested while loop. It works perfectly now, and yes you are right moving the functionality in the top which in fact is 'event handling loop' in my VI would improve the efficiency but I want those true and false buttons to pop up after the 'Test set-up' screen functionality is done and also 'Test set-up itself is the 2nd pop up screen. User would get main screen with just three buttons. So, I think moving functionality in the top loop would not serve this purpose.

0 Kudos
Message 67 of 104
(6,671 Views)

Hi Everyone,

 

I am using the template from Asynchronous Message Communication (AMC) Library and I wonder if I need to have a unique name for each intance of the "create message queue", or each instance has their own space such as avoid crosstalk between other instances of the same name "create message queue".

 

I am using this code with Teststand and I could use the socket number as a diferentiator for each name:  messageQueue1, 2, 3 and 4.

 

Thanks,

 

tstand

 

0 Kudos
Message 68 of 104
(6,155 Views)

Much of the value of the AMC comes from its ability to send messages to the local queue, to inter process queues, and to queue on another target. To keep this ability working I would say Yes, give each queue a unique name. You may find though that if you name them with incrementing number you can lose track of who you are sending to. I'm a believer in using functional names for things like that.  

0 Kudos
Message 69 of 104
(6,138 Views)

If you give each message queue a name, they MUST be unique. The queue mechanism used by AMC is a globally shared resource and each message handler (template) must have its own queue. The AMC template does not provide any namespacing or protection in this regard.

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 70 of 104
(6,109 Views)