Static digital inputs N samples

Is there a way to set the sampling frequency during the acquisition of N samples from a digital input static? I use a USB-6216 data acquisition but the only option of timer is on request.  It seems that daq samples randomly I use acquire N samples.  My goal is to have a level of synchronization between my analog and digital input data for sampling at 500 Hz.

Hi UpNSmoke,

Unfortunately, the 6216 can only run DIO clocked by the software. If you use Windows or another non-deterministic operating system, you will be unable to achieve very tight synchronization (or high sampling rate). If you want your two analog and digital input tasks be hardware synchronized, I would recommend something looking from the x 622, 625 x or better yet, the new X-Series range.

Hope this helps,

Sean

Tags: NI Hardware

Similar Questions

  • 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.

  • Reduce the period of sampling of the digital inputs of NOR-USB-6009

    Hello

    I need to read a line of digital input in the NI USB-6009 using NOR Express 2013 Signal box. I selected 1 sample (upon request) as acquisition mode. I need to define a smaller sampling period as 1 MS, but it gives error too short sampling period: "the current sampling period is too short.  Please specify a longer sampling period. ».
    I do not understand the reason for it and a way to slove this.

    Any help would be greatly appreciated!

    Thank you!!

    The 6009 doesn't have a clock that you can set for a sampling period. According to the specifications, the digital I/o is software programmed - sample on request you use now. I'm not at all familiar with SignalExpress but I don't think that you can find near a reliable khz sampling frequency on Windows or any other os non-deterministic.

  • Digital input triggering

    Hello

    Is it possible to trigger action digital input using the signal I want to measure? In the example:

    I want to measure PWM on P0.0 after first rising edge PWM on P0.0, but using only this line P0.0 (no PFI in use, only one used digital entry).

    IM using X SERIES USB-6353.

    Some DAQ cards can trigger on analog edge of the signal you want to measure. If a DI data extraction, it is possible to select only the PFI or similar as trigger. What is your application? What you want to achieve?

    I can imagine you could workaround: record streaming samples of DI and do a SW trigger in your program, so you can get the same samples prédéclenchés (as in a digital oscilloscope).

  • Digital input and output problem

    Hello:

    I do a test for digital i/o:
    for a table of the digital signal to an output of data acquisition in the digital input to detect the output signal.
    (bascially, it's like a loop that goes outside the material)

    It's pretty simple, as shown in the attached fichier_1.
    It works well.
    The manual light switch controls, which means that inputs and outputs are ok.

    Then I went on the low level DAQ for better speed, as in attached fichier_2.
    But it does not work. Especially when I pressed stop to abort the loop, an error has occurred:

    To speed up, I went to the low-level data acquisition as the fichier_2 attached.
    But it does not work. Espeically when I press the "stop"button to exit the loop, the error occurs.

    Possible reasons:

    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: SampTimingType
    Asked the valuelarge clock
    You can select: on request

    I don't understand why the sampling time has a conflict here.
    (It is probably just something very simple in data acquisition, but I checked a few examples and did not find a clue).
    Hope someone can give me a suggestion.

    Ultimately, my goal is to make the attached file_3.
    In this one, I generate a digital output, and then lead to the entrance.
    Then I can take it as a signal to trigger my other task.

    Note:

    I use a similar conti signal to control one of my camera.
    I need to sync it with my another task.
    So I think to generate a digital output (which share the same clock as the signal similar to the data acquisition device), then put it in one of the digital input.
    By detecting this digital input, I can trigger my task and synchronize with this signal similar.
    My camera's USB-6211.
    I am aware of the latency of USB, but once the value is a constant value, then the synchronization is always good for me.
    Actually, I was using an analogue at the entrance of the to do it before, it may work, but the synchronization error is too big for me.
    I need to do some calculations/judgment for this analog value, which makes the time difference varies.
    So I'm trying digital entry now and I hope that the digital input can trigger my task with a stable latency.

    Thank you very much

    Have you looked at the specs? It clearly states that the digital I/o is a programmed software. You have not any hardware clock at all. The best rate that you could possibly achieve is around 1 kHz and which would have a considerable jitter the nature of non-determimistic of windows.

  • With the help of digital input for Boolean control?

    Hello!

    I have spent a lot of time to search but have not found a solution to this...

    I have LV 2015 with chassis NI 9188 and module NI 9425 DI.  Try to use the input signal to assign a State structure machine program and/or events in real time.  It would be acceptable to have an indicator show the status of the input line, since I can use it elsewhere with Value (Signaling).

    Please do not ask for the code - the problem is quite simple.  I just want to use the digital inputs to program control as a T/F.  I want just the program to analyze the State of the input and decisions - a bit like a PLC.

    All I seem to be able to extract is data of digital waveforms with a task DAQmx.

    It's not a trigger - I already use a trigger to start the analog acquisition.

    Formulate the problem in a simpler way...  What to do if you had a digital input module and you wanted to see the status of each input line in the form of a LED on your face in real time.  How would you do it?

    I really appreciate the help!

    greyhorn23 wrote:

    Formulate the problem in a simpler way...  What to do if you had a digital input module and you wanted to see the status of each input line in the form of a LED on your face in real time.  How would you do it?

    I would like to write what has been read to the Terminal.

    From what I can tell, you want to just read a single static value from your digital line.  You can then simply read the value of one and do some logic with her.

  • You can synchronize digital input with an analog input on a 6034e?

    Is there a way to synchronize the digital input and analog input on a 6043e?

    I tried the test application "SyncAI_ReadDigChan", but it fails during the humor tick Verify():

    "The requested value is not supported for this property value.

    Property: NationalInstruments.DAQmx.Timing.SampleTimingType

    You asked: NationalInstruments.DAQmx.SampleTimingType.SampleClock

    "You can select: NationalInstruments.DAQmx.SampleTimingType.OnDemand.

    I'm currently collecting analog input data for the duration of a digital input pulse.

    Thanks for any help.

    Joe

    No, you can't.

    The problem with E-Series cards, is that they have just static DIOs, so you cannot have their clock.

    You would need a M-series card for that where you have correlated DIOs.

  • DAQmx simulated digital input

    I cannot using the simulated digital input function.

    I create a digital input simulated in single channel MAX - a simulation NI PCI-6534, port 0/0, mode of acquisition is 1 sample (on request)

    When I click on the 'run' button I see the led turn on and turn off, as I expect.

    However, when I remove this LbView task, I can not display flashes regardless of what I tried.

    Without doubt, I missed some basic notion. Can someone tell me what I am doing wrong?

    (VI attached).

    Try starting the task explicitly before the loop (and the task of clearing after the loop):

    Best regards

  • The iMac has a digital input?

    Hello

    I searched for centuries for the answer to what I thought was a simple question - the iMac has one digital input (optical or other)?

    I know that the headphone port doubles as an analog audio to as well as an optical digital output, but this port also accepts input optical? If not, is it possible to enter a digital signal via a USB port?

    I have an iMac (20-inch, mid 2007).

    Thanks to all who can help.

    AL

    Yes exit usb audio and are truly comprehensive external soundcards, they can have any type of entry and exit of the machine to be desired that they have

    and if they do a driver of OS x for him it's just a matter of connection installing the driver and choosing the entry in system preferences for being that

    https://Flipboard.com/@mariahlolas/top-10-best-USB-external-sound-card-adapters-for-Windows-and-Mac-2016-2017-npa5lltvz

    If the audio minijack that also take in charge the headset for iPhone I believe support the digital input and I don't know if

  • Digital input to Toshiba 46TL-&gt; no analog audio output to amplifier

    Hi all

    When I connect a video source (e.g. computer laptop via DLNA) to my 46TL, output TV audio analog (red/white taken connected to an amplifier) does not work.

    It does, however, watching television.

    Is it possible to configure the TV to read the audio data from digital input (HDMI/DLNA) to the analog output?

    Thank you for the help

    Not quite what series of TLxxx you have, but for example the TL938 supports a digital (optical) audio output port that provides a digital audio signal.
    Why n t connect the amplifier to the TV using this Jack?

    Connectors for component video / audio to the rear of the TV are the ports of ENTRY and not the OUTPUT ports. So, you can send an audio signal to the TV and not the amplifier output.

  • Interrupt with digital input

    Hello

    I am relative new to LabWindows.

    I have a program that starts when I press a button. The program controls a motor. Now I press a button on the motor and the program must cease (Safty Stop). The button is connected to a digital input on my card (PCI Express 6343). Now, I have the question, how do I program the interruption? I know not how do in CVI (controls the digital input whenever the program runs).

    I hope someone can help me.

    Best regards

    The starting point must be to look relevant examples that NEITHER provide:

    ReadDigChan - ChangeDetection.prj

    and

    ReadDigChan - ChangeDetectionEvent.prj

    However, I must advice against using a PC as a "Safety Stop". As a general rule, the PC are completely inappropriate to the core functions of security, unless you follow the standard IEC 62304 relevent to the letter. Tip: it's hard to do with a PC. To implement safety functions such as emergency and interlocks stops you buy much better a specialist dedicated safety relay and following the instructions of the manufacturer. If life-threatening energy (either electric or medcanical) may be present, then consult a professional engineer.

  • How to combine several digital inputs for playback?

    Hi comrade Labview users.

    I just started using LabView and I am very new to it. I know him understand how it works and you have something to work, but I need to be more effective.

    I use DIO96H - USB DAQ Measurement Computing, which includes 96 digital inputs. I use the DAQ to acquire the activations of relay and record the number of times the relays flips.

    Basically, I created a digital input read and then copy & pasted 95 times... it works but I know that's not the best way to use LabView.

    How can I change the digital input (Di1/1stPortA/dev0) in multiples so that it iterates through all 96 channels without copying and pasting the same pattern over and over again?

    Leon

    You have the correct polymorphic instance for playback? Once again, for the material OR it would be a NChan Read. There should be a similar choice if I remember correctly.

  • Digital input current limits

    Hello

    After reading everything that specifications and manuals, I decided to ask a general question.

    In the data sheets, user guides I've read, in general, there are two warnings for DIO:

    -Do not connect the outputs digital circuits which operates above the limits.

    -Do not drive the line with tensions outside its operating range.

    Generally speaking they tell me I need to know when dealing with output and voltage when dealing with entries. So I have this question, can I wire a power supply for digital inputs directly without exceeding its "beach of normal operation and without any protection circuit? In fact, my feelings, this is not possible. But why certain documents produced clearly mention that the impedance internal inputs while that of others is not clear those? How can I determine if I can connect a signal directly to an entry (for example USB-6525 indicates a current limiter circuit, but I don't see a clear explanation in the datasheet USB-6251)?

    As long as the input voltages are within specified limits, no damage will be the DAQ hardware. Logic devices often have two lines of non overlapping input, one for low input and high input. If the input voltage lies between the beaches, the performance of the device can be unpredictable. Also, check your power supply to make sure that this doesn't not exceeding when turned on or off as that could exceed the DAQ limit.

    Lynn

  • NEITHER 6501 digital input

    Hello world

    I use an NI USB-6501 and I'm trying to understand how to read the entries.

    I used this card to generate output using the example vi write Chan digging, it works fine.

    Now, I'm trying to use the example of reading dig Chan vi to read an input voltage. But it seems that, by default, the map reads 5V (a 1 logic) as entered on each pins, even if nothing is connected to them. I tried to connect the output to the input, use a relay to see if it detects a change in the entry, if we send a voltage or not, but it changed nothing. It still reads 5V anything.

    Can someone help me understand how to be able to read an entry? This problem has happened to someone else?

    Thanks in advance.

    Frédéric

    If you dig through the data sheet, you will see that there is a 4.7kOhm shoot all digital inputs.  So with the floating inputs you will get a high (logic 1).

    As Dennis have already said, wire your digital output directly into your digital input.  So everything that you set the output that you will read on the entry.  I don't know what you do with a relay.

  • 6259 switch digital input to output

    Hi all

    I use the NI PXI-6259. One of the digital inputs I want to switch to digital output, send a serial code and switch again one digital input.

    Does anyone have experience with this kind of configuration change during execution of the VI program.

    Thank you

    Basically delete the task that he had as an input, create another task DAQmx with channel configured as output, this task, erase it, create the task with channel configured as an input.

    If you need a tight with switching schedule, I wouldn't recommend this Board.  You may need to set up a Council of RIO with LabVIEW FPGA.

Maybe you are looking for

  • Can I Flash BIOS back to the older Version on Satllite A100-188

    I have new Bios is out (v1.7) but I have a problem after flash it. the laptop is slower. Can I flash back as an older Version?

  • Measures of CSR with SCXI - 1104 C + SCXI1300?

    Hello I have a module SCXI - 1104C for monitoring of asymmetric tension. I know that the SCXI module has entered differential only, so I assumed that I would need to connect each each negative terminal to ground. However, I have noticed that if I con

  • upgrade memory for one Aspire Switch 10

    Memory can be improved on the Aspire Switch 10.  I use mine for music but right now that I'm out of space

  • Help 2 x Slatebook

    Hello I come today and having some problems Cannot start, get the battery for 5-10 seconds red icon that's it. The base is charged but the Tablet it itself is dead. N ° HFW02001010 R3A Series No. [under the direction of personal information] No. E2T6

  • Remove the blue box of 'Alt Tab box office'

    original title: "Alt Tab Office Box". When I select Alt Tab on the desktop machine there is a blue box in the lower right corner, how can I remove it? I find this annoying box. http://i.imgur.com/rH2WC.PNG here is a picture of what it looks like. (of