QSM Architectu​re

Hi Guys,
Please, I would like to know about LabVIEW Queued State Machine - Producer/Consumer Architecture. This is like event structure in the producer loop and state machine in the consumer loop. Any representation vi may helps.
Sasi.
Certified LabVIEW Associate Developer
If you can DREAM it, You can DO it - Walt Disney
Solved!
Go to Solution.

I prefer calling that a Message Handler, but it is mostly known as the QSM.
Anyways, here's an example in the NI Communities:https://decibel.ni.com/content/docs/DOC-14169
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Qsm pc, problem with stop loop

    Hello,
    i tested queue producer/consument with event case, but i have problem with stop the both loop, can you help me with attachment ?
    Attachments:
    queue_mereni_1.zip ‏46 KB
    Global_queue.zip ‏3 KB

    thanks for your answer,
    i had problem with upload *.vi (some mistake), so when a upload *.zip it was ok, but i do not know why..
    please, when i put time out constatn, so when i push "stop" then both loops end - it is ok BUT:
    when i push "stop 2" button (for the second loop) so there is error (in attachment), please do you know why?
    i am sorry for a lot of questions but i try understand it..
    thank you
    Attachments:
    qsm.jpg ‏31 KB

  • VERY basic - how to decide what type of architectu​re to use?

    Forgive me if I'm breaking any forum rules with this post - I'm very new to this.
    I'm trying to write a Labview program to perform a functional test on an electronic product.  The test is fairly sequential - plug in the unit, apply a certain voltage, step up the voltage until the unit turns on, then turn on an electronic load, measure the load voltage, then step up the input voltage again, etc.  The power supply and electronic load that I'm using both have Labview drivers. 
    I'm brand new to Labview, and I have no resources in my company to help me out.  I have taken the Core 1 and 2 training class.  The problem is, I'm not really sure how to start.  Would this be a producer/consumer architecture?  A QSM?  I've been scouring these forums the past couple of days, but most of the discussions are advanced.  I don't understand all the acronyms.  A lot of the replies here assume you have some knowledge of Labview, and I don't.  Part of the problem is that I don't even know enough to ask a specific question, and that's why this post is so vague.
    I'm a competent PLC/HMI programmer but don't have any experience in other languages.
    I also want to be able to use variables for my limits so that I can easily change the pass/fail limits.  (For instance, I want the voltage and current pass/fail limits to be configurable from a "maintenance" screen on the Labview interface, but I don't know how to create multiple screens or password protect them).

    I have stated my opinion reagarding the QSM* design pattern previously and will not repeat it again here aside from "I avoid them like the plague".
    Architecture questions are good question but hardly "very basic" although some architectures can be very basic.
    I would recomend a State Machine that uses Action Engines to control your widgets.
    in this thread AND this thread I wrote extensively and included design documents for apps I developed. I invite you to look those over and start developing your own design that meets your needs.
    Ben
    * It is imposible to fully document all of the possible transitions of a QSM and since my application all are fully documented, the QSM is not an option. A Queued Message Handler on the other hand is different.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • QSM (Producer/Consumer) Template

    Hello everyone. Before I start with my project (instrument control and data acquisition) I made a template using the JKI State machine template and converted to queued based state machine with producer/consumer loop. Basically, I wanted to separate the processing i.e.. data acquisition etc. from any front panel activity i.e. button press etc. Since I've worked with JKI template quite a lot, I'm used to the idea of string based queues and the layout of the template itself, so I just modified it to better suit my needs.
    I checked the JKI Producer/Consumer design at: http://forums.jki.net/topic/1347-jki-state-machine-producer-consumer-loop/, but it wasn't quite what I wanted since if my hardware (i.e. motor) reaches a certain limit (safety issue) I have to terminate the process (easily accomplished with the above example), however, if user decides to intervene (HARD STOP), then the process wouldn't terminate on the second loop. 
    Anyway, above is just an idea of what I'm in to and attached is a template I decided to do with QSM Producer Consumer style.
    I would appreciate any comments/improvements that you might be able to do in this template.
    Thanks 
    Kas
    Attachments:
    Qued State Machine.zip ‏96 KB

    Thanks anyway.
    Regards
    Kas

  • Query rewrite error QSM-01219

    Hi,
    When having a query run with the REWRITE_OR_ERROR hint the query fails with:
    QSM-01151: query was rewritten
    QSM-01209: query rewritten with materialized view, CM_FT_FX1_MV, using text match algorithm
    QSM-01219: no suitable materialized view found to rewrite this query
    What do these error then mean? Does this mean that the MV wasn't found or that the MV had issues? This worked before and the only change was that we upgraded the database from version 10.2.0.1 to 10.2.0.3.
    If the MV name is specified in the hint REWRITE_OR_ERROR(CM_FT_FX1_MV) then the query works fine. Is something like this supported in Oracle: REWRITE_OR_ERROR(MV1,MV2,......) ?
    Did anyone encounter similar issue?
    Thanks,
    Zrinka

    Since you have not posted more details, see if your case is similar to bug 7201596 on metalink.

  • First attempt at Producer Consumer Architectu​re: continuous read and dynamicall​y update parameters​.

    Hello,
    I am currently working with two instruments; an Agilent E3646A and an NI 6212 BNC. My objective is to have the 6212 to be continuously taking measurements according to predefined parameters while the E3646A's parameters can be continuously updated. This simple instrument combination is intended to help me learn the necessarry achitecture; continuous measurement, dynamic output control, and more instruments will be added in the future.
    I've previously posted on a similar, but more complicated, setup (http://forums.ni.com/t5/Instrument-Control-GPIB-Se​rial/Split-second-lag-when-controlling-two-instrum​... and was advised to try the Producer Consumer Architecture. I've found relevant literature on the site (http://www.ni.com/white-paper/3023/en/, https://decibel.ni.com/content/docs/DOC-2431), searched the forums and constructed my own VI. While my first attempt at a Producer Consumer Architecture has resolved some of the issues I was having when I first posted on the subject, however, new issues have arisen with regard to reading and stopping the VI.
    I am currently able to run the VI and update the device parameters. Previously, I would get a freeze while the instrument was being updated and could not toggle parameters until it was done. This has been resolved although the read only updates when a parameter has been updated although it is outside of the event structure. Furthermore the Stop button does not work in any context. I've also gotten occasional errors regarding the Deqeue Element but the bulk of the trouble is Error -200279 "Attempted to read samples that are no longer available" at DAQmx Read. I realize that there is a problem in my Producer Loop but haven't been able to figure out how to resolve it.
    This is my first attempt at a Producer Consumer Architecture and already I can see that it is a powerful tool. I read as much as I could and looked at the relevant examples but expected to have some issues in the beginning. Would really appreciate any advice so I can take full advantage of the architecture.
    Hope to hear from you,
    Yusif Nurizade
    Solved!
    Go to Solution.
    Attachments:
    DCe3646A_DAQ6212_Prod_Con_4_13a_2014.vi ‏89 KB

    Jon,
    Thank you for the response and the suggestions.
    I created the Local Variable for the Stop Button and moved the original into its own Event Case. It is now able to stop VI execution although I get Warning -1073676294 which I understand to be the buffer issue. The warning says that this was incurred on VISA Open for the E3646A's Initialize VI which is outside both loops, however, which I don't understand.
    I tried increasing buffer size by decreasing the Number of Samples as per suggestions I found on NI forum threads. I've brought it down as low as 1 but the graph still only updates when an Event occurs and I keep getting the same buffer error. You suggested that the problem could be that they are in the same loop; does this mean that the DAQmx read should be outside both Producer and Consumer Loops or moved into the Consumer Loop? I found a couple of links ( http://forums.ni.com/t5/LabVIEW/Producer-Consumer-​Design-Pattern-DAQmx-Event-Structure/td-p/2744450 ,  http://forums.ni.com/t5/LabVIEW/Producer-Consumer-​Architecture/td-p/494883 -first response) on dealing with an Event Structure that my own VI is based. Alternatively, I found another link ( http://forums.ni.com/t5/LabVIEW/Producer-Consumer-​Design-Pattern-DAQmx-Event-Structure/td-p/2744450 - first response) on a DAQmx Read with an Event Structure that places the graph in the Consumer Loop.
    The core of my purpose in setting up this Producer Consumer Architecture is so that I could read continuously while the instrument parameters are updated dynamically so it's very important that I understand how this works. I am particularly struggling with how the Event Structure is controlling the While Loop's Execution.
    Hope to hear form you,
    Yusif Nurizade
    Attachments:
    DCe3646A_DAQ6212_Prod_Con_4_14a_2014_Edit_I.vi ‏90 KB

  • Quotes for "Managing Software Engineerin​g" and "Advanced Architectu​res" course material?

    I tried sending an e-mail through NI.com and never got a response, so I thought I'd try the forums.
    I'm interested in purchasing the course materials for "Managing Software Engineering" and "Advanced Architectures" as part of my CLA prep. There aren't any courses being taught in my area, and nothing seems to be scheduled for an online course. I couldn't find the information searching through the course pages on NI.com.
    Does anyone know how much it would cost to get just the course material for self-teaching?
    Thanks.
    http://linkd.in/mikele

    Hi,
    You can purchase the course kits.
    Here is a link.
    http://sine.ni.com/tacs/app/fp/p/ap/ov/lang/en/ol/​en/oc/us/pg/1/sn/n5:selfpaced/
    You can go to each link, and within the links there is a link to add the product to the basket, so to speak.
    Here is some more FYI, sometimes these links can be a bit hard to find.
    Here is a link for the online courses.   http://sine.ni.com/tacs/app/fp/p/ap/ov/lang/en/ol/​en/oc/us/pg/1/sn/n5nline/
    Inside each link you can see the schedule for that course.
    Also, at this link you can look over a schedule of courses for your area and online, it shows them all on one list.   http://www.ni.com/training/
    Under the section "Build your knowledge with training", there is a link "find a course near you".   On my PC it defaults to my area.
    Mark Ramsdale
    Project Manager and CLD
    Customer Certification and Training at National Instruments

  • Query Rewrite (QSM-01263) and Views in Execution Plan

    Hello!
    I created a query rewrite enabled materialized view from a query, which contains only tables (no views). Query rewrite didn't work, so i checked the query with dbms_mview.explan_rewrite, which told my that my query contains references to views or dictionary tables. I checked my query again, but there are only tables, no views, no dictionary tables.
    When I look in the execution plan of my query I see that the query optimizer generates views, I guess from my subquery (?). "A view definition was processed, either from a stored view...or as defined by steps...".
    I suppose that's the reason why my query rewrite doesn't work. All my other mat views are working fine, so the usual parameters (query_rewrite_enabled, integrity, etc.) are set correctly.
    Do you have any ideas how to get my query rewrite enabled work?
    Thanks!

    Modifying the query (potentially with hints) so that Oracle doesn't do the view transformation would be one option.

  • Learn about NI TestStand from the experts with the NI TestStand Advanced Architectu​re Series

    The NI TestStand Advanced Architecture Series consists of documents covering topics of interest to advanced NI TestStand developers. The series' authors are NI TestStand architects and developers who provide insightful content that goes beyond basic documentation by offering best practices for large and complex projects. The series will release new documents quarterly so check back to see what's new in a few months!
    Follow the link to visit the NI TestStand Advanced Architecture Series.
    Josh W.
    Certified TestStand Architect
    Formerly blue

    Hello J.Venkatesh,
    You should have posted a new post rather than attach it to this post.  Other than TestStand, it has no relation to Tables in Reports.
    Have you looked at some previous post such as the link below
    http://forums.ni.com/ni/board/message?board.id=330​&message.id=3528&query.id=73853#M3528
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • DSC 8.0 : How can I develop a client/ser​ver architectu​re

    I've developed a client/server application with DSC 7.1
    Now, I'm going to migrate it in DSC 8.0 and I've any problem.
    1. How can I load a lvlib from a server at run time ?!
    2. How can I get a shared variable list from another computer !?
    3. Can I monitor shared variables from differten PCs ?!
    Regards
    E.G. (Italy - Naples)

    Elio,
    1.  Regrettably, DSC 8 does not provide a simple means for remote process control, only local.  I have attached an untested example (Remote_process_control_example.vi) which should be able to accomplish what you are looking for but it requires that DSC be installed on the target machine.
    2.  Regrettably, DSC 8 does not provide a simple means for programmatically determining remote process and variable lists.  I anticipate that this will be added in a future release but I must stress that I am not in a position to be certain of that.  I have not found a reliable way around this yet.
    3.  In 7.1, since the tag engine only dealt with a single local process it was sufficient to have only unique tag names.  In 8.0, the shared variable not only has to deal with possibly multiple local processes but remote ones as well.  To accomplish this the shared variable API makes use of URLs much like those associated with the internet, although we rarely have to specify the protocol being used.  Therefore, to read a variable 'baz' in process 'bar' running on machine 'foo' you would construct the following URL \\foo\bar\baz which could then be used by the datasocket read primitive to read the remote value.
    Although the DSC development team chose to focus primarily on purely local systems, since this is what all existing customers already had, it is apparent that they, and the LabVIEW team as a whole, have laid the groundwork for further advancements in the remote machine aspects of the product.
    I hope this helps.
    Regards,
    Robert
    Attachments:
    Remote_process_control_example.vi ‏26 KB

  • Producer/Consumer-QSM

    Hi,
    This VI performs a instrument control. Some parameters need to be adjusted while VI is running.
    Producer/Comsumer design pattern is used to implement it. The producer catches the events of
    value change of parameters. The comsumer goes to corresponding state to deal with the change.
    VI has been attached please give any your comments, suggestions, and advices. THANK YOU.
    Guoguang Qian
    Attachments:
    PC-QueuedStateMachine-IETS.zip ‏1417 KB

    I have not looked at your code from a functionality point of view (plus I did not run it).
    However, I must say that it is among the cleanest, well organized code that I have read on this forum.  Great job.
    Your code is readable, scalable and maintainable.  3 important attributes.
    You are relatively new on this forum.  How long have you been coding?  Very nice code.
    There is only one minor thing that I might change.  Not important, really...
    Instead of reading the entire cluster, I would simply read the needed values in the states where they are needed.
    If your code grows, you may need that real-estate in the future.
    Nevertheless, it is a minor point.  I still like the way you wrote your code.

  • Producer consumer architectu​re functional​ity

    I was wondering if the consumer loop in a producer consumer architecture only works when the producer loop sends something to it, or is it always working, even if it doesn't receive anything from the producer loop?
    Solved!
    Go to Solution.

    In a "pure" producer/consumer, there is no timeout on the queue.  So as long as there is no data waiting in the queue, the Dequeue Element will "sleep" until the is data available.
    As Greg stated, if you have a timeout, then the Dequeue Element will "sleep" until the timeout is reached (assuming no data is available during the timeout time).  There is an output of the Dequeue Element that will tell you if it did timeout.  This is sometimes useful if you want to pull an instrument every so often or keep an ethernet port active.  But that is getting more into the Queued Message Handler than a Producer/Consumer.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • "You cannot open the application "Adobe Photoshop CS5.1" Because it isnotsupportedon this architectu

    I have a Mac OS 10.5.8, 2GHz Intel Core 2 Duo, and although I have succesfully installed the photoshop files, they will not open. When I try to open it the comptuer says "You cannot open the application "Adobe Photoshop CS5.1" because it is not supported by this architecture." Does anyone know what the hell this means or what I should do? Thanks

    Emmasrisd has it ever worked on this computer previously?  If so what has changed did you install new software or make any upgrades to the computer?  Have you also tried removing the software and reinstalling?  If so did you receive any error messages during the installation process?  Finally if you have tried to uninstall did you remove the program using the uninstaller located in Applications/Utilities/Adobe Installers.

  • Multi system control architectu​re

    Hello,
    I am trying to develop an application to control and monitor two systems. The two system will be using a single CDAQ chasis to acquire and control the signals. The two system is identical in all aspect only the channels will be different.
    I am bit confused in selecting the architecture. It will be very helpful if somebody can give me guidance/advice/suggestions/thoughts ....
    Thank You!
    Regards,
    Rajesh

    If the two systems are identical, make reentrant VIs so that they can run completely independant.  Just pass in which channels in the cDAQ to use.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Plugin architectu​re with shared dependenci​es

    I've developed a framework that is comprised of several libraries and handles tons of UI, logging, graphing, etc. There is a compiled executable that these libraries get compiled into. I have a plugin that I'm compiling into a packed library (lvlibp) that also depends on these libraries.
    Some of these libraries include functional globals that store configuration loaded between the main exe and all plugins. However I've read that compiling into a packed library also namespaces all dependencies which is causing my main exe to not see that the plugin has been loaded even though the plugin's initialization ran without error. Is there anyway around this namespacing done by the packed library so that the functional globals that the plugin sees are the same as the main exe?
    I've also tried doing just a source code distribution for the plugin but it doesn't use the dependencies compiled into the main exe when I try and load it. The source for the framework libraries needs to be in place in order to open the initialization VI for the plugin. With this solution the main exe's functional globals are used to store the plugin's configuration at least and it can see that it has loaded, though I'd rather not have to distribute the full source of the framework alongside what's compiled into the exe.
    In both situations I've ensured the framework gets compiled into the exe by putting all of the libraries in the "Always Included" section of the build specs. For the plugin, I let it leave any dependencies it can out of the packed library.
    Attachments:
    LoadPackedLibrary.png ‏41 KB

    DerrickB wrote:
    Alright then, with hundreds of VIs in these libraries referred to by the main app, is there an easy way to change dependencies over to the packed library? At that point I'd rather just distribute the source as there are already several applications in the field that would have to have all of their dependencies switched over to the packed library.
    I'm also not liking what I'm seeing as far as what VIs are exposed with having to choose a top level library. All of the libraries in the framework are "Top Level" and it's not looking like I can get access to them properly.
    Make a copy of those libraries used by the main application and plugin.
    Create the PPL of each library in a copy made.
    Add these PPL to a folder (which is not part of the project file of the existing application as well as the plugin)
    Later you can right click the libraries in the existing project and simply replace them with PPL's, which will replace all the callers with the VI’s from library to PPL.
    Hope this helps.

Maybe you are looking for