data flow problem, queuing Subvi primary VI

Ive stuck on a very simple data flow problem here, I would like to convey the data queued in the Subvi and dequeue in the main loop of the vi consumer. Ive attached the vi, since im already stuck on this problem, I was hoping I could learn a few things, especially implementation action engine in this situation

Thank you.

Your Subvi makes no sense since your loop will always leave after the first iteration and you always initialize your counter to 0 whenever run you it. This is a problem.

Your code also suffers from several places that are made by the queue data. You will get undeterministic behavior since you do not know which dequeue will get the first data. In general, for a producer/consumer using the architecture queued one or more loops loops should be given enqueueing to the queue. A single loop must be made of data. These loops shuold run in parallel to each other. In your code, you can only run your Subvi whenever you press the Start button and as said you will always show the value 1 to the queue. What you need to do, is to have your Subvi managed independently once it is started. Use "Start Asychronous CAll" to start your Subvi when the Start button is pressed then let it just run. Have it post the meter to the queue. Your lower loop in main VI should remove the values and display them. You need not wait in this lower loop since it is the purpose of the dequeue. This loop will be inactive if there is no current data and run only when the data is in the queue.

In the upper loop of your VI main remove the dequeue and the queue. You don't need them as the Subvi is all that is necessary to validate the data in the queue.

Try this:

Tags: NI Software

