Instead of using the structure of the event with the producer consumer?

I used the architecture of producer-consumer in the past to control a state machine with the structures of the event.  I'm working now with the basic version of LV that does not include the structure of the event.  Can anyone recommend alternatives to the use of the same architecture in this case?  Thank you, David

Before the introduction of the structure of the event, the only option was the election.  Control terminals are in a time loop (the producer) with shift registers and a wait, usually about 100ms.  At each iteration of the loop, the control's current value is compared to the previous value.  If it has changed, and then take appropriate action.  Andrey suggested, queues are a good way to pass information between the loops.

It works for the equivalent of the value change events.  Things like mouse to top or filter events were much more difficult or not possible.


Tags: NI Software

Similar Questions

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

  • Can I use my printer manually instead of using the wireless connection?

    Can I use my printer manually instead of using the wireless connection?

    cbg_37 wrote:

    It is an OfficeJet Pro 8610.


    It has a print USB 2.0 port, so you can use the printer USB cable to connect it to your computer. This cable may be not in the box, please check if you first buy one (around $5 to $ 10). It is similar to:

    Kind regards.

  • I deployed a private teredo server, I'm not using the public prefix 2001: 0 / 32, instead, I use the prefix 2001:2222 / 32

    Original title: windows 7 Teredo: how to configure the teredo prefix


    I deployed a private teredo server, I'm not using the public prefix 2001: 0 / 32, instead, I use the prefix 2001:2222 / 32
    But I got win7 can't connect to my server if I use the prefix 2001:2222 / 32.
    A test, I put the prefix 2001: 0 / 32, win7 it can connect.
    How can I do so that win7 customer teredo can connect to my private server that use the prefix 2001:2222 / 32?


    The question you posted would be better suited in the TechNet Forums.

    I would recommend posting your query in the link below.

    Windows Server forums:

    I hope that the information above helps you.

  • create a button for CONTABILISER instead of using the default

    Can someone give me the code for calculating the total no of records displayed in a form instead of using the default CONTABILISER functionality provided by oracle in the menu bar


    You can make a count_query on the block to get the no. documents and then use a get_block_property ('', query_hits) to get the value.

    For ex.



  • First try the producer consumer Architecture: continuous play and dynamically update settings.


    I am currently working with two instruments; an Agilent E3646A and a NI 6212 BNC. My goal is to have the 6212 continuously take measures according to predefined parameters while the E3646A parameters can be continuously updated. This combination simple instrument aims to help me learn the manual architecture; continuous measurement, output dynamic controls and instruments more will be added in the future.

    I've already posted on a similar, but more complicated configuration ( and was advised to try the producer consumer Architecture.) I found the documentation on the website (,, searched the forums and built my own VI. While my first attempt at a producer consumer Architecture has solved some of the problems I had when I posted on the subject, however, new questions have been raised regarding the reading and adoption of the VI.

    I am currently able to run the VI and update the settings on the device. Previously, I'd get a freeze while the instrument has been updated and could not switch settings until it was done. This has been resolved, although that reading updates only when a parameter has been updated, although it is outside the structure of the event. In addition, the Stop button does not in any context. I also got occasional mistakes on the part of Deqeue, but the major part of the sentence is error-200279 'A tried to read samples that are no longer available' to DAQmx Read. I realize that there is a problem in my loop of producer but have not been able to find a way to solve 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 examples, but should have some problems at the beginning. Would be very grateful of any advice so I can take full advantage of the architecture.

    Hope to hear from you,

    Yusif Nurizade

    You're going to overflow this buffer, unless the events are generated faster than "sample rate/number of samples.   Period.  Nothing could be simpler.

    You don't need a local to stop your curls.

    Try something like this attachment.  I simply moved the structure of the event in its own loop dedicated since it had nothing to do with acquiring data at all.

    Data acquisition loop stops very well when you destroy the task and destrying the stops of power queue (sending the default values of the queue for the power control) for EXAMPLE, to ADD a group of setting 'Safe shutdown' to a 'package' and it wire to the Center terminal (Prototype).

  • Data types in the design for the producer consumer model

    Is it possible for me to use any type of data in a model of design producer consumer, without specifying specific data type?

    what I mean is if there is a way to connect to a data type with which I can use any other type of data, not to mention that one that I have connected, and if not, how can I specify the data type for a number or any other data type, for use in a design of producer-consumer model?

    You can make a part of your cluster of data a Variant.  It will take any type of data.  A common architecture for the producer/consumer is a cluster which is an enum and a Variant.  The enum contains all possible "orders", you might want to send.  The variant contains data that could be of any type.

    Ungroup you in the consumer and get the enum and Variant.  Attach the enum to a case structure.  In the specific case, convert the variant type in a data type of regular LabVIEW and with it as you please.

  • Cannot terminate everything in a loop to the producer/consumer

    I have attached a simple vi which was built from the producer/consumer (events) model.  In vi I set up a counter.  I want to be able to complete the meter when you press the stop button.  This does not work as expected.  The meter goes to its full count before the program stops.  The vi works as expected when run in execution to highlight mode.  Cannot understand it.

    Thanks in advance.

    Race condition.  No matter what time something behaves differently with that highlight run it at full speed, and suspect it is a problem of synchronization due to a race condition.

    As soon as your producer loop has the command queued up, she is ready to handle the next event.  If you press the stop button, it is ready to deal quickly and the stem while the ends of the loop and Stop immediately gets back to false.  This probably happens before the loop of consumer has the opportunity to read the local variable of the button stop in the moment, it's true.  Have your consumer while loop redefine the Stop button to false instead ensuring consumer loop has a chance to see if it is true.

  • Convert single while loop with variable Timing literal to the producer consumer

    I have a controller for a biological system that updates every n minutes or every minute 2n, under certain conditions. My app has a synchronization controller calculates if the current iteration is n or 2n and feeds the output of this calculation in a loop of "Timing" VI in my all. If I understand correctly, this is similar to the issuance of an order of sleep() in a language similar to C and should be avoided. I'm refactoring my code and I heard that they are well suited for this kind of things. Here's how it should work:

    1. Loop begins at the time T, T is saved.
    2. Schedule controller runs and calculates if loop will get minutes 2n or n minutes. This controller will take a number of milliseconds to complete, so we are is more to time T.
    3. Now that the update interval (n or 2n, let's call it u) is known, the loop must until T +u fill.
    4. The PDC is executed, but a number of milliseconds to execute.
    5. The rest of the time until the next iteration of loop should produce the CPU for other processes.

    It sounds to me like it's the kind of a real-time system, although as long as we are in the minute of the original deadline, there will be nothing wrong.

    What the producer-consumer loop would look like? Assumed that the synchronization and the main order controller are separate from the VI.

  • iTunes has charged my bank instead of use the balance on my iTunes. Any chance to stop this?

    I just bought and sent a gift card only to discover that my Bank has been accused and not my iTunes account. How to reverse the charge to use the bank account to use my iTunes account balance.

    A gift card is not electronic media, so probably not eligible for usage of your iTunes Store credit.  credit balance iTunes Store can be used for all types of electronic media, including songs, apps, ebooks, audio books, movies (or rental), TV shows, etc.  Another example: charitable donations.  The iTunes Store has recently provided a way to make a donation to support the restoration of the disastrous flood of Louisiana.  But you can't use your iTunes Store credit. payment came from your designated payment method Apple ID.

  • How to use 'Import using Windows' instead of using the Live format?

    original title: "IMPORT to WINDOWS HELP."

    With my old computer, operating system Windows Vista, I was able to import pictures from a camera, DVD or CD, by "Import Windows using". It worked very well, and I liked the format of the Gallery of images produced, in particular space readily available for more information (title, date & tags).

    When Windows Live became available as an option, I DELIBERATELY chose to use 'The window using import', rather than 'Import using Windows Live', that I did not like this product format.
    When I had to buy a new computer, running on Windows 7, I find that I am completely restricted import using "Windows Live".
    Y at - there no way to return to importing photos using Windows rather than in the "live" format that seems necessary?
    Thanks for any help and assistance, someone can give.

    If it is not listed in the Autoplay download another program like google picasa... of photo editing and manually copy / paste the files that you want by using windows Explorer.

  • Y at - it an option to run the programs on download the CC 2015 instead of using the desktop client for CC?

    I tried to download programs CC 2015 tests, but get errors.  Here is the extended error message:

    Exit Code: 6 Please see specific errors below for troubleshooting.

    - 0 fatal error(s), 2 error(s)

    Payload: Microsoft Visual C++ 2012 Redistributable Package (x64) 11.0.61030.0 {3E272A93-C06B-4206-AD02-0EBE02535E20}


    ERROR: Third party payload installer vcredist_x64.exe failed with exit code: -2147024546

    ERROR: Failed to install Microsoft Visual C++ 2012 Redistributable Package (x64). Please try installing it by double clicking on the executable at "C:\Users\Username\AppData\Local\Temp\{B3D7342B-FF9C-4C51-AFB3-02381D8FC254}\Illustrator_19_LS20_win64\Adobe Illustrator CC 2015\payloads\Microsoft VC 2012 Redist (x64)\vcredist_x64.exe", or download and install the latest Microsoft Visual C++ 2012 Redistributable Package (x64) from Microsoft website -

    I the last MS C++ Redist, but is not 2012, and the executable list instructions above give me an error and ask for an annulment, which I don't think I should do.  I have just upgraded to Windows 10 Home, so there may be some issues here, but I wonder if I can just download programs directly instead of via the desktop client for cc. At least that I would like to know if the installation and possibly need to adjust my redistributable c++ is really necessary.

    N ° 1)

    Click on the below link, Sign In and open Photoshop Elements download link.

    Do not close the page, just keep it open.

    Note: * If we do not keep the page of items in Photoshop, we will have access denied error message when file downloading install direct.

    Then click on the link below and download the installer directly mentioned in step 2.

    Step 2)

  • Configure FCAC with TAF Oracle11g r2 instead of use the SCAN

    Dear Expert

    We deploy the RAC on Redhat Linux5.5 Os Oracle11g r2 with IBM equipment in our Production of 64-bit Client site.

    We do not have any DNS server available to configure the Oracle RAC SCAN feature.

    We want to use the functionality of the FCAC Oracle11g r2 TAF database.

    Please provide suggestions and solutions to the same.

    Hi Markus,.

    MarkusM wrote:

    In addition to what jrstern correctly pointed out, the paper that is linked here: is obsolete.

    I did correct paper. The blog is updated. "this post has been updated 23/02/2011 at 16:25.

    Kind regards
    Levi Pereira

  • overflow memory for the producer consumer

    I'm trying to save data from 4 ports to 40.96 Mhz. using a producer consumer architecture and a PCIe NI 6527 B using an external clock.

    I inherited code which works for 2 ports.  I tried to add additional ports and changed the size of the data to the queue and data.  Launch the program several times, reach conflicting error messages after less than 2 seconds from the beginning:

    Error 200284: Some or all of the requested samples are not yet acquired.  [...] To make available samples more quickly, increase your sampling rate

    200361 error: Overflow memory device on board.  Due to the limitations of system and/or the bandwidth of the bus, the driver could not read the device fast enough to follow the flow of the unit.  Reduce your sampling rate.

    What is a race condition between the error messages, a problem of timing of start or something else?

    I approach, how to debug these types of problems?  How can I determine what is causing the error?  I can't single step through because I'm at the wheel of sampling with an external clock.

    Running on labview 2012 Windows XP on the machine who's 3.17 GB of ram.

    Try to reduce the size of your buffer.  In fact, simply leave the calendar DAQmx unwired.  The size of the buffer must be large enough by default.  And then also try to read less data at a time, as data instead of data 500ms 10ms.  What I suspect here, it's that the DAQmx buffer is too large and therefore must use the hard drive for part of the buffer, to slow things down a lot.

    Other notes here:

    1. do not use the time-out to stop your loop of consumer.  Your producer should send an order of a certain type to your consumption by telling it to stop.  In this case, I would use an empty array.  And then, you must release the queue after the loop of the consumer.

    2. you want a constant FALSE to Append Array/String input size of the binary file write.  This will remove the 2 I32s at the beginning of each table that you write.  Eelle are here to tell the size of the table being written.  But since you are just data flow, I doubt that you care about those.

    3. instead of the entire setup of producer/consumer, have you considered using just the DAQmx Configure Logging VI do DAQmx stream directly to a TDMS file for you?  Makes things much faster and much easier on you.

  • How to use a Timer and an event with LIFA/Arduino

    Hello world

    I feel that my question is going to sound really stupid, but I can't find the solution. I want to use my arduino to do two tasks at the same time. I want to use a while loop with a timer, read my pins in my arduino. It's really easy. But then, I like to use as a case of event do different type of things. In the example, I downloaded, I just use an event to activate my fan. Again, I have no problem to use it by itself. But I can't find a way to use both at the same time, especially when I want out of my application. Because I use my arduino inside my event, I put it in an another while loop. But I want also an another while loop, but uses the clock. In my example, if you use the tool to highlight run, see you clearly that my signal goes the while loop that contains the case of the event, but not other things that I want to use it as a timer. That's probably because I missed something on the architecture, it's just to give you an idea. I just want to know what is the smartest way to combine my case of the event and my time in a loop using the timer and how to close them correctly. I'm not an expert in Labview, so it is a bit difficult for me. If my comments seems obscure, I'll answer all your questions without any problem.

    I thank very you much for your help and attention.

    FrenchLizard wrote:

    If you use the tool to highlight execution, you can clearly see that my signal goes the while loop that contains the occurrence, but not others

    Because of the LabVIEW data flow model: value of stop button is connected to the first loop for the second loop. You can see "How to stop several loops using the only button" then you can use any implementation.

Maybe you are looking for

  • pluggins

    How to find what Player is necessary for a web site? The visited web site gives no indication that it is pluggin. Exhibition: "a Player is required to view this content."

  • Satellite Pro A120 - does not start with 4 GB of memory

    Hi all I'm new here so please be gentle! I have a Satellite Pro A120, model No. PSACOE - 037014EN and you want to increase the memory 512 MB present. I tried 2 different sets of memory 4 GB (2x2gb), but the machine does not start. I tried the differe

  • Re: Satellite Pro U400 - Windows could not start, how to recover?

    I hope this is the right forum to display this property (if not, please let me know where I should post this) and nude w / a beginner like me. Any help or direction will be appreciated. I have a Toshiba Satellite Pro U400-160 is more than a year. I h

  • Why I can't make video call after upgrade the latest version?

    It's really makes me confused. I can't do for the Visio with my friends after update the latest version of Skype. I use PC / laptop here. In fact, I have a cam here. Give me a solution, if I can do for the Visio again as usuall with my friends Thanks

  • F55 vs Epic for wildlife

    I weigh just up the pros and cons as I see them between these 2 cameras and thinking, I want to scribble them in case where everyone is wondering the same thing. Benefits of two cameras: small size and weight, modularity (is no longer necessary to us