Where to store data (queued message handler)

Hello,
i'm developing an image processing application. As a template i'm using the 'queued message handler'. In my app I need to store some images, arrays, and so on in RAM. Now the question is  if i should store that data in the message loop's shift register (in a cluster) or somewhere else.
At the moment i have hidden front panel indicators where i store all my data. This isn't good practise, is it?
thanks alot
MN

nollMarvin wrote:
Hello,
i'm developing an image processing application. As a template i'm using the 'queued message handler'. In my app I need to store some images, arrays, and so on in RAM. Now the question is  if i should store that data in the message loop's shift register (in a cluster) or somewhere else.
At the moment i have hidden front panel indicators where i store all my data. This isn't good practise, is it?
thanks alot
MN
No that is not good practice.
A Shift register is a much better place to store data in memory it does that without creating copies the OS must interperate for display.  (Yeah the displaying of data to a user is a different concept than having data in memory) Ben's famous Action Engine Nugget is always a good read. http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801
And a basic concept to LabVIEW that attending a training session (or asking questions on these forums) will help you master
Jeff

Similar Messages

  • How best to decouple the UI in the LV 2012 Queued Message Handler Template?

    If you create a new "Queued Message Handler" from the new LV 2012 Template, you'll see a blue box in the "Update Display" case which says the following:
    Code Recommended - If you wish to decouple the Message Handling Loop from your user interface, consider creating User Events (like the "Stop" event in this VI) to message the Event Handling Loop whenever the user interface needs updating.
    I'd like to give this suggestion a shot but I'm struggling to find the best way to do this and still keep the code modular.  The template creates a "User Event - Stop.lvlib" with Create/Destroy/Fire SubVI's.  I would like to create a similar "User Event - Update UI.lvlib" library with similar Create/Destroy/Fire SubVI's to keep this new user event separate and modular.  The problem I'm hitting is that there can only be one Dynamic Event Terminal in the Event Structure so how do I modularlize creating user events into separate SubVIs and still maintain this one Dynamic Event Terminal?
    As a follow on question, would it be best to have one user event library per indicator that needs updating or just one single UI update user event and then pass a cluster as the message which contains the name of the control to update (to be used with a case structure) and then the data to go along with it?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    CLD.png ‏10 KB

    Instead of having the Register Events in the "Create Methods" you could do that part outside your "create" SubVIs and then simply bundle them. Then you create your individual User Event handling. See snippet where i created a "Create User Event - Update" vi in front of the Stop.
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Advantages of Using Queued Message Handler vs. Standard State Machine

    Hello,
    What are the advantages of using a Queued Message Handler?  Also, why are they more powerful than using Standard State Machines?
    Thanks!

    They are really just sort of an extension of a state machine.  The general idea is that you have one loop doing a specific job.  You then use a queue to tell it how/when to do this job.  For instance, I might have a log file loop.  I will send it commands to open a file, write some data, write some more data, and finally close the file.  Each of those commands are coming from the queue.  The beauty with this setup is that anybody that can get a reference to that queue can send the command to that loop.
    So the QMH is "better" than a state machine mostly because of the decoupling of functions.  In a given application, I will have a loop for log file writing, GUI updates, reading of a DAQ, instrumenet communications, server communications, etc.  Trying to do all of that in a single loop state machine is a major pain in the rear end.  Seperating them out makes life so much easier.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I need tips about queued message handler

    Hello, I have to use, for the first time a queued message handler. I'd like to know what is the best way to share data between cases in a loop and from a loop to another, I think with local variables  isn't  the best way...
    However all the tips on the queued message handler are welcome!!!
    Thanks

    smilegv wrote:
    I'd like to know what is the best way to share data between cases in a loop
    Shift registers.  Doesn't matter if QMH, State Machine, Producer-Consumer, etc.
    smilegv wrote:
    I'd like to know what is the best way to share data ...from a loop to another
    Well, now that completely depends on what you are passing around.  Streaming data?  Use a Queue or User Event.  Last known value (ie Tag)?  Global Variables, Action Engine.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Queued Message Handler Project Template

    Hello,
    Currently prepping for CLD exam.
    I was told we could use LV 2012 Professional Version.  Is it OK during exam to use Project template for Queued Message Handler to generate VIs and block diagram code?  Or must a QMH be generated from scratch?  
    I assume there will be a main VI which we must modify, but the thought was to reuse the generated template code into this VI.
    Thank you,

    You can use templates, examples etc that ships with LabVIEW. I am sure I read this somewhere, will post a link if I find it.
    Here is one tip offered by one of the experts: http://forums.ni.com/t5/Certification/Car-Wash-REV​IEW/m-p/2267688#M540
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Change where Mail stores my email messages

    Mail (Mavericks version) seems to be taking a lot of space on my small SSHD boot drive to store my email messages.  I can't find how to change the location to my 2TB HD (which is also internal to my iMac, but not the boot drive).
    Can anyone assist?

    That article gets around to talking about it half way through, but you can simply move a single folder in your home directory someplace else and make a link (alias) of it in your home directory.
    I already do this with my Mail -- i put my actual Mail folder in an encrypted sparse image, then in my ~/Library i link the moved folder "Mail" to where it sits in the encrypted volume.

  • Build applicatio​n based on queue message handler template

    I programmed an application, using QMH template in LV and made a build out of it. The build has the "main.vi" and it is always included. But, after build is complete, the application starts by clicking on my apllication.exe and immediately terminate itself !!!! any idea about why? (I have one global function ("exit" which set to false at initialize state of the application" and shared variables, but both seem not the items to be blamed !!

    I recently (about two years ago) started using the QMH fairly heavily, "re-inventing" my usage of it several times (that means taking a LabVIEW Real-Time project of several hundred VIs and almost "starting over").  I've attached a Demo Snippet to illustrate some Lessons Learned.
         First, an admission -- see all of those Queue wires?  I've gotten rid of most of them by using a Queue Action Engine that handles all of the Queue actions except Dequeue.  In place of the Obtain Queue, Enqueue, and Release Queue calls, I have a Message Queue VI that takes an Enum (Obtain, Enqueue, or Release) and (optional) inputs (such as the Element to Enqueue).  The only Queue wire in my diagram is the one from the call to Enqueue Initialize to the (necessary) Dequeue Element (but I don't need the Queue wire coming out of Dequeue Element as I use my VI instead of Release Queue).  Not only don't I need a Queue wire going into the parallel Event Handling loop, but I don't need a wire going into a sub-VI that needs to "send a Message", which makes spawning asynchronous parallel loops easy.
         You'll notice my Messages are Strings, not an Enum.  I'm a little conflicted here -- I like the "error-checking" feature of Enums, but especially when designing, it is so much easier to say "Hey, I need another State here to do this" and simply name it and add it.
         The Event Handling Loop, for the most part, should do nothing except generate a message, passing the Event New Value (if needed) as the Data part of the message.  In particular, the Exit message is just another Message -- it doesn't need to be "filtered out" for special handling.
         To stop all of the loops, I use a Local Shared Variable (you could use a Global or FGV/VIG as well) -- the TimeOut case in the Event Handling Loop wires this variable to the loop Stop, and as you can see, the Exit message sets it;
         You may notice the 500 msec timeout on the Dequeue -- this allows you to catch cases where no messages come in.  Here I "do nothing".  But you'll notice that this makes my Stop code work.  The User pushes Stop, generates an Event, calls the Stop Message, sets the Stop Shared Variable to True, but that (probably) does not stop the lower loop, as the earlier False value was probably read and "connected" to the Stop indicator when the loop was entered.  200 msec later, the Event Timeout fires, sees the Stop Shared Variable = True, and stops the Event loop.  After another 300 msec, the Dequeue times out, enters the True Case and does nothing, but now the Shared Variable is True and the lower loop stops.
         You are correct that if you want to do repetitive things with this model, you need to repeatedly call the State you want to run.  It depends how much of your code you want to put into a single QMH -- it might be just as simple to have yet another parallel loop do the same thing every 100 msec, and use the State Machine to handle the User Interface (I've done it both ways, depending on circumstances).
         Have fun!
    BS

  • Where to store data when you have a single app, users can purchase add-ons for the app, and each such purchase needs new files

    Hi, I have a hub app and need to give users the option to purchase various add-ons. For each such ad-on, I need to download a new set of files. Where would such files be stored, and how does it work when a new purchase is made? I cant seem to find any
    documentation to guide me.
    Thanks and regards,
    Lynn

    Hi  Lynn,
    Read something about in-app purchase documentation:
    Enable consumable in-app product purchases
    You can definitely store your file somewhere in your server when the customer buy your product, your app validated, download from that place.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to treat error handling in the consumer loop in the queue message handler structure?

    Hi,
    I'd like to know how to stop the producer loop(event loop) in the QMH structure when the error happened in the consumer loop.
    I've construct a demo code by myself as the attached image, but it's a pity that I have to create a recdundant indicator "End" to trigger the value change event to stop the program. This is not a good way to do it. Could someone give me some better idea how to deal with it? Very appreciated to you sharing ideas.

    Concerning your doubts about the "traditional" implementation of this pattern, I hear you. As I have written many times before, its main benefit is that it is easy to explain in a training class. It unfortunately has a lot of drawbacks.
    Tim's suggestion about User Events, is a good one. But to use it to the best advantage, you will need to get away from having everything on one block diagram. If you think about it there is no real need for the two loops to be on the same block diagram and a lot of really good reasons for them not to be. For example, if they are in separate VIs, they can both be event driven and any communication problems between loops evaporates.
    Its also more modular, easier to maintain, more reusable, etc...
    Check the link in my signature.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Error message handling in BAPI...

    Hi Guys,
    I am working on documentation of a BAPI used SAP insurance module. Now I want to see all the error messages associated/ handled in that BAPI. How can I do that ? Is there a table in data dictionary where I can see error messages handled by a given Function module/ BAPI?
    Any inputs will be highly appreciated.
    Thanks.
    Regards,
    Tushar.

    Hi,
    here´s one possible solution:
      CALL FUNCTION 'MESSAGES_INITIALIZE'.
      LOOP AT it_return_bapi.
        CALL FUNCTION 'MESSAGE_STORE'
             EXPORTING
                  arbgb          = it_return_bapi-id
                  exception_if_not_active = ' '
                  msgty                = it_return_bapi-type
                  msgv1          = it_return_bapi-message_v1
                  msgv2          = it_return_bapi-message_v2
                  msgv3          = it_return_bapi-message_v3
                  msgv4          = it_return_bapi-message_v4
                  txtnr          = it_return_bapi-number
                  zeile          = ' '
             EXCEPTIONS
                  message_type_not_valid  = 1
                  not_active              = 2
                  OTHERS                  = 3.
      ENDLOOP.
      CALL FUNCTION 'MESSAGES_STOP'
           EXCEPTIONS
                a_message = 04
                e_message = 03
                i_message = 02
                w_message = 01.
      IF NOT sy-subrc IS INITIAL.
        CALL FUNCTION 'MESSAGES_SHOW'
             EXPORTING
                  i_use_grid         = 'X'
                  i_amodal_window    = i_amodal_window
             EXCEPTIONS
                  inconsistent_range = 1
                  no_messages        = 2
                  OTHERS             = 3.
      ENDIF.
    ENDFUNCTION.
    Best regards

  • Where is mail data stored in 10.9.4? Mail works fine, but there is no data in Users/Library...?

    Where is mail data (all messages) stored in 10.9.4?  Mail works fine, but I cannot find the data to back it up. It is NOT in Users/Library..(In fact, my User folder has no Library folder at all)..?

    Exposing the /Home/Library/ Folder
    Pick one of the following methods:
    A. This method will make the folder visible permanently. Open the Terminal application in your Utilities folder and paste the following at the command prompt:
    chflags nohidden ~/Library
    Press RETURN.
    B. Click on the Desktop, press the OPTION (⌥) button, select Library from the Finder's Go menu.
    C. Select Go To Folder from the Finder's Go menu. Paste the following in the path field:
    ~/Library
    Press the Go button.
    The data are in your /Home/Library/Mail/V2/ folder.

  • Where does TREX store data?

    Hi all,
    Sorry if my question is stupid, but I didn't find any document writes about database of TREX. So where does TREX store data?

    Hi,
    TREX creates an index from documents in a document set. An index is a collection of selected terms that represent the content of the documents indexed. To produce this, TREX indexes the original data and stores the index generated. TREX is therefore a secondary data store.
    The data that the TREX queue server (queues) and the TREX index server and its search engines (search index, text-mining index, and attribute-engine index) access is not stored in a database. It is stored unencrypted in the file system as flat files in the file system. You protect the TREX files and indexes located in your file system by configuring the security of your file system. You can find details on this in the security documentation for your operating system.
    Read this
    http://help.sap.com/saphelp_nw04/helpdata/en/62/468698a8e611d5993600508b6b8b11/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/39/025d83ca90a04c8a6151309d6d9f60/frameset.htm
    Thanks

  • Did anyone tried Rejection Message Handler via Queue based method?

    Dear All,
    I am presently doing a Rejected Message Handler process and successfully implemented with File based and Web Service based. But I am not getting the clue for Queue based. We can enqueue the rejected message into queue as a JMS message via this method. But the URI format they have given is *"jdbc:oracle:thin:@<host>:<port>:<sid>#<un>/<pw>#queue"*. Format includes jdbc connection string along with queue name. For this I have created JMS module with JDBC Persistent store and created queue in it. But still I am not able to enqueue the message inside the queue. Also, is there anyway to see the queue names inside the DB. Did anyone tried this method? Could you please share the info??

    WL JMS Queue consume>BPEL1 (One way) invoke>Mediator service (one way) route> BPLE2 (one way). Also I have added transaction properties in BPEL1 and 2 + References + Services.
    Now, if there is a fault in BPEL2 the transaction should be rolled back in BPEL1 and the message should be seen in the WL queue itself. But that is not happening in my case. Everything is getting rolled back upto a point just after the >recieve activity in BPEL1 except the message is not getting rolled back to queue.There will be 2 transactions in this scenario : 1) jms queue to soa hydration store 2) soa-hydration to bpel execution.
    This is the behaviour for 1 way or async interfaces , jms adapter thread completes its transaction work after persisitng to dehydration store and another bpel system thread starts work executing the bpel code after retrieving the message off the db in a separate transaction. So the rollback you are seeing is only applicable for 2nd transaction which roll backs to the dehydration store instead of the queue.
    For synchronous interfaces, the same adapter thread will be involved for complete message processing including bpel code execution. So I think if you want to get the jms queue within the same transaction you can try set up the interfaces to be sync, even with dummy responses. This might make jms adapter thread to start a transaction --> read message off queue within the same transaction --> execute bpel code within same transaction --> complete/rollback transaction based on bpel code execution.

  • What is the event by which i can get that user deny the offline data store when the message comes in the browser

    I have an application which stores manifest for offline use. Now firefox asking for a confirm message that if i want to allow or not. If i say 'allow' the application works fine. but if i say 'not now' or 'never for this site' the application stops. What is the event to check that user deny to allowing store data. i used different option like - cached,noupdate,error,uncached,idle,obsolete. as an example- applicationCache.addEventListener('idle', function () {});
    but none of this says that user deny to allow. Please tell me the option that i can check that user does not want to allow and do my rest work.

    It should be possible to allow offline data storage for only certain websites, and that setting is in Options > Advanced > Network. If the answer is "don't do it", then it should not be done. Is that not what is happening?

  • I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly.  I have uninstalled/reinstalled evernote but it still doesn't work.  Anyone know where evernote stores their files on a Mac/

    I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly when I try to transfer it.  I have uninstalled/reinstalled evernote and the scan snap softward but it still doesn't work.  Anyone know where evernote stores their files on a Mac?  Or had this problem.

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

