NI-DAQ Digital Edge Start Trigger

Hi -
I have a digital input line that I would like to use as a trigger in order to collect 1 data sample of 31 analog input lines.  How do I configure this task?  I have been getting all kinds of error messages and am assuming there must be a simple way to go about it.
Thanks,
Dave

Hi Dave,
I think there is a problem either with your configuration files in MAX or the driver. Try renaming the MAX Data folder located at C:\Program Files\National Instruments\MAX. Also, you can try exporting your MAX configuration to preserve what you already have and then start fresh by creating new task. This will create a new MAX configuration and new Data folder when you create a brand new task.
I have searched for the -2147220733 error but I can't find any documentation on it even internally. Do you have another machine where you can try to create/test the task? Does the error appear in MAX or in LabView when you try to run your application? Do you have problem setting up tasks with any other cards in the computer? Does the error occur only when you have one channel in the task or all 31?
Selecting "1 sample HW timed" should definitely work.
Regards,
Natasa

Similar Messages

  • Using the same wire for positive edge start trigger and negative edge stop trigger for 6533

    I would produce a start trigger for an external data source to start them.
    Emediatly after this starttrigger this source produces a trigger Signal.
    I would like to use this trigger Signal as an extern trigger which should provide some functions:
    1. on the positive edge of the Signal some pattern should read in with an external clock.
    2. on the negative edge of the trigger signal this process should stop.
    I would do this with CVI

    Hey Schicki,
    I have included two links below that should help you with your application. The first one is setup to perform digital pattern I/O with an external clock in CVI. The second shows how to incorporate start/stop triggers in digital pattern I/O operations. You should be able to combine parts of these two programs to complete your application.
    NI 6534 Double-Buffered Pattern Generation, External Clock -- CVI
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E7FD56A4E034080020E74861&p_node=DZ52321&p_source=External
    Output Digital Data from a Buffer to a Group of Two Digital Ports Upon a Digital Start Trigger
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EA4556A4E034080020E74861&p_node=DZ52321&p_s
    ource=External
    I hope this helps.
    Regards,
    Todd D.
    NI Applications Engineer

  • Why is Start Trigger Delay not applicable?

    Hardware: PCI 6602
    Driver: DAQmx 7.4
    Programming Environment: ANSI C
    Hello All,
    I'm setting up a counter output pulse generation task which is to have a start trigger.  To be specific, it is a digital edge start trigger (not an arm start trigger) which I plan to use in retriggerable mode so as to get a single output pulse of specified width for every trigger edge.  Currently I'm baffled as to why the Start Trigger Delay and Start Trigger Delay Units properties do not seem to apply - whenever I try to access them I get an error message saying they're not applicable to the task.  The other properties of interest - Source Terminal, Active Edge, and Retriggerable - can be accessed and modified without any problems.  I don't actually need the delay but am curious to know why it doesn't apply in this case.  Thanks in advance.
    Jeff

    Hey Jeff-
    You will need to make sure that you don't stop the task at any point after the first generation.  Most of the examples use DAQmxWaitUntilTaskDone() to wait for a single iteration, but in your case you want to run through several iterations of the task.  So, you will want to enter a loop after starting to ensure that the task continues to run in the background on the hardware.  I modified the single pulse DAQmx shipping example to include digital retriggerable start triggering.  The empty loop spinning is obviously not ideal, so I'll leave you the choice to implement that as necessary.
    Since you're working with retriggerable single pulses, you may also want to be aware of the information in this KB.
    Hopefully this helps-
    Tom W
    National Instruments
    Attachments:
    DigPulse.c ‏4 KB

  • Why does Start Digital Edge in Start Trigger.vi do a kind of timeout?

    Hi I am doing a manual trigger on my hardwareboard by inserting a 5 volt source into the selected triggerchannel a couple of seconds after I push the start button.
    The generation never starts. But if I put the trigger signalchannel  equal to the external sampling clock the appended vi work.
    Example I use PFI7 as trigger source which is also the source of the sampling clock.
    Could somebody explain?
    Kindest regards,
    Lasse
    Solved!
    Go to Solution.
    Attachments:
    Cont Gen Voltage Wfm-Ext Clk-Dig StartA.vi ‏36 KB

    One cannot just insert a wire with a 5 V potential to PFI6 for instance if PFI6 is used as a trigger for "Start Digital Edge" daqmx -vi. The pin is floating and just inserting 5V does not guarantee a low to high edge.
    If I use a potentiometer to pull the channel low first, and then increse the voltage, the trigging happens.

  • Using DAQ occurrence to wait for start trigger

    Hi,
    I'm trying to use digital triggers to start and stop datalogging. Every time start trigger appears, new file is created and data is acquired to file until stop trigger occurs. Now I'm using set DAQ occurrence and wait for occurrence functions to wait for start trigger before creating a new file. The problem is that after first stop trigger this occurrence method doesn't work. I believe it's because AI is not cleared and configured before calling DAQ occurrence again. Number of scans acquired is not zero, if I don't clear and configure AI again? Am I right?
    Do I have to clear and init AI everytime before occurrence config or is there a better way to make program wait for start trigger?
    Thanks in advance,
    Jakke

    Hi Matt99eo,
    Have you configured your device for triggering?  Although you have not mentioned your device specifically, the M series user manual provides a great explanation of digital triggering.  Using the DAQ Assistant, this can be configured from the triggering tab.  Hopefully this helps!
    Regards,
    h_baker
    National Instruments
    Applications Engineer
    Digital Multimeter Resources

  • Getting error -200452 using DAQmx Base Trigger (Digital Edge).

    I'm trying to set up AI and counter output, and I'm using digital output as trigger for to start AI and counter at the same time. I get error 200452 "Specified property is not supported by the devise..." not consistently, but around 5 runs out of 100. Below the error description, the error box shows "This error code is undefined. No one has provided a description for this code..." If I "Retain Wire Values" in Block Diagram, the error first appears after 'Start Digital Edge' block in top counter output line.
    Using LabView 8.5 on MAC OS X and DAQmxBase 3.2
    The MAC I have is not Intel base, so I can't upgrade LabView and DAQmxBase to latest version
    Note: The file contains just a small portion of the program, but the rest of the program does not have any other DAQmxBase blocks accessing the channels used here in code attached.
    Attachments:
    Combined V 1.5.41_sm.vi ‏98 KB

    Hi Azotov,
    It looks like the DAQmx Base driver readme includes Mac OS X support for LabVIEW 8.5.  Could you specify what hardware you are using?
    I found one KnowledgeBase specifying that error code occurs when you try to use certain properties with certain devices.  Of course, this would most likely occur every time you run the task, not 5% of the time.
    Since I'm running Windows, it's a little difficult to see if you have DAQmx Base "Reset Device" functionality with that version of the driver.  You might check if you can run that functionality before using your device, though.
    National Instruments

  • AO output/start digital edge

    AO output中,我想用DAQmx write来写入电压信息到buffer,然后用DAQ start task开始产生电压。我的程序中用start digital edge指定每个pulse的falling edge来开始产生电压。我的问题是电压是不是只有在pulse的low edge电压才能产生,而当下一个rising edge是,产生就会停止呢? 还是说start digital edge只决定第一次电压写入的时机?望高人指点!

    可以贴程序框图看看么?
    Thomas | Xi'an China
    LabVIEW 7.1 | LabVIEW 2011
    DAQmx | CompactRIO

  • Analog output digital start trigger c api

    Hi, I am attempting to start analog output based off a digital trigger (either PFIO, or a PXI line)  I can do this easy in LabVIEW.  However with the C API (through Python wrappers), the problem isthat when I call DAQmxBaseWriteAnalogF64, the write will always timeout as the acquisition has not been triggered.   However, I cannot call this after the trigger occurs, as obviously that will be too late.
    I cannot find any C API examples where analog output is triggered off a digital trigger.  I can find them for analog input, but that is fundamentally different as you can performan read anytime after the trigger occurs.
    Python code as follows (the functions are equivalent ot C API, though you do not need ot pass the task handle as 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 some of the text based NI DAQmx (ANSI C) code examples on generating an analog output using a digital start trigger. If you included/checked text-based support 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 Out>Generate Voltage>Mult Volt Updates-Int Clk-Dig Start. If you have any questions/concerns regarding the NI hardware.

  • Multiple Channels with Single Digital Edge Trigger

    I have a simple vi where two analog channels are read in and recorded simultaneously to a lvm file and plotted on a waveform graph. I need a digital edge to post trigger the data acquisition for both channels. 
    I can get this vi to work with one analog channel and the digital edge trigger just fine.
    When I remove the digital edge trigger, I can get the vi to work with both analog channels. Both signals plot on a waveform graph, and record nicely in the lvm file.
    The issue is how I am setting up the digital trigger (see attached).  The program is never entering the while loop. Where am I going wrong?
    Chassis:cDAQ-9172
    Analog Card:NI 9205 (Trigger Source PFI0)
    LabView: 8.6
    OS: Windows XP
    Solved!
    Go to Solution.
    Attachments:
    Analog Input with Digital Edge Trigger.vi ‏52 KB

    Gardma,
     I am going to take a quick guess (I'm lazy and haven't actually tested the code ), but, since it works without the trigger and given that you have it so that the read never times out (i.e. = -1), there is something going on such that the trigger is never generated on the source pin.  Just a thought.
    Cheers, Matt
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC

  • How to calculate the time between start trigger,first scan and first A/D in DAQ

    Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
    I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
    Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
    Thanks

    I read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
    But it says the T1 and T2 are determined by external signals. How can I calculate that?
    T1=1/10KHz or T1=1/160Khz?
    T2=1/200KHz?
    Is the above correct?

  • Digital start trigger and high speed camera

    Is there any particular option or way available in LabVIEW to initiate the data acquisition and high speed camera using a digital start trigger? If yes, shall I create a task for high speed camera and then synchronize it with the other tasks?
    Kind Regards, 

    Hi Helen19411,
    The way to trigger data acquisition in LabVIEW is to use the 'DAQmx Start Trigger VI'. To set this up I recommend taking a look at this example: 
    http://www.ni.com/example/25282/en/
    Without any information about the high speed camera you are using, I can't give much advice. If the device is viewable in MAX then you may be able to create a task, and so long as you synchronise both channels in your code, the digital trigger should activate both events.
    Kind Regards,
    TomS
    Applications Engineer
    National Instruments

  • Using a Counter as a start trigger to one or more tasks

    I am using the NI USB-6251. I want to configure a counter (e.g. Dev1/ctr0) at a user-specified frequency and the rising edge on this counter should act as a start trigger for an analog input task and a digital output task. 
    I've tried to do this by creating a task for the counter:
    integStartTriggerTask.COChannels.CreatePulseChanne​lFrequency(
    "Dev1/ctr0",
    "Integration Start Trigger",
    COPulseFrequencyUnits.Hertz,
    COPulseIdleState.Low,
    0,
    integFreqHz,
    0.5);
    and then connecting this to the StartTrigger for the analog input task:
    analogReadTask.Triggers.StartTrigger.ConfigureDigi​talEdgeTrigger("Dev1/ctr0", DigitalEdgeStartTriggerEdge.Rising);
    However running this gives the error: 
    Source terminal to be routed could not be found on the device.
    Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names.
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Source
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Edge
    Source Device: Dev1
    Source Terminal: Dev1/ctr0
    Task Name: analogReadTask
    I have also tried "Dev1/ctr0/StartTrigger" instead of "Dev1/ctr0". What am I doing incorrectly? Thanks.

    Hi zkhan.cimtec,
    To use a digital trigger for your start task you need to use a PFI line to read a signal that is coming in. You are setting up a task that outputs a start trigger on your counter line, but you can't read off that same line to start the task since that line is already configured for output. An example of how to setup a start trigger coming into a PFI line can be found in the examples here:
    <National Instruments Public>\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Ext Clk-Dig Start
    Hope this helps,
    Kevin

  • Analog start trigger for x series card gives an error?

    Hi everyone,
    I am having some trouble setting up an analog start trigger for DAQ using an x series PCIe card (6351)... Attached is my configuration... After reading the manual (http://digital.ni.com/manuals.nsf/websearch/08B4B2E1B5373B94862579BA006E6BAB), my understanding is that AFPI0 is a compatable analog trigger for the device; however, the vi will not run and I get an error... Although if I change the soruce to "Force" (which is ai0) it works..
    Also, the device document says (pg 11-8):
    "To improve trigger accuracy, do the following:
    • Use an AI channel (with a small input range) instead of APFI <0,1> as your trigger source. The DAQ device does not amplify the APFI <0, 1> signals. When using an AI channel, the NI-PGIA amplifies the AI channel signal before driving the analog trigger circuitry. If you configure the AI channel to have a small input range,"
    To me, this implies that I probably should use "Force" as the trigger soruce anyway (note that the instrunment is used to acquire data load cell data generated from human muscle contractions; so slew rates are relatively low compared to signals acquired from industrial tests).
    Could someone please comment on these issues for me?
    Regards,
    Jack
    LV2010
    Attachments:
    Untitled 1.vi ‏22 KB

    Ok... I think I have answered by own question... APFI0 needs a low impedence signal to drive the terminal... I mistakenly thought this was an internal terminal or trigger...
    So I should stick with using the first analog signal acquired in my DAQ device (e.g. ai0) as the trigger source?
    Regards,
    Jack
    LV2010

  • Working of start trigger

    i want to know how a start trigger starts the acquisition of data.please give me any example

    Hello Christian,
    Thank you and Best Regards,
    I implemented a advance Measurement and Control system using cRIO-9074
    with c-Series I/O cards( NI 9217, 9411, 9264)
    I have some questions about it,
    (1)- Data rate from FPGA targate to host vi is too low. how can I increase
    it, when I run my host VI, sometimes all temperature sensor update at
    same time and sometimes one by one, can you please give me some hint, how
    can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
    Digital input and all analog output and input in a seperate while loop in
    FPGA targate VI.
    (2)- I have to write that data to analyse for further result. I tried all
    possible way to write data including wite to spreadsheet.vi, write to
    text.vi, Data storage.vi, Write to measurement.vi. All this VI work
    efficientlywhen it run individualy, But when I connect this VI to
    writedata from FPGA host VI. than it always give empty file.
    I saw your post in NI discussion forum about how to write data from
    Host.vi, But still I am confuse that how can I creat a protocol between
    host VI and Fpga target vi. to write the data in a file. I have nearabout
    38 channel to write data.
    (3)- I have to measure time difference between two digital pulses, to find
    a flow rate. I am using counter for it with risisng edge shot.vi, but when
    i get a timestemp when there is risisng edge for the second rising edge
    how can I get timestemp. Its like i have to measure time between two
    pulses, I triend waveform measurement.vi to find cycle period. but it not
    worked. any other was to measure it.
    I am stuck in this question since from last one month. I already followed
    NI-discussion forum solution but it doesnt work. I think the way I applied
    is may be wrong. 
    Looking forward to hear from you soon.
    Plese send an additional email copy to [email protected]

  • CTR start trigger error - USB6343

    Hi-
    A digital pulse from a device in my system is connected to the gate of CTR0 (PFI9).
    CTR0 is used as a quadrature encoder. My code routes PFI9 to the gate of CTR1 (PFI4)
    and also defines PFI9 as a start trigger for CTR3. CTR3 is set to generate a finite
    retriggerable pulse train for each digital pulse on PFI9.
    My code returns error -89137 indicating that Specified route cannot be satisfied,
    because it requires resources that are currently in use by another route.
    Not sure what this means?
    Screenshots of relevant code and error message are attached.
    I am using LV2010 and a USB-6343.
    Your help is appreciated !
    Dar
    Solved!
    Go to Solution.
    Attachments:
    CTR3 start trigger code.jpg ‏89 KB
    External trigger pulse route and CTR1 setup code.jpg ‏129 KB
    Error.jpg ‏163 KB

    Hey Dar,
    As long as you're careful about managing your hardware resources then you shouldn't face persistent problems. It's just a matter of knowing which lines you are using at what time, and being conscious of how your signals are physically re-routed in your hardware (as I said, this is something you can check in Measurement & Automation Explorer). There are lots of great DAQ resources online through NI KnowledgeBase articles, Developer Zone articles, and community examples (found at ni.com/support). For resource related conflicts, this KnowledgeBase article is particularly good:
    http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89?OpenDocument
    I hope this helps! If you encounter future problems, the forums are a great way to get peer input &/or response from NI engineers.
    Courtney L.
    Applications Engineer
    National Instruments

Maybe you are looking for