Synchronization of multiple tasks?

Hello,
I am currently working on a project that requires analog output signals and counter tasks to be synchronized.  The board I am using is the NI-6363 X series.  I am doing this in C++.
I called the start tasks one after the other, and then the read code like this:
DAQmxStartTask(taskHandlAO);
DAQmxStartTask(taskHandlCtr1);
DAQmxStartTask(taskHandlCtr2);
DAQmxReadCounterU32(taskHandlCtr1);
DAQmxReadCounterU32(taskHandlCtr2);
The AO clock and the counter read clock are driven by the same digital signal obtained by dividing the 20Mhz master time base using another counter.
Obviously the software timing delays between the start tasks and the read functions are causing my results to be inaccurate.
Is there a way i could group all the tasks together and force them to start at the same time?
Thank you in advance.
HT

Hi John,
Thanks for your timely reply.
I am using two counters to perform buffered counting edges in TTL pulse inputs.  I tried to start the clock source after all the tasks but there is still a problem.  Here's an updated snipet of my code:
DAQmxStartTask(taskHandleCtr);
DAQmxStartTask(taskHandleCtr2); 
DAQmxStartTask(taskHandleAO);
DAQmxReadCounterU32(counter1)
DAQmxReadCounterU32(counter2)
DAQmxStartTask(taskHandleClk); //Clock source
In theory none of the first three tasks would not start until the clock got started which would mean they would all be synchronized.  However the program seems to be stuck waiting for a measurement in the DAQmxReadCounterU32 function and never even reaches the start task code for the clock.
If I change rearragne the code to look like this:
DAQmxStartTask(taskHandleCtr);
DAQmxStartTask(taskHandleCtr2); 
DAQmxStartTask(taskHandleAO);
DAQmxStartTask(taskHandleClk);
DAQmxReadCounterU32(counter1)
DAQmxReadCounterU32(counter2)
The program would run but the time delay between the start clock and DAQmxReadCounterU32 functions would cause the same problem i had initially.
The results are inaccurate because the analog output tasks are driving scanners, if the analog output tasks were started before the counter tasks, the counter tasks would record counts that corresponding to the wrong scanner position and there would be no way of telling how much the results were shifted by.
I took a look at the Arm Start Trigger section of the manual, but I am confused as to where I would find this signal (external source?) to trigger the tasks and if there is a specific function I use to set that? I couldnt find that function in the C reference file. 
My apologies if I overlooked anything, I am quite new to using DAQ boards.
Thank you again
HT

