Many SM queued in a loop of Timed timed Vs multiple loops

LV 2009 + Win7 + 6229 PCI card.

It is necessary to control 4 different devices from a single code. The facilities are identical, but have two modes of operation that can happen randomly.

Every piece of equipment has its own state machine queues (QSM) which is inside a loop timed 10ms. As well as of the following options is the best (efficient) to handle this?

A. 4 policy different any current of running inside a single loop of timed 10ms.

B. 4 independent 10ms timed loops each MANUAL handling. Call loops have assigned to keep things in the order of priorities.

Thank you

Rama wrote:

LV 2009 + Win7 + 6229 PCI card.

It is necessary to control 4 different devices from a single code. The facilities are identical, but have two modes of operation that can happen randomly.

Every piece of equipment has its own state machine queues (QSM) which is inside a loop timed 10ms. As well as of the following options is the best (efficient) to handle this?

A. 4 policy different any current of running inside a single loop of timed 10ms.

B. 4 independent 10ms timed loops each MANUAL handling. Call loops have assigned to keep things in the order of priorities.

Thank you

And the answer is no doubt an option (A). I tried to simulate the two options on a computer P4 with 3 GB of ram and option (B) was struggling to run especially when starting. And stopping randomly for a few seconds between consume 100% of the time processor.

So, I'm going with Option (A).

Tags: NI Software

