9401 buffered output digital clock sample source

Hi, I would like to generate a pulse train with a defined number of pulses, according to a defined periodicity. I use a NI9401 module in the Groove 3 CompactDAQ chassis so that I can write the required buffer sample 2047 pulse train. The problem I have is I am unable to choose any clock source slower than the time base of 100 kHz, which means that the buffer can underflow very easily. I would use a 4 kHz clock source, but cannot find how do. If I want to generate a source of the clock of one of the counters, I must have the 9401 in slots 6 or 7 which then do not allow for generation of digital signals in the buffer...

Hi, JPP,.

Access to internal counters, even if modules are connected in the Groove 1-4 of the cDAQ chassis. Note this site 6 & 7 are necessary only if you need external access to counters as task of counter in the buffer, the measures of frequency/period, etc... Since in your application, all you need is to generate a continuous pulse train and access its output internally to clock output your digital correlated, this shouldn't be a problem with your DIO module into the Groove 4. Please take a look at the following link for more information.

With the help of internal counters on one NOR cDAQ-9172 as a sample for other tasks clock

http://digital.NI.com/public.nsf/allkb/EEB574335BA0B4EB862572060055E9DD?OpenDocument

I would also like to refer to an example on our site which shows you how to use your correlated digital i/o clock counter. I hope this helps.

NOR-DAQmx: Digital Correlation of e/s with NI CompactDAQ and LabVIEW

http://zone.NI.com/DevZone/CDA/EPD/p/ID/5256

Tags: NI Software