Maybe you are looking for

  • Error while opening HFM Application "The Parameter is Incorrect"

    I have recently installed HFM 11.1.2.1 and created an applicatiion. When I try to open that application, system is giving an error message stating "The Parameter is Incorrect" Error Reference Number: {DB65561D-1ECC-4227-9361-BB662D71078A};User Name:

  • Import from Memory ID

    Hi,    In a program, I am getting a short dump at statement, IMPORT T_DOWN_NOTPAYED HSDPN HIVDPN          HIVDPV HCURR FROM MEMORY ID 'ZDOW2'. Short dump details given below. <i>Error when attempting to IMPORT object "T_DOWN_NOTPAYED". When attemptin

  • I just updated to 6.1.3 and my iphone has no service

    my iphone is fully updated firmware software and carrier settings but i still dont have any service...it will search and then say "NO SERVICE" or it will come up with the network im with for a few seconds and then it goes to "SOS" how can i fix that?

  • Ask the Experts: Introduction to Cisco Trustsec Solution and Configuration (from Webcast)

    This is an opportunity to learn and ask more questions about Cisco Trustsec solution. The Trustsec solution is designed to flatten the network regardless of the access method but still provide fully distributed and differentiated access control no ma

  • Pse 8 and Intel Core Solo

    I can't instal PSE 8 and then noticed that system requirements state that you have to have a multi core processor. So I thought I would go back and reinstall PSE 6 which works on my solo core computer but then I noticed that the system requirements f