NI Home > Community > NI Discussion Forums

Components

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
Christian_L
Posts: 662
0 Kudos

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

I'm attaching a slightly updated version of AMC packaged as VI packages, to be installed with VI Package Manager (VIPM). The community version of VIPM is a free download from JKI Inc. and is the framework NI uses for content in the LabVIEW Tools Network.

 

http://zone.ni.com/devzone/cda/tut/p/id/12397

http://jki.net/vipm

 

There are three packages as AMC has dependencies on two other packages of VIs.

 

The main difference in the updated version of the AMC library is that the VIs are now contained in LV project libraries.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
Pellerin
Posts: 3
0 Kudos

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

Thanks, I think I managed to install those ones now. I also have the same problem with flexsignal_112. Can you help me with that one too? Actually my goal is to be able to run the "Data Acquisition Reference Design".

Active Participant
Christian_L
Posts: 662
0 Kudos

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

For FlexSignal the Zipped version of the distribution (flexsignal_112_zipped.zip) allows you to extract the VIs directly and place them in your LabVIEW user.lib folder.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
Pellerin
Posts: 3
0 Kudos

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

Ok, thanks. Now I just miss two files.. 'svc_Engineering Units Text Ring.ctl' and 'svc_engineering Units to Unit Label.vi'. Where do I find them?

Active Participant
Christian_L
Posts: 662
0 Kudos

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

 


Pellerin wrote:

Ok, thanks. Now I just miss two files.. 'svc_Engineering Units Text Ring.ctl' and 'svc_engineering Units to Unit Label.vi'. Where do I find them?


This is a cross linking error with one of the Sound and Vibration toolkits. Please replace these Vis in your code with the corresponding VIs in the following folder in the FlexSignal code.

 

 

C:\Program Files\National Instruments\LabVIEW 2009\user.lib\FlexSignal\Utility\Scaling to EU

 

 

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
testingHotAir
Posts: 126
0 Kudos

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

[ Edited ]

Hi Christian,

 

I've built an application using AMC and I'm generally happy with the package.  Two problems that are vexing me right now are:

 

1) Spaces in the Keys and Values in the Message Attributes are replaced with underscores when sending a message over a network (Send Network Message), but not when sending local messages.

 

2) No message is sent and no error generated if I try to send a flattened xml string over the network.  Again, this does work when sending local messages.  (I'm flattening objects to xml strings to pass to my RT target).

 

These problems kinda ruin the abstraction of the package as messaging strategy that works between local VIs breaks when moving the application to a network.  Any ideas for workarounds or for what might be the cause of this behavior?

 

Thank you very much.

 

-EDIT-

 

Whoops!  Just saw that Nate had asked the same question on the first page of the thread!  Does the last update you posted fix this problem?

CLAD
Member
testingHotAir
Posts: 126
0 Kudos

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

I found a workaround for sending xml strings in the value field over UDP.  Basically, I noticed that the most consistent error when sending xml strings was that the "receiver" field would come up blank after the amc_Parse XML.vi tried to parse a message with a xml string in the value, so I use that as my indication that there is an xml string.  If the receiver is blank, I just remove the value string from the original message xml string, parse the remaining message using the same method as amc_Parse XML, and add the raw xml string to the resulting message.  This allows objects flattened to xml string to be send using AMC as long as they are only in the value field.  If an xml string is sent in any other field, this fix behaves the same as the original Parse XML vi.

 

 

 

CLAD
Member
N.Schnitzler
Posts: 31
0 Kudos

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

Hi,

 

my question is, when will you release a version of the AMC reference library with a working acknowledge function?

At the moment you have to control by yourself whether a message receives or not.

 

best regards

 

Norbert Schnitzler

Active Participant
Christian_L
Posts: 662
0 Kudos

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

Norbert,

 

Adding an Achnowledge option to the Send Message is one of the features we have on our list to add to AMC, but we do not have a defined timeline when we might be adding any specific feature.

 

I hope to release an updated version of AMC by August, but that is always limited by other responsibilities we have in the Systems Enigneering group at NI.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Active Participant
Christian_L
Posts: 662
0 Kudos

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

testingHotAir,

 

Thank you for your feedback and posting an updated version of the code. The error is due to the encoding of the messageinto XML for network transfer. Wrapping your XML into the XML of the AMC message is causing the error on the receiving end in the parser.

 

I will add this to the list of features to add to AMC to be able to handle XML in the value and attributes fields.

 

Replacing spaces with underscores is also related to the XML formatting, and I will take a look at making this more consistent between local and network messages.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense