"Newbie" Unable to run two actions at the same time please help

Hello
I'm a newbie (2 weeks) on Labview, so I hope my problem will sound easy for some of you.
I want to read a file and at the same time get the reading from my sensors (4 sensors).
My program is working when I do each thing in a different program but when I add them the program only read the text file and stop reading the sensor signals...I attach the program file.
The goal is with the text file to add an exact time for each sensor signal I record.
Is there any other possibilities to include a time with the sensors signals recorded ? I need to do this to synchronize the sensors values with CAM program.
Thanks
/Xavier
Ps I used a scan rate of 12000/s but I try 1000/s
and the sensor acquisition is still not working
Attachments:
test3Rdif2802.vi ‏493 KB
readfile.txt ‏195 KB
sensoracquisition30s.txt ‏210 KB

from a glance at your code, it appears that you have nested a loop to read your file, inside a loop to read your sensors. this means the nested loop to read your file must finish before the outside loop to read your sensors can run through another iteration. what you want to do is separate the two loops to run independently of each other (in parallel). use a global variable to know when to stop the loop (if they need to stop at the same time) and if you need to pass data between the loops use a queue (easiest) or you can also use globals with semaphores.

Similar Messages

  • Can i run two widgets at the same time on the same page?

    Can i run two widgets at the same time on the same page?
    Hi
    I have created and published 4 free ibooks and i would to run two widgets
    - a countdown clock
    - a review test
    at the same time on the page. Can i do that?
    Thanks in advance
    Haris

    thanks for your answer. Yes indeed HTML widgets run only full screen (snif snif). I consider this as a "distinguishing treatment".
    One solution  i read !!!!! was to create through keynote a countdown clock, to export to quicktime move and to imported at iBA predefined widgets. of course this is not the solution i need.
    So, in order to have at the same widget and run together a count down clock and a preview test (20 questions)  i must
    1)"hack" the preview widget and insert a countdown clock
    2) create a preview test using iAD.....
    thanks again
    haris

  • Run two VIs at the same time

    Hello!
    I want to know how i can run two VIs at the same time.
    I mean that i want to run a second VI ( N.2) while another VI (N.1) is in
    execution without suspend it (N.1)
    If anyone has suggestions, please help me!
    Thank you very much.
    roby.

    If you say "run a vi", I assume that you have the VI open in LabVIEW, then press the run button. (Some of the earlier answers taks about programmatically calling VIs, which I don't think is the focus of your question)
    You can run as many VIs as you want at the same time. Simply press the run button of the second VI and they will both run.
    Of course you should ensure that they don't use the same resources (e.g. DAQ device, or listen on the same TCP port, etc.) In these cases, the second VI might fail. (Also if the second VI is a subVI of the first VI, you won't be able to run it seperately, because it will be already running.)
    LabVIEW Champion . Do more with less code and in less time .

  • Can i run two PIDs at the same time?

    Hi
    I want to control speed of the rotating shaft and force applied by the pneumatic cylinder using two different PIDs from the same program.
    I managed to get two PIDs to work separatly using PID control loop VI`s supplied with labview 6.1 (I got Kc, I and D right, so there is no overshoot). When I try to run both PIDs within my vi they don`t work. I again tried various gains and managed to get one PID to work but not the other. Then through trial and error I managed to get a second PID to work but I had to change refresh time of the FOR loop from 100msec to 1msec.
    Does anyone have experience with running two PIDs in the same program? Does the timing of the FOR loop influence PID contorller? Does equiring of other data while
    running PID has effect on the PID?
    I would really appreciate any comments/help. I am pretty thrustrated at this time
    Thanks

    I don't know whcih PID vi's you are using but I had similar problems. I
    solved it by going to the VI properties of the PID subvi, select category
    execution and make sure that reentrant execution is selected. Only then two
    instances of the PID vi can run without interfering each other.
    Martien
    solved by setting the execution mode
    "smartlander" wrote in message
    news:[email protected]..
    > Hi
    >
    > I want to control speed of the rotating shaft and force applied by the
    > pneumatic cylinder using two different PIDs from the same program.
    > I managed to get two PIDs to work separatly using PID control loop
    > VI`s supplied with labview 6.1 (I got Kc, I and D right, so there is
    > no overshoot). When I try to run
    both PIDs within my vi they don`t
    > work. I again tried various gains and managed to get one PID to work
    > but not the other. Then through trial and error I managed to get a
    > second PID to work but I had to change refresh time of the FOR loop
    > from 100msec to 1msec.
    > Does anyone have experience with running two PIDs in the same program?
    > Does the timing of the FOR loop influence PID contorller? Does
    > equiring of other data while running PID has effect on the PID?
    > I would really appreciate any comments/help. I am pretty thrustrated
    > at this time
    > Thanks

  • Run two vi at the same time

    I WANT TO HAVE A VI RUNNING (WHILE LOOP, COLLECTING DA DATA, OPERATING AN ACTIVE TEST, ETC.) AND WHILE THAT IS GOING ON, OPEN ANOTHER VI (FROM WITHIN THE MAIN PROGRAM) TO DO SOME SEPERATE FUNCTION (PRINT OUT A LOG REPORT, PREVIOUS TEST RESULTS, ETC.). BUT EVERY TIME I OPEN ANOTHER VI's WINDOW, THE MAIN PROGRAM WINDOW's WHILE LOOP STOPS LOOPING.
    I AM SURE IT IS JUST A SIMPLE SETTING, BUT SO FAR HAVE NOT BEEN ABLE TO FIND THE RIGHT SETTING OR AN EXAMPLE OF TWO VI LOOPING AT THE SAME TIME.
    THANK YOU FOR THE HELP.
    DOGFACE

    I HAVE ATTACHED A ZIPPED FILE CONTAINING TWO SAMPLE FILES (CARL1MAIN.VI AND CARL1SUB.VI) THAT SHOW WHAT I WAS TRYING TO DO. I HAVE BEEN USING TEST POINT AND HAVE RECENTLY SWITCHED OVER TO LABVIEW, SO I AM STILL LEARNING. I TOOK BOTH BASIC COURSES (AND SCHEDULING ADVANCED COURSES IN LABVIEW). BUT BECAUSE OF THE DIFFERENCES BETWEEN LABVIEW AND TEST POINT, I MIGHT BE STRUCTURING THIS WRONG.
    I AM OPEN TO ANY SUGGESTIONS.
    THANKS.
    Attachments:
    CARL1.zip ‏16 KB

  • Running two EXE at the same time

    I have two EXE.
    I cannot run both at the same time.
    What should I am doing wrong?

    Yes, these are two different applications with different names.
    I double-click on the first EXE and I see the start-up form. Good so far.
    I double-click on the second EXE and I don't see the start-up form. Instead the "icon" for the first EXE in the taskbar flashes.
    I am running Visual Basic Express 2010.
    Are these some settings for the compile that I should be using?
    Individually the two EXEs work fine. 

  • Running two methods at the same time

    Hi, I need to run a bubble sort and an insertion sort at the same time.
    How can I do this? Threads?

    It doesn't work when I put in the algorithms though.
    It works when I do this:
    Bubble class:
              for(int x=0; x<20; x++){
                    try {
                        Thread.sleep(0000001);
                   } catch (InterruptedException e) {
                        return;
                   System.out.println("yes");
              }Insertion class
              for(int x=0; x<20; x++){
                    try {
                        Thread.sleep(0000001);
                   } catch (InterruptedException e) {
                        return;
                   System.out.println("no");
              }but when I try it on an algorithm it doesn't do anything
    public void insercionDirecta(int [] a, int[] num){
              for ( int i = 1; i < a.length; i++ ){
                 int aux = a;
         int aux2 = num[i]; //coordenadas y
         int j = i - 1;
         while ( j >= 0 && aux < a[j] ) {
         a[j + 1] = a[j];
         num[j+1] = num[j];//
         j--;
         a[j + 1] = aux;
         num[j+1] = aux2; //
         try {
                        Thread.sleep(60000);
                        } catch (InterruptedException e) {
                        return;
         System.out.println("1");
         }]/code]
    I've tried different amount of milliseconds and it doesn't work....
    my run() is like this
         public void run()
              int [] a = {5,2,4,3,1};
              int [] num = {1,2,3,4,5};
              insercionDirecta(a,num);
    } any ideas?

  • Debug 2 servlets at the same time please help!!!!

    I am using JDeveloper 3.1 and trying to Debug 2 servlets at the same time. I can debug either servlet individually, but I cannot seem to call Servlet 2 from Servlet1 while debugging. I keep getting Web-to-go cannot find URL. What am I doing wrong.
    Whenever I run a servlet in the debugger, the url shows: http://<myserver>/servlets/servlet regardless of the name of the servlet.
    How do I debug 2 servlets at the same time.

    Hi,
    It depends on how you call the second servlet from the first. You want to make sure to use a relative URL.
    For example, if both of your compiled servlet classes are in JDEV_HOME\myclasses\ServletProject, then make sure to call servlet2 from servlet1 directly. If servlet2 is in JDEV_HOME\myclasses\OtherServlets, then you want to use '..\OtherServlets\servlet2'
    I'm not sure why it resolves the url to servlets\servlet for everything.

  • Is it possible to run two applications at the same time on ipad.

    Hi,
    I would like to know of it is possible to play media apps (movies or bbc iplayer programs) while surfing the Internet with safari on ipad2. Even if I can't actually see the video while I'm surfing the net but can still hear it and can jump between the Internet and the movie without the movie stopping.
    Somehow I think the answer to this is no but then I also thought it wasn't possible to do print screen images with ipad until someone showed me how.
    Can anyone help?
    Thanks :)
    Locard

    Prior to iOS 6, it was possible to "multitask" with some media like playing audio from YouTube video while playing a game or surfing the web, but it changed in iOS 6.
    There are always a few surprises in major iOS releases, so who knows, it might work again in iOS 7. I never set my expectations for anything other than what Apple talks about publicly, but like I said, you never know.

  • [KDE] Unable to play two sounds in the same time

    I am switching from gnome to kde, and i did a fresh install (i formatted) the entire system.
    The problem is that, for example, before in genome i was able to have songbird playing while a movie was being as well played and if someone talked to me via pidgin, the warning sound would be heard as well....
    In kde, if i am listening to amarok, i cannot listen the audio from a video from youtube, and sometimes, while i am listening to music, someone talks to me on kopete, stops the playback on amarok and then plays the new message warning sound...... i understand this is a misconfiguration of my audio system, isn't it?
    Where should i start from? I am using xine as sound engine (phonon-xine)-.....
    Thanks!
    Last edited by Xi0N (2009-10-15 16:08:10)

    Seems to be a problem with your alsa conf...
    But, here with a stupid intel chipset, it works without any configuration !
    Maybee your gnome was configured with pulseaudio?

  • Two actions on the same day

    Hi Experts,
    I have activated the additional actions, even though i am not able to perform two actions on the same day. When i am running the second action on the same day, system deletes the first action. Plz help
    regards
    Kunal

    Hi Kunal..
    Check below:
    Cause and prerequisites
    You use the functions 'Additional actions' (infotype 0302) (that is, flag ADMIN EVSUP = 1 in table T77S0). If you delete or shift a created personnel action type 'Leaving' and then create a new personnel action without leaving the transaction, on the list screen of infotype 0000, the system does not display the last but one personnel action.
    Solution
    To correct the display problem, start report RPUEVSUP for the affected personnel number. Then check Customizing of the personnel action types (table T529A), since the report sets indicator U0302 (update of infotype 0302) active for all personnel actions.
    Hope this helps ! if so reward.
    Thanks
    Shyam

  • Desinger Workflow 2010: Unable to load workflow actions from the server. Please contact your server administrator?

    Hello,
    I am facing a problem from last some days..
    When I am trying to open/create/update workflows from Designer 2010, then designer giving me an error "Unable to load workflow actions from the server. Please contact your server administrator".
    I researched on internet for this error and found some possible reason like
    Login user Permission issue
    Error in custom actions
    So that I checked for permission for login user, but it has administrator rights. and I tried to open workflow by removing custom activity code, but still exist.
    also if I tried to create/update workflow for another site on same server then it works without any problem.
    Can anybody please help me?
    Many thanks,
    Nitin
    N i T i N

    Hi NiTiN4u,
    Thanks for your post.
    First, here are some troubleshoot workflow error form Microsoft site:
    http://office.microsoft.com/en-gb/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx#BM20
    Second, have you tried to close the site and open it again in SharePoint Designer 2010?
    Third, try to restart your IIS and share the results.
    SharePoint 2010

  • How to run two query  in the same preparedStatement

    Hi all,
    Please tell me how to run two queries in the same preparedStatement object ?
    In my module I have to run two queries and I don't want to make two methods for running two different queries.
    I just want to call this method for both of my queries.
    methodName(long param)
    Connection conn=null;
    PreparedStatement pstmt=null;
    //////////////// some coding
    Please Help !
    Thanks in advance
    amitindia

        public void foo()
            Connection connection = null;
            PreparedStatement stmt = null;
            try {
                connection = ...get from pool...;
                stmt = connection.prepareStatement("...");
                ...fetch results...;
                stmt.close();
                stmt = null; // So the finally statement works if there is an exception
                stmt = connection.prepareStatement("...");
                ...fetch results...;
            } finally {
                if (stmt != null) ..close it...;
                if (connection != null) ..return it to pool...;
        }

  • Can I run two PIDs from the same vi?

    Hi
    I want to control speed of the rotating shaft and force applied by the pneumatic cylinder using two different PIDs from the same program.
    I managed to get two PIDs to work separatly using PID control loop VI`s supplied with labview 6.1 (I got Kc, I and D right, so there is no overshoot). When I try to run both PIDs within my vi they don`t work. I again tried various gains and managed to get one PID to work but not the other. Then through trial and error I managed to get a second PID to work but I had to change refresh time of the FOR loop from 100msec to 1msec.
    Does anyone have experience with running two PIDs in the same program? Does the timing of the FOR loop influence PID contorller? Does equiring of other data while run
    ning PID has effect on the PID?
    I would really appreciate any comments/help. I am pretty thrustrated at this time
    Thanks"

    The timing of the FOR loop will influence your PID control, which is a fundamental part of PID control. Acquiring data doesn't affect the PID although it could affect the timing of the loops. For instance if you only have one DAQ card you would want to have it all in one loop because you can not have two AI sessions open to the same card.
    For more detailed information on PID I would recommend reading the "PID Control Toolset
    User Manual" which should have been installed to your machine but can also be found at : PID Control Toolset User Manual"
    Regards,
    JR A.
    Application Engineer
    National Instruments

  • Singletons running on two servers at the same time

    Hello,
              we faced one interesting situation with our application, running on clustered BEA Weblogic 9.2. We implemented some Singletons (ie. Singleton Service in a Weblogic cluster) and they are running fine. Most of the time.
              Common scenarios: cluster is started -> the singletons run on one server; the server is brought down -> the singletons are started on the second server.
              However, we had recently two situations where the Singletons started on both servers! Here they are:
              1) We use Database Migration Basis and we have a dedicated table for Weblogic to capture current state of the singletons. Due to the fact that database (Oracle RAC) was partially available one of the Managed Server could not get the lease and probably assumed that no singleton is running, therefore started the singletons locally.
              2) Network outage: we had several minutes where none of our servers could communicate between them (neither between SASU MS nor with the database). Consequence: each MS decided to start the singleton locally (after some time, which I assume is the waiting time). Once the network came back the servers could communicate again but the duplicate singletons are not deactivate, so they are running in parallel.
              Anyone experienced the same or similar issues? How to prevent the above? Is the Consensus Migration Basis a better choice? (I think yes for #1 but not for situation #2).
              Any helpful answer is appreciated.
              Thank you, best regards,
              Remus.

    In general its not a good idea.  Running PSConfig will try to establish a lock on the configuration database.  Doing that from two servers at the same time may cause the update to fail.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

Maybe you are looking for

  • Safari won't open some secure pages

    It's not just Safari, though - Firefox, Chrome, Opera. It's not just my iMac either - MacBook Pro *AND* iPad. Some secure sites simply won't open.  It looks like they load (the timer thing goes through the URL) but blink - no page. Just a blank brows

  • Can we make a BDC program as a webservice

    Hi All, Can we write a BDC program in RFC Function Module and access it through web service. We have a requirement to create a Return Order, for that we have recorded the Va01 transaction for return order and included the same recorded code in RFC Fu

  • Invalid or unknown password

    hello, i cannot access tzo because of an invalid or unknown password. I am using a wvc80n camera. I have the camera working fine at my store using the wireless here but i want to access it remotely. Solved! Go to Solution.

  • Compatibilité Camera Raw 8 + LightRoom 5 + PHotoshop CS6

    Bonjour, Système Mac Os X 10.8.5 Nouvel ordinateur Imac 27 /3,5 GHz / 16 go RAM Problème: À l'achat de ce nouvel ordinateur, le technicien a réinstallé mes principaux logiciels dont LightRoom 5 et Photoshop CS6 extended. Il a fait la mise à jour de c

  • Pop Up Message with three  Option---------------Very Urgent

    Hello all ,    I need a POP Message Name which show three option Before saving My data. Please Provide me the name of functional module . regards Swati,,,