Similar Questions

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

  • Printing win 7 guest, the printer queue maintains a loop and increases the size of the file

    Hi all

    That are running Windows 7 enterprise and on another professional machine, same results:

    I share a "laser" on the USB printer, the printer works very well under windows prgms...  (all as administrator)

    Open CMD window:

    "net use LPT2: \\hp1\laser / persistent: Yes" command complete and looks good in "Net view \\hp1".

    Now, I open the print queue window and try printing a text file:

    "print test.txt > lpt2" command appears to complete.  (Same results for copy, etc.)

    I now see the file appear in the print queue, flashing, saying: rolling/printing, repeating & loop, and each Flash increases the size of the file!

    I tried to change the Port LPT1 and 3

    Nothing prints, because I have to stop the spooler, delete the file, start the spooler to clear.

    What happens on two different machines, I'm totally stuck!

    Help appreciated!

    Hello Stan,

    Thank you for visiting the Microsoft Community Forum.

    The question you asked is more complex than what is generally answered in the Microsoft Community Forums. We have a support forum dedicated to complex issues. I suggest you to send your query on Microsoft TechNet forum. You can get more effective suggestions and adapted by experts familiar with this topic. Your understanding is appreciated.

    Here is the link:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itprovirt

    Hope this information is useful. Feel free to write us again to the case where you are facing in the future any other problem with Windows. We will be happy to help you.

  • How many cursor level for nested loop?

    Cursor for loop nested up to level (depth)?
    CURSOR cur_user_tab_cols
    IS SELECT column_name
    FROM user_tab_cols
    WHERE column_name = 'DQ_SUMMARY';
    

    The cursor should not

    CURSOR cur_user_tab_cols
    IS SELECT column_name
    Of user_tab_cols
    WHERE table_name = 'DQ_SUMMARY ';

    Published by: Kiran on February 2, 2012 04:13

  • Removal of many Textfields created by a loop

    Hey guys

    I have a loop that creates multiple TextFields in different positions:

    for (var i: Number = 0; i < 11; i ++)
    {
    var t:TextField = new TextField
    t.Text = "TextField.
    t.x = 10
    t.y = 20 * I
    addChild (t)
    }

    But then in my program, I need to remove all these textfields

    I tried removeChild and affecting the t.text nothing, but this will only affect the last created textfield

    Can anyone help?

    Thank you

    Chris

    Yes, the container is a very good way to manipulate all objects to display at a time. But it depends on the application. I wouldn't create a container just because I'm used to the creation of containers. As you have said - it is an architectural decision and there should be a reason to do that if I'm to do. Even with a container, I would use a reference table to keep things tidy. You can loop on the elements not only because you want to remove them.

    Anyway, there is no doubt that the function of yours is a nice little feature to use to get rid of the fake items. I use it myself a lot - especially with anonymous objects, pieces of graphics etc.

  • Timed loop versus While loop

    Most of the machine control software I design have the following structure:

    1. There's a HAND that takes place inside a TIMED LOOP with synchronization of 50ms and priority of 100. His only job is to read / write data from / to DAQMx IO cards.

    2. the MAJOR can call several SUBs based on the choice of the user, and once a submarine is called FP MAIN is closed and the FP SUB opens. All submarines have a States Queued Machine running within a TIMED LOOP with 50ms timing but with priority to 50.

    3. data transfer between HAND / SUB is through function globals - there are many of them based on past data.

    4. all woks fine so far. No need to any RTOS. and platform of WIN7 is alomost standard. I even ran with a timing of 20ms without anything crashing...

    Problem: When there are a lot of file i/o operations in a SUB partciluar, then I have the chance to see several missed iterations. Perhaps the TIMED LOOP is hogging resources.

    What I want to do: convert both TIMED in asnd SUB HAND loops simple while loops.  But I am concerned by the priority - since the MAIN interacts with HW there priority. But with LOOP WHILE how can I ensure this?

    Or is there any replacement / effective way of doing what I do now?

    Rama wrote:

    .... FGV should be thrown out the window...

    Well used for a while, based on many articles in the KB. One of them is locked... and it does not represent the engine of the Action or of the FGV as a villain to avoid.

    The driving force is one of the largest buildings in LabVIEW.  The FGV who does nothing but Get and Set (or writing and reading) is useless and a waste of resources.  Why?  It does nothing to fix possible race conditions (does not protect critical sections) and it is much slower than just using a global variable.  See this example I put in place to see what I mean: an overview of the race Conditions.

    Rama wrote:

    So in the sample that I had attached, what do you think would happen if I just replaced the two loops with the SAME timed in MAIN and SUB wait value ms. is there a work order then?

    When things are at the same time, there is no such thing as the order of execution.  But as I said, it seems that your loop is quite slow, so it's something I would not worry.  Just make sure that you do not have a loop that uses all the CPU.

  • too long in the loops of whlile (timed)

    HY

    I am: routinely labview developer course made, advanced no performance (not even as it may seem, I need that).

    Programm: multi all structure of event loop with lines of command for each loop, more a single elemnt queue for each loop running as a variable. network communication trought the queues is possible! Many hardware addons as controller PXI Motion and IO digital communication, RS232 communication with several controllers different als separated loops. The software also works without connected hardware components.

    problem: lines of "continuous loop" rate should be less than 5 ms, but is about 15ms/iteration at the present time.

    hardware: computers 2core, WinXP32bit, LabVIEW9

    goal: improve rates of loop of the "continuous loop.

    What has been tryied and tested:

    OK, I tried many things, partially with success.

    -make Subvi returning some of them are used many times at the same time in each loop (see hierarchy VI)

    -increase in speed Subvi with code improvements, partially with success

    -Analyze with the profiling of the VI

    Question:

    When I was profiling the performance of my VI, I have identified that summarizing the duration of the Subvi "Continuous loop" does NOT match the current loop duration. they are about 20-30 ms, whereas they should be according to the number of tracks and the total corresponding to 3ms. in other words, it is factor of 6 to 10 slower than it should be in my point of view. I don't really have an idea of why this happens. the printscreen and its corresponding information is without another iteration loop (deque just waiting) running.

    I tried to get more details and made a few tests and comparative analysis with my continuous loop. He showed that this additional time (latency? so high?) is not actually produced by the continuous Subvi and also not part of the loop deque. It seems that almost all the time of the loop is displayed once the code for the loop is finished... and before the beginning of the loop, somehow...

    If you have any suggestions or information, why this is the case, or if you even have ideas for improvements or references, please let me know.

    attached is viewed from the corresponding part of the program. I don't want to the public the entire program for everyone. If you have any ideas or need the code for the specific tests, please send an e-mail directly to stefan.hartmann (at) psi.ch.

    best thanks in advance

    HY

    OK, I found the problem. the long time of iteration is produced mainly due to a queue which was to load and write the string array of 100 x 100 several times by iteration. This is the reason why time iteration actually has been measured so high and produced a further delay by iteration, next to the slot-VI-times.

    I solved this problem by maintaining the use of queues in 100 with chain 1 x 100, where I actually just need a queue by iteration and not the 100 x 100. This means at the time of iteration about 2 Ms!

    see you soon

  • Can someone tell me what's wrong with my loop of consumer queue or producer?

    A Labview engineer helped me with the overall structure of my program, made necessary by the rapid sampling rate data and post-processing requirements. He recommended the producer/consumer, loop and using one of the example (Cont CQI graph - int clk voltage) files to actual data acquisition. So I put the loop on foot and spend my two channels of data acq past in the loop of the producer. However, nothing is get picked up in the loop of consumer and none of my data gets displayed there.

    Someone wants to take a look and let me know what I am doing wrong?

    It seems that the only time where you have to write the data in the queue (in the loop of the producer), when you stop the DAQ while loop or the acquisition of data generates an error.

    You may need to place the element from the queue node in the data acquisition while loop.

  • Closure of a state machine in queue event with several parallel loops

    I am trying to find the best way to stop a program that consists of an architecture of State machine in line waiting for event with several parallel loops. Can anyone recommend the best way to achieve this in my attached VI? (To browse the forum, this seems to be a frequently asked question, but I have not found a solution that works for me.)

    I look forward to any comments on my as well code, if someone is willing to offer it.

    My program needs:

    If the user press the 'Stop' button, the program should prompt the user with "are you sure you want to stop the program?" and then return to a State of rest or move forward to stop the program. In addition if there is an error, the program should prompt the user to ' clear the error and continue, or stop the program. Then back to the idle state or move forward to stop the program.

    Architectural details:

    The program consists of 3 parallel loops: (1) a loop of event management that places different States of a queue of the State, (2) a State Machine that enters the State that is removed from the queue of the State and (3) a loop error/Shutdown, which deals with errors in the error queue management.

    During normal shutdown, where running handling loop in the case of event 'Program.Shutdown' and 'Shutdown' and the 'Idle' States are added to the queue of the State. In the state machine, the State of 'Stop' is invoked. Special "5000" error code is added to the queue of the error. In the loop of error handling and stopping, "5000" error triggered a prompt that asks the user if they want to stop the program. If the user chooses not to stop, a notifier StopNotif is sent to the State of 'Stop' and 'Program.Shutdown' event case with notification 'Go '. If the user decides to stop, the Notifier sends the notification "Stop". Loop and event management State Machine ends when they receive the notification "Stop".

    In case of error, the program behaves in the same way: If the user chooses to clear the error and continue, the program returns to the status "pending".

    HOWEVER - if the user chooses to stop the program, the program crashes. The author of the notification that is sent to stop the loop of events and State Machine management cannot be read because event Program.Shutdown and the stop State (which contain the function "Waiting to notify") are not active.

    I was able to activate the stop State by Queuing in the loop of error/Shutdown management. But I don't know how to activate the "Program.Shutdown" event by program and thus access the function "Waiting to notify" inside.

    I tried to put the function "Waiting to notify" outside the structure of the event, so the event-handling loop never ends. Placing timeouts on the "wait for declaring" and the structure of the event makes the programme of work, but I want to avoid using timeouts because I don't want to turn my event program into a program of polling stations. I would also avoid using variables or nodes property to stop loops, because that requires the creation of a control/indicator for something that the user does not need to interact with.

    Thank you!

    First of all, close the notifier outside loops with your queues.  Second, you must use a user event to send the message to the event structure loop so that it stop in the case of the stop on an error.

  • Producer/consumer problem: several loops/queues

    Hello

    Please refer to my previous post ... http://forums.ni.com/t5/LabVIEW/What-is-the-best-way-to-switch-between-multiple-image-buffers/td-p/1 > for more on the subject. I was told to try a producer/consumer architecture, so I decided to go and do it.

    After doing much research, I come back to ask for help.  I decided to try to implement three loops. The reason for this is because I thought that the length of each loop synchronization can be controlled independently as it should. A single loop treats all user interactions.  A single loop treats data acquisition.  A single loop about the transformation.  I hope that this would help, but obviously made things much more complex.  I created a queue for each loop.  I didn't get the full project, but it seems that everything has run very well where I stopped.  However, one of my States I did not queue receive queue and I have no idea why or where coming.  There is an error in the variant data that says

    'status'-> TRUE
    'code'->-6
    'source'-> ' error: Invalid Args.

    However there is no error in wiring.  Also when this error is displayed, the random State fell through.

    The other weird thing is the number of items in the queue jumps very quickly when I do almost anything.  I don't know if it's common.

    Before I post pictures or whatever it is, I would have an idea about this error.

    Also, I think I saw this in a previous post about the BAU, but I would like to ask a question.  Attached are two photos.  Queue 1 is the way I put things in place.  Queue 2 is the way I saw things in place.  Can someone tell me if the queue 1 is the wrong approach and why?

    I realized what happened.  The other loop was not handled properly and sent the random State of the main loop.

  • Stopping at two while loops, running with queuing

    Hi all

    I'm using labview 8.2.

    I have two while loops in my code (called the main loop and the other average loop - seen on the screenshot file).  I just want to stop both the while loop at the same time (it's ok it the average loop takes a bit longer).  I use global variables to stop (as I have tried the local one, but I don't think that LabView sees in the middle of the subroutine).

    Please give me some suggestions on this.

    Is attached a screenshot and my labview code

    Using a ' functional global' is almost identical with a "global" variable Indeed, before the existence of "global variables", a functional overall, it is how people have this feature.

    The usual way to stop a loop containing a "wait for queue ' is to destroy the queue and use the error on the terminal of the 'expectation of queue' directly in the terminal of the judgment. In this way, you don't have to queue up some kind of end the command to stop it.

    Add a queue to destroy after the stops 'main while loop. Delete the global variable and the error from the stop "waiting in the queue" in the loop "average" it is wire terminal.

    General advice, always try to avoid using local and global variables.

  • What architecture for loop to hour of time timed with responsiveness front

    I cannot consider this application planning.  I was originally using an Event Driven Architecture with a State Machine in queue to analyse Panel UI changes and react accordingly.  (Something like the solution found here).

    Datalogging should be done in its own loop with the data passed by a queue.

    If you want, you can have multiple queues and several loops of consumer.

  • Infinite loop of BSOD problem - Satellite M55

    Many people receive the "infinite loop" error with M55 / ATI 200 M.
    Is there any solution for this? My laptop (bought in May 2006) is worthless... restarts every 2 minutes. Totally unusable.

    There was a post here where the user has indicated they have found a solution, but the solution was not displayed :(
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=15169

    Please reopen this thread, or post the solution.

    If there is a new driver that I'm supposed to use, thanks for posting the link (as opposed to simply say "use a new driver").

    Thank you.

    Hello

    First of all... the infinite loop error is not specific to any video card.
    When you get this error? The BSOD appears during the game?
    Using the graphics driver from Toshiba?

    I t can give you a good solution, but if you use all the drivers of the operating system recommended should I run stable without any problem, the BSOD or interruptions.
    The unit is very old, and the warranty is valid. The notebook should restart every two minutes on something like this is not usual.
    So if the drivers of Toshiba won't help you I would suggest contacting the service point in your country.

    Everything has to be checked

  • A wait timer is needed in a loop of consumer?

    I have a leak of test engine and motor servo which is a loop of consumer being called via "Start Asynchronous Call" several times for each device.  A contractor I work with said that I need to add a timer wait since the dequeue tie up the processor.  Is this true?

    I kind of logic that awaits the dequeue to treat something immediately, but I thought that the time-out would free the loop as a wait timer to zero.  He says he doesn't because he is still waiting to remove something.  What the experts think about it?

    nonecure wrote:

    So the dequeue will normally be on the CPU?  Is this similar to an empty loop without a wait timer?  Not a lot of treatment, but taking processor resources?

    Lol if there is nothing in the queue, Dequeue item causes a 'sleep '.  This is similar to the Structure of your event until the event.  They use no CPU while you wait for a message.

    Now if you have a lot of things in your queue, then your loop could run as fast as possible to play catch-up.

  • Wait queue element and then rinse queue

    I then process in a separate loop and work with a producer consumer design to read data from a data acquisition (number crunch, update locations, write to produce results).  The rate of data acquisition can be very variable, so there are some cases where the producer fills the queue more quickly that the consumer can handle it (one at a time).  So I changed the loop of consumer to use RAS queue instead of dequeue and batch process all recent items.  This works well and allows a much faster operation.  The downside, I've noticed, is that, when the producer loop runs much more slowly than the loop of consumer, hunting generates the queue runs without data to pass.

    What I am wondering if there is nothing to wait for the elements of the queue (as done dequeue) and then clear the queue, without using too broad.  I guess I could use the status of the queue in a loop and then emptying the queue, but I'm guessing that this would lead to a significant overhead when I turn at higher speeds.

    The only alternative I can think of is to put the write file a third loop with another queue because it's probably slowing down the main consumer loop and then put the loop main consumer towards the transformation of one item at a time.  But it seems that there should be an easier way to do it.

    Any thoughts, suggestions or generally better ways to handle this?

    Thank you

    Tim

    Use Preview queue and do not wire out of the element. It has a timeout, as element Dequeue. Put empty the queue directly after this one. Or, use Dequeue followed by emptying the queue and add the output from the Dequeue item on the output table to empty the queue.

Maybe you are looking for