two loop running concurrently, but double length

Hi guys,.

I try to read at the same time both ion Chamber. IC0 IC1 reading and reading have a loop of each.

These two Subvi can run concurrently, but by the time the cost doubled again.

Why?

Thank you very much!

Hi guys,.

Thanks for your reply.

I found the problem. I put the delay between write and read the com see the following figure. The timer was implemented with Resp.vi of IC101. After I moved out, my code can work well. It's the job

Tags: NI Hardware

Similar Questions

  • Two different running loops one after another with different time intervals

    Hello

    I am currently using LabVIEW 2013. I'm new to LabVIEW.

    I take 10 values to data acquisition during the 9-10 sec time interval within a period of 10 seconds.

    I thought runs two loops. 1st loop will run for 9seconds out giving zero and the second loop will launch with 1 second left taking all the required 10 values. can someone help me in this way to do it. If you can suggest me any other idea.

    Thank you.

    Your task of data acquisition is to take 10 samples in 1 second (I assume that you also spaced).  10 samples/s = sampling frequency of 10 Hz (Hz = events/second).  To configure DAQmx tasks, MAX is your friend.  Open MAX, find your device (plugged in), open a panel of Test and find a way to let him taste at 10 Hz and collect 10 samples.  Test to see if it works.  Get it now to save as task.

    Now, when you configure your block diagram, drop a DAQmx Start Task (or even read DAQ) and wire an empty constant to the task in.  See the little arrow for menu drop-down?  If you click on it, one of the choices should be the task DAQ, you just saved.  Select that and it will work.

    Now, all you have to do is wait 9 seconds before acquiriing your 10 points.  There are functions of synchronization that can allow you to do this.

    Bob Schor

  • Best practice for simultaneously run two loops (read + write) in sync

    Hello

    I thought I had a work program that could write and read simultaeously with reasonable accuracy, because it is perhaps not as reliable that I discovered the thought (he sometimes gets out of sync/jumps steps).

    Is there a good guide, method tutorial or recommended to do with reliability, in sync and effectively?

    Should I use the notifier? and/or timed loops?

    I have a loop of Scripture, which sends steps to a certain type of equipment (stepper motor or magnet etc.) to not more than 100 Hz.

    I have a loop of reading, that reads data from a detector (photodiode, the signal is dependent on the stage of writing), no more than about 1000 Hz (the playback loop runs faster than the loop of writing)

    I then pass information from one loop to the other (a single loop wrote to a group, the other readings of him).

    I then save data to a file by saving the content of the chart.

    Thank you

    Jeff_Tech wrote:

    (1)... in sync...

    (2) ... (the playback loop runs faster than the loop of writing...)

    These two statements are not a contradiction?

    There is important information that you have left behind, for example are - it enough for both in phase or is it also necessary that they occur at a very steady pace.

    What the two depend on each other? It is an application of control where the output depends on the entry in some way or is it simply an excitation/response pair.

    Are you single point of software timed acquisition?

    Should it operate for long periods of time or he just a scan done every time?

    In any case, are probably the right thing is to run the two hardware timed the same clock. Configure the AO output array and arm the AI, then start the two running of the same clock (for example, you might bind the conversion of CEW AO clock). Read the data in the buffer to HAVE at your leisure in a loop which is a not any special time.

    Can you show us a code so we get a better sense of what you are doing?

  • Output graphics of two loops for

    I would like to see a graph of the output generated in both loops for.

    X: steps (i x I have two loops)

    Y: Y1 should graph the polar output

    Y2 should chart the Azimuthal output

    Probably very simple to resolve/upgrade in place.  (The output file works fine).

    Thank you

    Kevin

    Good work Kevin.

    I have some suggestions for you (I don't know what it will be eventually, because then maybe they're based):

    • If the data do not change over time, you can use a graphic instead of a graph; Whatever it is, reduce the necessary processing power by updating the two parcels only once for a full run of the outside loop (see below)
    • You have a lot of indicators that are not obviously necessary (they simply out what puts out control - off 4;) Stop 5; Polar; Azimuthal, etc.).  When you submit here, the code is more it is easy to understand and faster you get an answer (minimal document also helps understand us what all is for).
    • Use the decrement vi but don't take it off 1 (reduced the increase in code).
    • Avoid strain - explicitly cast I32 to double so that no appeal should be made to the Manager of memory running (will reduce your footprint of memory of codes).
    • Written file are intensive and bays of building CU generally allocate dynamically memory - try to avoid these as much as possible.  In your VI, you can write to the file once when all iterations are complete.  This will reduce the runtime of the VI.

    Anyway, there are a whole bunch of thoughts that you probably care to hear, but I hope they have been helpful.

    Cheers, Matt

  • How for-loop to calculate RMS with length of 100 samples window and step 1 sample window

    Hello world

    I'm trying to make a transition from Matlab to Labview signal processing needs... Specifically, I need to smooth out and quantify a randon, two-phase sampling signal ~ 128000 in length... In matlab, I so calculate the RMS with a length of 100 samples window and no window of 1 sample to smooth.linear evelope signal; do my calculations of amplitude...

    I have a problem to do in Labview... The matlab code that I would use normally is:

    ___________________________________________________________

    Variables to assign % RMS

    x = signal of interest;

    window_length = 100;

    window_step = 1;

    Calculation of % RMS

    EMG = x ^ 2.

    index = 0;

    nWindows = floor (nrows - (window_length - window_step)) / window_step;

    EMG_rms = zeros (nwindows, matches); % The pre-allocating memory

    j = 1:window_step:length (EMG) - window_length + 1;

    index = index + 1;

    EMG_rms (index, = sqrt (average (EMG (j: j + window_length-1,));))

    end

    ________________________________________________________

    I tried many times with the loop for, but no luck... Ingore smileys... They must be a colon (:, to indicate all lines) followed by a)...

    Any suggestions?

    Thank you


  • Two loops of event Structure: hang

    Hello

    I have a wired problem when I try to use two loops with two event structures (see VI below).

    The problem is that you can stop the measurement and close the VI with X but not to stop it only with STOP button: this would lock the façade.

    Here my (rather long and perhaps not quite understandable) description of VI:

    A structure must respond on the user interface and the other a certain action. The first uses only user events: change value button START, PANEL NARROW? and the value enum STATE changes. The second event structure uses those registered dynamically: start the event user & user close event. Action when the STATE changes from button should always be done. When you press start the startup user event disables the START button and activates a loop in the second structure that should make continuous measurement. Now, we can always change the STATUS button and information (this works). The measurement loop should stop if the STOP button is true. Later START is enabled again and we should be able to press START again. It does not work as the front panel is locked. Curiously the last implemented user action works very well: by pressing X of VI, the PANEL CLOSE? is called in the first loop and should stop the two loops: If the measurement loop is running, STOP is True first, stop the loop measurement. Then a secondary structure event waits until the JUDGMENT is again set to False. If the measure is not in the process of running the first loop stops. In both cases, the event close user is sent to the second loop, successfully stop.

    I'm really confused, because I have no idea what is wrong. I would greatly appreciate any help on this.

    Best regards

    Daniel

    Thank you very much! This solves the problem. I did not understand that structures of events queued events even if they are not "active".

    (Finally there is even no need one notifier, you can just change the value of the real STOP button and will raise the event close user, comapare attached, work VI)

    Thanks again,

    Daniel

  • Why these two loops while cannot work at the same time?

    I place two same while loop in the block diagram, and then use highligt and one-step run function to observe their parallel operation.

    But I discovered that this two loop operate alternately and cannot operate simultaneously.

    Can someone help me understand this?

    My software environment:

    OS: Windows XP SP3

    LabVIEW: student editions 2011

    CPU: intel P8400

    Hi, GerdW

    Thanks for the reply

    I post a video to illustrate my question.

    While I press a strong of the run, I find that these two loops does not begin at the same time.

    While the execution of a loop, the border on the other became dark.

    It seems that during an iteration in loop 1 run, the loop2 keep waiting. and then the loop2 iterate while loop1 keep waiting.

    I do not know why this happens

    Sincerely

  • Can I control the activity of the two loops independently while in the same vi?

    I would like to run two generators of random numbers (RNG) in the same vi. The first GNA go all the time that the vi is running. But I would like to be able to control the second RNG (turn on and off at will). I consider start and stop buttons wired for the while loop to control the GNA. I tried a few different configurations but none work so far. I have included a simple vi with the start and stop buttons. I don't know how to reach my goal with them. Thanks for your help.

    Like this:

    You forgot to attach your vi.  You don't need two while loops.

  • VI does not work properly when run at each full speed or highlight the run mode, but running at full speed after the starting and stopping of the execution mode games

    Start labview, so fix that will probably teach me a lot. Looked and saw a lot of posts of things only work in games of the run mode, but nothing like this. I have attached the relevant real-time and FPGA VI.

    The code is supposed to read a motor encoder. When ran regularly, it works somehow. It will update the counter of how sporadic all few seconds a fraction of a second. When ran in climax run mode, it appears really up-to-date. After that matches the execution mode is canceled, it works perfectly. Can someone find out what could be the problem?

    Ended up staring at me. I am sure that the problem was that if there is only one element in the FIFO when it checks first, it eliminates the two elements when the FIFO filled.

    Fixed it by adding a test for the number of items before and reading only if there are enough items to read. Attached file sets for reference.

    I have still no idea why he was running after delivery to highlight in the first place. We will never know. Bonus points for the answer = P

  • two loops of consumer a producer, dequeue even item in two consumer

    Hello!

    What is the best way for the following:

    I have given in my loop of producer enqueu. I need this data dequeue-d in both loops of my intake, but I want to dequeu the same element in two loops.

    Of course if I take off in two loops, then the second loop of consumer will lose the odd elements and the first loop of consumer will lose the same elements.

    Thank you!

    Hello

    Create two queues or use notifiers...

  • control of time of two loops

    Hi all

    Here, I'm a little stuck. I'm trying to control the execution of the two loops to display a picture, I need run the upper loop for example for 30 seconds, after that he needs to stop and the lower loop starts to run for 15 seconds and stop. and then the upper loop run again for 30 seconds and then the process continue in this way.

    So please, if you can share me your trick, which will be appreciated.

    Thank you

    Hello

    something like this should work.

    Best regards

    K

  • Judgment of multiple while loop running at different rates to stop using the single Boolean stop button

    Hello

    I'm on the block diagram of 4 loops, do different tasks. They are independent of each other, but need to see the unique front panel - some of the wonders of labview!

    Now, I want to have a unique stop button which will in fact be a back button to return to the main screen by stopping all four loops on the block diagram. I used the stop button (switch released) with local variable to stop the three other loops. He stops the vi but it is not a good stop vi to stop properly and the grid on the performance of the front panel. Now all loops run also at different rates, so it is not necessary that all loops are stopped immediately when one of the loop is stopped. Can't really think of a better way. All the ideas!

    Kind regards

    Austin

    Variables local is ok in this case, but you will need to keep the control in switching mode (no lock).

    A better solution would be to have all the loops as a structure of event all listening value stop change. Or have the Stop value change event generate a user defined output event or similar.

    /Y

  • Why loops run after that assignment of processors for timed loops?

    I have 256 call loops of two frames in my code. When I execute the code without affecting processors only 128 call loop runs at the same time, however when I attribute a different processor to each of them (0-255) then only 4 runs at the same time. Why is this? How can I make all run simultaneously?

    Attached: two snapshots of the code. 1 shows a small portion of the call loops, and the other is the part of code that communicates with an FPGA VI which controls the status of the outputs (using a CRio-9066.) For call loops, the small Sun icon is a Subvi, which generates values for the time delay dt call loops.

    doug333 wrote:

    They run on the computer VI and I don't know how many processors available I!

    Windows?  If this is the case, don't bother with call loops.  They add overhead and you're very unlikely to get something from him.  Even basic affinity rarely helps.  Normal just use While loop with a ms funtion in here waiting.

  • LabVIEW measures two loops (cycle of Charge and discharge) of writing to a file

    Hey,.

    I was wondering if it is possible to write measures Labview two loops (stacked sequence Structure) in a single file. Currently, he prepares the loading of data in a single file and discharge data in a single file. I have to every time the data for the chart of the charge and discharge cycles combine and sometimes there are about 50 cycles and by copying and pasting is time consuming.

    I'll try to upload my vi a little

    Hi basketball.

    I thought you loops run in parallel. In your case, you can simply use the same path for your files. Change the option to 'apend to the file. After these changes, the two loops must write to the same file.

    Mike

  • How can we enter and update digital panel forward when a young while loop runs?

    Hi all

    In my code, I have a while loop making quick gripping (sampling)

    How can I update other digital controls in the front panel when the while loop runs?

    right now, once I have enter a number in this digital control, the computer seems to be no answer to the elbow. Looks like the computer focuses on the while loop.

    any ideas are appreciated.

    Thank you

    Jack


Maybe you are looking for

  • Satellite L650 - 1KR PSK1JE - dead after BIOS update

    As the topic already says, my Satellite L650 - 1 m Ref. PSK1JE is completely OFF after upgrading BIOS 2.40 - bios-download-page VICTORY. I tried everything: press all the buttons, remove the laptop battery, laptop battery only,... .simply anything! M

  • Paging Bob neutrons - light still does not

    Sorry, I clicked on accepted solution, and it is not! It looks like V 02.01 and something behind all of this, I see the brightness being too dark.

  • HP Pavilion dv6-A3E87AV / no sound

    No audio output device is installed. However, I know this is not true because the system is new and the sound worked fine a few days ago.

  • Impossible, connect to windows Live Hotmail

    When I click on Internet explorer, I get a message that says: "this tab has been recovered", then another message that says "internet explore has stopped working." However this only happens when I try to go to the MSN homepage and try to connect. Wha

  • HP Pavilion Media Center m8160 Win7 upgrade?

    Will be my HP Pavilion Media Center m8160, running 32-bit win7, run a 64-bit version of Win8? My flag has an E4400 clocked at 2 Mhz.? I've already upgraded the card wirelessly with a compatible W8.