Similar Messages

  • Synchronize multiple tasks and multiple boards with X-series USB devices

    Hi all,
    I am trying to figure out how to synchronize multiple tasks across multiple X-series USB boards (6353, to be precise). 
    I have to run a digital output task AND an analog output task on each board.  All four tasks (the DO and AO on Board 1, and the DO and AO on Board 2) must be synchronized.
    I know how to synchronize multiple tasks on a single board.  I've been doing that for years.  That works fine.
    I know how to synchronize a single task across multiple boards (say, a DO task across 2 different boards).  That works fine too.
    For the life of me, I can't figure out how to marry the two.  Everything I've seen, all of the examples, etc. assume you want to do one or the other, or that you have a RTSI cable available.  Are there any examples out there that synchronize multiple tasks across multiple USB boards?
    I tried exporting the AO clock signal from my master AO task to PFI12, and then using the signal on PFI12 to as the clock source for the remaining tasks (Dev1/PFI12 physically connected to Dev2/PFI12, and Dev1/PFI12 set as the clock source for Dev1's DO task). 
    I have also tried setting Dev1/aoSampClock as the source for Dev1's DO task.
    Under both configurations, I invariably get error -89137 when I try to start the tasks -- required resources (PFI12) in use by Dev1/do/SampClock.  I understand what the error is telling me.  What I don't understand is why I'm receiving this error when I don't have any of my tasks configured to use the DO Sample Clock.  It seems as though it is not possible to export a clock signal to a PFI line and simultaneously run a clocked digital task, even if the clock source for that task is specified as something other than the DO Sample Clock?
    So, my question is, is it possible to do what I want to do?  And if so, how do I do it?  How do I configure a common clock source across multiple tasks running on multiple USB boards?
    Hoping for insight from those wiser than I...
    Diane
    Solved!
    Go to Solution.

    Update:  I decided to try using a counter as the source clock.  One cannot use counter 0 to accomplish this, but it does appear to work with counter 1.
    I'll take what I can get.  Fortunately I have two spare counters.  (Yes, I'm running counter tasks too -- 6 of them -- but they don't have to be synchronized.)
    I have to add both digital and analog input tasks as well -- all synchronous with each other, but not with the output tasks since they'll be running at different sample rates.  I hope I'm able to use a counter as the source clock for those as well.
    My head aches.

  • Mx-DAQ multiple tasks

    Hello,
    Im using LV7.1 with NI-Daq 7.4.
    in my Application i use multiple tasks, a few for aquiring analog and digital input from my first 6024E and one to aquire digital input from my second 6024E.
    In most of the time this works very well, but from time to time, when the mxdaq read VI for the second task is executing for the first time, an error message occurs. This erromessage tells me, that i passing an empty string instead of an task reference to the mxdaq read VI of my second card. After Reexecuting my App it works fine without creating error messages until I reboot. For me it looks like an initialization/synchronization problem. Both cards are properly installed and visible/testable in MAX.
    For syncroniziation of these cards i use the same MX-DAQ clock source.
    Perhaps i have to reconfigure the task initailization but i dont know what is wrong.
    thank for help

    I'm guessing that the reason that you only see this sometimes is that it is a race condition between the read call and task creation. I've seen this problem before and the cause is usually that you are trying to read before your task is created. This can be caused by using an asynchronous process to create your channels/tasks apart from doing your multi-channel reads. To eliminate this problem I suggest you write your application in such a way that you create all of your tasks first, before trying to read from any of them. The easiest way to do this is to wire up your create task VI's in order before your reads, as these VI's will block until they complete task creation.
    Hope this helps,
    DB

  • Need to find a calendar to schedule multiple assignments with multiple tasks set on specific days for multiple people

    There may be no such animal as what I am searching for, but I thought I'd give it a try.
    What I need to do is find a calendar app that allows me to have individual calendars for staff members that I can place a several-days-long assignment and have those people access remotely on an iPad or iPhone (autosync).
    I also want to be able to have tasks set on specific days within that assignment that have alerts/reminders for each stage of the assignment.
    Being able to custom colour each individual assignment (not just the person's own calndar) is also necessary, as these asignments overlap and need to be easily distinguishable at a glance. Each assignment needs to be its own entity and not affect any furture or previous entries, even if I choose the same colour.
    It needs to be in a month by month view and be able to be something each person can subscribe to and sync up with for changes on a daily basis. It does nothave to be a calendar like in the screen shot below, it could be a linear calendar that has days across the top and assignments down the left side.....
    Here is a screen shot of a rudimentary excel spreadsheet I have been using. It is awkward and becoming unmanageable as the number of assigments increases and more staff are being added on. And I must send a new spreadsheet out every time I make a change or add an assignment, which is several times a week.
    I suspect I may be asking for the world, but if anyone knows a direction I can go in to start a search, I'd be grateful. I haven't had success of my own so far and need to find something soon.
    iCal doesn't work for me due to the fact I can only colour code the calendar itself and not the event, plus not being able to have multiple tasks within one event. And the qty of assignments I'd have would see most getting lost, eliminating my abilty to see every staff member's assignmanet at the same time.
    Thank you in advance if you have a suggestion and if not, thanks for looking at my dilemma! 

    check with T-code TPM44
    zashok

  • Creating multiple tasks

    I am using the CVI plug-in for MSVC.  My application requires that I toggle a set of digital lines based on a user's input.  For a variety of reasons I would like to initialize my DAQ task handles at the start of the program so that when I need to toggle the lines I just call Run and Stop.
    Some of my tasks use the same lines.  I know that if I try to define multiple tasks using the same lines that I will get an error (-200089). 
    My question is this: Is there a clever way to pre-define my tasks at the start of the program even if they use the same lines? 
    Thanks. 

    UGH!  Cut and paste got me.  Stupid syntax error.  I can do what I wanted to do.

  • Create multiple Task Instance from one Task Instance

    We have a process, where user can request for multiple resources(access) in one single request.Currently user has to wait until all the resource requests are approved by application owners to start the provisioning process.
    I am thinking of splitting that one request(task) into multiple task, based on the number of resources requested.so that, if one resource request is approved user can get that particular access.
    My question :
    1.How will I split the one task into multiple task and pass the required information to child task?
    2.How do I handle views?Currently since its one task , we checkout and check-in the same view.
    3.How will I overcome the possibility of one view overwritten by the other.
    Thanks.

    We have a process, where user can request for
    multiple resources(access) in one single
    request.Currently user has to wait until all the
    resource requests are approved by application owners
    to start the provisioning process.
    I am thinking of splitting that one request(task)
    into multiple task, based on the number of resources
    requested.so that, if one resource request is
    approved user can get that particular access.
    My question :
    1.How will I split the one task into multiple task
    and pass the required information to child task?
    2.How do I handle views?Currently since its one task
    , we checkout and check-in the same view.
    3.How will I overcome the possibility of one view
    overwritten by the other.
    Thanks.Hi,
    yes u can split one task into multiple task means as ur requirment diffrent task for different resource. so u have to write diffrent W/F for each resource and call them by setting a counter for number of resource.
    the below code help u.
    <Variable name='index'>
              <i>0</i>
         </Variable>
    <Activity id='1' name='createNewTask'>
              <Action id='0' name='createView' application='com.waveset.session.WorkflowServices'>
                   <Argument name='op' value='createView'/>
                   <Argument name='type' value='Process'/>
                   <Argument name='viewId' value='Process'/>
                   <Argument name='taskName'>
                             <s>give any name to the task</s>
                   </Argument>
                   <Argument name='process'>
                             <s>task name that u want to launch</s><!-- u can get task name dynamicly by rule also by passing resource name -->
                   </Argument>          
                   <Argument name='accountId' value='$(accountId)'/><!-- pass the required information to child task as argument -->
                   </Action>
                   <Action id='1' application='com.waveset.session.WorkflowServices'>
                   <Argument name='op' value='checkinView'/>
                   <Argument name='view'>
                        <ref>view</ref>
                   </Argument>
                   </Action>
                   <Action id='2'>
                        <set name='view'>
                        <null/>
                        </set>
                   </Action>
                   <Transition to='incrementIndex'/>
    </Activity>
         <Activity id='2' name='incrementIndex'>
              <Action id='0'>
                   <set name='index'>
                        <add>
                             <ref>index</ref>
                             <i>1</i>
                        </add>
                   </set>
              </Action>
              <Transition to='createNewTask'>
                   <lt>
                        <ref>index</ref>
                        <ref>length</ref><!-- number of resource-->
                   </lt>
              </Transition>
              <Transition to='end'/>
         </Activity>

  • Creating multiple tasks in labview fpga

    Hi,
    I need to create multiple tasks in labview fpga....I need to set one update period in each task so that i can make my while loop run at this rate everytime my input frequency changes....How do i do this?

    Hi,
    just to be sure: You are talking about multiple tasks on the FPGA to acquire data? Or do you want to have multiple tasks on the host to display the data?

  • Create Multiple tasks for Single Item in List using state machine workflow in sharepoint

    Hi,
    I want to create multiple create tasks for Single Item in List based on Assigned to column using state machine Workflow through visual studio
    Here Assigned to column allows multiple users. so i have to create task for every user based on column .
    I'm trying for this but i didn't got any solution
    Please provide solution for this.

    Hi,
    According to your post, my understanding is that you wanted to allow multiple users to approve.
    There are some articles about creating parallel tasks in state machine workflow, you can have a look at them.
    http://www.codeproject.com/Articles/477849/Create-Parallel-Task-in-State-Machine-Workflow-in
    http://msdn.microsoft.com/en-us/library/office/hh128697(v=office.14).aspx
    http://social.technet.microsoft.com/Forums/office/en-US/b16ee858-4360-479a-a686-4ee35b7be9db/sharepoint-2010-workflow-creating-multiple-tasks?forum=sharepointdevelopmentprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Implementing multiple tasks on one hardware

    Hi,
    i am anil, i am using NI CDAQ 9188 Chasis, for NI 9237 of 5 numbers, for load cells measurment,
    for my application i have requirement of acquiring reading from all channels simultaneously, and i need to scale them independently.
    while configuring tasks how we can implement multiple task.
    how we can operate module 1 with 3.3 V, module 2 with 2.5 excitation voltages
    how can we scale different scaling factors for each channel.
    with regards
    A Anil 

    Hi,
    i am anil, i am using NI CDAQ 9188 Chasis, for NI 9237 of 5 numbers, for load cells measurment,
    for my application i have requirement of acquiring reading from all channels simultaneously, and i need to scale them independently.
    while configuring tasks how we can implement multiple task.
    how we can operate module 1 with 3.3 V, module 2 with 2.5 excitation voltages
    how can we scale different scaling factors for each channel.
    with regards
    A Anil 

  • Synchronization of multiple tracks

    I have been working with Java Sound for around a month now and there is a glaring shortcoming: no synchronization for multiple tracks.
    I am writing a multitrack recorder in which a recorded track can be played while the user is recording a new track. Both tracks can then be played simultaneously with the correct timing that was heard during the recording phase.
    Is there a way to do this with JMF?

    hacksmurf wrote:
    Is there a way to do this with JMF?Ummmmm, theoretically. You can syncronize two or more controllers with JMF, and you can play multiple "tracks" of data simultaniously...but I can't guarentee that, in the end, you won't run into the same problems with JMF that you're having with JavaSound. There's a fundamental problem that, in order to play and record, you're using multiple threads and you have inherant delays between what the user hears and what the computer records.

  • Submitting multiple tasks within a job?

    So far I have been submitting scripts/commands to my grid which execute as single tasks. I want to learn how to submit multiple tasks within a single submitted job. Does anyone know a good reference to learn this topic? I tried the man pages but I would like something less cryptic to read.

    So far I have been submitting scripts/commands to my grid which execute as single tasks. I want to learn how to submit multiple tasks within a single submitted job. Does anyone know a good reference to learn this topic? I tried the man pages but I would like something less cryptic to read.

  • How to add multiple tasks to the worklist view?

    Hi,
    We are creating a view based on our BPM process and we are using OBPM 11.1.1.4. We do have 2 human workflow tasks in the process.
    While creating views in the worklist we are able to add only one task is there a way to add multiple tasks to one view?
    Thanks a lot for the help in advance.

    Hi Mikael,
    First of all, which Project Server version do you use?
    I'd like to be sure to correctly understand your concern. You would like to have more than 1 task list in your project site, am I right? I'm a bit confused since you talk about both project site and project center.
    First notice that the default task list is related to the project Schedule, ie when a task is updated in the project, the list will be updated accordingly.
    With Project Server 2013, I could open a project site, navigate to "site content", select the task app and create a new task list. This new list will be created as a blank list not related to the schedule neither the default task list.
    Note that there is a list setting which triggers wheither or not the list link will be added to the navigation menu of the left side (list settings, List name, description and navigation).
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Dispatch center - Select multiple tasks for scheduling at the same time

    Hi!
    I need a consultation regarding Dispatch center. Is there a functionality to select multiple tasks for scheduling at the same time for one resource?
    Please, guys, this is urgent.
    Jan

    You can schedule a single task or multiple tasks automatically directly from the
    dispatch center. The scheduling criteria applied come from Advanced Scheduler.
    Make Sure, you have the advanced scheduler. With out Advanced Scheduler and by just using Advice, you can only assign one task at a time.
    HTH
    ps: for more information, refer Field Service User Guide, "Scheduling Tasks"

  • UWL - System doesnt support multiple tasks assignment for the same assignee

    Hi all,
    we have some tasks coming from our back- end system. When a certain task needs to be substituted to a colleague, no problem ... for one task. When we wish to assign him a second task, we get following message :
    <i>System does not support multiple tasks assignment for the same assignee</i>
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/0b/1fc20097b74c41b38621ec2a9454bb/frameset.htm">help.sap.com - substitution</a> :
    <i> System does not support multiple tasks assignment for the same assignee 
    For example: User can only assign one task to an assignee at a time in workflow.
    Collaboration Task does not support other tasks at all.</i>
    Is substitution only limited to one task per person? What would be a workaround? It's possible to create for each combination of tasks a definition in the back- end which is available from the substition drop down list, but this is not what our customer would like to see.
    Many thanks,
    Kevin

    Hi Boris,
    we're using the WebflowConnector.
    Thanks,
    Kevin

  • Selection one or multiple task

    Hi,
    i'am working with labview 2013 and I would like to select on the front panel one or several task of input analog measure, i know how to do with one task but i don't know how to do with multiple task, could i merge two task in one?
    Thanks!
    Solved!
    Go to Solution.

    s² wrote:
    Hello,
    Some channels are associated with a device (for example Ai0:6 to device 1 and Ai7:10 to device 2) and i want to have the possibility to select what device i want to "measure" by selecting it very simply on the front panel (for example with a single/multiple task selection system)
    thanks
    And your problem is what exactly?
    Jeff

Maybe you are looking for

  • Anyone able to help me out with this?

    Been working on setting up a development environment at home similar to what I have at work. I have Tomcat 5.028, MySQL (latest standard version), and XSQL from the latest XDK. Mainly trying to set all this up so I can generate XSQL and do some XSLT

  • Call Transaction in ALV GRID Display

    Hi All, i have an ALV list .( list of Invoices) i want to call  trans. VF03 from clicking the line . i have also used User Command, events  in ALV function . as mention below , but cant able to call transaction. in ALV line is selected but not workin

  • Key Figures By Fiscal Period Dissappear -

    Some Back Ground on the problem query. I have 4 calculated key figures. Each one represents 4 quarters of a year. Each one is a sum of three RKF’s. For example CKF1 (Quarter1) is a sum of RKF1 (Period I), RKF2(Period2), RKF3(Period3).  I have created

  • Scrolling an inserted photo in mac mail

    I have inserted a photo using the templates found in the upper right of the mail window in this "air mail".  Put once the photo in place the heads are missing so although I get a hand symbol I am unable to move the photo up or down..   Using latest M

  • Using 16:9 - Trying to Resize to 4:3

    Hi Gang I imported a few clips that were shot in wide screen. Can you tell me how to convert/resize them to fit the rest of my 4:3 stuff? Thanx Mike