Slow loop inside the quick loop

It's my first week of work with LabView so perhaps the answer is very simple.

Here's my question:

How can I include a slow loop (event B) inside a quick loop (event A)?

What I would like is for event B run every 1000 milliseconds, and the event has every 100 milliseconds.

Where event is a position control loop and event B a simple write to a file of any measure.

Any recommendations on how I should do this?

You can use an Express VI of time spent inside the quick loop to see if it is time to perform the slow loop.  I took the liberty to not use a loop for your "event B" because it sounded like you want just the rhythm with the event.  Place B events in the real case of the box Structure. The design of producer/consumer model is the way to go if you are developing a complex application. This will make if your problem is relatively simple.

Tags: NI Software

Similar Questions

  • Why my SSD C: HD so slow running inside the XP Mode

    I come to install a Verbatim 256 GB SATA II SSD as my HD C: and find that inside my Win 7 Pro XP Mode using the HD test HD Tune untility speed, it only shows the speed of transfer around 9-10 MB/s

    Also the startup in XP Mode is extremely slow

    I also found that when I'm in Win 7 Pro HD Test transfer speed the results I get vary across

    Sometimes, approx. 190 Mbps. other times down as low as 5-6 MB/s

    My Seagate 500 GB SATA HD C: consistantly shows approximately 130 MB/s and XP Mode Boot time, it is much, much faster

    I realize that there could be several factors causing these problems SSD, but I'd appreciate it if someone can suggest a way to find how to fix this problem/s Transfer speed

    Thanks in advance

    Max

    Hi Max,.

     

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    TechNet Forum

    http://social.technet.Microsoft.com/forums/en-us/w7itprovirt/threads

     

    Hope this information helps.

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

  • tasks timed inside the loop

    I have a program that has multiple tasks, and I want to work at different frequencies inside the loop.  I wonder what is the most effective way to do this?

    I read on several tasks running button push-based or events, but have not found much of the timed tasks.

    Is the loop timed the best way to go with this?  Have a loop timed for each required task?

    I have attached a vi corrupt that shows what I'm trying to do.

    I'm sure there is an easy solution, but want to find more effective this way.

    Thank you

    For a simple task like this, just turn the loop at the faster pace, you need and perform other tasks to integer multiple of it.

    Here's a simple project (LV 8.6)

    (Of course you have serious problems with stolen memory, as you grow berries of infinite sizes in the uninitialized shift registers. Which must be fixed too).

  • Is it possible to put the property inside the loop node?

    I created three nodes of separation of property (color graphics) for my 3 XY graphs.

    Is it possible to have a property node, put this tag inside the loop where I ranges from 1 to N, and say plot_color_i

    where plot_color_1 would update 1 XY graph, plot_color_2 update XY Graph 2, etc. ?

    See the attached VI.

    Yes.  Create an array of references to the XY graphs and have this auto-index in the property node in the loop For

  • Event inside the loop 'for' confusion

    Hi all

    I have an event inside a N = 2 for the loop, which generates an array of 2 elements (auto-index mode). The first value is a first event, the second of the second round. The events are the mouse clicks on a front panel with many buttons control.

    Am I able to access the i counter inside the front loop of 2 elements output table? He does not appear.

    Maybe I want just 2 events in the order I should put two copies of this event in a sequence of 2 image... but it creates the need to set up the event twice... a concern, because it contains many possible sources.

    Ive tried everything in loops, by the way I like a local variable, tunnels, shift... registers but I don't seem to be able to access I have during the loop.

    Can anyone suggest a method or a better structure/approach for this issue.

    In any case, it seems that the program is blocked waiting for the second round, so I can't do anything with the value anyway?

    I want to take action after the first test and before that I'm waiting for the second event.

    Thank you

    Carloman

    OK, you're much too complicated things dong.

    • Use a unique event for all low Boolean mice, then use the ctrlref of output event to detect only one. For Boolean values, you can use an array of Boolean instead of all these individual buttons.
    • Don't do the "table of cluster... unbundle" songs and dances. It's just ridiculous! 'array Index' is sufficient.
    • You need an event for the stop button.
    • The structure of your outdoor sequence has no purpose.
    • The coloring is registered with VI, no need to recolor with each race.
    • Do not reproduce any of this code. Your internal matter differs only in a constant of the diagram, it's everything that belongs inside the case. The "subset of table to replace" belongs to the outside.
    • Now, simply do the processing in a new event and ignore if the State isn't fair. Modify if needed.
  • Oracle 11g: engage inside the outer loop or loop

    Hello

    Could someone pls help in this regard.

    My PLSQL program retrieves approximately 400 000 thousand records in cursor loop and cl, it takes more than 4 hours to complete IT.

    I commit every transactions inside the cursor loop... This can affect the runtime performance?


    Also, pls suggest, can we use commit 400 000 transactions once it will be faster? (or) the performance of baskets longer than the current situation.


    My goal is to make the fastest program and expect to reduce the timing of execution of 4 hours to 1 hour...


    Appreciate your help...


    Program design: advice:

    a. Select 400 000 thousand documents in the cursor.

    b. inside cursor for loop to two new sql instructions written to get values and store it in the local variable (this value is used in the call to insert data), two sql statements are handled with no_data_found and too_may_rows logic implicit sql statements to intercept the errors of the company

    c insert statement.

    validation of d. inside the loop (batch mode: nowait)

    management at the level of the procedure using raise_application_error exception e...

    Do not use the PL/SQL for data processing. SQL is a powerful language. Get the best out of him.

    Here is an example of using INSERT ALL. This is untested code and may contain syntax and semantic errors.

    insert all
      into medicomread.aatable_permit_people
      (
            permitnum
          , lic_num
          , lic_type
          , bus_name
          , addr1
          , addr2
          , addr3
          , city
          , state
          , zip
          , ph1
          , ph2
          , fax
          , bus_lic
          , lic_original_issue_date
          , expiration_date
      )
      values
      (
            appt_ref_no
          , lic_num
          ,'Business License'
          , company_name
          , postal_address
          , null
          , null
          , null
          , emirate
          , po_box
          , telephone
          , null
          , fax
          , license_no
          , issue_date
          , expiry_date
      )
      log errors into err$_aatable_permit_people ('INSERT1: HEALTH CARD SPONSOR DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , name
          , b1_contact_nbr
      )
      values
      (
            appt_ref_no
          , 'Applicant'
          , cname
          , userseqno
      )
      log errors into err$_aatable_permit_people ('INSERT2: HEALTH CARD BUSINESS USER DETAILS') reject limit unlimited
      into medicomread.aatable_permit_people
      (
            permitnum
          , tt_contact_type
          , B1_Contact_Nbr
          , Name
          , gender
      )
      values
      (
            appt_ref_no
          , 'Individual Health'
          , userseqno
          , patient_name
          , ***
      )
      log errors into err$_aatable_permit_people ('INSERT3: HEALTH CARD APPLICANT USER DETAILS') reject limit unlimited
    with t1
    as
    (
     select mr.appt_ref_no
          , mr.sponsor_name
          , substr(mr.PATIENT_NAME,1,79) PATIENT_NAME
          , mr.***
       from medicomdata.mc_register mr
          , medicomdata.mc_process_type_register mptr
          , medicomdata.um_users uu
          , medicomdata.um_companies uc
      where mr.patient_id     = mptr.patient_id
        and mr.pro_id         = uu.user_id
        and mr.facility_id    = mptr.facility_id
        and mr.process_type   ='OH'
        and mr.regn_status    = 5
        and mr.sponsor_name   = uc.company_name
        and uu.type_id        = 3
        and (add_months( mptr.issued_date, 12 )-1) > sysdate
    ),
    t2 as
    (
     select decode(ucr.license_category_id,'DED','DED'||uuc.license_no,uuc.license_no) lic_num
          , uuc.company_name
          , ucr.postal_address
          , ucr.emirate
          , ucr.po_box
          , ucr.telephone
          , ucr.fax
          , uuc.LICENSE_NO
          , ucr.issue_date
          , ucr.expiry_date
       from medicomdata.um_companies uuc,medicomdata.company_registration ucr
      where uuc.license_no=ucr.business_license_number
        and uuc.inactive=0
        and upper(ucr.request_status)=upper('true')
    ),
    t3 as
    (
     select uu.company_name
          , cname
       from (
             select uu.first_name ||' '|| uu.last_name cname
                  , row_number() over(partition by uu.company_name order by decode(usr.service, 'HCDC', 0, 1)) rno
               from medicomdata.um_users uu
                  , medicomdata.user_service_request usr
              where uu.user_id      = usr.user_id
                and usr.service     = 'HCDC'
                and uu.type_id      = 2
                and uu.inactive     = 0
             )
      where rno = 1
    )
    select t1.appt_ref_no
         , t1.patient_name
         , t1.***
         , t2.lic_num
         ,'Business License'
         , t2.company_name
         , t2.postal_address
         , null
         , null
         , null
         , t2.emirate
         , t2.po_box
         , t2.telephone
         , null
         , t2.fax
         , t2.license_no
         , t2.issue_date
         , t2.expiry_date
         , t3.cname
         , companyuserseq.nextval userseqno
      from t1
      join t2
        on t1.sponsor_name = t2.company_name
      join t3
        on t1.sopnsor_name = t3.company_name;
    
  • FUNCTION SLOW - subset of the string

    Hello everyone,

    in the image of attacched, I have a loop that goes through a 1 d array of strings, searches for items starting with "02" and went back inside their index in the array.

    The problem is that it is very slow, it takes about 18 seconds to analyze the overall picture of the file which is long about 20000 pieces. Since I'm on a PC, I expect to do the job in a few seconds.

    Any suggestions?

    Thanks in advance,

    Lorenzo

    OK, here's a few things I noticed that could slow things in:

    -Nodes of property inside the loop will definitely slow down your loop. It's also dead code - you must update the maximum on the scale once before the loop executes.

    -Local variables are also (I don't think marginally) slower than the use of the Terminal. LabVIEW is a data flow language: you must use cables to connect all things!

    -Using conditional indexation will cause dynamic memory allocations, because you have to resize the table... you could improve this by preallocating a table for the number of iterations in the loop and then resize the table at the end

  • Slow response of the DAQ

    My DAQ system includes measuring RTD temperature via a NI9219 module.  The usual analog to (NI9201), analog out (NI9264), digital in, digital out (NI9401) work fine and run properly with a single software timed while loop 20 Ms per iteration.  When I add entries temperature that the loop slows down at the rate of 2 Hz of the NI9219 - fine for measures of temperature but too slow for the user interface and the rest of the system.  How can I keep the loop running and don't update the temperature data when the NI9219 ends?

    Thanks to each of you for your help.  Lynn, your answer got me on the right track, but I don't need the design / the response of consumers.  What I needed, it is three while loops.  One for slow sensors (NI9219), one for user interface and fast sensors and a third in both.  Now LabVIEW begins the slow acquission, and then allows you to run the fastest acquission.  I have a lot of cleaning up to do, but that's the easy part.

    Once again, thank you to you two.

    Bill

  • Subvi inside the structure of event wont run a second time.

    I have a Subvi within a structure of the event, and it runs when I press a button, inside the Subvi is code in a while loop, and when the last piece of code is executed, the while loop stops.  I have a bad event triggerring once I have already run once.  Which means that I pressed the button and the code in the event structure was executed and while the main VI works always, I press the same button again and everything works but the Subvi.  How I would do this job?


  • Creating user interface inside the transmitterPlugin.cpp

    Hi, I had two questions about transmitterPLugin. I am trying to create a plugin that will transmit data to the monitor of first source pro on an external device.

    transmit_UI.PNG

    (1) I use the MessageBox to create a normal window from the code above, but how to create a UI like premier pro has inside the function above? Is there documentation on creating interface user using C++?

    Or should I create a Javascript UI file that is used by the C++ plugin loading?

    (2) in the SDK documentation mentions this:

    transmit_other.PNG

    By clicking on the following call pass does not any useful information. I also checked on a previous post on this https://forums.adobe.com/thread/1179336

    Adobe explain please how can I get the suite to call forwarded to work. For example, should I create a video filter that, if the user adds to the clip, it should

    Send the entire timeline for external devices, how to use the SDK example files to achieve this? Should I export a Video_filer plugin and a plugin of the issuer or should

    Add the source code of these two into one? It would be useful to understand the workflow, since there is no examples related to this in the SDK.

    Thank you

    Since you have to scrub the timeline and see live results, plugin show is the way to go.

    The interesting part of your project, it's that you must return the frame for head tracking, even if there is no new image from Premiere Pro.  I agree that you need the while loop in a separate thread or process, so that it can continue to loop and manage the lead followed separately.

    SetupDialog certainly isn't the place to run a processing loop.  This is only a place to display the user settings and save them.  To the settings dialog box, you can use Windows or Mac API.

    During the ActivateDeactivate, you can manage physical access low level, and could be a possible place to redeploy a new priority processing thread that assumes the head track frames and handles.

  • How can I do the quick filter Toolbar NOT search in type-I?

    Research during the strike makes it extremely slow search. I would prefer if it seeks ONLY when I hit enter and NOT while I type.

    https://support.Mozilla.org/en-us/KB/quick-filter-toolbar

    There is no way I know of to freeze the quick filter search until you press ENTER.
    It dynamically adjusts the list according to what has been entered, and how broad you are looking.

    TB built in functionality 'search Messages... " you wait for you to press on enter. You can search for a single file, or the parent folder and all its subfolders. It uses the same list of filter as the message filter criteria.
    "Edit - Find -"Find Messages... ', or
    Right-click any folder in the folders pane, and select 'search Messages... »

  • When you take a Flash inside the shutter remains open as if you used no flash.

    When you take a Flash inside the shutter remains open as if you used no flash. The anti-shake icon is visible in the viewfinder before a picture is taken.

    The handshake that you see indicates that the device is set to use 1/30 of a second shutter speed or slower. This explains the symptoms you describe. There are other parameters that will allow you to do, but the first thing to check is to make sure that the flash setting is not set to slow sync menu.

  • Satellite L505-144 - dust inside the screen

    * Hello there *.
    * I have the *.
    * L505-144 *.
    * I'm having a problem in view of the presence of dust inside the screen *.
    * Is there a way to clean this dust *.
    * Note (_its not dead pixels _ dust *)
    * Thank you and please help quickly *.

    Hello

    Well, I never heard talk about the dust inside the screen. Are you really sure you and have you ever tried to clean the screen with a cloth Microfiber?

    Is if there is really a problem with the screen, you need to contact an authorized service provider and leave guys to check the situation of what needs to be done now and if the display should be replaced or not.

  • How to control the order of the icons in the Quick Launch bar on taskbar of office?

    When I toggle display Quick launch in the desktop taskbar and Start Menu properties, the order of the icons changes.

    Is that what I can do to keep the order of the icons when I cant see the Quick Launch bar?

    You could try the button "Rebuild icons" inside TweakUI (part of the Microsoft Power Toys for Windows XP pack).

Maybe you are looking for