Producer consumer with the third loop model

Hello everyone and thank you for looking at this.

I have a problem that I thought for a while now on the execution of a third loop in a design model of producer consumer (with events).

I use this type of model for a UI and am happy with how it works. However if I want to add a continuis loop model to test for example how can I control the loop?

In my example (see table), I use a local variable to run them (or stop) the test and the same to close the application.

I don't know why, but this feels wrong to me. Is there a better way?

Thanks in advance

Chuck

Nickelback says:

Is the problem with the consumer loop only runs when it receives a message from producer loops event.

Nothing says that you can't have a consumer loop enqueue States to itself.  Of course, this is more in a State Machine in queue with the possibility for another loop to the States of the queue.

Tags: NI Software

Similar Questions

  • events producer consumer with notifiers

    Dear users of LabView,

    I would like to ask your advice on my project (see the attachment of files). For the beginning, I did only the "backbone" of my project, that's what you can see in my VI. My project will have the following features:

    -Start and stop action possibly (and also plot data to the chart and saving the data to the file)--> here is some time a loop to record data ranging from DAQmx (USB6009) and another while loop with rates of different loop to rise in voltage output amplifier of the magnet.

    -During the measurement, or if the system is idle, the user is able to read files of measured data and evaluate the measured data, etc... (so there will be more features...)

    I decided to use producer consumer structure with events and the authors of notifications, and I also use the dynamic user event to be able to communicate to the consumer with the producer (where I have my machine of the State as in a shift register).

    Please comment on my VI, what do you think? Maybe I should use the state machine (the shift with the pole of the State Register) in the lower loop? I could also use up queues of the notifier, but since I send only orders and the values of the parameters (not streaming broadband data) I guess that the declarant is fine?

    Thanks for the tips!

    The code you posted looks like a good start.  The architecture is very similar to the measurement sample continuous project comes with LabVIEW 2012.

    A few things I noticed:

    1. I would usually use queues instead of filers (unless you want to manage only the last command and not all orders in the order they are received).
    2. You don't need the registry change in the top loop (structure of the event).  You inadvertently send a length of measure and other commands parameter since you replace only the command.  Probably, this is no problem for now but could be a problem later.
    3. I think the user events are a great way to manage cases of judgment where the consumer is able to report to the producer that the application must exit loop (this is how we do in the sample project).
    4. Your case 'Init' confuses me a little.  It is read length control measure and send a user event in the event that, in the structure turn immediately place a measure command. Once I see a control in a loop of consumer as it hurts a bit uncomfortable. Why not have the value "start_measurement" to change event read the length of measure command and send it as part of his message to the consumption loop. Then the loop of the consumer can Init and self talk to start the measurement.
    5. You may need to rethink your strategy mistake in the case of the measure. Currently you do not stop a loop if an error occurs, and allows you to keep the error between iterations of the loop information shift registers.  Therefore, if an error occurs in one of these loops you can never hear about it.
    6. In general, using the error state as the main way to stop a loop from consumers is a bad practice. I'd rather see a "Shutdown" command which causes the consumer to stop loop. It is more scalable and less likely to be triggered by the accident.

    Good luck with the rest of your application.

    ~ Simon

  • Using the producer/consumer with GPIB/VISA model

    Hi all

    So I have a .VI I learned to communicate with my camera, I joined. I tried strip down as much as possible, just to understand the concept. It basically just takes a resource VISA name, use this open VISA, then uses the same resource VISA to write a command that reads the data from my machine (xall?) and then bed in 500 bytes and which prints. If it works, and it's good.

    I try to use producer/consumer model for doing essentially exactly what this guy. I have a RLC, I want to press a button that starts my measure, I want him to taste several times per second, save the data in a text file or .csv and then stop when I press the stop button. Thus, he will be given indefinitely potentially.

    I would like to have the data in a format something like:

    Time C R

    0 5.0 4.3

    ... etc.

    I read the link of model p/c above, but my LabView knowledge is still low. Currently, my plan is to take the part of read/write of my attached VI, which are a sub - VI and then put that in the pink box in the VI for the producer/consumer above page that is labeled "produce data to be placed in the queue":

    What prevents me to do this, it's that I can't get the piece of read/write to work properly as a standalone Subvi.

    What is the right way to go about this?

    Thank you!

    I put if you actually found data of your instrument.  Your instrument is not made to take new measures or just send you the last reading, she did.

    Insofar as the file IO, I recommend that you learn to use the palette for the file IO functions.  You need to create your file before your loop, write in a text file inside and then close after the loop.  I don't do the thing the comment on the express VI entry will do what you want.

  • You try to run the system on my desktop restore encounters a problem with the program looping.

    Original title: System Restore loops

    Hi, I am trying to run restoring the system on my desk is a problem with the program in a loop.  He directs the system restore and then comes back just to start the system again Restore page.  How to solve this?  I started having problems when I have updated the BIOS on my motherboard.  When I installed the motherboard at the start, I think I used the incorrect installation disc (my son has same brand motherboard but the sound is more advanced).

    Recovery of your computer (Windows) using "Recovery Partition" of the Manufacture or
    contact PC manufacturing (see support links below) and order the recovery media.

    Note: Activation is not required when you use the recovery partition or recovery media, but you will need to reinstall all your applications.

    Also to save your documents on external support (if possible) before starting the recovery process.

    Once completed, your PC will be actually in the State when you first purchased it and turned on for the 1st time.

    To access the recovery Partition, start your computer, and then by pressing the appropriate function key. It can be either F1, F2, F9, F10, F11, F12, DEL or tab key. Check the list below or your user manual for your brand and model.

    If your hard drive has failed, do not have a recovery partition or the recovery partition is not accessible,
    Then, you must contact the manufacturer support team and ask for a "recovery disc" which allows to reinstall Windows 7.

    How access/start the process of recovery of the manufactures listed below.

    Acer: Press and hold ALT + F10, as soon as you see the logo
    http://Acer.custhelp.com/app/answers/detail/A_ID/2631
    Acer support: http://www.acer.com/worldwide/support/
    Acer recovery support: http://store.acer.com/store/aceramer/en_US/eRecovery

    Advent: restart your computer, then the immediate start by pressing the [F8] key or the F10 key.
    The fastest way to restore your computer is to use the hard disk recovery tools. You can access them by restarting your computer and then pressing the [F8] key or the F10 key until the Advanced Boot Menu appears. Use the arrows to select "Repair your computer", then press [Enter]. Read all of the instructions on the website of advent and made your choice as to the action you want to perform: http://www.adventcomputers.co.uk/restore-or-reinstall-windows-your-computer
    Support: http://www.adventcomputers.co.uk/product-support/support-services

    ASUS: Press or press the F9 key as soon as you see the Asus logo.
    http://support.ASUS.com/troubleshooting/detail.aspx?SLanguage=en&m=X53E&OS=&no=1775
    ASUS support: http://support.asus.com/contactus.aspx?SLanguage=en

    Dell: Press F8 directly after switching on / to start the computer
    Recovering detail instructions:
    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?docid=DSN_362066
    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?docid=52182
    Dell support: http://www.dell.com/support/home/us/en/19?c=&l=&s=
    Or: http://www.dell.com/

    EMachines: hold the Alt key and hold press and release the key F10
    http://Techchannel.RadioShack.com/eMachines-system-recovery-1747.html
    Support: http://www.emachines.com/ec/en/US/content/support

    Fujitsu: Press F8 several times directly after switching on
    https://answers.Yahoo.com/question/index?QID=20110406074143AAcx1Zw
    Support: http://www.fujitsu.com/global/support/

    Gateway:
    http://www.ehow.com/how_6297937_restore-gateway-laptop-factory-settings.html
    https://support.gateway.com/s/software/Microsof/Vista/7515418/7515418su531.shtml
    Support: http://www.gateway.com/worldwide/support/

    HP Notebook: Usually to begin recovery process press the F10 key, power on the computer
    HP Mini: Press F11 directly after switching on / to start the computer
    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c01867418&cc=us&destPage=document&LC=en&tmp_docname=c01867418
    Support: http://www8.hp.com/us/en/contact-hp/ww-contact-us.html

    Lenovo uses the F11 key to launch the restore process:
    http://support.Lenovo.com/en_US/detail.page?LegacyDocID=MIGR-4UFUYK
    Directions for Lenovo OneKey Recovery, hidden partition and recovery DVDs:
    https://support.Lenovo.com/us/en/documents/ht077384
    and: http://support.lenovo.com/en_US/detail.page?DocID=HT077144
    Support: http://support.lenovo.com/en/supportphonelist

    How to run Lenovo Onekey Recovery
    http://support.Lenovo.com/en_US/downloads/detail.page?docid=HT062552
    Detailed as follows: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&LegacyDocID=127597018499211

    You can also find parts of this article from Lenovo worth reading:
    http://support.Lenovo.com/en_US/detail.page?LegacyDocID=MIGR-4VFUDU

    LG: Press F11 directly after switching on / to start the computer
    Support: http://www.lg.com/

    Packard Bell: Turn on your computer. When Packard Bell logo is displayed, press in and hold the ALT key while pressing the F10 key several times. Release the keys when a message that Windows is loading files.
    After the system recovery program has loaded follow the instructions to reinstall the operating system.
    Support: http://www.packardbell.com/index.html

    Samsung: Press the F4 key to the Samsung logo when you turn on first of all of the computer.
    Support: http://www.samsung.com/

    Sony VAIO Windows 7: restart and press "F10".
    https://CA.en.KB.Sony.com/app/answers/detail/A_ID/35585/p/48903, 49902,71663,71664/c/65,67/kw/recovery%20using%20f10
    Sony VAIO Vista: Restart and press "F8" repeatedly until the screen "Advanced Boot Options".
    https://us.en.kb.sony.com/app/answers/detail/a_id/41931/~/how-to-perform-a-system-recovery-using-the-vaio-recovery-center.
    https://us.en.KB.Sony.com/app/answers/detail/A_ID/41949/session/L2F2LzEvdGltZS8xNDA4MjI2NTAzL3NpZC8qWVBPbCpfbA%3D%3D
    Support: http://www.sony.net/SonyInfo/Support/

    Toshiba: Press on F12 or the value 0 (zero) key on the top of the keyboard (not the zero on the numeric keypad key)
    and at the same time, press the button power once to turn on your laptop.
    When the Toshiba screen appears; release the 0 key.
    References: http://www.mytoshiba.com.au/support/items/faq/71
    http://forums.Toshiba.com/T5/system-recovery-and-recovery/how-to-perform-system-recovery-Windows-7/Ta-p/279643
    Support: http://www.toshiba.co.jp/worldwide/

    Windows 7 - location of the Partition Recovery and information.
    "Configurations of drive partitions using the BIOS has recommended.
    Note: Check the diagrams of this article
    http://TechNet.Microsoft.com/en-us/library/dd744364%28WS.10%29.aspx

    J W Stuart: http://www.pagestart.com

  • Help with the enforcement code model

    I need to find a way to apply a pattern that I can't enforce through the specification of the normal template.

    I have a field that must be two numeric characters.  If only a numeric character is entered, then it must be two characters, with the first main character being zero.  So, if you enter 3, then the field becomes 03.

    In addition, none of the non-numeric characters cannot be accepted.  Unfortunately, if I try to specify a model in a numeric field, then it converts all non-numeric characters zeros!  Who does not work for my application.

    The plan I came up with is this: make the field so that it is not wide enough for the characters to width fixed to fit and check the box to limit the length of field to the visible area.  Then enter the code on the output event that will check the characters who had entered one at a time, first the left then the right.  It can examine the ASCII values for these characters to ensure that they represent 0 to 9 digits; This would mean that the ASCII value of each character must be greater than or equal to 48 and less than or equal to 57.  If one of the characters does not pass this test, then the computer will beep (as it does when I try to enter an alphabetic character in a numeric or decimal field, if it is possible to make a beep like that) and the field is cleaned.

    Can someone help me with this code?  I know I have to use javascript instead of formcalc (since there is no function ASCII in formcalc I know), and I don't know javascript, so I'm at a loss.

    Thanks for any help...

    Hello

    As with most of the code, there are a number of ways to do this. Here is an example that you can add to the event of output of the field in question and make sure that the language is set to JavaScript, or well the code generates an error. I've added comments for you to see what is happening:

    var myRegex = / ^ \d{2}$/; This corresponds to a 2-digit model

    var singleDigits = [0,1,2,3,4,5,6,7,8,9]; Table for verification to a single digit

    for (var i = 0; i)< singledigits.length;="" i++){="" loop="" through="" single="" digit="">

    If (this.rawValue == i) {/ / if the value is a number in the table}

    this.rawValue = "0" + i; Add a "0" in front

    }

    }

    If (this.rawValue! = null | this.rawValue! = ") {/ / only if the field contains a value...}

    If (! this.rawValue.match (myRegex)) {/ / and it does not match the model (i.e. 2 digits)}

    this.rawValue = "; Clear the field

    xfa.host.setFocus (this); set the focus on the ground

    xfa.host.messageBox ("error: reason for conflict.") Only 2 digits can be entered in this field. ") ; Enter any message you want here

    }

    }

    This field must be a text field for the '0' to be added to the front, otherwise, if it is a numeric field, the code will try to add the '0' mathematically the number entered and you'll end up with a single digit again.

    Another option is to make the field a comb 2 numbers and then you can delete the second block of code.

    -

    Dallas

  • Three questions.  The heart rate monitor now plays nice with the third-party applications?  Can you run these third-party applications, without the link to your phone?  How much storage?

    My experience with the original watch is that the heartbeat was working fine with apps in the House but does not work well with third-party applications.  Aboriginal health applications were sub par at best.  In addition, he wouldn't these third party apps (Strava), unless you were related to your phone.  A new doesn't do me much good if it is always the case.  Finally, it's great that you can bind your helmet now but what storage is the watch have?  I am not unrealistic, its understandable if its not much, but I hope that it is enough that a few apps and music enough to pass through a 4 hour tour.

    1 WatchOS3 made major changes in this area, and 3rd party applications get access to things like HR. OS3 also makes everything much more receptive. 3rd party applications will need to be updated to play with the HR monitor.

    2. you can run applications 3rd party without the phone with you, but for your type of application, you'll want a series 2 with GPS watch. The likes of Runkeeper OK working in the older shows, but without GPS, they do not really work you need. New - 3rd third party apps will need updates to work with the GPS watch. OS3 software has been available to developers for a while now, so I expect software updates only very quickly. I don't know if or when 3rd parties had access to the equipment and GPS devices, s, then it may be some while before they have series 2 updates.

    3. you can store 2 GB of music. How much music that is depends of course format and quality, but certainly several hours.

    Hope that helps

  • G72 - B66: is this form that he could work with the HP G72 model

    Is this or is this screen may work with the HP G72 - B66 model

    Hello

    The screen above will not work on your device.

    G72 the product manual, check Page # 69

    http://h10032.www1.HP.com/CTG/manual/c02623152

    The G7-1000 product manual, check Page # 89

    http://h10032.www1.HP.com/CTG/manual/c02720306

  • Problems with the pages of models CS3

    My site is www.cft-aft.org and I have problems with a page or two that were created from a master template that the images are not loading or projection. An example can be found at http://http :// www.cft-aft.org/Get%20Involved.html. I don't know what the problem is or how to diagnose.  All pages of this website have been created from the master template. I had some file management problems in the past, and I think I have corrected most of them (with the exception of the change of name without spaces). I understand that this could be a problem and if it is my problem with this specific page, I understand.

    I have attached a few screenshots of the presentation of dreamweaver and a screenshot of my side of local and remote sites.

    The main problem with the page get involved is not editable images do not exist. Everything lies in the local root folder of the site/htdocs, on both sides. I noticed that when I do to the top of the page get involved in DW is at the top right of the screen, he reads a long path (shown as an example on the screenshot) and on other pages which load correctly, the path is not the same thing, but they reside in the same folder. I suspect that this is probably my problem, but I'm confused, how it got like that and worse still, how fix without having to completely rebuild the page.  I am a total novice and teach me how to do this using the DWCS3 Missing Manual book, but I can't find a solution in there, so please help if anyone can, with step by step instructions.

    If anyone has any idea how it happened, I'd appreciate comments so I do this again.

    If more information is needed, please let me know.

    Thank you

    Hi, Kelly.

    What keeps you from renaming files with Word spaces? It is a good idea. On ALL of your files. Rename them to the INSIDE of the files Panel.

    You work in a defined site? Yes, you are.

    The page you we directed (with an address disheveled, but easy to fix on the track), shows a large number of links to files on your computer, do not using links to other files in your root directory.

    You must open your template and reapply links to all images. Save the model. Once you have re-applied the links in your template Master.dwt, change > models > update of the Pages... while your model is open (especially if DW does not ask if you want to update the files). Record everything (better yet, don't have other pages opens when you update the pages...).

    Depending on how you created your page "Se Involved.html", it would be preferable for you to set up a new page of the child of your template and copy the changing content of the old page. Name the new page (without spaces in the file name... lol...) and save it. You won't be totally rebuild the page, because a lot of it will flow in your model.

    Commenting on your illustration to pdf, you want the indicator model-based Yellow Page in the upper right of your page based on a model of read model: Master. Pages containing the path to the top there are incorrect. I don't know how this happens, but it could be a problem with moving the files outside the DW (bad idea)... always use the files Panel to move files. You have full access to your computer in this window.

    Beth

  • Returns a route with the network data model

    Hi all,

    I like to read (on Chapter 11 of "Pro Oracle Spatial for Oracle Database 11g" manual) is it possible to receive the direction of travel of the computation of the path more runs using the routing engine.

    I want to ask you: is possible to receive the sense of the market by using the network data model? (for example, by using the Java API).

    Thank you in advance.

    Hello

    NDM API manages only the paths to the topological level. i.e. path of nodes and links. It generates no routes since the paths.
    You must use information Street links to generate driving directions yourself. You may need to use the sign post information as well as information geometry (towers from left to right) for directions.

    You can also use (API XML that uses the NDM API as its scan engine!) of the motor routing service Oracle to generate your itineraries which will include directions.

    Jack

  • change my model of producer consumer with different types of orders


    Right,

    Sorry I was not clear about that. I meant add the enum that I mentioned to the cluster.

  • Producer consumer with inputs and outputs analog and digital

    Hello world

    I'm working on a program of control system for some practical test work. Currently, I am working on the data acquisition of the Labview program component. My architecture is consumer-product loops with a what. My system will have analog inputs, outputs, analog inputs and digital outputs. It is not a criticism of time sytem, but I wish that all the acquisition of data to synchronize. I enclose my program because it is at the moment. I have difficulties to get all the data in the since that I have two types of data. In addition, I don't know if I have synced the four sequences of read/write correctly. I would be very happy if someone could take a look at my program and give me some advice. Thanks in advance.


  • "Dell Backup and Recovery" asking the upgrade with the inspiron 15 model

    Hello

    I'm new to this forum and also started to use the Dell laptop. I bought Dell Inspiron 15 (model 3521) 01-Jan-2014. I am trying to take backup of my laptop on a DVD. When I clicked on 'Backup and restore of Dell' app in app Manager. I try to click on backup system option 'Dell backup and recovery' section, its upgrade premium or enter key. Its not that allows to create backup DVDs.

    What may be the issue? Because when I bought it, seller said that his original one.

    It's part a scam from Dell.  I've got 5 Dell portable computers/computers / tables all have this software on it with a VERY limited useage then weekly or if I get a pop window op offering the upgrade at a special price which, in the end, is the same price as if you would have just bought or 'improved' (like Dell likes to call it) the program to a regular price which IS : 39.99.

    What I hate about businesses, in particular, the one that I spend a lot of money with it, is when they think they can put a quick access on me or in my case 5 times that I have 5 of these upgrade special offer windows popping up each week.

    You're better off getting programs like Goodsync which will back up your computer or synchronize your files on an external hard drive, and that you can use on all of your computers for only $29.99.  I use it on my servers and my offices.

    Otherwise good luck with Dell and their implementation to special day called 'offer' that is the price of retail, after all.  NOT COOL DELL ALL!

  • Problem with the digital field model

    Hello!

    This problem is driving me crazy!...

    I placed a numeric field and used the following model:

    NUM {zzz zzz zzz, zz9.99}

    This field must view and accept with 2 decimal places and in European format floating point numbers.

    The locale by default for this form are the Portuguese (Brazil).

    So... If I type something like 99999, the field correctly 99.999,00.

    Now, if I type 99999.00, once again the field correctly contains 99.999,00.

    However, if I type 99999,00 (with a comma instead of a period, what I need) field contains 0.00.

    Please, thank you very much for all the ideas!

    Marcos

    The result you get is correct, because the boss lets only a time separate decimals.

    Try the following change:

    NUM {zzzzzzzzzzz9, 99}. NUM {zzzzzzzzzzz9.99}

    and this view model:

    NUM {zzz.zzz.zzz.zz9, 99}

  • With the help of models

    Hello

    I have many pages have been created from a template.

    Strangely enough, I entered in the templates folder and made a change to the model in there, but it is not up-to-date standard pages...?

    It seems that they have separated from the model, OR there is another model somewhere else who controls these pages...

    So, is there a way to watch a standard page and trace where his master is?

    Thank you

    Here are seven common mistakes which will result in changes of proliferation do not model for child-

    1 rename the Templates folder

    2 move the folder models to another level of folder in the site other than the root level

    3. move a template outside of the Templates folder.

    4 changes to an editable model (which is not set)

    5. on the assumption that the changes made to the model will be will be by simply downloading the file Template modified on the server without downloading also files the modified

    6 corrupt the site cache to make the link between the model and the child page is broken

    7 wrong to create your child pages to just open the template, adding specific content on the page and re-register the model with an extension *.html rather thanits *.dwt extension. (you can tell if this is the case by looking at the code on a page of the child - if you see something like