Similar Questions

  • Problem of clock sample e/s digital PCI-6229

    Hello

    I use PCI-6229. I need to use the digital output channel to generate pulses of 20 kHz 30% duty cycle.

    The datasheet shows the sample clock frequency can be 1 M Hz. But in may, only 100KHzTimebase may work to generate. But acctually I need at least 200K Hz.

    I've done the Vi is attached. Can someone help me with this problem?

    Thank you

    Hello ossoo,

    The PCI-6229 is not a timing engine digital to create a digital task which runs at 1 MHz, you must use an external sample clock.  However, one thing you can do is generate a pulse train at your desired frequency using a meter integrated 6229 and then using this output meter as the sample for your task digital clock.  Take a look at the attached amendment, I made to your VI which shows how to build your digital task to 1 MHz using the meter on board.  You can change the frequency of the train of impulses of the meter in order to change the frequency of your outputs digital.  Please let me know if you have any questions.

    Kind regards

  • Outputs digital synchronized DAQmx

    Hey, I am trying to send two synchronized digital signals of a PCIe-6420 device.

    Here is my code:

    DAQmx configure clock
    DAQmxErrChk (DAQmxCreateTask ("Clk", & taskHandleFRQ));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev1/freqout","",DAQmx_Val_Hz,DAQmx_Val_Low,0,ManchSampClkFreq,0.5));

    DAQmx digital output configuration
    DAQmxErrChk (DAQmxCreateTask ("Harmony", & taskHandleHarmony));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandleHarmony,channel2,"",DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleHarmony,"/Dev1/PFI14",ManchSampClkFreq,DAQmx_Val_Rising,DAQmx_Val_ContSamps,sendCount));

    DAQmxErrChk (DAQmxCreateTask ("DOchan", & taskHandle));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,channel,"",DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev1/PFI14",ManchSampClkFreq,DAQmx_Val_Rising,DAQmx_Val_ContSamps,sendCount));

    DAQmx Configure similar output
    DAQmxErrChk (DAQmxCreateTask ("AOchan", & taskHandle));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,channel,"",0.0,10.0,DAQmx_Val_Volts,));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev1/PFI14",ManchSampClkFreq,DAQmx_Val_Rising,DAQmx_Val_ContSamps,sendCount));

    DAQmx write code
    DAQmxErrChk (DAQmxWriteDigitalLines(taskHandleHarmony,sendCount,0,10,DAQmx_Val_GroupByChannel,SendManchHarmony,,));
    DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,sendCount,0,10,DAQmx_Val_GroupByChannel,SendManchData,,));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,sendCount,0,10.0,DAQmx_Val_GroupByChannel,SendManchAnalog,,));

    Starting code DAQmx
    DAQmxErrChk (DAQmxStartTask (taskHandleHarmony));
    DAQmxErrChk (DAQmxStartTask (taskHandleFRQ));
    DAQmxErrChk (DAQmxStartTask (taskHandle));

    Only problem, is that I get "error DAQmx: NI service platform: the specified resource is reserved." messages.

    The name of the task associated with the error is DOchan: aka: taskHandle. If I rearrange the code such as taskHandler events occure before the equivelents to taskHandlerHarmony, then errors are associated with harmony: aka taskHandleHarmony instead.

    That I am I doing wrong and how should outputs digital syncornized be implimented instead?

    Think of the fifo in a block of memory that is the same width as the digital port where each bit corresponds to a single digital line.  The samples are transferred from this FIFO to the port in written all over port (there is some logical activation, so only those lines that are configured in your output task are actually updated each sample clock).  DAQmx will combine the data you write for if make sure that the correct data at the scale of the port gets written in the FIFO.  DAQmx for this by looking at the configuration of the group 'line' in DAQmx create DO canal and the "dataLayout" specified for the function DAQmxWriteDigitalLines.

    You have two lines you have set on DAQmx_Val_ChanPerLine.  This means that when you call DAQmxWriteDigitalLines, it will be expected to see enough data to two data channels.  The way in which these data are specified is configured by the dataLayout.  By specifying DAQmx_Val_GroupByChannel, you say DAQmx data for each channel to be grouped.  You should do these groupings in the same order that you specify your channels.

    So consider the following:

    DAQmxErrChk (DAQmxCreateTask ("DOTask", & taskHandleDOTask));
    DAQmxErrChk (DAQmxCreateDOChan (taskHandleDOTask, "Dev1/port0/$line0", "", DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxCreateDOChan (taskHandleDOTask, "line1/port0/Dev1", "", DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleDOTask,"/Dev1/PFI14",ManchSampClkFreq,DAQmx_Val_Rising,DAQmx_Val_ContSamps,sendCount));

    We will alternate digital high/low between our two lines (we will write the 10 values of each line), with the exception of this last point, where we will write two lines high
    The data should be written in the corresponding line bit position (if I remember correctly)

    which means you want to manipulate the lsb for the 0 line, and line 1 manipulate you the 2nd lsb.

    Int32 [10] line0Data = {1,0,1,0,1,0,1,0,1,1}

    Int32 [10] line1Data = {0,2,0,2,0,2,0,2,0,2}

    Int32 dataArrayByChannel [20];

    Int32 dataArrayInterleaved [20];

    for (int32 i = 0; i)< 10;="">

    {

    Group data through

    dataArrayByChannel [i] = line0Data [i];

    dataArrayByChanne [i + 10] = line1Data [i];

    Group the data by scanning

    dataArrayInterleaved [i * 2] = line0Data [i];

    dataArrayInterleaved [i * 2 + 1] = line1Data [i];

    }

    We can write data in one of the formats that we just built, but we must provide DAQmx with the correct dataLayout.

    DAQmxErrChk (DAQmxWriteDigitalU32 (taskHandleDOTask, sendCount, 0, 10, DAQmx_Val_GroupByScanNumber, dataArrayInterleaved, NULL, NULL));

    Alternatively, we could write per channel.  If we chose, it would look like this (you wouldn't do both).

    DAQmxErrChk (DAQmxWriteDigitalU32 (taskHandleDOTask, sendCount, 0, 10, DAQmx_Val_GroupByChannel, dataArrayByChannel, NULL, NULL));

    DAQmxErrChk (DAQmxStartTask (taskHandleDOTask));

    In both cases, DAQmx must write the following data to the FIFO:

    x 1

    x 2

    x 1

    x 2

    x 1

    x 2

    x 1

    x 2

    x 1

    x 3

    In this way, the data written to each line are combined by DAQmx then written to the FIFO.  Allows you to specify the data for each channel individually.

    It was quite long, but I hope it will answer your question.  If I was not clear, please let me know.

    Dan

  • 6009 outputs digital and analog input synchronization

    Hello

    I work in a program NI 6009. I want to leds by car with outputs digital NI 6009. For example, leads first will be on until what 200 micro seconds then second led will be on up to 200 micro seconds, and then first of all led will be on up to 200 micro seconds. I'll take led with photodedector signals and connect analog output photodedector input NI 6009. I want to synchronize the outputs digital and analog input and separate the first and second led signals the analog input for NI 6009 channel. How can you do with NI 6009? Please ADV

    You can not do with the USB-6009 case. Its outputs digital are software with a maximum speed of slightly more than 100 samples per second. The outputs can produce 200 microsecond pulses and cannot be synchronized with the analog input.

    You need a device with outputs digital hardware timed or counters that can produce a pulse outputs.

    You can synchronize a bit digital output and analog input recording signal on an additional channel to HAVE. Will allow you to see the photodetector and LED the drive with the same schedule and such resolution as described by the sampling rate I. The maximum sampling frequency of AI on the USB-6009 case is 48 kHz that is shared by all channels. If you have two lights to led and photodetector two signals maximum sampling rate would be 48 kHz/4 = 6 kHz which is barely fast enough for your 200 US signals. For more than 4 channels, it won't be fast enough.

    I suggest a simple oscillator circuit building and use it to clock a flip flop. This will give you alternating signals to drive the LEDs. You can use a line to reset the flip flop to give you control without the need for high speed.

    Lynn

  • Current output digital USB-6009

    Hi, I'm trying to increase the voltage output digital device USB-6009. I read a few topics on the use of a relay, but I couldn't get it.

    I was thinking of using power 5V on the map because there current 200mA on it, but when I use it with open-collector output, it cannot change the relay. When I measure the current between

    5V and ground: 200 ma,

    5V output, I read a value around 30-40 my.

    Why can I not use this 200mA with output? It is the Relay that I use.

    If this is not possible, can I use an external power supply 5V (with more current) and a digital output to pass the baton without damage the 6009?

    Outputs digital of the USB-6009 confined to 8.5 my. Your relay coli requires much more than that. Even if the power source can provide enough current for the relay, digital output can not put.

    The solution is to use a buffer of extermal. The ULN2003 can switch currents up to 500 my and voltage up to 50 V while being controlled by digital output.

    Lynn

  • By dividing the time base clock sample by N, we're the first sample on pulse 1 or pulse N?

    I use an external source for the time base a task of analog input sample clock. I'm dividing down by 100 to get my sample clock. Is could someone please tell me if my first sample clock pulse will be generated on the first impulse of the source of the base of external time, or about the 100th?

    I use a M Series device, but can't see a time diagram in the manual that answers my question.

    Thank you.

    CASE NO.

    CERTIFICATION AUTHORITIES,

    I don't think it's possible to use the sample clock of 3 kHz on the fast map as the time base clock sample on the slow map and get the first sample to align.  The fast card can enjoy on each pulse signal 3 kHz, while the slow card will have to meet the requirement of the initial delay before he can deliver a sample clock.  If you turn this initial delay a minimum of two ticks of the time base, the slow card eventually picking around the edges of the clock 2, 102, 202, etc..  You can set the initial delay for 100, which means that the slow card would taste on the edges, 100, 200, 300... but you wouldn't get a card reading slow on the first edge of your sample clock.

    Hope that helps,

    Dan

  • clock sample question

    Hi ppl,

    I have a question for you.

    I have a very similar to the attached picture circuit. also you can find here (http://zone.ni.com/devzone/cda/tut/p/id/3615#toc4 , fig.2) I write some data on analog channels out and then I collect the data in the time loop. I don't understand what exactly is happening when I write the data in the buffer. Let's say I have a table of 2D 2-lines and 62500 columns that I want to write in the output analog channel, then read in the analog channel. I do not understand the meaning of the sample clock. (I read on operations 2 devices simultaneously and blah blah blah). What should be the sample clock frequency in the August channel and the channel of the ain and the number of samples per channel in the ain daqmx channel when I want to collect data? (http://zone.ni.com/devzone/cda/tut/p/id/2835; reading the data in example labview). My problem is that I do not understand what is happening when I load the August channel with data buffer; for example I put the sampling clock rate: 1000; meaning he will write each s 1000 samples of 62500 samples until the end of the samples; all of these samples that I drove from my out channel voltage piezo-beam-scanning engines. which means that each s piezo motors will get 1000 samples of tensions? now, I want to measure. should number of samples in the playback channel I put? I put my daqmx reading in the while loop. Let's say I put 100 Samper useful/channel. so, each itteration in while loop it will read the 1000 samples/channel buffer. How will I know that the buffer is already full with 1000 samples when ain channel tries to read?

    The process is therefore more; correct me please if I'm wrong. The sample clock will define us the buffer data rate. For example, I load the 2D matrix: 62500 2rows columns; It will load in the buffer and then there are these samples at the August channel of the rate defined in the clock sample string? Then I want to read from the channel of the ain. What sampling clock frequency should I set for the channel of the ain? If the sample clock rate for the playback channel sets the buffer? for example (I put it there 1000 samples/s; meaning it can read 1000 samples per second?) then what the number of samples should be in the read daqmx channel in the while loop?

    Please clarify me this point, I'm confused...

    Hi dimani4,

    There is a very comprehensive document that answers your questions. You can find this document here.

    This article explains the operation of the sample clock frequency and the DAQmx Read reading samples. Quoting the article: "On the hardware side, the Schedule VI DAQmx determines the flow rate of the device/sensor data at the hardware buffer on the data acquisition card.". Here is the 'Timing VI' the sample clock.  Then he also explained that "on the software side, the reading VI DAQmx determines the transfer of the data of the buffer material in the software". "." It is making reference to the samples to read the reading VI DAQmx.

    I hope this information specific to your questions.

  • analog output digital start trigger the api c

    Hi, I'm trying to start analogue output based on a digital trigger (either PFIO or a PXI line) I can make this easy in LabVIEW.  However with the C API (through the Python wrappers), the problem is when I call DAQmxBaseWriteAnalogF64, writing will always be timeout that the acquisition was not triggered.   However, I can't call it after the trigger occurs, because obviously, it will be too late.

    I can't find any examples of C API where the analog output is triggered a digital triggering.  I can find for the analog input, but is fundamentally different that you can CONV read anytime after the trigger occurs.

    Python code as follows (functions are equivalent ot C API, even if you have no need of ot pass the task handle such that it maintained as part of the Task object)

    # create analog output task
    analog_output = Task()
    analog_output.CreateAOVoltageChan("Dev1/ao0","",-10.0,10.0, DAQmx_Val_Volts, None)
    analog_output.CfgSampClkTiming("",outputRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, numSamples)
    analog_output.CfgDigEdgeStartTrig("/Dev1/PFI0", DAQmx_Val_Rising)
    analog_output.StartTask()
    analog_output.WriteAnalogF64(numSampsPerChan=numSamples, autoStart=False,timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=data, reserved=None, sampsPerChanWritten=byref(samplesWritten))print("Analog output: Wrote %d samples" % samplesWritten.value)# create digital trigger dig_out = Task()dig_out.CreateDOChan("Dev1/port0", "", DAQmx_Val_ChanForAllLines)
    
    # create digital trigger function
    highSamples = 1000
    numpts = 3 * highSamples
    doData = np.zeros((numpts,), dtype=np.uint32)
    doData[highSamples:2*highSamples] =  2**32 - 1
    
    # send digital trigger
    doSamplesWritten = c_int32()
    dig_out.WriteDigitalU32(numSampsPerChan=numpts, autoStart=True, timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=doData, reserved=None, sampsPerChanWritten=byref(doSamplesWritten))
    print("Digital output: Wrote %d samples" % doSamplesWritten.value)
    

    Hi PatrickR,

    You can review examples of code NI-DAQmx (ANSI C) text based on the production of an output using a trigger to start digital analog. If you included/checked support textual dusing your NI DAQmx driver installation, you can navigate to Windows start > all programs > National Instruments > NI DAQ > Teaxt-Based Code support > ANSI C examples > analog output > generate voltage > Mult Volt updates-Int Clk - Dig start. If you have questions/doubts about the material.

  • Back table of outputs digital for all available hardware

    Hi, I use an output digital on the USB-6008 box to toggle a switch to relay.  The problem is that the State is initialized from the all the outputs for this device is high when the unit is first powered.  So, I include in my code to set the digital line (saved in the config file) solenoid low when the program first runs.  The real problem is that the first time that the program works on other computers, depending on the hardware installed, the line can have a different name.

    Is there a way to return an array of all available digital output lines, so that I can put all weak when my program works first?  One of these lines will be the one I really want to put down.

    Thank you

    Greg

    Dig in the DAQmx palletes for nodes and constants to find a node 'system '. Select the "DevNames.

    Wire as arry in a loop with a node For "Device" and you can choose the "product Type" or "product number".

    Ben

  • output digital 1 sec ON - 9 OFF s

    Hello friends,

    I'm new to LabView.

    And I'm working on a project where I have to order 6 relays via lines outputs digital data acquisition in question. (USB-6353)

    Each relay is ONE for dry and OFF 1 for 9 seconds. But they all should be out of phase. If only 1 relay is active at a time.

    Can someone help me with this in Labview.

    Thank you.


  • Audio output digital on Lenovo docking station and Port Replicator

    Dear community,

    There is no station Lenovo port replicator or docking station for Thinkpad recent (T440 & X 440) with audio output digital?

    A big thank you in advance?

    Amine

    Neither has it. You need something like that. It divides basically your audio digital HDMI or DP.

    http://www.envioustechnology.com.au/products/images/further/HDMI-SW41_Inline_01.jpg

  • Digital clock

    I am trying to simulate a digital clock to count from 0 to 60 seconds using two seven seg displays two 7447 two 7493 and two generators on Multisim of clock, but the problem is that I can't drive the input frequency to give two 7493 ic connected to the poster through the two 7447 ic please help

    You must send to the Commission of multisim. You can click on Options and ask the moderator to move your question. It really had nothing to do with a material OR the digital I/O.

  • A1 - 830 - how to change the life of Acer digital clock

    A few questions...  I would change the temperature on the Acer life widget display digital clock in degrees Fahrenheit.  But I don't know how to do it.  Can someone help me?  I found the instructions for another model of Tablet online but my 830 A1 is not put in the same place.

    In addition, anyone know if there is any app available that I could charge that would allow me to connect a webcam to the Tablet?  I would use the Tablet occasionally as a backup for my car camera.  I would like suggestions.

    Thank you.

    Sue

    Hi, to change the temperature on Acer weather clock:

    Press the 'time', a settings page, the first parameter is from F/C, after choosing your setting, press 'done' at the top right of the screen (just under the battery/time icon.

    On an application to connect a cam, I can't help you.

    Sorry

  • Digital clock displays but is not updated in time

    This is the code that I have on board animate under compostionReady:

    function updateClock)

    {

    currentTime var = new Date ();

    var currentHours = currentTime.getHours ();

    var currentMinutes = currentTime.getMinutes ();

    var currentSeconds = currentTime.getSeconds ();

    Cushion the minutes and seconds with zeros, if necessary

    currentMinutes = (currentMinutes < 10? ('0': "") + currentMinutes;

    currentSeconds = (currentSeconds < 10? ('0': "") + currentSeconds;

    Choose 'AM' or 'PM' as appropriate

    var timeOfDay = (currentHours < 12)? « AM » : « H » ;

    If necessary, convert the hours component in 12-hour format

    currentHours = (currentHours > 12)? currentHours - 12: currentHours;

    Convert a component hours of "0" to "12".

    currentHours = (currentHours == 0)? 12: currentHours;

    Compose the string for display

    var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + "" + timeOfDay;

    Update the time display

    document.getElementById("Stage_clock").firstChild.nodeValue = currentTimeString;

    };

    updateClock();

    setsetInterval ('updateClock ()', 1000);

    I am currently having a digital clock to display on the page and with the code above, it appears but is not at day time. You will see that the figures in this report initial second as the page loads. Any help is appreciated!

    Hello

    Well, setInterval() must be the function [updateClock()].

    I rewrite your code using the dashboard API: sym.$("clock") is a text box on the stage.

    I like setTimeout().

    compositionReady:

    function updateClock() {}

    var updateClock = function() {}

    var clock = sym.$("clock"); //

    currentTime var = new Date ();

    var currentHours = currentTime.getHours ();

    var currentMinutes = currentTime.getMinutes ();

    var currentSeconds = currentTime.getSeconds ();

    currentMinutes = (currentMinutes< 10="" "0"="" :="" ""="" )="" +="">

    currentSeconds = (currentSeconds< 10="" "0"="" :="" ""="" )="" +="">

    timeOfDay var = (currentHours< 12="" )="" "am"="" :="">

    currentHours = (currentHours > 12)? currentHours - 12: currentHours;

    currentHours = (currentHours == 0)? 12: currentHours;

    var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + "" + timeOfDay;

    Clock.html (currentTimeString); //

    setTimeout (updateClock, 1000); //

    document.getElementById("Stage_clock").firstChild.nodeValue = currentTimeString;

    setInterval ('updateClock ()', 1000);

    };

    updateClock();

  • Can I create a digital clock effect after effects 4.1?

    Hi all

    I used an old software of my in some new installations on Windows 7.  I just installed after effects 4.1 and I use it for the first time... I know software 13 years, but that's what I have for now.

    I have been using Adobe first 6 for awhile and I'm pretty comfortable with it, but creating a digital clock effect first manually has realized a project requires a lot of work that I am now looking for an alternative to.  I am also a semi expert in Photoshop, but I don't have the new version than to use the effects of timecode functionality.

    So I installed my old copy after effects 4 and I found the tutorials in a search on how create a mobile digital clock effect in new versions of After Effects, but I don't know if plug-ins available or tutorials apply to version 4.

    D there's allot of good things happening in the software in 1999, and I found that even my old version of first 6 is very similar to the new CS5 version to allocate resources, then why not check everything after effects 4?

    Also, you are looking for a user guide or instruction manual online for after effects 4... When I installed my first software it automatically installed a set of files of HTML user manual and a full PDF user guide, but I searched and who apparently have not been installed with after effects 4.

    Thanks for any help,

    Digi

    Rick is 100% correct, but I'm assuming 4.1 AE will not search the web, or Expressions for Dan Up-Down clock, so here's a tutorial on the numbers plugin, I mentioned, just in case.

Maybe you are looking for