DAQmx 50103 error, two tasks of MAX on the E-series

A bit of a surprise here, even after reading all the posts on the infamous error of-50103.

I'm debugging a data acquisition task, in LabWindows/CVI, for a PC with an E-series PCI card (PCI - 6032E, I think). There are two analog channels: one is a photoelectric sensor ("receiver") that is read in bursts, the other ('power') is an electricity meter that is read from time to time. I've set up two tasks, Max with the corresponding calendar and the trigger settings; Load them into my program using DAQmxLoadTask() and others, and we're off. Where I encountered problems, that's when I need to restart the task of 'Receiver' and re - allocate buffer according to certain parameters of execution. When I do that, the call to DAQmxStartTask() fails.

If, as I understand it, the problem is that you cannot have two tasks simultaneously running on the same tray, so why don't I get the error-50103 when I first start both tasks?

The basic sequence looks like this:

Init() //called once at the beginning of the init program the two tasks

DAQmxLoadTask (& Receiver_handle)

DAQmxSetTrigAttribute (& Receiver_handle)

AllocateBuffers()

DAQmxLoadTask (& Power_handle)

DAQmxSetTrigAttribute (& _handle Power)

AllocateBuffers()

InitTask(&handle) //called to stop and restart the task of the receiver with new buffer settings

CloseTask(&handle)

StopDAQ(&handle)

DAQmxStopTask(&handle)

DeallocateBuffers()

DAQmxClearTask(&handle)

DAQmxLoadTask(&handle)

DAQmxCFGInputBuffer(&handle)

DAQmxRegisterEveryNSamplesEvent(&handle) //register Manager of data (task receiver only)

AllocateBuffers(&handle)

StartDAQ(&handle) //called once for each task, called once again after the call to InitTask()

DAQmxStartTask(&handle) [failure]

The program successfully call StartDAQ twice at the beginning and starts each two tasks without error. I only get the - 50103 to the DAQmxStartTask () call the second time, I call StartDAQ() for the receiver, after the judgment task, reallocation of the buffers and reloading of the task (which happens without error). Any help much appreciated.

Hello

I hope that you had a wonderful holiday season, looking at your code, I think it will take to ensure that you have a task that is running, below I think would be the best way to initialize the task at hand and see if it works.

DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));

If this does not resolve your problems I check the example finder and see if any of this code is able to help you.

Finally, I have two examples of data strings at the same pace and if you have too many samples on a single line you can throw most of these samples.

I hope this helps,
Daniel

Tags: NI Hardware

