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.

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

  • 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

  • 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

  • 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

  • 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

  • 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.

  • Project Templates with Enterprise Resources

    I'm using Project Server 2013 ( latets updates installed for both Client and Server)
    I've created a project template and attached this to a project type. My template has enterprise resources speciified. So far so good.
    Now I'm trying to create a project using this template and I'm getting some errors.  (See below)
    As soon as I remove the resources from my template the project creates fine.
    It looks like 'rsResourceCannotAddLocalWithSameNameAsEnterprise'  in the error below means that Project Server looks at the resource in the template and considers the resources in the template always to be a local resources. And of
    course the resource already exists in my enterprise resources and therefore the project creation fails.
    Datasets:
    ProjectDataSet
    Table ProjectResource
    Row:  RES_UID='0bb2c5b5-1716-e311-a1c1-005056992257' PROJ_UID='3121855b-f13b-e311-9f7f-005056991b52'
    Error rsResourceCannotAddLocalWithSameNameAsEnterprise (2058) - column
    RES_UID
    General
    Queue:
    GeneralQueueJobFailed (26000) - ProjectCreate.ProjectAddToMessage. Details: id='26000' name='GeneralQueueJobFailed' uid='353d845c-f13b-e311-9f7f-005056991b52' JobUID='3a21855b-f13b-e311-9f7f-005056991b52' ComputerName='13fdabbe-0ac0-4cca-b382-49d1853aec73'
    GroupType='ProjectCreate' MessageType='ProjectAddToMessage' MessageId='1' Stage='' CorrelationUID='147f4f9c-ae30-b04b-aec7-382a52fa5fdf'. For more details, check the ULS logs on machine
    13fdabbe-0ac0-4cca-b382-49d1853aec73 for entries with JobUID
    3a21855b-f13b-e311-9f7f-005056991b52.
    My questions are:
    Are Enterprise Resources in templates supported?
    Is there a way around this? We're trying to make it easy to select a subset of the enterprise resources available.

    I have experienced this exact same thing and my situation is highly irregular. 
    This is with Project Server 2013.
    I had an EPT with a Project Schedule that had Generic Enterprise Resources assigned and was able to create new projects without problems using the EPT from the New button in the Project Centre in PWA.
    I was creating new projects to test and demonstrate Portfolio Analysis and was able to model Organisational Capacity represented by my Generic Resources and also the Surplus/Deficit element of Resource Constraints on a Portfolio. The Hired Resource Report
    was failing.
    A Service Pack and Cumulative update were applied to the Server and now I cannot create new projects using EPTs that have a project schedule with Generic Enterprise Resources assigned to tasks in the schedule.
    I checked the error message for the Failed and Blocking job in the queue and the GUIDs were for my Generic Enterprise Resources. I deleted the offending Generic Enterprise Resources and then re-created them anew, edited the Project Template to have
    these Generic Enterprise Resources on the Project Team and randomly assigned them to tasks in the schedule to generate a notional demand for work in the Project Template. I then Saved the Template in Project as a new Project Template and edited my EPT
    to reference this new Project Schedule. 
    Same error encountered again.
    Perversely I can open the Template schedule in Project Professional and do Save As and save it as a new project to the Server and that works just fine - the schedule is visible in the Project Centre and I can edit the schedule in both Project Pro and in
    PWA.
    My hunch is that the Cumulative Update and Service Pack which were applied to try and resolve the failing "Hired Resources Report" in Portfolio Analysis, which sadly it didn't resolve - has probably provoked this interesting challenge as it is
    the only material thing to change on the Server during the time that this issue has manifested itself.
    Am I the only one to encounter this?
    Dominic Moss | MAPM Microsoft Certified Technology Specialist | Our Newsletter:
    PM News Project Server Specialists
    Project Server PRIME | Twitter:
    @Twitter | Facebook:
    @Facebook | Linkedin:
    Wellingtone

  • VS, ODT and using "Oracle Project"-template requires Policy Management

    HI,
    I installed the ODT 11.1.0.6.20 and tried to create a new project using the "Oracle Project" but received the following error message: "The project <ProjectName> requires Policy Management. Open this project in Visual Studio.NET Enterprise Developer or Visual Studio.NET Enterprise Architect."
    I have tried this using VS 2008 Professional and Team Edition. The operating systems is Vista x64 Ultimate.
    Oracle documentation doesn't mention any specific VS version so this is perhaps something else. Is there a workaround or fix to get around this?
    TIA,
    Kari

    OK, I'll give it a try. This suggestion makes perfect sense. I have used that template to create a project before, but noticed that it doesn't contain a windows form by default and so I assumed that it was a build for a n-tier application database access class, which is not necessarily what I want, and so I abandoned the effort. I know I can add a window form. I appreciate the response and will post back my results.
    Is there an example project somewhere that I could download and have a look at?
    Thanks again for your reply, even though you didn't reply to me. I think you resolved my problem! :-)
    Bruce
    Edited by: Bruce Davis on Oct 19, 2009 11:07 AM
    Edited by: Bruce Davis on Oct 19, 2009 11:11 AM
    I replied to the wrong post!

  • Problem while creating a new project template

    I am trying to create a new project template under one operating unit newly created.
    I am using P A Super User responsibility for that operating unit.
    In profile setting the above responsibility has been assigned the new operating unit under Mo operating unit profile.
    Now when I go to Setup>>Projects>>Project Templates and click on New, the form to create new Project template opens up but in the field where I have to select the operating unit, it shows no values in the LOV.
    Can anyone please help me to know what setting do I have to perform so that I can select the operating unit in this new Template creation Form.
    Regards
    Hawker Hunter

    Dear Mr. Govind,
    we have followed all the Project Implementation Setup for the new operating unit except for the Implementation options which we have to fill up for each operating unit.
    In the implementation Options form in the first tab 'System' there are many fields to be filled up.
    For 'Summarization period Type' we choose 'G L Period' and based on this the fields 'Calendar Name' and 'P A Period Type' automatically gets populated.
    But in our case the 'P A Period Type' is not getting populated.
    Can you let me know where we can link the 'P A Period Type' to the chosen 'Calendar name'?
    Also there is a check box - 'Maintain common PA and GL Periods'. If we tick this check box, a message says: 'The Period Type and Calendar of the PA Period does not match the Period type and Calendar of the corresponding GL Period.'
    Can you please let me know where to create the PA Period based on the corresponding GL periods?
    Regards

  • Termination error when accessing resource tab in project template

    Hi,
    i am getting error when i am trying do resource in the project template. i have structured the project structure in the template. and i am trying to add roles for the project template but it is showing termination error when i click on "resource tab" in the template. 
    anybody can help on this error?
    thanks,
    Prabu
    i have serached for notes but it didnt help.
    fyi,  below are the error message i am getting,
    Error while processing your query
    What has happened?
    The URL call http://cmcw08v701.us.fit:8000/sap/bc/webdynpro/sap/CPROJECTS_FPM was terminated because of an error.
    Note
    The following error occurred in system CMD : Line types of an internal table and a work area not compatible.
    The error occurred on application server cmcw08v701_CMD_00 and in work process 8 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RETRIEVE of program CL_DPR_API_APPLICATION_OBJECT=CP
    Method: IF_DPR_PROVIDER_ACCESS~RETRIEVE of program CL_DPR_API_APPLICATION_OBJECT=CP
    Method: RETRIEVE of program CL_DPR_API_BUSINESS_OBJECT====CP
    Method: IF_DPR_PROVIDER_ACCESS~RETRIEVE of program CL_DPR_API_BUSINESS_OBJECT====CP
    Method: IF_DPR_CORE_SERVICE_PROVIDER~RETRIEVE of program CL_DPR_API_CPROJECTS_CSP======CP
    Method: IF_DPR_CORE_SERVICE_ACCESSOR~RETRIEVE of program CL_DPR_API_CORE_SERVICE_MNGR==CP
    Method: HANDLEDEFAULT of program /1BCWDY/0O2TQEJ08RJE3X97BQID==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/0O2TQEJ08RJE3X97BQID==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
    Method: NAVIGATE of program CL_WDR_CLIENT_APPLICATION=====CP
    What can I do?
    If the termination type is RABAX_STATE, you will find more information on the cause of termination in system CMD in transaction ST22.
    If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server cmcw08v701_CMD_00 in transaction SM21.
    If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process 8 in transaction ST11 on the application server. cmcw08v701_CMD_00 . You may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system adminmistrator.
    Error Code: ICF-IE-http -c: 120 -u: PTHANGARAJ -l: E -s: CMD -i: cmcw08v701_CMD_00 -w: 8 -d: 20110918 -t: 002509 -v: RABAX_STATE -e: OBJECTS_WA_NOT_COMPATIBLE -X: 005056B8017E1ED0B8B7AF786703B697_005056B8017E1ED0B8B7AF77EFCBF697_1 -x: 7BBDE1E038C3F1239697005056B8017E
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Line types of an internal table and a work area not compatible

    Hi Prabu,
    Just do a quick check if there is any custom implementation in Project management side. This may occur most probably due to not defining the navigations properly or if any modifications in the Define Navigation part of SPRO. Raising a ticket to your BASIS team might help some time to resolve this. Last option is OSS notes.
    Regards,
    Karthik

  • Finite Measurements Project template

    Hello,
    I am using the Finite Measurements Project template for acceleration
    acquisition using an accelerometer. I made changes to the project and it is
    working properly except for these three major points:
    1)  Copy Graph- How do I put a ask user to define file path (A pop-up window)? It only
    allows me to change the file path in the block diagram window.
    2) Update UI -I would like to change to a free running VI and update the main
    user interface during an acquisition real time. How do I do this? I tried
    adding a data display loop. But it is not working properly.
    3) Analyze- I would like to press the analyze button and be able to convert the
    acceleration data to an FFT in the frequency domain. But it is not able to export the FFT data into the Main.VI
    Thanks in advance for your help.

    Unmnt,
    If you are able to attach your project to your post it would help us out a lot.
    1.  You can use the "File Dialog" Express VI and have the output of that VI go into the input of the invoke node.  This VI just pops up a browser similar to when you are saving a file so it might be better in the future to make your own SubVI so the user has a better idea what they are doing.
    2.  This is where an attachment will come in handy but it looks to me like you are trying to use a queue to update a graph but I am not seeing where you are Enqueuing data.
    3. I see you use the FFT functions but I am not sure what you are doing after you auto-index the outputs.  You might need to just add a FP indicator and wire that to the connector pane but again an attachment would probably clear this up.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • Project template distribution

    Hi,
    I made a project template that I want to use for all my projects. It includes controls, VIs and a specific archtiecture in the project view (autopopulating folders, etc...).
    Is it possible to create a project template such as a VI template ?
    If not, is there a way to use an installer to copy all files in a specific folder, rename a part of VI and control names, and have the project running ?

    Hi zyl7,
    If i well understand what you want to do, you would like to create a project template and to use it for several projects. The best way for you to do that is to create your project and save it in a folder as your template project. When you will need to use this to implement a project you will just have to open it rename it and build your project.
    This way is the same thing as if you had a project template.
    There is another discussion in the forum that could interest you, here is the link:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=172972&requireLogin=False
    Regards,
    Jérémy M. | Certified LabVIEW Developer
    Design Engineer - LinkedIn - Contact
    Don't forget to give Kudos to good answers.
    N'oubliez pas de donner un compliment aux bonnes réponses.

  • XML Messages Into Projects

    I need to figure out how to get XML messages into Projects at a business proces level. So far it seems Advanced Queue as an entry point but have adapters been written for Projects?
    Any help pointing me in the right direction would be appreciated.
    Cam Smith

    From OTN:
    Oracle XML Developer's Kit (XDK) provides components, utilities, and interfaces you can use to take advantage of XML technology in database applications. You can use different parts of the XDK for different projects, depending on application requirements, programming preferences, and development and deployment environments. Oracle has implemented support for XML and the XDK throughout its products and applications.
    http://www.oracle.com/technology//tech/xml/info/htdocs/otnwp/about_oracle_xml_products.htm

Maybe you are looking for