Producer Consumer Parallelism Failing!

I'm controlling multiple automation stations with a single cRIO 9074 -- the multiple stations are all following the same logic but should be independently controlled. I'd like to accept all digital inputs (from all stations) in a producer loop, queue them up, and then consume the data in 3 consumer loops which actually perform the logic (take a digital input and then decide what to output at each station).
The actual logic is functional, but the three consumer loops are outputting the data with a time delay.
So, for example, if I want my first step to be "Event 1", once I start the program the state machines decide that:
Station 1: Event 1
Station 2: Event 1
Station 3: Event 1
And when a decision is made to switch to Event 2, the 3 stations take turns switching (the action is not simultaneous), so you may get:
Station 1: Event 2
Station 2: Event 1
Station 3: Event 1
and momentarily after,
Station 1: Event 2
Station 2: Event 2
Station 3: Event 1
etc...
Attachments:
cRIO_fake.vi ‏27 KB

RavensFan wrote:
Queues are meant for a one to one, or many to one relationship.  Here you have a one to many which is wrong.  When something is sent, only one of the three loops will get the message depending on which is ready to grab the message first.
You should have a different queue for each consumer loop.
Or a User Event, and have all the consumer loops register for the single event so they can all act on it when one event is generated.
Attatched is a quick example of what I was thinking.  You can make this more complicated, and wrap some functionality into SubVIs to help scale it for larger applications.  User Events do work in LabVIEW Real-Time but I believe you would need some kind of FIFO to User Event to go from a host PC to the RT to have work be done.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
Attachments:
User Event Request Example.vi ‏17 KB