Similar Questions

  • Data flow problem

    I tried diligently to understand and implement the correct data flow in Labview. I have a slight problem, now that I don't understand. While inside the loop internal (while loop) and data acq is running, the program does not query the capture button so it will hang in an infinite loop. Since the acquisition of data is configured to read a single sample, my logic says it should do exactly that and query button. I use that as a DAQ simulated at the present time, no hanging physical Board card. May this be the problem? Or is my simply wrong flow data?

    There are a few problems.

    • You don't need a wait in a loop that has a structure of the event.
    • Your case of timeout is not necessary, he asks basically just the back button. Best is to create an event for the back button.
    • Yes, what's good is a structure of the event if it is blocked with an inner loop of maintenance events. You can use the outer loop for everything, it can turn plugs as well through the timeout event.
    • You should have logic to prevent the capture up to this as configured.

    Attached is a quick project on how you can change things. Because I don't have DAQ, I can not test, so there are probably bugs. However, you should be able to see the main ideas.

    Let me know if you have any questions.

  • data flow of a Subvi in primary vi - path refnum

    Hello everyone

    Sorry my English

    http://forums.NI.com/T5/LabVIEW/stream-data-from-a-subvi-to-the-main-VI/m-p/2205150/highlight/true#M...

    -refnum boolean worked

    -graph of refnum worked

    -Digital refnum worked

    How to create a path refnum? a Subvi in vi main stream

    where should I start?

    Thank you

    BOM Dia reach,

    EU awesoe o than você hoje seja isso aqui (Desenho bem simplificado) has:

    Hoje o as voce tem e o Aplicativo Medidor + USB Driver controlando o seu medidor. Básicamente, sua aplciacao esta dividida em camadas very:

    • Size- Wave are as funcionalidades reached programa (interface com o usuario, dados Apresentação, Geraçao of archives, etc.)
    • VISA - Location Software Uma para appropriate control. Básicamente, ele to communication com o USB Driver para poder enviar e receber dados do barramento USB through pacotes.
    • Device driver - Intrucoes SW of baixo nivel para um Periférico um barramento through control.

    No desenho, EU aponto duas camadas wave voce pode atuar para automatizar try suas medicoes:

    E possible access pilot diretamente also o, mas had nao recomendo. O resultado não compensation o esfroco!

    Espero ter esclarecido suas doubt e espero that voce has sucesso na sua application!

    Atenciosamente.

  • Waveform display and the data flow problem

    Hello

    I have a mission and I am facing difficulties in a number of things.

    I wonder to monitor the level of CO and NH3 and the level of measured in ppm following the equations:

    for CO: 50 * (1-exp(-t/7000)) and NH3 is 35 * (1-exp(t/12000))

    The first problem, I do face is the trace of the on a waveform table.

    How can I draw on the graph of the level of CO and NH3 simultaneously / bundle tried but it don't did me not a graph.

    The second problem is that when the condition of the structure of the capital letter is true the loop stops running; How can I solve this problem?

    Thank you


  • problem of data flow in the case structures (using a state machine)

    Good day everyone.

    I'm having a problem with the flow of data between the structures of the case.

    I try to use an example of a state machine for this simple problem. but when I try to send data of a box structure to change the State of the code. It will change not in the desirable output, instead, it offers the possibility that the exit options emul.

    could someone please point what I'm doing wrong here. Any kind of help would be very appreciated.

    With a quick glance at your photos a question you have is that you use not data flow. You write your status updated in local variables value. Your State should pass through the case structures are a single wire. Playback of your order "Enum", happened in the register shift on the right side of your loop probably get running and reading before any processing occurs within the structure of your business. That's why you're reading the old value of the State and not the update. or have a classic case of a race condition in your code.

  • No dialog boxes of Bank of information on data flow diagram

    I upgraded from data model 3.0 to 3.3.0.747, but now I'm having problems creating data flow diagrams.

    Previously, I select the "InfoStore" or "Process" or "External Agent" icon and click on the diagram to create a new object.  Double click the new object would open a Properties dialog box and I would be able to enter information from here.  This always works for the external Agent and the process, but the information never store opens a Properties dialog box.  I tried to find it elsewhere, but I am currently at a loss on how to enter this information.

    Any suggestions?

    Hello

    It seems you have a problem with the content of "system directory set types" in the preferences:

    C:\Users\anne.haak\Documents\Oracle SQL Developer data Modeler\mywork\systemtypes

    You can copy the contents of the default system directory - here it's in your installation of DM datamodeler\datamodeler\types. Or at least you must copy types.xml.

    Philippe

  • from the data varying in queues, error code 91

    Task:

    pass data varying in a cluster as a data type of queue, i.e. the bundle a boolean and a string (the string is converted to a Variant).  Create two while loops (producer + consumer).

    Everything works fine the consumer using variant of the Labview if timeout for the dequeue is - 1 service data function.  Then when the data is sent (in response to a press of button in the producer) data are received and displayed correctly.

    However to modify the time-out of the consumer to say 500ms and then each time-out time that 91 error as shown in the attachment.

    I would like to know what I'm doing wrong, because it is not completely clear to me why it works with the infinite time-out but not the time 500 ms.

    Hello

    When "wait" wait times the function provides an empty cluster as output.  When you try to convert a white to a string type, it generates an error.

    Just do not transmit data to the conversion operation when the dequeue tiimeouts.

  • Lose the mapping source-target of a process of data flow diagram

    Hello

    When I reload an xml repository model design, I lose mappings of source-target of a process of data flow diagram. I wonder why.

    The way it goes is:
    -Define a flow diagram data banks of information, processes and workflows.
    -Information structures are defined on the workflow and information reflected down to the processes and stores information.
    -In a process, I defined mapping Source-target by selecting a target element, and then by selecting the source element.
    -J' I save the entire model.
    -So far, the mapping of the Source-target maintains the link between the source and target.
    -If I leave Modeler data, next time I reload the saved template, the mapping target Source-target associations to elements of source are lost!

    Someone there the same question or do not know how to solve?

    Thank you

    / Mario

    Hi Mario,.

    There are a few errors in the definitions of meta data and you can change them - are located in datamodeler\datamodeler\xmlmetadata directory.
    (1) bad method is used in the definition of Process.xml meta data file:

    getter = "getUpdatedTargetElements" should be replaced by
    getter = "getTargetElements" and it works

    also, there is an error in TargetElement.xml

    getItemByID = "getPartyByID" should be replaced by
    getItemByID = "getSourceByID."

    Philippe

  • Primary key several columns with Date - parameter problem

    All,
    I'm having a problem where I can not find the answer to. I looked upstairs and down nothing helps. Help, please.

    The issue is that I have a table that has a primary key of several columns and a column is a date, and the other is a string. I have a simple search and I want a picture update of the results table that users can click on and go to another page to update this record. The question is when I launch an appeal based on the updated image, I also want to define the settings based on the record that I have selected. So I put the string parameter and that works very well. The problem is with the date. When I put the setting date this market but he chops off the coast of the timestamp. Later when I try to access this setting "("dateParameter") pageContext.getParameter"; that it will bring a date as December 15, 2008 but I need the whole date and time stamp (i.e., December 15, 2008 10:20:33) to properly identify the record.

    Help, please!

    Thank you
    Colby J

    Hello

    because each parameter go into url as a format string, so you will never get the full date with timestamp setting, the solution would be to

    1.) set a fire on the photo update action, give his name to the event as "update."

    (2.) by clicking Update photograph fires this event.

    (3.) processFormrequest in the controller method

    OAApplicationModule am = pageContext.getApplicationModule (webBean);

    If ("update".equals (pageContext.getParameter ("event")))
    {
    This will give you the select line when you click Update

    String rowReference = pageContext.getParameter (OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Line VORowImpl = (EmployeeSummaryVORowImpl) am.findRowByRef (rowReference);
    Timestamp sdateVal = (String) row.getAttribute ("Date value");

    This will transfer the values to the next page
    pageContext.putTransactionTransientValue ("transferdvalue", sdateVal);

    }

    and in the next page, you can get the value as follows

    timestamp getDateVal = pageContext.getTransactionTransientValue ("transferdvalue" l);

    hope this will solve your problem, please let me know if you face any problem

    thanx
    Pratap

  • Data flow of the User Interface general problem (LabVIEW 2012)

    I have problems reading & checking to a tab group user input (see the "Test settings" tab in the attached example).

    Essentially, I need to define and test many parameters.

    In the example, I need to create a bitmask of four switches to selection. Only the system works a treat, but in the context of

    the Panel tabs switches are never 'reached '. I tried to put some time structure around the switches (which works ex vivo

    See attached 'channelselect.vi') but the switches are never reached when I'm not in the code. Basically, I don't want

    Leave the pane until all parameters have been set and verifyied.

    I tried business structures (per group), structures plate Structures (group picture by picture), event (change nutton event)

    I expect the same problems with the other parameter sets. I need to change - set - check, in an order any.

    Understand that the "adjustment" mechanism is linked to a sub-vi/class method where the parameter is tested, defined and verified.

    It is a long-term approach to the fundamental question "How would you have it out"? I don't know that it is a misunderstanding of basic

    my part of the dataflow paradigm. I'm not looking for anyone to do my work for me, but I want to understand how this

    Works I can get on with my day.

    Thanks in advance for any help that you can present.

    You can still have the tab control.  It is just useless to do all your processing when the user changes the tab.  You can do event on the button presses as well.  Treat the VI as a whole VI, not different tabs that you have to manage.

  • Problem understanding reference object data flow

    I'm having some difficulties to understand some of the information I receive in return a stream of inflated a cross-reference in a PDF object data and I hope someone can shed some light on this for me.

    The file is in PDF 1.6 with several revisions and uses compressed Xref objects.  The document seems to have been created with Adobe Illustrator CS4, however I can't be sure of this.

    The last object Xref in the file contains references to 21 objects.  This is what contains the object:

    < < / DecodeParms < < / columns 5/Predictor 12 > > / filter/FlateDecode/ID [< 3A463CD74A9C496D9A4786F3D29731C8 > < A0D07C1430304C0EBAD6AB0556B E8B4E >] / Index [244 1 515 2 613 3 705 1 708 1 711 1 717 8 766 4] / Info 516 R/length 0 0 R / size 74/Prev 1617685/root 518 770 / Type / XRef / W [1-3-1] > >

    First of all, why is there a predictor of PNG in the object?  Is not serious because I can't ignore that.

    When I decompress the stream after the object, I get a byte array of 126 characters (1 + (1 + 3 + 1)) * 21 = 126.  The inflated data looks good.

    According to the documentation (ISO 32000), at page 51, table 18, it describes what the different attributes of each value and how they should be handled, however the information is not just make no sense to me.

    Here's what I get for the 21 topics:

    2 0 0 0 0 1

    2 1 24 182 182 255 (it is almost logical except that the generation number is 255 and that seems strange)

    2 0 3 55 41 0

    2 1 229 22 33 0

    2 0 0 0 0 1

    2 254 0 253 244 0

    2 0 0 2 115 0

    2 0 0 0 90 0

    2 0 0 0 3 0 (if it is deleted why is the next generation number 0)

    2 0 0 0 3 0

    2 0 0 0 6 0

    2 0 0 0 1 0 (why this entry has a reference to the same string free object as the next 5 entries?)

    2 0 0 0 1 0

    2 0 0 0 1 0

    2 0 0 0 1 0

    2 0 0 0 1 0

    2 0 0 0 1 0

    2 1 27 236 189 255 (it is almost logical except that the generation number is 255 and that seems strange)

    2 0 0 1 154 0

    2 0 0 0 65 0

    2 0 0 1 234 0

    Not much sense that's based on documentation limited in the ISO document.

    Miss me something crucial here and I don't know what it is.  Anyone can shed some light on this?

    Thanks in advance!

    Mike,

    We cannot ignore the PNG Predictor - as who modifies the entry of data back - which is probably why you are getting the wrong values.

  • Reading data from a queue - store quick loop, slow loop display

    Here's my BD below.  I'm data queues in a loop faster (100 ms or 50 ms) and by sending this data to a loop of 250 ms.  I need to be able to view the data in the slower loop (so that the public Service only is updated every 50 ms).

    Problem I have: How can I dump the data?  It builds and builds, and finally I'm looking at a chart that contains data that is old in 1 minute.  I tried to write my own code RAS (attached).  I tried to use variables to pass data and use a table to analyze... does not.  Any help would be appreciated.

    If you need all the data into the table, I use the RAS queue and write on the Blackboard in a loop FOR (autoindexing with the array of items in the queue RAS).  You can set the front reporter Panel updated before the loop FOR and reset it after, but I don't know who's going to buy you a lot.

  • Transfer config data refnum problem

    I have problem of storage and transfer of value of refnum of configuration data.

    The value displayed using the seam of the probe to be OK, but it is not accepted as soon as a continuous run is used.

    The attachment shows what I tried.

    How the value of refnum of configuration data can be managed?

    Do not use run continuously.  It is designed for purposes of debugging, not to run your code normally.  If you need your code to continue to operate, put in a while loop (with a sort of timer loop as the function of waiting (ms), while it is not run as fast as possible and consume all your CPU time).  The use of "Continuous run" is like hitting the button run over and over, and some things reset each time you press the run button.  For example, whenever a first level VI ends, all the references he opened - queues, file references, TCP connections, etc. - are closed and become invalid.  This is what you see - whenever the VI ends, it closes the file, so well that the refnum still contains a value, that value is therefore more a reference valid to a file.  Use some time to keep your code running in a loop instead, and it will do what you want.

  • Notifier breaks the normal data flow behavior

    This is another one of those questions to notify... I would be grateful if someone could explain to me what is the problem with the attached VI (LV2012).

    When you move the cursor, I get different readings on a single thread that is just the synchronization of data with the release of a notifier flow. In particular, there is a notifier 'normal' that feeds a loop that works as expected. The declarant "spooky" is used to trigger the display of a value of control indirectly. If the notification output is connected to the structure of sequence, it produced uneven results in out1 and out2 (or probes on this thread). If this thread is removed, it works as expected.

    The cable slider to out1 and out2 seems to keep 2 different values without any given obvious flow condition or the time.

    Thank you

    Dirk

    Race condition.

    In your second loop, the cursor is read before the author of the notification is sent.  So, it will always be 1 iteration behind.  By wiring up that boolean to the structure of the sequence, you declare that the indicator cannot be updated until that a notification is received.  And given that this slider value was read before that the author of the notification has been received, the indicator will get the value of "old."

  • TCP data flow is interrupted by recording data (text entry)

    Hello, I am currently working on a senior design project where my team is currently developing a control system for a small wind turbine. We are adding sensors and wireless systems to the turbine. The sensor data will be collected and sent over a TCP connection. The Labview will serve as the listener and display the values on the web.

    I have problems with the registration however data.

    I would like for where you put in the time, you the datalogger to be active, then press a button and the data logger records the incoming values on the TCP connection and create a CSV text file.

    Whenever the loop of data logging is running, stops the flow of data from the sensor so all my recorded values are the same for the duration.

    Any input would be appreciated.

    Thank you!


Maybe you are looking for

  • What causes update extension errors?

    Today about 15:00 Firefox tells me there where some add-on updates available, but I noticed most of them didn't upload instead I received an error message failed to update. So I corrected by manually installing updates.But it made me think what is th

  • Docking station is half visible during the shutdown process

    Hello I did a clean install of El Capitan. In general, when you shut down the Mac, the Dock usually slide the screen and after a few seconds the Mac stops. However, with El Capitan, when I stopped the Mac Dock only halfway so that the process of clos

  • Satellite Pro P300 - his axe with Win XP installed

    Starting with Satellite Pro P300 with VISTA everything was fine including the sound. For other reasons, I'm back to Win XP and noise started to sputter and example music was chopped.After you have installed the latest driver everything was going well

  • About movies in the Itunes store

    If I download a movie from the itunes movie store, will be the name of the film and the film awards go to my messages or that the price of the film will go to my messages but not tell the name of the movie? By example, if I upload deadpool the messag

  • Transfer the information to another hard drive

    # 1 I am operating Windows xp pro and you want to add an additional hard drive. I would like to transfer all the data to the new hard drive. Is it possible to copy data from the old to the new drive without transferring the operating system? I want t