Using Microsoft Message Queues (MSMQ) with LabVIEW

I want to use the Microsoft Message Queue to communicate between applications on different machines. Does anybody have experience in using the MSMQ with Labview (in the .NET framework)? How do I send messages? The MessageQueue.Send method requires an object, and I don't know how to create this object format.
This question was asked several years ago on this forum and no answer was given.
I would appreciate any examples of Create a Queue, Delete a Queue,  Send a Message, and Read a Message in LabVIEW 7 or earlier.
Thanks,

P.C.
I'm a little confused by what you mean.  I thought you were sending messages through the MSMQ, but the code there would receive a message, get the body, then display the body of the message.  The Object that the invoke node refers to is the Body of the Message, which has no properties, but has a few methods like ToString that you can use to get the string from the Body. 
You need to wire up the references into the invoke and property nodes to get the selection of the methods or properties that are available.  Do they just not appear when you are using the invoke node with a reference to the body?
Message Edited by Coal Man on 06-04-2007 01:56 PM
Brian Coalson
Software Engineer
National Instruments
Attachments:
msmq.Jpg ‏40 KB

Similar Messages

  • MSMQ with Labview

    I want to use the Microsoft Message Queue to communicate between applications on different machines. Does anybody have experience in using the MSMQ with Labview (in the .NET framework)? How do I send messages? The MessageQueue.Send method requires an object, and I don't know how to create this object format.

    Jim,
    please find attached an MSMQ send/receive example I've created with LabVIEW 8.2.1
    To get it working, you need to do the following:
    1. Make sure MSMQ is installed on all involved machines, senders and receivers. The attached ZIP archive contains batch files to install MSMQ on Windowx XP and Vista in the so-called workgroup mode (does not involve active directory integration).
    2. Manually create a private queue named "labQueue" or whatever you like on the receiving(!) MSMQ target machine.
    See http://technet2.microsoft.com/windowsserver/en/library/53f029d6-8824-4b1b-a312-167b03f5fca51033.mspx... for instructions to do so.
    Important note: people often misunterstand the term "private" in a way that such queues would only work locally, within one machine. This is not the case, in fact there is no kind of local-only receive queue like there is no local-only TCP port binding and private queues are open to get messages from anywhere. They are just not public to the active directory queue management services so any sender needs to know the correct target address itself.
    3. Adapt the "FormatName" string of the SampleSender.vi that it points to the queue on the MSMQ receiver, that is: Insert the queue name you've chosen and replace the IP with the address of the target machine.
    Run both VIs, SampleSender.vi and SampleReceiver.vi and send single messages typed into the "myMessage" string control by pressing the "Send" button or create looped bulk messages with the corresponding boolean switch control.
    To experience the coolness of MSMQ, send some messages from the running sender VI before the receiver was started, then start the receiver VI. Or run both VIs on 2 different machines, unplug the LAN connection of one while still sending messages and then plug it in again. MSMQ does all the caching for you in case one of the peers is temporarily unavailable. This rocks!
    The VIs demonstrate a very straight forward use of the .NET System.Messaging namespace for synchronous MSMQ messaging. A more elaborate (and better) way included the automatic creation of non-exisiting receive queues and asynchronous message receiving with .NET events.
    Greetings + have fun,
    Hans
    Attachments:
    MessageQueue (MSMQ).zip ‏31 KB

  • Can I use third party DAQ boards with Labview real time?

    I have an Adlink DAQ 2010 card that I curently use with labview. Will this card also work with Labview real time? What requironments are there for 3rd party cards to work with Labview real time?
    Thanks!

    Hello George,
         Here is a great link for you to take a look at: Can I Use a Third-Party Device with LabVIEW RT?
    Have a great day,
    NathanT

  • Using pixelink software development kit with labview

    hi,
    i am currently using the pixelink camera pl b741 f, however i am facing a problem when i use the "get frame dll" in labview.
    my program works when in highlight execution mode, however when i run it in normal mode i get the following message:
    Labview: an exception occurred within the external code called by a library node function node. This might have corrupted labview's memory. Save any work to a new location and restart labview. VI "amol_getimage.vi" was stopped at node "" at a call to "MEPU- acquisition-getframe .vi"
    can you please help me!
    thanks
    amol

    amolchoudhary wrote:
    hi,
    i am currently using the pixelink camera pl b741 f, however i am facing a problem when i use the "get frame dll" in labview.
    my program works when in highlight execution mode, however when i run it in normal mode i get the following message:
    Labview: an exception occurred within the external code called by a library node function node. This might have corrupted labview's memory. Save any work to a new location and restart labview. VI "amol_getimage.vi" was stopped at node "" at a call to "MEPU- acquisition-getframe .vi"
    can you please help me!
    It's simple! You made an error in the configuration of your Call Library Node. It could be a number of reasons but the two most likely ones are that you get a variable wrong to be passed by Value while it should be by Reference or vice versa, or that you call the function which expects a buffer it can write in the results (the image frame is a likely candiate) and didn't create a large enough buffer in LabVIEW to be passed to the function.
    I actually think this last one is by far the most likely reason here and in fact the number 1 error done by most people that try to interface to a DLL through the Call Library Node. DLLs come from the C world and want to be called like that and one important rule there is that memory buffers to be filled, must always be created by the caller. This is different in LabVIEW itself since LabVIEW manages all the memory for you and allocates it whenver necessary but this can't work for calling DLLs as LabVIEW has ABSOLUTELY no way to know what a DLL function might need as memory buffer.
    You can create such a buffer by either executing the Initialize Array function with the correct parameters or in LabVIEW 8.2 you can directly configure array and string parameters in the Call Library Node configuration to create the necessary buffer. I prefer the Initialize Array variant since the other one is a LabVIEW 8.2 only feature and creates a fixed size buffer while for your frame buffer you will likely have to allocate a memory buffer whose minimum size depends on the bitmap format and bitmap size the function is going to return.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-29-2007 07:27 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can I use a DAQ PCI-1200 with Labview 5.0.1?

    I have a Labview 5.0.1 software, and I want to use PCI-1200 with it. Can I do that? My OS is Windows XP, but I can change it with Windows98/2000.

    Hello jhylee,
    The latest NI-DAQ driver for the PCI-1200 is 6.9.3, which is compatible with LabVIEW 5.0.1. LabVIEW 5.0.1 supports Windows 2000, but not Windows XP (although it may still run).
    Have a nice day!
    Robert M
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • Using HP E2050 HPIb gateway with labview

    Hi,
    I was wondering if it is possible to use an HP E2050 Ethernet-HPIB
    gateway (interface) with Labview. National Instruments has a similar
    product (a GPIB-Ethernet interface), but I was wondering if it was
    possible to use the HP product since I have a whole bunch of them lying
    around.
    Thanks,
    Prasun Chaudhuri

    "Chaudhuri, Prasun [WDLN2:2M22:EXCH]" wrote:
    >Hi,>>I was wondering if it is possible to use an HP E2050 Ethernet-HPIB>gateway
    (interface) with Labview. National Instruments has a similar>product (a GPIB-Ethernet
    interface), but I was wondering if it was>possible to use the HP product
    since I have a whole bunch of them lying>around.>>Thanks,>Prasun Chaudhuri>
    Prasun,
    If the HP Gateway has a VISA interface, i.e. you can interact with it through
    VISA calls then you should be able to use it in LabVIEW after installing
    HP-VISA. I've never tried it but it might be worth looking into.
    Kamran Shah
    National Instruments

  • How can I make DAQ VIs visible when using NI-DAQ 4.9 with LabVIEW 6.0?

    My operational system is Windows 98, I am using a AT-DSP2200 card and is configured. I have installed a NI-DAQ 4.9 (the last for this card) and I use Labview 6.0, but I can not find the DAQ VIs on the functions palette. How can I solve this?

    Hello;
    That version of the driver is too old to work with Labview 6i. The oldest version of NI-DAQ that one can combine with Labview 6i is version 6.1.
    You will need either to use another version of Labview, or to investigate a replacement hardware that you can use with newer versions of NI-DAQ.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Is there a plug-in to use Microsoft Visual Source Safe with JDeveloper?

    Is there a plug-in available to allow me to use JDeveloper with my current source control software (Microsoft Visual Source Safe)?
    Thanks,
    Phil

    Hi Phil,
    Not that I'm aware of. We're adding support for visual sourcesafe in the next release of JDeveloper.
    Thanks,
    Brian

  • How can I use my Keithley 2100 DMM with LabVIEW 7 Express?

    How can I communicate with Keithley 2100 digital multimeter using LabVIEW 7.0?

    Hi,
    There are a number of ways,
    1) Unfortunately the driver on the Keithley site is for labview version 8.0, so you could speak to keithley to see if they can provide a ver7.0 of the instrument driver
    2) You could use the version for the 2000 model from the NI website
    http://sine.ni.com/apps/utf8/niid_web_display.down​load_page?p_id_guid=E3B19B3E90B0659CE034080020E748​...
    There is a version 7.0 which you could modify to suit the 2100
    3) Use the VISA vi's and create your own driver using the user manual for the bus commands to driver the instrument.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Has anyone used an USB ASIO driver with LabVIEW ?

    Anyone has already tried to use LabVIEW to get data from USB audio recording equipment (M-Audio Quattro)?
    RKO

    Hi,
    NI-VISA 3.0 is the only driver in LabVIEW that would give you access to an USB device. You would probably use NI-VISA USB Raw mode.
    To use the VISA driver you need to know in detail how the device works and how to program with USB. There isn't too much documentation, but if you are clear on those two things it should be easier to get familiar with the NI-VISA API.
    You'll need the USB specification (www.usb.org). Also check the NI-VISA Programmer Reference Manual
    Hope this is what you are looking for.
    DiegoF
    National Instruments.

  • How to use ExpressionEdit Control in teststand with labview

    Hi
    I am trying to get the ExpressionEdit Control to work in a labview custom step in teststand, but i have no idea how it works and cant find a solution.
    What I need is a simple example.

    Hi,
      that would really depend on how you want to use it. Do you just want the text from it? In which case there's a property of Text you can get from the control. Architect your code so that when you hit your OK button etc, it grabs the "text" information from the control.
    All of the properties and methods are documents (right click the control's fpterm on the block diagram, create >> property (so it created a property node for the activeX control, not a property for the LV control it's buried in) and select things like Text, or an invoke node, and things like DisplayBrowseExprDialog.
    You can then right click those, and go to "help for ...." for that property or method.
    Unless we know what you propose to use it for, then we can't really help with sample code, since it might not be applicable to your setup. (i.e. text out versus evaluation of the expression, versus displaying the browse expression dialog etc).
    You'll probably need to write to the context property to get the correct sequence context to browse with (pass in the "thiscontext" to your vi, and write to the context property of the dialog box.)
    Hope that helps
    Thanks
    Sacha.
    // it takes almost no time to rate an answer

  • How to use Microsoft SSIS to communicate with SAP Extractors? Is XI a way?

    Hello Extraction Experts!
    here is a challange for you:
    Our customer wants to pull GL Data from ECC6 as well as other various R3 Special Ledgers into a database (Not SAP BW at this point in time!), which can then provide the data to a 3rd party tax calculation tool.
    Until we are able to move to SAP BW we would like to use the delta enabled General Ledger extractors to pull the data into SQL Server by using MS SSIS (Event Handler). The reason for this is that the standard extractors are
    a) delta enabled and
    b) provide data enhancements which otherwise we would have to rebuild. (like currency transformations or calculation of the cumulated balance)
    So the big question is now how can Microsoft SQL Server with SSIS  be configured in such a way that it can communicate with the standard extractors? All settings which are in the Infopackage need to be configurable (Data selection, update mode settings for full vs. delta request, schedule and so on).
    The extractors use Services API, iDocs, RFC.
    What exaclty needs to be rebuild and how? Is XI an option here? If we dont extract the data in the wway SAP does it it will be very difficult to move to SAP lateron.
    Thanks for all your comments and help.
    kind regards,
    Marko

    Interesting
    Of course the easiest way to do it is to install a GL DSO on BW extract the data into there and then extract the data out of BW
    However to do this you will need hardware and an additional license to extract from the BW system (it does cost quite a bit for the license - but it should be discountable)
    The idea of using the delta extractors is fine - but to be quite honest the logic in the FI extractors can easily be built into a ABAP to dump the data out to a flat file
    That will be cheapest option without any doubt - not the most fancy but definately cheaper
    So I would approach it as - take the GL4 extractor code, hack it and write the output to a flat file.
    The GL4 extractor does basically this..
    read bwom_timestamp t get the last timestamp selected up to
    read bwom_settings to get the safety mechanisms (ie how the timestamps should be manipulated)
    loop around a datapackage size
       select * from bkpf where cpudat between two datetimestamps (from above)
         select from bseg for those records
         read into an itab and manipulate the data
         send package to BW
    endloop
    loop around a datapackage size
       select from bwfi_aedat where change time between datetimestamps
         select from bkpf/bseg for those records
         read into an itab and manipulate the data
         send package to BW
    endloop
    update the timestamp table with the timestamps used
    Now you will need to have some sort of table in your source application which will resolve the duplicates - as GL transactions can be modified and FI does not provide a before and after image - ie you only get the after image

  • How to read columns of a Microsoft Excel .csv file with LabVIEW?

    This should be simple.  Any ideas on how to read an Excel file with csv extension using LabVIEW?
    Thanks!

    Use the Read From SpeadSheet File.VI which you can find on the FILE I/O pallette.
    "Read From Spreadsheet File
    Reads a specified number of lines
    or rows from a numeric text file beginning at a specified character offset and
    converts the data to a 2D, single-precision array of numbers. You optionally can transpose the
    array. The VI opens the file before reading from it and closes it afterwards.
    You can use this VI to read a spreadsheet file saved in text format. This VI
    calls the Spreadsheet String
    to Array function to convert the data."
    The CSV file is essentially a text file which uses commas as delimiters in the files structure.

  • How to use Extech Instruments model 407123 with Labview 7.1

    I am pretty new to Labview.  With the help of this forum I was able to configure my DAQpad 6020E with my Labview 7.1.
    Now I am looking at using an Extech Instruments Hot Wire Thermo-Anemometer (407123) in my experiment and running it through Labview.  Based on my research, I was led to believe that I should use the Instrument Assistant I/O and NI-Visa, but I am having a lot of difficulties.  First off, the Thermo-anemometer is wired for RS232 and I have it connected to an RS232 to USB converter, which is then plugged into my computer.  I have the driver for the converter.  When I plug the thermo-anemometer into my computer, MAX reads it as a serial port and it is listed as COM3.  MAX claims that the device is working properly.  However, when I run Labview's Instrument Assistant I/O, and tell it to read data I get a bff0015 error and it says that the device timed out.  I have tried changing the time and I still get the same error.  I am assuming this means that Labview and my device are not communicating.
    I have seen some mention of instrumentation drivers, but I haven't been able to find any for my particular device.  I am assuming that is the root of my problem, and that if I had an instrument driver to run my device in Labview that it would work properly.  So here are my questions.
    1)  What do I need to take data from a third party thermo-anemometer in Labview?
    2)  Am I correct in thinking I need some sort of instrument driver?  And if so, where could I find one (I have already searched for one and did not find it)?
    3)  Is it possible and practical to take data through Labview from a DAQpad and a third party instrument at the same time?
    4)  Are there any guides or tutorials I could use that may show me how to accomplish what I'm trying to do?
    Thanks.
    Solved!
    Go to Solution.

    I've been trying numerous things to get this to work, and I've had little luck in getting exactly what I want.  I have been able to get data from some example VI's designed for serial read, and I was able to tweak them some, but this data seems to be only able to be saved to a .txt file.  I want the data from my anemometer to be read along with the time it was read and stored in a spreadsheet.
    Instrument I/O Assistant appears to have exactly what I need to do this, but I can't get it to work.  I keep getting the bff0015 error, which is that the device timed out before the operation completed.  I don't understand why it is doing this, or how to stop it, because I am able to get data from the device otherwise.  In fact, following these steps I can see the exact data I want:
    1.  Open Instrument I/O Assistant
    2.  On "Select Instrument" I select the correct port and then click "properties"
    3.  At the top corner of the window I click "Open VISA Session"
    4.  Once there, I go to the "Basic I/O" tab.  Within that tab I click the "Read" tab.
    Please see attached screenshots if you want to see what I'm talking about below.
    At this point I can read the data from my device.  The default count value is 1024 bits.  If I click "execute" the device is read and I can read the data in the textbox that says "buffer."  However, my device only makes one 16-bit reading every 1.6 seconds, so I have to let the device sit for some time before it can fill the buffer up with 1024 bits.  If I don't, the reading takes place, I can see all of my data in the buffer, but the "Return Count" value on the screen is something significantly less than the "Count" value.  This makes sense because the buffer did not have time to fill.  Needless to say, the "Return Value" says "bff0015" which means it would return the time-out error.
    If I wait for the full time for the buffer to fill, OR if I change the "count" value to something significantly lower, say... 32 bits, the buffer "fills" much faster, the "return count" count is correct, and the "return value" reads "3FFF0006" which I assume is a standard code meaning everything went correctly.  I also notice that if I wait long enough, the buffer will continue to fill, and I can click "Execute" many times rapidly and get readings instantly.  I can tell that the program is just reading data stored in the buffer when it doesn't take a second to perform the reading, and if I continue to click "Execute" rapidly, I will eventually expend the data stored in the buffer and I will start to see the "fresh" readings again.
    So here is my question.  How do I lower the expected "count" value in the actual "Instrument I/O Assistant"?  I can do it in the "Open VISA session" under properties, but the only thing I can change in the Instrument I/O Assistant is the timeout value, but even when I set the value to 5 minutes, I still get the time out error.  What else can I do?
    Attachments:
    Instrument IO view select.pdf ‏119 KB
    Instrument IO view read.pdf ‏125 KB

  • I want to use an old Daqcard 1200 with Labview 8.5. Where is the driver?

    I'm using Labview 8.5. I have an old Daqcard 1200 and there doesn't seem to be a driver for it. I downloaded an older version of NI-DAQ that claimed to have support for that card, but when I tried to install it wanted me to uninstall my newer version. Is there a way to use this card without going back to an ancient version of NI-DAQ?

    Unless there is some specific technical problem with interfacing to the old equipment, I don't think it is unreasonable at all to expect them to include drivers for legacy equipment. It would cost them very little to throw a few extra drivers into a package that encompasses their whole product line anyway, other than the missed opportunity costs associated with not selling new equipment in a few rare cases (which is probably what this is really about) .
    NI will probably explain better than i do. in general, they changed the way the DAQ driver operates, introducing also DAQmx. this is incompatible with the old way of functionning. for you, it forces you to choose the driver version to use.
    But anyway, it's not worth it for me to set up a machine just to run this thing. I'm just going to trash it. Thanks for the help.
    why dont you sell it over ebay? there are quite a bit that would love using it, for cheap enough. for example, this was one of the latest cards exhibiting 3 counters, operating differently than the modern version. it has its usefullness...Also, if this is the only one card installed in the computer, you wont miss anything with the new drivers
    ... And here's where I keep assorted lengths of wires...

Maybe you are looking for

  • .m3u links on emusic will not open or download when clicked

    Trying to listen to the samples on emusic.com and nothing happens when I click a link. It shows the address of the .m3u file when I hover over it, and I can save that .m3u and listen to it on my computer, but nothing happens when I click it. I tried

  • Bought a Flash 8 Template

    I bought a Flash 8 template for one of my customers.  Getting help is like pulling teeth. I make changes by modifying a .txt file and I observe by clicking index.html. The expressions in the .txt file look like: &menu1=Home Page &menu2=About Us etc..

  • Installing 8i on WinXP prof

    I am trying to load 8i Enterprise on WinXP prof but when i click on setup nothing comes up ... Any hints?

  • Dreamweaver crashing, deleting prefs helps

    Hello, on different machines we have the problem that from time to time dreamweaver does not start and gives an error. When I delete the file "Adobe Dreamweaver CS3 Prefs", dreamweaver start again. We have to repeat that procedure to often, what is c

  • N91 - Deleted Access Points still visible to appli...

    I created and later deleted a number of Access Points in Menu > Tools > Settings > Connection > Access Points. Although they appeared to be deleted (not listed anymore in the N91 menu system), applications such as Fring and Nimbuzz include/show all t