Digital output DAQmx calendar

I keep me going in circles. I need to understand this because it seems so simple.

I have a digital waveform with a frequency of arbitrary clock. I want to send this waveform on a device USB-6259. I was able to do this with an analog signal and digital signal gives me problems.

For example, if I want to send a 7500Hz digital signal, I need to have the material, since the time of the application appears not to get up to about 1 kHz. But when I try to set up the schedule, it never seems to work. I'm going to make mistakes like that...

"External sample clock source must be specified for this application."

How can I configure things so this thing can clock the stuff at a particular rate. The analog part of the device doesn't seem to have a problem doing this, I do not understand why the digital side needs an external clock.

A modified version of one of the examples is attached.

VI attached

Tags: NI Software

Similar Questions

  • How can I improve my 2 digital output signals calendar?

    Hello

    I use a NI DAQ Pad-6015 (usb) with Labview 8.5 and XP to generate 2 digital outputs (high for the first 500ms and 600ms high for the second). The moment didn't need to be very specific, so I use not the 2 outputs hardware clocks. When runing of VI, and measure the length of the outputs with an oscilloscope, I get s 520ms and 640ms. This isn't a problem, but I still want to know, if I'm doing the right thing in my program, or if it is possible to improve it?

    Thanks for your help,

    Kind regards

    Marc

    Hello

    Using all your advice I have exact measure now: only 0 to 4ms delay for signals from ms 500 and 600 using the NI DAQPad-6015.

    PS: Timmer was right regarding the notice of usb. With my previous program when you use a card PCI of 6229, I had only a difference of 10 ms instead of 20 ms with the usb one.

    Thanks for your help,

    Kind regards

    Marc

  • 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

  • clock calendar - digital output

    Hi all!

    I need timing equipment impliment on a few digital output lines.  That's what I have so far:

    I didn't get an oscilloscope for her yet, but I'm fairly certain that it works.  Please note that in this example, I use a PCI-6115.  I have 2 questions:

    (1) make what I do look reasonable at a quick glance?

    (2) I'm kinda mistified by the entry of clock source to the example of the clock function.  The analysis that I read just still confuses me.  I understand that the clock is what dictates the sequence of material.  I do not understand how to choose the appropriate clock source correctly.  More specifically, in the above example, I've only had the program work when I chose "20MHzTimebase".  What is c? Why this work?

    When I try to select ' Dev1 / / SampleClock ", I get the following error:"attempted to perform a route when the source and destination are the same point."

    When I try to select "Dev1/PFI0" or "RTSI0/DEV1", I get a timeout error in the wait_until_done.vi--> it does not appear that the waveforms are executed.

    That means the PFI and RTSI acronym for, and why they appear as options when you select a source of the clock?  Furthermore, why have they not worked as a clock source?

    I would be very grateful to anyone who could clear things for me a little.  Thank you!

    Have you read the http://digital.ni.com/manuals.nsf/websearch/01C075FB9478F94A8625786A007435BA? manual The definition of PF and RTSI are here. They are designed using external clock signals. You have the choice of using the internal clocks of analog output (20 MHz) or external clocks. If you do not connect the RTSI bus or PF what, whether you have no clock so no data will be output. Selection of as source does not work because it is not a source. You provide a source for it.

  • Continuous output DAQmx and queue software

    Hello

    I'm coming out of a digital waveform on a map of data acquisition using the internal clock. Now, I also store the waveform for later processing by using the exact time at which the wave was written. So I would get a rear wave form that lets me know what state my digital output was at one point.

    Y at - it an option to do this?

    Or, as an alternative, could I somehow synchronize the beginning of the output waveform to the DAQ card with a timed loop? Because I know that the waveform that is written, this loop could return for example of this waveform with the good "t0" for each iteration.

    The code runs on a target-RT.

    Background: I'm controlling one instrument that has no indication of its current state, but I would like to save its current state on the entry of order.

    After some research, I realized that there is a VI 'DAQmx create calendar Source' that returns a source calendar synchronized to the clock of the task DAQmx sampling. This source of synchronization can be used as a source of synchronization for a timed loop. There is here an example for this:

    https://decibel.NI.com/content/docs/doc-25763

    Unfortunately, I realized that my digital I/O hardware has no timing hardware capabilities so too, this does not work for me and I stick to a software solution that is timed.

  • redeclenchables strange behavior digital output

    I created a redeclenchables digital dashboard task (finished) digital output as follows: (in DAQmx C)

    DAQmxCreateTask("",&_taskHandle);
    DAQmxCreateDOChan(_taskHandle,"/Dev2/port0/line6","",DAQmx_Val_ChanPerLine);
    DAQmxCfgSampClkTiming (_taskHandle, "" / Dev2/Ctr0InternalOutput ", _clockRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, static_cast (_sampleCount)");
    DAQmxCfgOutputBuffer (_taskHandle, static_cast (_sampleCount));
    DAQmxCfgDigEdgeStartTrig (_taskHandle, "/ Dev2/PFI4", DAQmx_Val_Rising ");
    DAQmxSetStartTrigRetriggerable (_taskHandle, true);
    DAQmxWriteDigitalLines (_taskHandle, static_cast(_sampleCount), FALSE,-1, DAQmx_Val_GroupByChannel, _pDigital, NULL, NULL);
    DAQmxStartTask (_taskHandle);

    sample clock:

    DAQmxCreateTask ("", & _taskHandleCO);
    DAQmxCreateCOPulseChanFreq (_taskHandleCO, "/ Dev2/ctr0","", DAQmx_Val_Hz, DAQmx_Val_Low, 0,0, _clockRate, 0.5 "");
    DAQmxCfgImplicitTiming (_taskHandleCO, DAQmx_Val_ContSamps, _numSamples);
    DAQmxStartTask (_taskHandleCO);

    When I run the task without redeclenchables parameter, it output a correct signal. However, if I run with redeclenchables it out almost exactly 2 times faster than normal. For example, a pulse whose width of 10 ms became 5 ms and repeats again to be 2 pulses of 5 ms. This is repeatable, no matter how much or how fast triggers provided.

    My card is PCIe-6363. I do not know what causes this strange behavior, and I hope someone can help on this.

    Thank you.

    It disappears after reset configuration. Might be interesting for future reviews.

  • NI USB-6501 digital output problem

    Hello

    I use DASYLab v.11 and I'm working on an interface with the NI USB-6501 where I'm putting a digital high on four ports.

    With the module "NOR-DAQmx - digital input", I managed to read the digital inputs of the ' NI USB-6501 ".»

    It's only the "NOR-DAQmx - digital output" I can't go to work.

    Using 'NI MAX' of NOR I have easily can emmit my four LEDs in the way of my High/Low ports.

    But not with DASYLab. When you use DASYLab tension on the ports remains unchanged.

    Now, I have a switch module, generating 5/0, directly connected to the digital output module, which is assigned to my four output ports for my task.

    I also tried with a module of relay between the two without success. I also tried to use 1.5 above instead of 5 without success.

    I use the option 'Bus (0/5 supply) for the module "Digital output".

    "NI Max", I configured the ports as "active drive.

    Any suggestion of what I might be missing?

    Thank you

    Martin

    Hmm, four ports, or four lines?

    A port consists of eight lines. Each line can control an LED (ON / OFF ~ 0/5V).

    If you have created a task to dig-out to control a port, 5V to this port sending sets all lines of this port to 'high '.

    You need to 255 for each line one too high port (at the bit level: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1).<- eight="">

    Or, you can create a dig out tasks to control four lines of a specific port.

    Four lanes of the EEG DAQmx DigOut module.

    Each of the channels of the modul will feed a single line of the task/device.

    Four switches will then turn the lights, or turn off.

    Make sure, that the 'bitposition' is the number of correct line (see picture).

  • Measure the time difference between a digital output and an analog input that responded to the questionnaire

    Hallo,

    I use the following system:

    • OR PXI-1044 with controller NI PXI-8109

    • OR PXI-2564 switch module to turn on the monitor of my test device

    • Data acquisition multifunction NI PXI-6259 to measure the signal that responded to the questionnaire jump

    The two cards are the same - PXI trigger bus. For both, PXI-2564 and PXI-6259 I use DAQmx to set the reading and writing of the channels.

    Now, I want to measure the time between the digital output, my unit turns and the analog input, which measures the response of my system.

    I can't do work by myself, please help me!

    I thank Ludwig.

    Hi Ludwig,.

    If you can't give us any VI we have difficulties with to help you.

    Because I Donat knowledge how your program is mounted it is not easy to know where you should enter signals.

    Here's a question similar to yours:

    http://forums.NI.com/T5/LabVIEW/best-way-to-measure-time/TD-p/178704

    and 2 external links:

    http://www.ehow.com/how_8698983_measure-time-LabVIEW.html

    http://objectmix.com/LabVIEW/385152-how-can-i-use-LabVIEW-measure-time-between-analog-pulses.html

  • USB 6008 digital output signal

    I am VERY new to LabView and have been racking my brain trying to get digital output of my USB-6008.  All I want is to be able to get a signal of + 5 V of my digital output when I click on a button.  This signal opens a valve on a system I see so when it is pressed, it must stay open until I press the new button.  It seems simple enough to me, but I'm not too familiar with LabView.  Help, please!

    Stripling07

    You must first take the LabVIEW tutorials and then look at the links to get started with DAQmx .

    The simplest program would be with the DAQ Assistant. Drop it on your schema, and then select digital output > digital line. Select the line when the wizard has completed, click OK. Wire a Boolean value in a table to build and the output of which is connected to the data entry. That's all. You can test the output of MAX (Measurement & Automation Explorer) with the test Panel. Do NOT test with your connected tap. Your valve may require more current that can provide the 6008.

  • analog sync of input with the onset of the digital output

    I'm trying out an analog signal to a file with a specified frequency samples.  I also need a digital output to trigger a measurement at a frequency specified on a separate system.  The frequency is controlled by the loop exits and timed when the iteration number divided by the period is exactly a whole number.

    Both outputs work.  The problem is that they are not synchronized.  The analog output amounts to about 0.5 ms faster than the digital signal.  (I checked with an oscilloscope)  They both start in the 1 ms each loop runs for, but I really need them to start at the same instant.  What can I do to synchronize?  Also, if I'm going in the wrong direction complete, please indicate.

    I use a card PCI-6723, which I think someone at some point, said not having a material sample clock.  That's why I try to use a timed software loop.

    Hi NEA.

    You must use the 6723's built-in calendar to accomplish what you want.  As the digital output subsystem is only clocked by the software, an appropriate solution should be to use one of the counters to the pulse output.

    The attached code should show how.  You can use the counter to output a pulse all samples of the AO N task.  Material requires the initial delay to have a minimum of 2 ticks, so the meter will be behind the task of the AO by 2 samples in this case.  There are different ways to work around this problem if you need (for example write two samples of 0 first).

    Best regards

  • Problem with a digital output in the information of an analog input

    Hello

    I use a SCXI-1000DC module with a module of the SCXI-1600, SCXI-1531 module and SCXI-1163 module to receive an analog of an accelerometer signal and a digital signal.
    I claim that the accelerometer is constantly monitored, and the output is on when I want to, by an impulse that I comand in labview.
    I use a rate 25 k and a 12, 5K samples per channel on DAQmx Timing.

    I notice in DAQmx read, if I put a sample of hight by channel, the output is not there when I want to, and if I put a few samples per channel, I exit when I want to, but the program seems to be slow with the passage of time. I don't know how I can solve this problem!

    I'm sorry for my English, and I hope you can help me.

    Thank you

    Silvia

    Hello Silvia,.

    If you ask a larger number of samples, the labview diagram will stay longer in the DAQmx Read function, so the while loop runs slowly, and the digital output is updated less often.

    I suggest that you use 2 separate while loops: one for the analog input and the other for digital output, so that each loop might run at a different speed.

    Best regards

  • digital output microsecond LED timer

    Hey all,.

    I'm doing a table of 10 LEDs in a row to form an analog timer to use to characterize the delay of the shutter on a digital SLR. We'll first stage shutter lag on the camera using a method different and well set the delay of the shutter for interior<1ms. i="" am="" trying="" to="" use="" labview="" alongside="" a="" ni="" usb="" 6251="" using="" an="" sc-2345="" for="" access="" to="" the="" digital="" outputs.="" im="" using="" a="" timed="" structure="" and="" a="" timed="" loop="" to="" ensure="" the="" timing="" between="" each="" led="" turning="" on="" corresponds="" to="" an="" actual="" time.="" however,="" i="" am="" not="" getting="" the="" results="" i="" thought="" i="" would.="" the="" timing="" does="" not="" seem="" to="" be="" what="" i="" thought="" it="" would="" be="" and="" i="" can="" not="" get="" the="" timed="" loop="" to="" work="" with="" all="" the="" channels="" at="" the="" desired="" frequency="" which="" would="" idealy="" be="" as="" high="" as="" possible.="" could="" someone="" take="" a="" look="" at="" my="" code="" and="" provide="" me="" with="" some="" insight="" where="" i="" may="" be="" getting="" issues?="" i="" apologize="" if="" i="" am="" overlooking="" important="" information="" that="" may="" be="" needed="" to="" help="" solve="">

    ~ Aaron

    I have no DAQmx I can't be sure.  I think that the 6251 has a maximum rate of 1 MHz in order to try to set the rate to 20 MHz should generate an error.  For the purposes of test on the rate 1 Hz bit or less.  Then you should be able to see the LEDs as turning on and off.

    You may also need to set the number of samples to the size of the array.  Referring to the size of the array fed to Scripture DAQmx, not the table on the front panel.  With the number of samples set to 1, I would expect that he wrote that the first element of the array that is equal to zero.  That does not produce a very interesting performance: he lets just all lights off the coast!

    Lynn

  • Implementation of multiple digital outputs with a box USB-6009

    Hi all

    I write the code to implement a USB-6009 multiple digital channels, digital outputs independent.  I have configured the function of "DAQmx create Channel" to create 'a channel for each line', but I can't understand how to access and control these channels separately.  Pointers would be greatly appreciated.

    Thank you!

    I thought about it.  Never mind.

  • USB-6289 digital output signals setting

    I use a USB-6289. I am writing a CVI application that uses this device. I need to put the digital i/o pins as outputs. In the CVI app, I know I can create these tasks with the tools-> create/edit DAQmx tasks. He created this:

    Int32 CreateDAQTaskInProject(TaskHandle *taskOut1)
    {
    Int32 DAQmxError = DAQmxSuccess;
    TaskHandle taskOut;

    DAQmxErrChk (DAQmxCreateTask ("DAQTaskInProject", & taskOut));

    DAQmxErrChk (DAQmxCreateDOChan (taskOut, "USB-6289/port0", "))
    "DigitalOut", DAQmx_Val_ChanForAllLines));
    DAQmxErrChk (DAQmxSetChanAttribute (taskOut, "DigitalOut", DAQmx_DO_InvertLines, 0));

    * taskOut1 = taskOut;

    Error:
    Return DAQmxError;
    }

    So this it puts in place but not to write the data. My question is what is the command to write the data?

    Also I was wondering if the code source of any example that shows how these commands are made? Is it possible to configure the bits individually? I only need to use 5 of these pins as outputs so t would be coll if I could write that the bits D0 - D4.

    Are there documents written on these commands and how they are used?

    Thanks in advance

    A DAQmxWrite writes the data.

    Go to help > examples > material input and output > DAQmx > digital generation.

    If you specify the lines instead of a port, you can use as the number of bits you want.

    First glance using the ICB.

  • Digital output problem

    Well, I thought I had everything figured out, but we have finally had time to go to our lab and test it and there seems to be a problem with the output digital here.  I'll look at what's the point of this VI, then describe the problem

    Analog input is entered and analyzed as digital outpt is sent several lines (3).  The digital output is used to send a single, user‑defined delayed pulse TTL with other instruments like triggers.  I put this program to create an array of digital waveforms for each channel, each of them are of the same length as the analog input.  '1' is inserted in the appropriate place in the table, in lieu of a value of '0', creating the required table.  This table would be written on a digital line (1 channel, samples of N).  Three of these subVIs are used here, so three signals various tables are created and writtin in its respective lines when the program runs, the analog input seems to work very well, but that a single digital output is executed.  I need all three lines to write simultaneously.

    I use a USB-6221 with LabView 8.2

    I have attached all the files needed to run this program, and if the 'LabView programs' folder is saved on the C drive, I think that the paths of the files must be correct.

    Thanks in advance

    Hi Chris,

    Hello and I hope that your well today.

    Thanks for your updates.

    I think that my being better if we start from the beginning.

    1 could you try the example Correlated Dig writing with Counter.vi from the Finder of example of NOR?

    It produces output meter as the time base for the digital output - to get clocked at digital output. Don't you see the waveform being printed on your outings that match the graph of digital waveform on the front panel?

    If not, try to use one of the other examples, as Scripture Dig Port - this is a single VI just to send a single value for each digital line. If this does not work, there is a connection problem.

    2. If we got this far without problems, then the next part would be to change the waveform so that you could write the data that you want to...

    The digital waveforms can be made a boolean table, then using the array of Boolean DWDT to Digital.VI to convert into the type of digital waveforms. The waveform will have X number of samples. Therefore, at each clock pulse, you will produce 1 sample on each channel. So if you set the rate for 1000 and the number of points to 1000 (samples) it will display the waveform on a second. (as his continuous the DAQmx will make a loop through the buffer and start out of the waveform again).

    Note, have you seen the palette of digital waveforms? It is located under waveforms and has more vi like the Boolean DWDT to digital.

    Please let me know how you go.

Maybe you are looking for