Similar Questions

  • NOR-DAQmx 50103 error 'the specified resource is reserved.

    Suddenly, I get this error when I try to run my program. I looked at the page for orientation:

    http://digital.NI.com/public.nsf/allkb/485201B647950BF886257537006CEB89

    I followed the steps for the case 1 (traditional DAQ driver reset), but I still get the error. Other cases concern problems with the program itself, and this cannot be my cause because my program was working fine when I left him before the holidays! Does anyone know if there is anything else without not my program that could be cause of this error?

    Thank you!

    Christina

    Glance, I see nothing in your program. I guess that other programs can run.

    However, I would certainly create and delete tasks only once. At the beginning and at the end - it could theoretically help. I also suggest you to split your large loop for in 2 loops.

    BTW, a task that throw you the error?

  • Can I create two tasks of IA using the same unit of data acquisition?

    Hi all

    Sorry for the question of gumby, but I'm new to all this stuff DAQmx, and I'm trying to understand how it all works.

    I use a USB-6229 with LabVIEW 8.6.1.

    I would use 30 lines HAVE to monitor 30 voltage remote signals.

    I would use the other two lines of AI to perform input voltage independent tasks.

    I tried to create and start the two tasks, but I get an error message when I try to start the second task.  He tells me that the resource is not available.

    What is the cleaner way to configure things working for me?

    Thanks in advance.

    -FB

    Hi diarmaede,

    You can only create one task to HAVE on your card. Read all your DO this card in a loop. You can divide the result and send it to different loops to work on it.

    It will be useful.

    Mike

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

  • Two objects claim ownership of the UID: U70049 class: text block

    Hello, I can not save my file, error: two objects claim ownership of the UID: U70049 class: text block

    Please send us the .muse file at [email protected] as well as a link to this topic. If the file is larger than 20 MB, you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (if you use a service, please include your return e-mail address in the body of the message, as no service all enrolling them in the sharing invitation they send.) Thank you.

  • DAQmx: synchronization of the two tasks of pulse output

    Hey Gang,

    I need to synchronize two tasks of pulse output.  I use the PCI-6601 Counter-Timer.  I need to use two tasks because the second output frequency must be a multiple of the first.  I think that the way to do it is using arm Start Trigger functionality.  I found some information on this site about it, but the examples spoke using a "dummy" analog task, I do not understand.  I have found no documentation on the trigger to begin arms in the DAQmx documentation.

    For reference, here's the enforceable part of my code:

    TaskHandle DetHandle, LasHandle;

    DAQmxCreateTask ("DetPulses", & DetHandle);
    DAQmxCreateTask ("LasPulses", & LasHandle);

    DAQmxCreateCOPulseChanFreq (DetHandle, DetChannel,
    "DetChan", DAQmx_Val_Hz, DAQmx_Val_Low, 0,0,.
    StateSettings.DetFreq, StateSettings.DetDuty);
    DAQmxCreateCOPulseChanFreq (LasHandle, LasChannel,
    "LasChan", DAQmx_Val_Hz, DAQmx_Val_Low, StateSettings.Delay,
    StateSettings.LasFreq, StateSettings.LasDuty);
    DAQmxCfgImplicitTiming (DetHandle, DAQmx_Val_FiniteSamps,
    StateSettings.DetPulses);
    DAQmxCfgImplicitTiming (LasHandle, DAQmx_Val_FiniteSamps,
    StateSettings.LasPulses);

    DAQmxStartTask (DetHandle);
    DAQmxStartTask (LasHandle);

    DAQmxWaitUntilTaskDone (DetHandle, 10.00);
    DAQmxWaitUntilTaskDone (LasHandle, 10.00);

    DAQmxStopTask (DetHandle);

    DAQmxStopTask (LasHandle);

    DAQmxClearTask (DetHandle);

    DAQmxClearTask (LasHandle);

    I think I need to insert the startup code of arms before the start of the tasks, but I do not know what device to use for the relaxation of the beginning.

    I'll appreciate any help.

    Thank you!

    Roger

    Hey Jorge and all,.

    I appreciate the effort you do in my name.  The simplistic answer proved to be using the correct syntax to specify the name of the terminal where the starting arm trigger specification may find the edge of digital triggering.

    I use an output digital as the trigger (not shown in the code segment):

    >>>>

    Adjust the arm trigger for meter market
    DAQmxErrChk (DAQmxSetArmStartTrigType (DetHandle, DAQmx_Val_DigEdge));
    DAQmxErrChk (DAQmxSetDigEdgeArmStartTrigSrc (DetHandle, TrgTerm));
    DAQmxErrChk (DAQmxSetArmStartTrigType (LasHandle, DAQmx_Val_DigEdge));
    DAQmxErrChk (DAQmxSetDigEdgeArmStartTrigSrc (LasHandle, TrgTerm));

    The "TrgTerm" variable contains an array of char as "/ Dev1/PFI0" "EUREKA" discovery is that requires an oblique protagonist to work.  In other functions DAQmx I used that was not necessary.

    All of this consternation was absence of a single character ' / '.  It would be nice to add this to the DAQmx database somewhere.

    Best regards

    Roger

  • Two tasks to trigger a simple analog trigger signal

    I use the 6351 and have two tasks:

    AnalogInputTask has 3 channels of I

    AnalogOutputTask has 1 channel AO

    When I created these two tasks to trigger a single digital channel, I have no problem. But when I want to use an analog trigger, I get error 50103 during the second task (no matter the order in which they are in) is engaged. Are there restrictions with the implementation of an analog trigger?

    The code looks like this:

    public AnalogInputChannel (config ConfigSettings, sweep of SweepSettings, SweepType sweepType)
    {

    AnalogInputTask = new Task();
    AnalogInputTask.AIChannels.CreateVoltageChannel (voltageChannelName, "detection of voltage", AITerminalConfiguration.Differential, -5, 5, AIVoltageUnits.Volts ");
    AnalogInputTask.AIChannels.CreateCurrentChannel (currentChannelName, "meaning current", AITerminalConfiguration.Differential, -15, 15, currentSense, AICurrentUnits.Amps ");
    AnalogInputTask.AIChannels.CreateVoltageChannel (irradianceChannelName, "Meaning the irradiance", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts);
     
    AnalogInputTask.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger (sweepTriggerAIChannel, AnalogEdgeStartTriggerSlope.Rising, aiTriggerLevel);

    AnalogInputTask.Timing.ConfigureSampleClock (string. Empty, rate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, length);
    AnalogInputTask.Stream.ReadAllAvailableSamples = true;
    AnalogInputTask.Stream.ReadWaitMode = ReadWaitMode.Poll;
    Reader = new AnalogMultiChannelReader (t.Stream);
    AnalogInputTask.Control (TaskAction.Commit);
    AnalogInputTask.Start ();
    }

    public AnalogOutputChannel (config ConfigSettings, sweep of SweepSettings, SweepType sweepType)
    {
    AnalogOutputTask = new Task();
    AnalogOutputTask.AOChannels.CreateVoltageChannel (vOutChannel, "voltage Source", -10, 10, AOVoltageUnits.Volts ");

    AnalogOutputTask.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger (sweepTriggerAIChannel, AnalogEdgeStartTriggerSlope.Rising, aiTriggerLevel);
               
    AnalogOutputTask.Timing.ConfigureSampleClock ("", note, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, length);
    Writer = new AnalogSingleChannelWriter (t.Stream);
    Writer.WriteMultiSample (false, waveform);
    AnalogOutputTask.Control (TaskAction.Commit);  ERROR GETTING PAST HERE
    AnalogOutputTask.Start ();
    }

    Instead of I. StartTrigger, try to use the name of Terminal DAQmx "/ Dev1/AI/StartTrigger.

    Best regards

  • Two tasks that share the same resource in sequence

    I'm the current exception "the specified resource is reserved.". I understand that you can not run two tasks that share the same resource at the same time. However, is it true that you can not run two tasks that share the same resource, one right after the other, without the eliminate completely from the first task?

    for example

    Task1 and task2 share the same resource
    Task1. Start();
    Task1. Stop();
    Task2. Start(); This will always throw an exception until you have a task1 (i.e. task1.) Dispose()?
    Task2. Stop();

    Hi cafarm,

    You're right, the fact to just stop at one task does not allow that run you another task with the same resources immediately after. That being said, you can start the next task without having to erase or dispose of the first by making use of the task status template DAQmx. As you can see on the next page, stop a task simply going to the State of "Clerks", which means that the material is still used by the task even if she does not actively.

    http://zone.NI.com/reference/en-XX/help/370466AC-01/mxcncpts/taskstatemodel/

    Instead, you can use the control functionality of task for the first task of transition to the status "verified" after stopping it, then start the second task. This keeps the parameters of the task without having to have the task, but it should free up resources to be used by other tasks.
    http://zone.NI.com/reference/en-XX/help/370473H-01/mstudiowebhelp/HTML/verifycommitstartstopdaqtask/

  • DAQmx Trigger: Error 2200077

    Hello

    I am trying to create a program to trigger a hammer signal, using a USB-6211 card and 4 analog inputs (via 1 DAQmx create channel HAVE voltage to the hammer and 3 others at the exit of the accelerometer). Having as a basis for some examples of LabView as "Acq Cont & voltage chart ' and 'Impact Test (DAQmx) [.vi SVXMPL_Impact Test (DAQmx)]', I built my program, but it does not work.

    If I don't put the relaxation and the task to start, my programme without any problem (in this case I use 4 DAQmx create channel HAVE tension, a DAQ Timing, linked to the DAQmx Read located on the loop). But when I add the trigger (start analog Edge) out of the loop, so that between the time the DAQmx Read, error-200077 apears and DAQmx. This same error apears too when I try to run the sample of "Cont Acq & voltage graph" (even if I change the sample rate and the number of samples, the error is still the same). The error-200431 apears when I try to launch the second example ("Impact Test (DAQmx) [SVXMPL_Impact Test (DAQmx) .vi]), but in this case probably the DAQ card is not suitable to run this program.

    When I add a task to start before the loop (where is located the DAQmx Read function) on my program without the shutter button, the error-200278 appears. And if I add the trigger and Start Task, just the apperas-200077 error function. However, the startup task is not bothering me as much as the trigger, because when I do not use the trigger on the example "Acq Cont & chart tension" and the task of beginning is always there, this program runs normally. In this case the problem is probably on my prgram and not on my data acquisition card.

    I just want to know if my card cannot run this trigger function (early analog Edge) or if there is something else, because it's strange how a relatively simple example can be run using my data acquisition card.

    Thank you

    Hi, FCB,.

    The USB-6211 can only be released digitally.

    The attached document allows you to see the specifications of your card:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/203224

  • Use tasks without MAX

    Hello everyone, I need your help. Due to some that HE reasons, I can't install MAX on one of my computers in tests. The DJ is a copy of a previous test bench. In the initial testbed, the user had to choose a NI DAQmx task in the application. Now, I want to keep the same working principle. For this reason that I copy the MAX configuration since the original testbed report and paste it on the new computer (the one without MAX). I will read the configuration settings of the .html (tasks, channels, scales, etc.).

    I know that I can use OR-DAQmx Run-Time Engine 9.1 (heart), so I can work without Max (it always was not testicles)

    My problem is, how to do that the user selects a task (unknown number of parameters strangers, channels, etc.) as well as the measurement will take place without problems? If I have not installed MAX, can I use all the DAQmx palette icons?  Thank you

    The_sun

    PS. Y at - it an option to the date of importation of the .nce file?

    Hi The_sun,

    For your situation, it can be a bit tricky to create by the task and program their settings based on the user's selection.  There is a way, although if you can configure all the options of possible task before the program begins. You can use a box structure that allows you to select which task to load based on the case picker control that the user can choose before the time of execution.  What tasks do you intend to have control of the user?  Your front panel may become cluttered with all the selectable settings, but you can program windows to tabs or other methods of organization if you wish.

    You can use all the vi from the palette DAQmx without installed MAX.  The vi is the driver himself, is independent of the application of MAX.

    When you speak with the import of files .nce?  The date of its creation?  My first research and experimentation did not turn anything on the import of a date from this file.

  • get the MAX from the task frequency

    Hello

    I would like to know if it is possible to obtain the frequency configured in MAX for a particular task in LabVIEW.

    This is in order to launch the task set by the user in LabVIEW, as set in MAX: channels, frequency etc...

    I tried differentDAQmx furniture knots and I could not find this information.

    Best regards

    Didje

    Didje Hello,

    Indeed, it is possible to obtain this information.

    After you have configured your task in MAX, you must find the task created by task name Constant DAQmx in LabVIEW. After that, you use the property Timing DAQmx node where you can find the frequency you set up before in MAX.

    I hope this will help!

    Kind regards

  • DAQmx: Outputs digital multiple tasks for the same card using the on-board clock

    I have a PCI - 6259 DAQ I'm programming with DAQmx. I want to create two tasks of digital output on the same card. A single task using on-board clock, continuous samples. The other task uses an onboard clock, finished samples and an external trigger with trigger Start.Retriggerable property = TRUE. Is this possible with my hardware and DAQmx? There will be a conflict if two tasks use the same clock source?

    This is not possible, you can have only one task timed materially by device.

    Best regards

  • Daq stop task VI back to the State of the task was really forward the DAQmx Start Task or DAQmx writing?

    Hello

    I use DAQmx and DAQ Assistant and try to get the details on the following questions.

    1 does Daq stop task VI really return to the State of the task is in front the DAQmx Start Task or DAQmx writing? Digital Input taking as an example, I don't think that the status of the task means that input data because I tried and I can't really back to the entry level it was.

    Maybe more experienced people can help to share their expertise.

    2. the information in help indicates "virtual channels created with the function/VI DAQmx create Virtual Channel are called virtual channels the and cannot be used in the task." But I don't know what "in his work" means.

    3. could I get some guidelines or expertise on the Labview programmers when use virtual channels the and when, to the more global?

    Thank you!

    Best regards

    Allen

    If you create a channel of the task, or scale just usuing the screw to create or Assistant session wire io is the only way to pass the info autour.  It is not saved anywhere on the disc.  A channel of the task or the scale in a project can be used by anything in this project.  A channel of the task or the scale recorded in MAX can be used by anything on this machine.  Its an extended thing.

    And Yes, the DAQ Assistant fresh extra performance overhead and the poor than the DAQmx API.  Often, it won't have the impact of a little experiment.  Large applications should avoid the express Visa.

  • When you send an e-mail using Outlook Express, I immediately get this message; "Some errors occurred while processing the requested tasks. Please see the list of errors below for more details"

    When you send an e-mail using Outlook Express, I immediately get this message; "Some errors occurred while processing the requested tasks. Please see the list of errors below for more details". Unfortunately, there are no errors listed below and the green bar is frozen on the screen. The message remains in my Outbox and repeated again and again sending. There is absolutely no record and file sent in my sent box. TIA - Ernie

    You have apparent dbx file corruption. A common problem.
     
    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.
     
    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.
     
    After you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    General precautions for Outlook Express:
     
    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3 
     
    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm
     
    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.
     
    Compact often as specified above.
     
    And backup often.
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx 
  • I get an Error Message When you try to send emails. "some errors occurred while processing the requested tasks. Please see the list of errors below for more details". __

    I get an Error Message When you try to send emails. "some errors occurred while processing the requested tasks. Please see the list of errors below for more details".

    But it sends the message anyway... multiple copies, and she also is put in the "Outbox" in Outlook Express as if it is not sent.

    To stop the email to be sent repeatedly to the recipient, I erase it from the "Outbox" but a) you don't know if they really got it) b it is embarrassing for the receiver c) is this a bug I can fix it?

    Thanks for any help.

    You have a corruption of dbx file easily corrected.

    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.

    Compact often as specified above.

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

Maybe you are looking for