Similar Messages

  • Running subVI in parallel with itself using producer-consumer pattern

    I'm using the procuder-consumer pattern to create what I call threads in response to various events much like in Producer Consumer with Event Structure and Queues
    I have several physical instruments, and would like to run the exact
    same test in parallel on each of the instruments.  I have a subVI
    that takes as inputs a VISA resource and a few control references among
    other things and then performs the desired experiment.  I have a
    separate consumer loop for each physical instrument, with this subVI
    inside each consumer loop.
    My test VI worked great; each consumer loop was a simple while loop
    incrementing a numeric indicator (not using my real subVI above). 
    However, my real program can only run one consumer loop at a time much
    to my dismay.  Reworking my simple test VI to use a subVI to
    increment the indicator rather than just explicitly coding everything
    resulted in the same problem: only a single consumer loop ran at a time
    (and as I stopped the running loop, another would get a chance to
    begin). The subVI in this case was extremely
    simple taking only a ref to the indicator and a ref to a boolean to
    stop, and incrementing the indicator in a while-loop.
    Is there a way around this?  Now that I've spent the time making a
    nice subVI to do the entire experiment on on the physical instrument, I
    thought it would be fairly trivial to extend this to control multiple
    instruments performing the same experiment in parallel.  It seems
    only one instance of a given subVI may run at one time.  Is this
    true?  If it is indeed true, what other options do I have?  I
    have little desire to recode my subVI to manually handle multiple
    physical instruments; this would also result in a loss of functionality
    as all parallel experiments would run more or less in lock step without
    much more complexity.
    Thank you.

    You need to make your subvi reentrant.  Then it can run several instances at any time with each instance occupying its own unique memory space.  Click on File - VI Properties - Execution, and check the reentry execution checkbox.  Then save the vi.
    - tbob
    Inventor of the WORM Global

  • Help? Looking for better approaches to mutlithreading, parallelism (producer/consumer)

     Hi,
         So II would like to do some parallel processing of data using the multiple cores of my computer, and I'm trying to find a way to do this in labview.  I deally, I would liek to be able to take a given task, put the work into a work queue, have threads from each processor take a task from the work queue and process it in parallel until the work queue is empty, and put the result into a results queue where I could then write the results to a file. So in a text-based languange, the implmentation would be straightforward.. but I'm not sure how to go about this in Labview. 
           I've read about the different designs patterns, and was trying to use a Producer/Consumer approach with queues. What I wanted to do was read a list of files from a directory, stuff the paths into a queue (Work Producer), then have a second loop (Work consumer/Results Producer) dequeue each file, process it, and send the results to a second queue.  Then at the end, a final loop (Results consumer) would read all of the results.
     My question now is..  is there a way to do this more cleanly than what I have on the diagram?  Right now, I have to know in advance how many parallel tasks I want to use, then I have to wire up each task before executing the program.  If I move to a different computer, I need to change the wiring digram.  Is there a way to abstract this to avoid having to make huge changes to the block diagram?  I was considering trying to make the parallel portion fit into a subVI so that I could just copy and paste several sub-vi's to easily add and remove parallel threads..    but its not so simple to have to keep track of all the queue references, and etc..  
    Has anyone already done somoething like this? I feel like what i'm trying now is becomming a big mess
    Thanks

    You can run clones (instaciate from tempaltes) of the crunching code where each get a ref to the queue based on its name. When they see the queue is empty the terminate and close.
    Make sure your queue is full be fore you lauch them.
    There is supposed to be new property that tells you how many CPU you have but I can't find it at the moment.
    Have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Producer consumer vs state machine

    Hi there,
    I have been on and around for quite a while to understand how can I re-design an application, which was originally built using a mix of sequence structure, while loops and event structures. And now I am making a newer version of the same application, for research purposes, while learning the LabVIEW techniques. Earlier I used LabVIEW versions 5 and 6 to make simple programs for fuzzy logic and neural networks. And that's not a good reference.
    Ok, after learning that Producer Consumer (PC) and Standard State Machines (SSM or SM) are two new approaches for a better (scalable, flexible and efficient) coding as suggest by veterans, in one thread where I asked about another issue, I have started digging into this topic and now I am on a point where I have to implement it finally (spent pretty much time in the learning phase).
    I have several questions.
    To start the discussion, I would give a brief description of my application.
    It's a networked application, where the network communication happens using DataSocket (one reason to use LabVIEW as the environment).
    We are talking about the client application, which communicates with other applications on remote computer, via Internet.
    User interface involves a tab control, with several pages-
    On startup, the controls/indicators (now onwards referred as controls only), are initialized, datasocket connection is checked (rather internet is checked, and a connection established with the remote datasocket server) (page 1)
    If connected to the datasocket server, the user selects Login/Registration (page 2)
    Login and/or Registration happen on page 3/4
    Then the user sees a table of remote users to connect to (page 5)
    Upon selection of a remote user, and after clicking on "connect", the user will see a video indicator, with a lot of other controls. (page 6)
    On this page with video indicator and controls, the user has a lot of activities, in which many messages are sent and received to/from the remote machine.
    the user may disconnect and go back to page 5, and log out and go back to page 2 and so on.
    I hope this is clear.
    I have thought about two different ways to do this application. Using PS or by SSM.
    In the attachments, I have given a diagram (with errors, of course, because of unlinked controls), for each of the approach, plus the original application's diagram.
    I hope this is sufficient for anybody to understand my case and give suggestions.
    I am looking for suggestions about which is a better model for my type of case. I have been to discussions like this one and saw that there are many issues regarding dequeue in PC model. So I am curious to know if SSM is a better and latest model or it's more primitive? Which looks better for my application's performance?
    Thanks ahead!
    Vaibhav
    Attachments:
    OldDesign.vi ‏41 KB
    PCDesign.vi ‏42 KB
    SSMDesign.vi ‏46 KB

    Vaibhav wrote:
    @ Harold
    Thanks. Any suggestion how can I start and stop that loop in parallel with other loops? Like, if some event occurs, the loop should start execution, and keep on moving, while other events are being traced and executed.
    In those examples where you had a while loop inside a case structure, that bit of code will only execute one time.  It will immediately read the boolean at the start of the program, if the value was true before the porgram started, then the while loop will run.  Once that while loop stops, the case structure will end.  It will never execute again unless you completely stop and restart your program.  If the boolean is false before the program starts, the false case will execute immediately.  Nothing happens since it is empty and it is done, never to run again (unless you stop and restart your VI)  You should turn the structure around.  Put the case structure in the while loop.  Make sure you put a small wait statement in the loop so that it doesn't run full speed eating up CPU cycles just polling the status of the boolean.
    @ Ravens
    Thanks for the detailed comment.
    One thing I would clarify. The user will not be able to switch between the pages using the tab control. The program will direct appropriate page to the user. I kept the tabs visible just for your idea of the pages. Sorry, I didn't mention that.
    Do you think it's still a bad design?
    If the tabs will be hidden or disabled, you will probably be okay.  I wouldn't call it a bad design.  I wouldn't do it that way.  But as long as you understand the possibility of problems and prevent that.  Especially some time down the road when you modify the program in some other way that could lead to a problem because you forgot about the dependencies of the event structures on the state of the state machine. 
    Yes, I agree about only one event structure to handle all the events. But since the user will not be able to click somewhere else, other than those possible controls, I thought to keep it like this.
    I thought the events are captured only if we are in that case. I think I am wrong, right? Events are captured at any time, even if the case has never executed before, or will never execute.  Ok, The events will be captured, but will not be executed until in that case.
    And that's the reason why I have two separate event structures, in two separate phases of the program.
    Because, prior to page 6, the events will occur sequencially. The user will click somewhere, then some message will be transmitted over DataSocket, then some message may come , then again some user action and so on. But, when the user starts using page 6, there will be parallel process of user controls events and actions, and incoming messages and corresponding actions. For this, in the page 6, I need a different kind of execution. So I separated the two event structures.
    At first I thought to have SSM, and then I thought to PC, just because I can have two separate parallel processes - one for user events, and another for messages (because that way I can take maximum advantage of message tracking). But looking at other complexities, I find SSM more appropriate. Can you please tell me how can I have my message loop and events loop parallel to each other and just one event structure?
    You can have a dequeue function in your state machine loop and have it be a consumer loop.  Use a timeout on the Dequeue.  If there is a timeout, have the statemachine execute normally after that perhaps just passing the enum wire straight into the case structure of the state machine.  If it doesn't timeout meaning you got a message, then look at the message that is dequeued and act on it.  Perhaps it means ignoring the enum coming in from the shift register and changing the enum to something else to feed into the case structure of the state machine.  Attached is an example
    Attachments:
    PCDesign[1]_BD.png ‏6 KB

  • Producer/consumer w/ScanEngine issue

    All,
    I have a large VI implemented with producer/consumer architecture using 10 events and uses conditional disables to select the data acquisition hardware.  The application is being developed in LV2009 with FPGA & RT on XP.  The application is intended to acquire and control analog signals in a cRIO-9073, but early development is done using LV simulated signals.  I can switch back/forth between the different configurations quickly & easily.  In the simulation mode, the front panel, controls, events, etc; all behave as one would expect.  When the conditional disable is changed to use ScanEngine and cRIO modules, then a very primary control fails to generate an event and does not function.  All other controls that can be tested are functional and generate their events.  I am at a loss and seeking suggestions on techniques to diagnose & fix the problem.  The application behaves as if the 'event structure' for primary control gets corrupted or some size threshold is been exceeded.  The whole concept, scanEngine based and simulated data, were functioning several days ago prior to numeruous edits and I can revert back to not using the scan engine and cRIO hardware with simulated data to validate correct function, but that is not the intended final path.  At the present time, I am stuck and looking for ideas.  All suggestions will be considered and appreciated.  The applicatiion is company proprietary and can't be posted.  Thanks in advance.

    I can definitely understand your confusion, and on the surface it seems like everything should transfer over.  However, when using simulated data you won't get errors that can occur once you introduce hardware.  Errors can prevent events from occuring, there is also the issue of timing, to see if when using actual hardware, the timing causes issues.  As I menationed before, there are a hundred different reasons why it would work with simulated data, but not actual hardware.  Please let me know if you need further direction in your troubleshooting.
    National Instruments
    Applications Engineer

  • Producer/consumer architecture over network variables with Real-Time target.

    Hi all,
    I am maintaining a producer/consumer data acquisition program to be deployed on a real-time target. The main code is deployed to and run on the real-time target during experiments, but was having trouble because the program was originally designed to write all experimental data to disk on the real time during acquisition, which puts the whole experiment at the mercy of the hard drive. I am now trying to rework the code so that the host takes care of logging, so that my time-critical loops don't have to wait.
    I am currently using LabVIEW 8.5
    I have two questions:
    First, how can I programmatically call the data-logging subvi on the host so that it runs in parallel with the main vi which runs the experiment and collects data on the real-time? I have attached the test code that I have been working with to figure this out, but it does not run the logging vi continuously in the background. I am aware that there is better functionality for this in newer versions of LabVIEW, but I would prefer not to upgrade unless there is no other option. I would like to be able to run my data-generating vi and have it start the data logging remotely.
    Second, is there a way in the host VI to read values off the network variable using an event structure rather than polling it for updates?
    Any help would be sincerely appreciated!
    Attachments:
    testRemoteLogging.zip ‏124 KB

    VI server
    Mark the target VI as served on the machine on which it will execute and use VI server Call by reference to invoke the served VI.
    This used to be taught as THE way to communicate syncronously with an RT app.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Timed structure for output in producer consumer data acquisition

    Hello LabVIEW community,
    I have a bit of a problem.  I am writing a program that is primarily for data aquisition but has a few control features as well.  I need the program to aquire and write several channels of data at a relitively high speed.  The program does this fine ( in the top 3 loops fo the program).  I need the program to also send a seires of two output signals in response to a particular condition.  When a certain channel registers a value of above a specified number, I need an output channel to write an anologue signal for 225 seconds and then a signal of a differnt value to the same channel untill the condition occurs again (not for several hours).
     I put this action in a timed structure inside of a case structure. The case structure and timed structure are inside of a second consumer loop.  I have no idea if this is ligitimate.  This event takes much longer than any of the other loops which run at 1 or 2 seconds. When I exicute the program with "highlight exexutuion" this longer (case/ timed ) loop never executes. I asssume this has to do with the mismatch in time scales of this loop and the other loops in the program.  I also didn't really understand the help information on timed structures, so its possible that I just need better/ different inputs to the timed stuctures.  
    If anyone can see any obvious problem in the code or suggest a better way to do the output function I would really appreciate the help.  My code is attached.   
    Thanks,
    Jo

    I can't figure out how to fix your code, but I can point out the things I see wrong with it.
    1.  You are dequeueing elements from the same queue in the same loop.  In one you are not taking the element, and in parallel, you are taking an element.  I see that in your bottom two loops.  Why?  That code won't execute until the queue gets two elements in it.  And which dequeue gets it first and which gets it second is an arbitrary race condition.  So there is no certainly of order (first 4 vs. last 4 currents in the one loop), or which gets kept and which gets discarded (in the other loop.)
    2.  You are creating and/or clearing DAQ tasks in every loop iteration.  Tasks should be created before a loop, used inside the loop (read or write), then cleared once the loop is done.  Anything else is wasteful, time consuming, and could lead you to run out of resources.
    3.  You are using the STOP function which is pretty much like hitting the abort button on the toolbar.  No program should ever stop that way.  All loops should exit gracefully.
    4.  You have a data dependncy between your bottom two loops because of the boolean wire running from one to the other.  That bottom loop will only run once (if the value is True), or run forever (if the value is false).
    5.  Use of the dynamic datatype.  You are taking waveforms, converting them to a blue wire, then coercing them into another datatype such as just displaying a scalar in an indicator.  A lot of unnecessary conversions there.
    6.  Your thermometer indicators have a digital display you can make visible.  Then you won't need the separate numeric indicator to display the value.
    7.  For loop that runs only 1 time because of the constant wired to the N terminal.  Get rid of the For Loop.
    8.  Check your spelling.  The word "Temperatures" on the graph, and one instance of "distillate" is missing an "l".
    Until all of these problems are fixed, it is not worth talking about timing of timed structures.  Some of these problems were discussed in your other thread.  http://forums.ni.com/t5/LabVIEW/producer-consumer-missing-channels/m-p/3159757#M911255   But now it seems like you've made things even more complicated without fixing the basic problems.

  • XY graph in producer/consumer structure

    Hey there,
    this is my first shot at setting up a producer/consumer structure to operate a power supply (I've posted several questions about it here, but since this is more a Labview programming specific question, I thought this might interest more people). Seems to be working fine when using simple controls. But I also want to display the voltage plotted against time. To get the voltage, I have to send a control to the power supply to get the measurements in answer, get the voltage from there and put it in the graph. Since I can only send one control at a time, I've chosen to queue the "read" state behind every control (so for example, when queuing (or queueing?) "Run", I send "Read" immediatly afterwards so as to start the reading). But of course, every time I send a new control (change parameters for example), the graph is set back to zero. Does anyone know a way around this?
    This is just a tryout, no error handling or even closing of VISA sessions.
    Attachments:
    Producer consumer tryout.vi ‏37 KB

    crossrulz wrote :
    Not really.  Your waits are in parallel, so the delays do not simply add up.  You really should get rid of the 150ms wait that is outside of the case structure.  If you need to introduce any delays, they should be in the specific cases that will need them.
    Well, the power supply doesn't accept commands that come in at a faster rate, so I was thinking that by putting the wait function there, I would manage the queue in a way that it only sends commands at this specific rate. It's only the read function that needs to be executed at specific intervals. All the others don't need to. So I would still delete de 150 ms and put it inside every other command case?
    crossrulz wrote :
    One more comment on your code.  If you have something that needs to constantly happen, I just use the Timeout ability of the queue.  You could just set your timeout to be 500ms and then on timeout it performs a read.  This would eliminate the need to enqueue the Read command at all.
    You mean the timeout abilty of the queue? How would I go about this, create a separate "enqueue element", wire a constant of 500 to the timeout and the read state to the element input, then wire it to the Master Queue? I was thinking of using the timeout ability of the event structure. But I guess that wouldn't be ideal if I have more than one producer loop... Anyways, you Sir, are a genius.

  • Data delay in producer consumer loop?

    Hi,
    I've been creating an VI using producer consumer loop. In producer loop, every loop take 1000 samples at the rate of 40000/s(or 40000s/s devided by number of channels) and the consumer loop will average the data in a way corresponding to the "sampling rate" value on the front panel. The "sampling rate"represents the data rate on the chart and in the saved data file. If it's too slow,say 1 sample per second, then the producer loop will just wait for some time.
    So far the VI run smoothly, but there's one big problem. Each time I adjust the amplitude of input signal and the change doesn't show up on the chart untill several seconds later. When the "sampling rate" is really slow, the delay could be 1 minute! It's the first time I have ever used producer consumer loop and I 'm really confused of what causes this time delay.
    Could someone give me a hand with this?
    Thanks!
    Yaqiong
    Attachments:
    parallel.vi ‏73 KB

    You should consider further separating your tasks. For instance, the writing to file should be in its own task since file I/O can really cause delays in your processing. Also, I would separate your data processing (averaging) from the UI updates. The UI updates can be within a task that is using an event structure. It can get the data updates to update the chart but it can also quickly respond to the changes in your amplitude. I would also be very careful of the wait in your producer loop. This could starve the CPU.
    One last note. Your code could really benefit from a cleanup. Your coding style is quite a mess and it makes reading (and maintaining) your code much harder. For example, your code should generally read from left to right. Running wires backwards, having outputs on the left, lots of bends, etc all lead to messy code that is difficult to read.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Producer consumer loop only execute once?

    Hello here,
    In my VI, the producer loop seems working continuously, but the consumer loop only execute once.
    I haven't used producer/consumer pattern before, could someone give me some ideas why this happens?
    My code is in attachment.
    Thank you in advance.
    Yaqiong
    Solved!
    Go to Solution.
    Attachments:
    parallel - Copy.vi ‏72 KB

    That would be the poor choice of using an event structure in the consumer loop.  As set up you must generate a mouse Leave or mouse enter event on Waveform Graph for the consumer loop to finish its first iteration. 
    Delete the event structure.  you don't need it to update a graph.
    Jeff

  • Database producer consumer architecture

    Dear NI supporters,
    I am trying to devolope Producer/Consumer program to communicate with MS SQL database.
    The Producer loop select data from database1 and process them.The Consumer loop insert proccesed data to database2.
    The problem is, fast Producer loop must wait for slow Consumer loop and I have no idea why.
    I have attached really simplified VI. There are two parallel processes (while loops). First loop read large data and the execution time is high. The second loop read really small data, so execution time is low. So if I execute the VI, I would expect the fast while loop (FAST PROCESS) will get much more iterations then the slow one (SLOW PROCESS). But the reallity is, the FAST PROCESS will get the same number of iteration as SLOW PROCESS. It looks like the processes don´t run in parallel or did I just missed something?
    Could you explain me, why this occur, and how can I improve my code?
    Thanks in advance.

    vasicekv wrote:
    Thank you Jim, it really helps me!
    Do you also know any other library to communicate with database in labview which is reentrant?
    I mean I am focused on speed my labview-databse communcation up.
    Perhaps you should be considering why your consumer loop is so slow?  Is your database running on a dedicated server?  Is it getting bogged down?
    Please share a little of your real code so we can try to improve the performance of your consumer loop.

  • Producer/consumer state machine

    Hello,
    I have a State Machine with an Idle state that has an Event Structure to handle user events in it. I would like to include in that state, and in parallel with the Event Structure, a VI that polls for data every 10 seconds. Is there a way to have the Event Structure respond automatically to User events without having to wait 10 seconds before polling new data? Is the Producer/Consumer the way to go and how am I going to program this?
    Thank you,
    Richard
    Attachments:
    Tombeau_NewArchitecture1.vi ‏171 KB

    If you are polling for data (in the same state) in parrell to the event case then surely the event structure would execute at the same time you poll.. it would just not be able to jump to the next state in your state machine until the polling had completed.
    I had a quick look at your code, not to be mean but it's not the easiest thing to read. Try to keep the block diagram to a single screen so you don't have to scroll if possible. If that isn't possible, have it only scroll in one direction. You can achieve this with the use of Sub VIs.
    Also, be careful with using local variables to read and write. They are terrible for introducing race conditions. Instead trying using an FGV/Action Engine.
    Olly
    The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.

  • Could Buffer replace the Queue in Producer/Consumer Design Pattern

    Hello,
    I have a question that the task of Buffer is to store the data and the queue is also of the same so could we use the Buffer inplace of queue in a Producer/Consumer Design Pattern.
    Solved!
    Go to Solution.

    No, those buffer examples are not nearly equal to a queue and will never ever "replace" queues in producer/consumer.
    The most important advantage of queues for producer/consumer (which none of the other buffer mechanics share) is that it works eventbased to notify the reader that data is available. So if you would simply replace the queue by overly elaborate buffer mechanics as you attached to your last post, you will lose a great deal of the the purpose using producer/consumer.
    So, to compare both mechanics:
    - Queue works eventbased, whereas the buffer example does not.
    - Queue has to allocate memory during runtime if more elements are written to the queue than dequeued. This is also true for the buffer (it has to be resized).
    - Since the buffer is effectively simply an array with overhead, memory management is getting slow and messy with increasing memory fragmentation. Queues perform way better here (but have their limits there too).
    - The overhead for the buffer (array handling) has to be implemented manually. Queue functions encapsulate all necessary functionality you will ever need. So queues do have a simple API, whereas the buffer has not.
    - Since the buffer is simply an array, you will have a hard time sharing the content in two parallel running loops. You will need to either implement additional overhead using data value references to manage the buffer or waste lots of memory by using mechanics like variables. In addition to wasting memory, you will presumably run into race conditions so do not even think about this.
    So this leads to four '+' for the queue and only one point where "buffer" equals the queue.
    i hope, this clears things up a bit.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Progmatically stop vi with producer/consumer architecture

    I can't seem to get my VI to fully stop, so that I can go on to do some more things in the program.  I am trying to progmatically stop the vi (pictured below), so that I can return to my main gui (not pictured).  The main gui just consists of a login, exit test system, and run test.  Once the user presses run test, the vi pictured below opens.
    I am using a producer/consumer architecture with a state machine.  The problem I run into is that when I press the "Main Menu" button, it should close the pictured vi and return to the main gui.  I tried using the vi server, and when the user presses the Main Menu button, it fires an event and then it goes to the Stop state in the consumer loop, which opens a reference to the vi's (one for the strip chart vi and another for the gage vi), closes the front panel using an invoke node and then closing the reference.  I also tried adding in the abort vi method after the close front panel and it still gave me the same result.
    Here is the catch, it does close the vi's, but it does not stop the while loops (producer and consumer), or it stops only one of the loops.  I thought of putting in a constant in the event structure for when the Main Menu event is fired, but that will stop the producer loop before the consumer loop reveices the info to go to the stop state, so the consumer loop does not end.
    I also tried a "dummy" control that was connected to the comsumer loop Stop terminal (for the while loop), and then progmatically changed the value in the stop case to true and then read that value in the producer loop to, hopefully, stop both loops, but it did not work either.
    I am sure that it is something so stuipidly simple that I cant see it right now
    Kenny
    Kenny
    Attachments:
    test system.gif ‏252 KB

    Hi Kenny,
    I think of two solutions to your problem. First, use the message queue to pass the message "stop" or something from producer to consumer or second (and I think, better), use occurrences. I made a little draft how it could work.
       You have to pass the occurence- Refnum to both VIs, the producer and the consumer, when the producer finishes execution, then use "Set Occurence".
       In the consumer blockdiagram you react on the generated occurrence.
    If you set in the VI- properties "Open Frontpanel when called" and "Close if originally..." the VI Frontpanel should disappear itself when execution is stopped.
    Hope this helps,
    Dave
    Message Edited by daveTW on 08-14-2006 04:53 PM
    Greets, Dave
    Attachments:
    occurrence 1.png ‏1 KB
    occurrence 2.png ‏5 KB

  • How to change the transmissi​on rate of data flow in producer/ consumer pattern

    Hi All
    I am new to labview and trying to design a application to transfer image data in different rates, that means I can change the transfer rate in the transmission process. In fact,I refer to the the Queue Basic.vi to achieve this function by Changing the delay value of dequeue and enqueue.The program is divided into three parts:
    The first part is the sender in vc used to split and send image data.Data size is 226kb and each time we send a 1kb packet;
    The second is labview rate-change part,use producer/ consumer pattern and queue to transfer data;
    The third one is the receiver in vc,receive data in sequence and synthetic images.
    The entire transfer process is: image data was sent from the sender to producer loop through DLL, then enqueue--dequeue in consumer loop--DLL--receiver.The sleep time in vc sender is equal to the delay value in producer loop and this makes it look like the data generated as in the loop.
    Now this is where my dilemma is:
    When transferring data, if the producer loop and consumer loop delay value are equal(both 20ms), I can see image synthesis at a constant speed and no data lose; if I change the consumer loop delay value and make it greater than the producer delay(one is still 20ms and another is 50ms),that means receive in a lower rate and store data in queue. I can see Elements in Queue
    increase but the image data randomly lost, and the image synthesis speed is not reduced.
    My question is why image data loss and I can't see the image synthesis speed reduced when change the delay value in consumer loop?
    Do anyone know how to solve the problem? Are there any examples I can refer to? Any suggestions are greatly appreciated!
    Attachments:
    image1.JPG ‏56 KB

    thisoldman,
    I don't have '/usr/lib/modules/3.17.3-1-ARCH/build/Documentation/VGA-softcursor.txt' on my file system. Does it contain the info about changing the blinking speed?
    P.S. The other two links I found yet before starting this thread. I only found in them the recommendations about changing "the color and shape of the cursor and turning blinking on/off" (as I mentioned in the original question). Did I miss the info about the blinking speed?
    PPS: I found the vga-softcursor.txt here: https://www.kernel.org/doc/Documentatio … cursor.txt
    But that file doesn't tell about changing the blink rate either.
    Last edited by nbd (2014-11-23 20:55:41)

Maybe you are looking for

  • CRM Web Log on Issue

    i am getting the below error while i am trying to access CRM with http://<host>:8000/sap/bc/bsp/sap/crm_ui_frame/default.htm?sap-client=800&sap-sessioncmd=open It is promting for User name Password and accepting too. Error Message Business Server Pag

  • Third Party Sales order showing billing satus as Partially Invoiced

    Dear GURUs In Thirdparty sales scenario I checked the VBUP table for FKSAA field its showing status as B while delivery invoice all has been done in full(not partial).I checked the item category it has given bIlling relevance as G(should have been F)

  • How to obtain the file name of the cached file

    Hi All, I am using JMF to play a MP3 file from an HTTP link and I need to know the file name of the locally cached file. I found that I can obtain the cache directory using Manager.getCacheDirectory() and I can see the cached file there but its file

  • Trim Support for SSD's

    Is Trim Support required for Intel 320 series SSD's?

  • Relationship Between tables in ECC

    Hi Experts,        I have to generate one report which is belongs to Purchasing, Meterial and Delivery. I need to findout the relation between  MSEG and MBEW, these two tables are belongs to Meterial.     I found MATNR in both the tables but I found