producer consumer loop run only once?

Hello here

In my VI, the loop of the producer seems to operate continuously, but the loop of consumer only run once.

I did not use producer/consumer patterns before, could someone give me some ideas why this is happening?

My code is attached.

Thank you in advance.

Faouzi

It would be the wrong choice to use a structure of the event into the loop of the consumer.  As it is configured, you must generate a leave mouse or mouse event enter on the graph of waveform for the loop of consumer to complete its first iteration.

Remove the structure of the event.  you don't need to update a chart.

Tags: NI Software

Similar Questions

  • Timed loop runs only once with pulse train?

    It is a VI that attempts to drive a loop timed with a train of pulses 6608 OR map attached.  My timed loop never appears to run more than one cycle.  No error is reported.  I suspect it's because I'm not set up correctly with NOR-DAQ.  Any help would be most appreciated.

    WB

    Hi Wb,

    Take a look near the timed loop, I can see that the value of dt period is set to 1000. This period is used to scale based on synchronization source units. In this case, the clock contains 0.5 second pulses. Change the dt to a value of 2 has allowed me to see the timed structure to go as planned. See the image below for more details:

    I hope this helps. Let me know if this behaves that way even on your system.

    See you soon!

  • Consumers-producers - acquisition image but loop run only producer

    Hi all

    I try to acquire and store the image of camera Basler L301kc and framegrabber OR PCe 1427. I have create a producer / consumer loop because save him more time than the acquisition and if I do both in the same loop I lose frames. But I have problem: producer loop only run.

    I've read all the threads, but I does not solve my problem.

    I have attached a VI code how I tried to do. I'm using LabView 2011.

    Please, comments or help is deeply appreciated.

    I thank in advance

    XuanThuy

    Hi XuanThuy,

    The location of the VI have in your program is attached.  It is currently located in the loop of the producer.  I think it would be useful to move this to the consumption loop, so that you do not delete the image of the memory before you save it in jpeg format.  Please let me know if that helps with your program.  Thank you.

    Kind regards

    Kira T

  • While the loop within a box Structure runs only once a target FPGA

    I have a card OR cRIO-9012 RIO for the HIL system. I have a target FPGA file when I use a While loop within a while loop I use the box Structure to check a real condition inside I have the function of activation of the ports and selecting the analog and digital ports. But for my code the code runs only once on repeted times that we have in the LabVIEW environment.

    I also need help to optimize the code. I've seen people using While loop timed in the FPGA target I don't use in both cases.

    I've attached my FPGA with the Version of LV2012 file.

    Waiting for your comments.

    Thank you and best regards,

    Ganesha Moorthy

    You have while loops inside the structure to deal with a constant of false cable to the stop condition. These loops will obviously never stop so browse your outside while loop (containing the case structure) can never.

    This has nothing to do with the FPGA target, the same thing will happen in the development environment.

  • My new Publisher El 12 runs only once after restarting the PC - how to fix?

    My new publisher of 12 items, runs only once after restarting the PC and seems to work well. I did a "clean install" repeatedly (cleared Temp files, shut down all applications, including Norton Antivirus and then installed DVD after a clean reboot). I can launch organizer of 12 elements several times, but the photo that editor runs only once. After that, I have to restart the PC, and then I can run the Editor again, but once again, only once. I also first 12 items for video files - no problem, he launched several times. I see that Alfredo has a similar problem: How can I fix?... is it a bug of El 12?... Thanks for your help... k-paul

    Thank you very much Peru Bob... your statement works... of course, this stitching is 12 items of closing/out not really closes it (which is why I could not re - start it), so there's always a problem... I can live with that, but why would the program stops not when I close?... k-paul

  • The initialization Code: run only once at T = 0?

    Hello

    Is it possible to run some ActionScript only once at the beginning of the flash application?

    There are GIFs that I need to download dynamically from the server that once that will be used on the buttons. When we go to another scene and return, the GIFs are downloaded again.

    Thank you
    FG

    #initclip and #endinitclip must be applied to a movieclip. If this movieclip is on stage as part of the _root timeline and governing has played more than once, your code initialization, attached to the timeline of the movieclip would run only once.

    Anyway, there are some easier ways to accomplish what you want directly. for example, the following code in the conditional runs, at most once little matter how many times the frame is played:

  • Tip action that run only once

    Hello

    Question: What is the best way to get a tip action to execute only once during the lifetime of an execution?

    My script: I have a project with 80 slides in there to learn. Slide 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, I use onEntry event to perform actions advanced designed for each of these numbers. Given that users are allowed to go forward and backward slide, slide 10-100 event are executed several times, depending on how much time users visit these specific slides. My question is, what is the most effective way to ensure that a tip action is executed only once. Say a user reached slide 10 and advanced action "foo10" is executed. If this user has decided to return to slide 10, I don't want to foo10 advanced action to be executed again.

    My solution: I would create Boolean variables for each of the advanced actions. foo10 ... foo100. If the corresponding var bool is false, do not run the action, run another action assigned.

    Question: What is the best way to get a tip action to execute only once during the lifetime of an execution?

    Thank you.

    If it was a success (for an interactive object) event, you could disable this object with the same action as the advanced conditional action. Using the system variable LastVisitedSlide will probably exclude not all possible situations. A Boolean variable is probably the best choice. Since you're on 9 Captivate, make sure to use shared instead of shares advanced actions, you will save time (and the size of the file).

  • the event structure cannot combine with other events and run only once

    Why it will always get stuck when I combined the 'new user add' event to the event of 'Login '?

    It works for me when I separate the two, but the 'Add a new user' button can work but only once for the structure above, program will be blocked on the second time that I press the button "add a new user".

    It has already been said, you must use that a single structure of the event and not 2. Also, avoid using local variables (better store data in a shift register and not in an indicator) how you do it, it can cause bad racing conditions.

    Actually here you just don't another data storage since you have a file. Don't store data file to the root of the C drive, you do not have write permission. Use the default data folder or the folder of the application.

    I have attached a simple example. I guess that's a work at home? Please make my account help: try to understand why your VI does not work and try to find a solution by yourself. Modify my sample and play with him. This is how you learn LabVIEW. If something is not clear, post here, and we can explain/help.

    Edit: has the 'connection' event, I don't check against whether the file exists or not. Difficulty of this part, gives too little practice.

  • Producer consumer loop

    I'm constantly trying to read data from a file every 30 seconds, for example. Then use the data read to update all my indicators and LEDs on my front. Producer consumer architecture that is suitable for use?  someone at - it an example to follow?


  • While the loop executes only once?

    I'm doing a LabVIEW program to control a power supply of Sorensen. The VI circled in red calls for supply of the voltage and current and then exports it. I want this to happen continuously, but it seems that it only updates once. Anyone know how to fix this?

    Yes.  Your loop will not go again until an event occurs as the change in value on the value of the boolean values.  You might want to set a timeout on the structure of the event so that if no event occurs (I don't know if you have other manifestations), the case of delay of the event structure is running and the loop will iterate.

  • Why my calculation at the time loop repeats only once?

    I have a series of simple calculations (multiply, divide, add, subtract) occurring in a while loop based on input data on the front panel of the user. The results are then connected to local variables that alter the parameters of a signal generator in one another while loop.

    The while containing the iteration of repetitions one calculation, unless I turn the button "Highlight execution" in which case it repeats until the loop is stopped as I expect. With the 'performance highlight' button and using a probe to check instead of the loop does not repeat itself.

    Another while loop with the signal generator allows to reproduce, but uses only the values which were concluded before the VI began to run.

    I need the VI to be recalculated each time a value on the front panel is changed and change the output of the generator signal accordingly.

    What Miss me?

    Because local variables are fixed on the LEDs that are in the position it after the end of the VI it runs correctly the first time and only executes a forward iteration to stop, all in a loop containing calculations, if you run the VI more than once. As long as the LEDS are in the off position when the VI is launched then everything works fine.

    Thanks for the advice, everyone.

  • loop running only when the mouse or keyboard are active

    Hello

    I started a few weeks ago a pretty big VI. Most of the program is included in a large loop. But I feel it's to slow down unnecessarily. So to optimize it, I would like that the VI only works when the mouse or keyboard is acting on it. It would free up the CPU when I do not use it without having to shut it down. I found on the internet how to use the "wait for" to slow down the loop, but in doing so, some parts of the VI that must run in real time also slow down. I think that my idea should be more effective as well for applications in real-time and to free the memory.

    Accordingly, how can I ask the while loop to skip to the next iteration only when you press the mouse button or when a field is filled by the keyboard? Or is there an alternative for the while loop?

    Thank you

    Isaac

    Hello

    You can check this by using the structure of the event and monitor the activities of the mouse and the keyboard.

    I have change a simple VI to show this, please see the attachment.

    In the meantime, you can consult this example available on ni.com

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/3924

    Kind regards

    Lou KwokHow

    AE OR Singapore

  • Agent script - runs only once.

    Hi all

    I wrote a custom script agent that uses a file of DOS commands to run a powershell script that creates a text file, then type this file on the screen.

    The content of the text file is here:

    TABLE PT_GBES02_USER_COUNT

    START_SAMPLE_PERIOD

    Host.String.id = ukstrgbes02.peroot.com

    PT_GBES02_USER_COUNT = 410

    END_SAMPLE_PERIOD

    END_TABLE

    The batchfile BACK content: (PT_GBES02_USER_COUNT. BAT)

    off @echo

    PowerShell-folder e:\Scripts\CountUsers.ps1

    type e:\scripts\usercount.txt

    Content of the powershell script.

    $usercount = (get-ChildItem E:\PST-filtre "GMS-BlackBerryServer *.pst.db"). County

    Clear-Content E:\Scripts\UserCount.txt

    E:\Scripts\UserCount.txt Add-Content "TABLE PT_GBES02_USER_COUNT".

    Add content E:\Scripts\UserCount.txt "START_SAMPLE_PERIOD".

    Add content E:\Scripts\UserCount.txt «Host.String.id = ukstrgbes02.peroot.com»

    Add content E:\Scripts\UserCount.txt "PT_GBES02_USER_COUNT is $usercount".

    Add content E:\Scripts\UserCount.txt "END_SAMPLE_PERIOD".

    Add content E:\Scripts\UserCount.txt "END_TABLE.

    I created the agent and deployed the agent on the server. The agent runs the script once but not again. I need to run periodically.

    Every time I have stop and start the agent running the script once but again its not repeated. I do not also the agent Agents/hosts with agents screen

    but it is visible in the agent status page.

    I have written other agents of script (even if not using powershell) and they all seem to be normally repeats.

    The only messages in the log file are

    2012-11-09 09:25:36.934 ECHO VERBOSE [IncomingMessage-4444] com.quest.glue.core.agent.AgentInstance - starting data collection

    2012-11-09 09:25:37.293 ECHO INFO [IncomingMessage-4444] com.quest.glue.core.agent.AgentInstance - started data collection

    No idea what I did wrong?

    Hi John, it is resolved. It was the command line I used to start PowerShell

    I replaced the bottom and everything works fine now

    PowerShell - ExecutionPolicy RemoteSigned-NoProfile interactive non - command -.<>

  • the animation code runs only once

    Hi all

    import bb.cascades 1.2
    
    Container {
        Container {
            layout: StackLayout {
                orientation: LayoutOrientation.LeftToRight
            }
    
            Label{
                overlapTouchPolicy: OverlapTouchPolicy.Allow
                text:"Initial Text"
                minWidth: 600
                animations: parallelAnimation
            }
            Container {
                overlapTouchPolicy: OverlapTouchPolicy.Allow
                layout: DockLayout {
    
                }
                ImageView {
                    overlapTouchPolicy: OverlapTouchPolicy.Allow
                    imageSource: "asset:///images/hotels.png"
                }
                ImageView {
                    overlapTouchPolicy: OverlapTouchPolicy.Allow
                    id:imgsource
                    imageSource: "asset:///images/hotels.png"
                    opacity: 1.0
    
                }
            }
            gestureHandlers: TapHandler {
                onTapped: {
                    if(parallelAnimation.isPlaying()){
                        parallelAnimation.stop();
                    }
                    parallelAnimation.play();
                }
            }
    
            animations: [
                ParallelAnimation {
                    id:parallelAnimation
                    TranslateTransition {
                        id:translate
                        toX: -20
                        toY: -300
                        //duration: 1000
                    }
                    ScaleTransition {
                        id:scaletransition
                        toX: .2
                        toY: .2
                        //duration: 1000
                    }
                    FadeTransition {
                        id:fadetransition
                        toOpacity: 0
                       // duration: 1000
                    }
    
                    onEnded: {
                        console.log("On ended parallel animation");
                        translate.toX = 0
                        translate.toY = 0
                        scaletransition.toX=1
                        scaletransition.toY=1
                        fadetransition.toOpacity=1
                        //parallelAnimation.stop();
                    }
                }
            ]
        }
    
    }
    

    I made the image to translate into original poision in onEnded ParallelAnimation but its not working. The label is visible only after tapping the container again. And further taps plays not the animation.

    Please help me with this.

    use a sequential Animation:

    first run your ParallelAnimation

    then the following reset of translations

  • JavaScript to run only once

    I need to make several calls javascript from my Captivate 6 project, but anywhere, I put the javascript calls (OnEnter for a slide, OnSuccess for click box or the button), the javascript code is only run the first time.  It is a major wait up for me, and it makes no sense.  I can add a second slide and place a javascript call and it also works a long time that I did no other call javascript to this day.  It's SO frustrating, and unless I'm missing something, this is obviously a bug in Captivate. It is easy to reproduce the problem.  all you have to do is to create a new project and add the 2 boxes and add javascript both calls.  Then click on one, then the other.

    Huh, I got the flex project and put it on the Web server, and it works.  There must be a problem with it being in charge of Flex.  Sorry!

Maybe you are looking for

  • "inspect element" not able to be closed

    After the opening of the toolbar 'inspect element' right click menu is not able to be closed. I tried to click x toolbar, pushing the ESC and by again clicking 'inspect element' in the menu popup with nothing doesn't. The button (Q) also cause it to

  • Retina vibrant Pro speakers

    I'll start by saying that this issue could be in my head. I've updated to el capitan yesterday and I noticed this morning that when I play normal audio at a reasonable volume my two speakers vibrate slightly. I don't remember what is already a proble

  • 5 k iMac restarts on its own after you install 10.11.4

    Hello I installed 10.11.4 March 24 (I think), and since that day my iMac has been unstable. It restarts on its own, like a kernel panic, but never logging in a kernel panic. This restart does not seem to be triggered by software I run because I remov

  • Where to download the latest firmware for Toshiba TL938G

    Can someone give me a link where to download the latest firmware for TL938G?I want to update with USB Thank you

  • Satellite L350-17Z: Question recovery disc creation - problem with calibration

    I'm eager to get win xp instead of vista current on Satellite L350-17Z because some soft is not stable and vulnerabilities, while under xp on the desktop computer, I had no problem. XP compatibility mode is not solve this problem. So I decided to do