Several digital entry tasks by unit

I'm a noob DAQmx here and I have a few general questions about the architecture of task on a device.  I'm trying to create two tasks of DI with a portX associated on the same device.  When I try to start these tasks the other always up a resource-200022 error.

I even have two tasks for digital on the same device?

Not if they are two devices timed. If you do not use hardware timng, combine the channels in a single task.

Tags: NI Hardware

Similar Questions

  • simultaneous monitoring of the digital input lines when executing digital writing tasks

    I'm writing a multithreaded application in C on Windows 7, using the 9.6 DAQmx API and device USB-6509. This requires that we constantly monitor several lines on the 6509 for entry, digital using the change of the device detection feature. You must also write the digital output without having to stop monitoring the input rows. It is very important that the input rows be monitored continuously for the duration of the project.

    In the DAQmx manual reading, it seems that it is impossible to make a digital reading as well as a digital writing occurs, even if these tasks are performed in different threads. (The same I understand, that it is impossible to have several tasks of digital entry running simultaneously.)

    It seems that it would be possible to launch the task for reading (configured with the change detection), to pause playback, start the writing task, pause the task of writing, and then re - start the task of reading. But - and this is the important part - for the duration of the writing task is running, is it possible to configure it to the task of reading will always monitor the lines, even if it's just stores the data in the buffer for these periods? The key is that the data will be lost.

    Thank you

    Danielle

    Each channel is independent. If you can get the input data that you export a value. You need not make a break each task. The two tasks are parallel.

  • WordPad may be formatted/jprogrammed/that it's Add digital entries, consider the digital occurrences, etc.?

    I want to make a WordPad document that contains several tables of numerical data.   To save a lot of time, I'd like to WordPad to add some digital entries, add up the number of times wherever a number took place and other things like that.    Is this possible or do I have to use Microsoft Works?

    Hello

    WordPad is a treatment basis of text which is included in Windows. A word processor is a computer program that you can use to create, edit, view, and print text documents.

    See also:
    http://Windows.Microsoft.com/en-us/Windows-Vista/using-WordPad

    (Applies to Windows XP)

  • Written for several digital lines separated by commas

    Hello people,

    I use a USB-6009 box and want to write several digital lines created in the style, separated by commas:

    error = DAQmxCreateDOChan(taskSelHead,"dev3/port0/line0,dev3/port0/line6","",DAQmx_Val_ChanPerLine);

    When I try to write in this channel I do

    uInt8 data [8] = {d1, 0, 0, 0, 0, 0, d2, 0}; with d1 and d2 that represents 0 or 1, which bits I want to get written

    int error = DAQmxWriteDigitalLines (taskSelectFilter, 1, 1, 10, DAQmx_Val_GroupByChannel, data, NULL, NULL);

    The result is, this only $line0 is updated, lin6 rest 0.

    I also tried DAQmxWriteDigitalU8 with the same effect.

    Can anyone help?

    Thanks in advance,

    Michael

    Hi Michael,

    you have defined two dig.out channels in your task: line 0 and line 6. So, when you write an array of string values, d1 Gets the mapping to your line 0 straight - but line 6 still receives a zero!

    Have you tried to set data uInt8 [2] = {d1, d2}?

    Best regards
    Sebastian

  • Slide with several digital poster Down filter event Bug button?

    A key event filter on a slide with several digital screens down does not work as expected when not waived. If you for example tab of this slide with two digital screens digital display, the cursor remains on his position, rather than get KeyFocus to the next control. Same behavior at fault if you want to move the cursor on the left/right keyboard, nothing happens. Anyone an idea why?

    A simulation of that VI is attached. All other controls, a Slide with a digital display or a standard digital control, the key Down event filter behaves as expected... I tested in versions 8.5.1 LV (attachment), LV2012SP1 and LV2013.

    A teammate now found a solution or workaround. We do not know if this is the way it should be, if yes, then it's a bit hidden, but it works!

    It seems that the cursor needs to know on what digital display the FocusObj is when you use the event notifier KeyDown. Then, when to get the reference of the digital display active and the wiring of this reference to the terminal FocusObj filter event everything works as expected, numbers of tabs, typed, cursor etc and have to filter and notify events structure to the event.

    A vi and a printscreen are attached.

    The question is probably due to the specialty of slides and the class NumericWithScale in general, as its digital displays are a little under References and during the implementation of the features of event KeyDown for the class NumericWithScale filter, LV simply does not know on which side of the main action control part must be executed.

    Or someone has a better solution and explanation?

  • Problem of size of form with several Digital Signatures

    I created a form (liveCycle 8) with several digital signatures.  When each user signs the form, this section of the form is locked using collections.  The form is workflow by email after each user connects it.  Whenever the user signs and submits the form, the size of the form becomes too great.

    How to optimize the form to compress whenever a user signs the form?

    Thank you

    Lori

    Steve,

    After your request to publish the form, I wanted to remove some elements of society, such as the Logo.  Once I removed the Logo, I found that the biggest problem was a Logo image size which was the large file.  Once I reduced the size of the image, added only 46 KB signatures at each level of signature.

    Thank you for your help,

    Lori

  • Single virtual channel with several digital ports

    Hi all

    I created a program that creates a task to read continuously for 3 lines of digital channels in the same unit (PXI-6133). I'm trying to figure out how I can retrieve the data from each row of port to be in a waveform graph. Currently, I use DAQmx Read instance with '1 channel N samples' but I get a waveform with all the values at the same time or a graph of waveform with the three lines transposed.

    I use Windows XP and LabVIEW 8.6.

    Appreciate any help!

    Matt,

    I'm sorry to have brought this on you but I thought about it. I misread the description of vi DAQmx create a task for a digital input. I thought that several lines of port could not be divided into several channels, but it was all physical ports.

    For those seeking another response: I was able to specify 'a channel for each line' in the task of creating, and then in the DAQmx Read task, I indicated "N channel N samples" and finally analyzed the 1 d table to get the data for each port.

    Thank you for your time!

  • Problem of current drawing of digital entry into PCI-6220

    We have card NI PCI-6220 mounted on card PCI-Raiser in a windows PC mini. We are using 8-channel digital input P1.4 - P1.7 and P2.2 - P2.5 to take a few entries of our entry card.

    When the computer is turned on then everything works well and we get of the digital inputs in Labview. The problem is that when the computer is off the digital inputs on current drawing of early card PCI-6220 and due to this voltage regulator IC on our card entry begins to heat upward.

    This problem occurs only when the PC is turned off, in a State that everything works fine.

    We will be grateful can anyone suggest a solution to our problem.

    Concerning

    Magalie

    I'm not familiar with this part OR special. But maybe there is protection on the output diodes. Usually, these diodes are connected since the entries on the power rail.

    In case the power rail is 0V (or below the input voltage supplied in them), the LEDs will be put and feeding current in the power of the PC rail, attractive and current of your external device. If this unit has a push-pull, HIGH level output configuration there will be excessive current from the power supply where the outputs are short-circuit or almost short as it will be in the configuration described above.

    I have no immediate solution except for additional hardware as the optocouplers, the outputs of your device from the inputs of the unit NOR the decoupling.

  • Outbreak of several digital lines of a single window using PCI 6353

    Hello

    I use a PCI 6353 to control a laser for a PIV system. The laser requires 4 pulses (F1, F2, T1, T2) on different channels. It would be easy using 4 counters on the Board, but I also need to trigger the camera. The card has a lot of output digital, so I thought I could use 2 meters and four digital outputs.

    I thought that, by setting the pulse counter from 0 at a time duration between F1 and T1 and triggering a rising edge and T1 F1 a front down using output internal), I would be able to solve the problem. However, the system I cannot trigger the two lines of the same internal output. I don't know why. I have attached two vi, one for a single channel that works very well and the other with two channels. I am also attaching a diagram of approximate time of my proposed solution.

    I am not absolutely put on this format, so if this is not possible and you have another solution, please let me know. Accuracy is the key here, the widths of pulse being about 1 microsecond and the intervals between F1 and Q1 being approximately 10 microseconds, so I think the hardware timing is essential. However, I'm not quite clear on interact it with the digital pulses and counters.

    Kind regards

    Joe

    Hey Joe,

    All the lines that you want to use for quick time ARE on the 6353 must be in the same spot.  Unfortunately, you can't start or clock several lines independently.

    That said, I think that the simplest solution would be to simply create a waveform suitable for generating all 6 signals with.  You should be able to clock up to 10 MHz, which gives you 100 ns resolution.  If you need 1 us resolution, then you could get by synchronizing the c to 1 Mhz.  While you could technically use a combination of counters and to get what you need, it should not be necessary in your case.  All you need is a single task with the waveform appropriate to generate your desired signals.

    Best regards

  • Best way to encode several digital inputs of choice / binary indicators

    Hello.

    I need some suggestions.

    We have several libraries API (to control our material) written in C and distributed as a dll.  For many of them, we have a library of LabVIEW VIs wrapping (using the call library function node).

    We have several functions in which the entry (in the original C library) is an unsigned integer, which is supposed to be several flags ORed together (each value one bit).

    I've seen more than one title, that this interface has been transferred to the wrapper live

    1 digital input.  User must understand and use it exactly like the C programmer

    2 try to make more enjoyable - an entry that is a table, which appears on the front panel, as a sort of list box multiple choice of entry (internally in the block diagram that is used to create the correct entry to the C function)

    I think there are others, but this is what I remember right now.  When I saw option number 2 (looking at the front) I thought it was much more enjoyable. clearer and more intuitive (the user can select choice named, no, not strange %valeurs hexa%, etc.).  However when I put on a block and tried to wire diagram, I had to provide an array of numbers; I had no idea what the values were supposed to be.  Option 2 seems so much better for a user interface, but for an API, I think it's actually worse.

    What do you see, if you were a programmer building my functions into your application?

    Thank you.

    Batya

    Since each value is a bit simple, I would say that the wrapper have Boolean values in the connector pane and convert it internally to the correct bit field. Another option is to use a cluster of Boolean, but which may be less friendly to the user of the API. I suggest you do this only if you have several options.

  • Several digital signatures by the same person works does not correctly

    I was tasked to automate our voluntary process.  I converted the forms to PDF using Adobe DC forms.  My problem is that there are several signature lines, even if only one person is signing the documents (think of a mortgage application).  Whenever I digital sign a form page, asked me to save him.

    How can I have a volunteer sign multi-page PDF without saving each time?  I then want the signed form sent via e-mail.

    Thank you

    Donna

    You must use a stamp for this.

  • How can I set up a digital input task to read continuous samples?

    I am trying to create an exclusively digital task that will make digital readings at a rate timed by the material using a PCIe-6509. However, when I try to put the task timing as follows (which works on a PCIe-6509), I get the following error:

    Requested value is not supported for this property value. The value of the property may be invalid because it is in conflict with another property.

    Property: NationalInstruments.DAQmx.Timing.SampleTimingType

    Required value: NationalInstruments.DAQmx.SampleTimingType.SampleClock

    Possible values: NationalInstruments.DAQmx.SampleTimingType.OnDemand, NationalInstruments.DAQmx.SampleTimingType.ChangeDetection

    Task name: DigitalInputTask

    State code:-200077

    The relevant parts of my code are:

        public class DigitalInputReader: IDisposable
    {
    public DigitalInputReader()
    {
    dataReadyHandler = new System.AsyncCallback (DataReadyEventHandler);

    daqmxTask = new DigitalInputTask();
    daqmxTask.Configure (Globals.NI);

    daqmxTask.Control (TaskAction.Verify);
    daqmxTask.Control (TaskAction.Commit);

    daqmxReader = new DigitalMultiChannelReader (daqmxTask.Stream);
    }

    public class DigitalInputTask: task
    {

    public DigitalInputTask(): {base ("DigitalInputTask")}

    public virtual void Configure (NiConfiguration niConfig)
    {
    <= niconfig.digitalinputs.count="" -="" 1;="">
    {
    String physicalChannelName = niConfig.Device + "/ port" + niConfig.DigitalInputs [i]. Port.ToString () + "/ line" + niConfig.DigitalInputs [i]. Channel.ToString ();
    String nameToAssignToChannel = niConfig.DigitalInputs [i]. Name;

    DIChannel ch is this. DIChannels.CreateChannel (physicalChannelName, nameToAssignToChannel, ChannelLineGrouping.OneChannelForEachLine);
    c. InvertLines = niConfig.DigitalInputs [i]. InvertLines;
    }
    var signalSource = "";
    This. Timing.ConfigureSampleClock (signalSource, Globals.MachineSettings.SampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);// Globals.MachineSettings.SamplesPerChannel);
    }
    }

    The last call to Task.Timing.ConfigureSampleClock, it's which throw errors.

    Of the options available, or SampleTimingType.OnDemand or NationalInstruments.DAQmx.SampleTimingType.ChangeDetection provide the same precisely timed calls that I am familiar with the analog input interruptions.

    How is it possible in a digital task?  I mean, it seems that I could set up another task to do call by material for the production of a clock signal and use the ChangeDetection synchronization mode, but this seems a bit complicated for what should be easy to do.  What Miss me?

    Update: I thought about it.  You cannot call ConfigureSampleClock when the digital input card is a device of 650 x, because these devices have any automated examples of clock.  They are configured to run in mode default finite samples.  You must make all sample synchronizing with these devices in the software.

    Be cautious, however, because the .NET timers ensure they put any faster than their scheduled interval.  In practice, they are usually 5 to 10 ms slow by tick.  This means that if you want to read samples every 100 ms by sample clock, you'd end up reading all 108 ms samples.  All counters based on the elapsed time and number of samples would be away after a few seconds of it.

    Instead, you must do one of four things: write a doggone driver that runs in ring 0 and interfaces with the PCIe card in the required interval (i.e. on NC, not you, in practice), tolerate the inclination of the clock, use a multimedia timer as an interruption audio or video that is more likely to respond to the correct interval, or , my solution, an accurate clock allows you to set the interval of the timer.  I wrote the following code to the timer:

    var CorrectiveStopwatch = new System.Diagnostics.Stopwatch();
    var CorrectedTimer = new System.Timers.Timer()
    {

    Interval = targetInterval,
    AutoReset = true,
    };
    CorrectedTimer.Elapsed += (o, e) =>
    {
    var actualMilliseconds =;

    Adjust the next tick so that it's accurate
    EG: Stopwatch says we're at 2015 ms, we should be at 2000 ms
    2000 + 100 - 2015 = 85 and should trigger at the right time
    var StopwatchCorrectedElapsedMilliseconds = newInterval +.
    targetInterval-
    CorrectiveStopwatch.ElapsedMilliseconds;

    If we're over 1 target interval too slow, trigger ASAP!
    <=>
    {
    NvelIntervalle = 1;
    }

    CorrectedTimer.Interval = NvelIntervalle;

    StopwatchCorrectedElapsedMilliseconds += targetInterval;
    };

    I hope this helps someone.

  • How to trigger and outputs analog and digital Outout tasks begins on a counter to start?

    Hello

    I'm trying to synchronize the start of a task outputs analog, a task of digital output and a task of counter. I want to start the counter to serve the master trigger and analog and digital tasks to synchronize his departure.

    I guess I need something like:

    analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    digitalOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    analogOutputTask.Start (); Slave 1

    digitalOutputTask.Start (); slave 2

    () counterTask.Start; n / / master

    Where? is a string specifying a command source for the beginning of the task of the meter. However, I can't find what this string. Any suggestions?

    Thank you!

    -Jon

    Just FYI, the solution to this problem as well as some other ones is encapsulated in a short example .NET, I created. It is on the Web site of EITHER:

    http://decibel.NI.com/content/docs/doc-15500

    This project shows how to synchronize all your analogue/digital outputs through tasks and forums in terms of synchronizing Calendar and start clock.

    -Jon

  • Several digital test with labview cluster?

    Is it possible to make a numerical limit several test with the values of a cluster of a labview vi?

    So-called step "Multiple numerical limit", the data must be numeric. If the cluster already contains only numeric fields.

    Given that, I would throw the cluster within the module in a table (table Cluster). The downside of this is that all the fields of the table share the data type, so all are single or double or I32...

    Other solutions will not work with the default step type, but you can create your own type of step to accept a multiple similar to the digital cluster, which only accepts an array.

    Norbert

  • 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

Maybe you are looking for