DAQmx triggering

Im relativley new to labview and I have a problem trying to setup Triggering using DAQmx
Im am using NI 6210 to aquire data from AI sensor - what Im am wanting to do is aquire data each time the proxistor is triggered from my Digital Input.
So what I require is to capture 1 cycle of data and save the data on each cycle to be used at a later date to pick off certain samples at a specified time.
I have setup a test (VI attached) which at the moment is using the Boolean Crossing to see when the proxistor goes high and when this accurs the task is started and data captured and the task is stopped when the proxistor goes low. This seems to be working ok from what i have been told is that this is not a very good way of timing and I can see that samples captured are not the same each cycle so for the aquistion I would need to look at another way in which to capture 1 complete cycle of dat using the DAQmx triggering. I have been thorugh the NI examples but from these cant find a way in which to implement the triggering for what I need. I also have read that this series of card does not allow re-triggering which is somthing that i would need to implement?
Any help/advise would be greatly appreciated.
Lee Henstock
Cooper Research Technology
Solved!
Go to Solution.
Attachments:
Aquire Data_Proxistor Simulation.vi ‏26 KB

Dear Imhensto
I have been working on your problem and I have a solution for you. First, to clarify, the NI 6210 does not have retriggering capabilities and hence this problem you are trying to solve is a little more complex as you are trying to accomplish alot with a basic device. 
I have attached the VI  below for your viewing and hopefully this will offer you some help on what you want to accomplish. Aviod using boolean crossings and use the daqmx tools palette when acquiring synchornous data. If you want to acquire the data to be used for analysis, connect an array to the VI to get this data. Select your appropiate input channels for your devices and run the program. You will see that when the digital edge is triggered it returns back to zero and at this edge it will correspond to an analog value.
I hope this is of some help.
Many thanks for using the NI forums and I look forward to your reply.
Kind regards
David
Applications Engineer
National Instruments UK
Attachments:
daqmx task.vi ‏32 KB

Similar Messages

  • DAQmx : How to Trigger camera and AOTF

    Dear,
    I have a camera sCMOS and an AOTF that i want to trigger.
    I have attached the description of the camera acquisition sequence.
    I want to sent a digital pulse (only one pulse because I want to acquire one picture only) to the camera via the EXT/SW Trigger input of the camera and get the FIRE output of the camera which will trigger the AO lines connected to the AOTF. I have a NI PCI 6733  with 8 AO and 8 Digital line
    I am very new in DAQmx and  I do not know how to proceed. Please help me. The best should be, if it is not to much, to send the correponding vi to me.
    Thanks by advance
    mnemo15
    Attachments:
    External-SoftwareTrigger.PNG ‏11 KB

    Hi Mnemo15,
    Thank you for posting on NI's forum
    Which model is your camera and how is it linked to your computeur ?
    I think you can use daqmx example with Software Triggering (in the help menu of LabVIEW).
    You can set a digital pulse and use it as a trigger to acquire a picture (by wiring this pulse to the daqmx triggering vi).
    Then when you got your picture, you can start your AOTF by using the Fire output signal of your camera as a trigger.
    I hope I understood each step of what you want to do.
    Regards,
    Vincent.O
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Été de LabVIEW 2014
    12 présentations en ligne, du 30 juin au 18 juillet

  • How to start and stop an embedded sound

    I'm putting a sound of a cat purring in the intro to my animation. I've been asked to make it possible for viewers to turn the sound on and off with buttons. I can do it with an outside sound file by using URLRequest.
    Is there a way to start and stop the sound if it is embedded in my library? If so, can someone give me that script.
    TIA

    Hello mnemo,
    You can use your digital signal to stop your generation with the following property node
    DAQmx-Triggering
    Regards.
    Jean-Baptiste C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Téléchargez dès maintenant toutes les présentations techniques !

  • Pretrigger delay

    I need to acquire analog signals with DAQmx triggered by digital edge. I need a pretrigger as well.
    Everything works fine, the DAQ assistant made the code for me ...
    The only problem I saw is the following:
    - I set a pretrigger of 1000 samples and my sample rate is 1000 samples/sec.
    - I call the DAQmx Start Task.vi
    - I raise the digital edge (connected as trigger) without waiting the pretrigger time (1 second)
    - the acquisition starts but I don't see pretrigger samples.
    This is quite obvious (I should let the DAQ board to acquire the pretrigger samples before starting acquisition), but:
    - how can I automatically get an error if that occurs?
    - how can I wait time until the DAQ is ready to acquire?
    That's it.

    I tested the behaviour on a 6251 board and still everything works fine.
    Here is what I did:
    - Configured the Reference trigger to come from a digital line --> DIO7 for example
    - Sampling rate is set at 1000 S/sec
    - Configured 1000 pretrigger samples --> this gives me 1 second before the trigger is recognized
    - Set total number of samples to 3000 --> the acquisition keeps going for 2 seconds after the trigger is sensed
    I have started the acquisition and after 250 ms I fired the trigger. All I see is the acquisition that is not returning because it is waiting for a digital trigger to occur
    If I then, during the same session, fire a trigger well after 1 second since the application started, I then wait 2 seconds and the acquisition returns the 3000 samples.
    If you try this(using a digital line as the trigger)and still have the same problem, then get in touch with us as we might want to discuss the possibility of testing your board.
    AlessioD
    National Instruments

  • Preventing false trigger in S series Device

    I have a PXI 6133 and currently have a task set up to begin with an analog edge trigger, however the line experiences a fair bit of noise due to solenoid power lines. I know that some other devices are able to use the minimum pulse width option in the daqmx triggering property nodes, but as far as i can tell S series devices don't. Does anyone know of a work around for this.

    Hi fchacon,
    One approach may be to reduce the environment-induced noise in your system. The Field Wiring and Noise Guide and these Five Tips could be a good starting point for you. 
    Another possible option is using an Analog Edge Reference Trigger that accounts for the noise in your system. This may allow you to set a trigger higher than the desired level, but incorporates the noise from our environment.
    Briana C.
    Applications Engineer
    National Instruments
    ni.com/support

  • How to trigger on Falling Edge?

    Hello,
    I could not find any example on Falling Edge trigger Acq. for 6534 or 6110. Can anybody tell me how to trigger on falling edge, or for that matter even specify which edge to trigger on?
    Dhruvish

    There are some great NI-DAQmx triggering examples that install into LabVIEW 7.0 or newer when NI-DAQ is installed (as long as you include support for your LabVIEW version when installing NI-DAQ). With the release of NI-DAQ 7.4, both of your devices are supported by NI-DAQmx, so I would definately recommend using the DAQmx API. In LabVIEW, go to Help>>Find Examples. For your analog board (6110), navigate to Hardware Input and Output>>DAQmx>>Analog Measurements and maybe take a look at Acq&Graph Voltage-Int Clk-Dig Start.vi. For your digital I/O board (6534), go to Hardware Input and Ouput>>DAQmx>>Digital Measurements and try Read Dig Chan-Int Clk-Dig Ref.vi. Both of those examples has a control on the front panel that allows the user to select whether he/she wants to trigger on the rising or falling edge of a digital signal. Hope this helps!
    -Alan A.

  • Doing something the DAQmx way that doesn't fit? (Triggered counter on PXI 6608)

    Hi,
    I want to create a counter with my PXI6608 that is triggered with an external input, then counts up. I then want to be able to read the count in LabVIEW and hence determine the time since the trigger. I have achieved this before with old-style code, but it is not clear how to do it the DAQmx way. In particular, I can't create a task because what I'm looking to do doesn't seem to fit in with any of the pre-envisaged DAQmx task templates.
    Can anyone help? I'm assuming there's some way to create an 'empty' DAQmx task so I can fill in the details with property nodes?
    Cheers
    Lee
    Solved!
    Go to Solution.

    You'll want to make an edge count task and set the source to be one of the internal timebases using a DAQmx property node (set it before starting the task):
    The trigging functionality you're looking for is called an "arm start trigger" in DAQmx.  It's configured through a property node (also before starting the task):
    I'm not sure what you're getting at with regards to the "empty" DAQmx Task.  Typically you'll use the standard API to set typical properties and the property nodes for more advanced functionality so you'll end up with a combination of the two.  In many cases you could replace the DAQmx API with property nodes (for a fun example of this, open up the DAQmx Timing VI), but odds are you might be forgetting something important so I would always suggest using the VIs and then tacking on property nodes for additional functionality when necessary.
    If you're using LV 2012, this example should get you started (or if not, the picture still shows you what the task would look like).
    Best Regards,
    John Passiak

  • LabVIEW sequencing DAQmx, setting outputs on input triggers

    I am still learning labVIEW.  I am an engineer in a mechanical test lab and I am currently working on a test.
    The test needs to run through a sequence controlling a stepper motor, sensing when a touch screen is activated, and write load cell DAQ to a file.  This needs to repeat as much as 1,000,000 times.  It is a cycle test.
    I have been working on learning labVIEW for the past month and it has gotten me pretty far but I am having trouble with tying together my first VI for an actual test to be performed in the lab.
    My biggest constraint is:
    I don't understand how to set an ouput to a level (HIGH/LOW) at the condition of a rising/falling edge of a input.  This pertains to how the stepper motor and touch screen works.  I want to set an output to high to extend the motor and wait until it activates the screen which will send a digital high input.  I want to collect DAQ at this point then set a second output to hight that will retract the motor to a 'home' position.
    I have attached photos of my setup, a diagram of how it is wired (hand drawn), and two VI files.  Both VI files don't work since I don't know how to 'tie' everything together and control an output when an input edge is triggered.
    Load Cell VI_V2 uses DAQ Assistants to sequence through.
    000_Touch_Screen.vi uses DAQmx which are seperated into operations that I want to sequence.
    Any thoughts on best method for a newbie?
    Thank you in advance for any help!
    Attachments:
    Xerox IS_MP_001.pdf ‏126 KB
    000_Touch_Screen.vi ‏23 KB
    Load Cell VI_V2.vi ‏268 KB

    Your application should be written using state machine as discuss in http://www.ni.com/white-paper/3024/en. One of a very good example could be found in https://decibel.ni.com/content/docs/DOC-8596.

  • How to use and configure DAQmx software triggering in Labview 7.0

    Dear NI support staff,
    I want use to software triggers to start and stop acquiring an indefinite amount of analog samples (as opposed to a fixed number of N samples in most of your code examples). I don't know the correct way to configure the DAQmx property nodes and the DAQmx send software trigger VIs. In the property node VI it doesn't seem to have an entry for software trigger. So I think I am not on the right track. Would you please help me out? It would be great if you can show me an example. Thanks a lot!
    Regards,
    Bennett

    Hello Bennett,
    The example below demonstrates how to perform an analog software triggered acquisition in NI-DAQmx. The example allows the user to specify the triggering condition and the number of pre-trigger samples to acquire.
    Example Code - Triggering
    Let me know if you have further questions.
    Good luck and have a great day!
    Regards,
    Koninika
    Applications Engineer
    National Instruments

  • Synchronization - DAQmx not triggering

    I have worked with labview 8 for a little while & have never used it for synchronization. We have a PXI1042 chassis connected to the computer using 8331. 6723,5122,5412 need to be synchronized & I am using the clock from 6602 as a trigger for this. The application requires the DC outputs to be at changing levels from each of the 20 channels and at certain points the AWG & Digitizer have to get triggered with a certain microsecond delay. This accuracy is key to the application. All components are working  except for the synchronization bit. The problem I am having is that the DAQmx is not reading the pulse from the source line to get triggered. On the other hand, if I try to make the a/o the source, I can't seem to configure the DAQmx to send out a trigger either. Any ideas on how this can be accomplished would be greatly appreciated!!
    Thanks!
    Sue

    Hello Sue,
                Can you elaborate on what product isn’t triggering properly. Is this the 6723 that’s not triggering correctly. The others are supported by NI-FGEN and NI-SCOPE. Do you have the trigger signal sent over PXI_STAR and have the devices triggering off the signal on that route? It sounds like you are never receiving a trigger on the 6723. Are the other devices receiving the trigger correctly? Are both the trigger and clock coming from the 6602 and PXI routes?
                The only recommendations are to be certain that the cards are triggering correctly on their own, to be sure there is no hardware problem. Hopefully we can get this settled soon.
                The link is a great reference to synchronization with DAQmx. You may be beyond anything here, but maybe it can be helpful in localizing the error.
                Regards,
                            Chris

  • Triggering DAQmx from a GPIB device

    Hi,
    We have a GPIB device that sends out trigger signal to the computer, and we want the DAQmx card (PCI-6052E) to listen to that trigger signal. We tried doing this:
    m_referenceTriggerEdge = DAQmxAnalogEdgeStartTriggerSlopeRising;
        try
            // Create the voltage channel
            m_task->AIChannels.CreateVoltageChannel(channelName, "",
                static_cast<DAQmxAITerminalConfiguration>(-1),
                minimum, maximum, DAQmxAIVoltageUnitsVolts);
            // configure the internal clock
            m_task->Timing.ConfigureSampleClock("", rate, DAQmxSampleClockActiveEdgeRising,
                DAQmxSampleQuantityModeFiniteSamples, samplesPerChannel);
            // Set up the start trigger
            m_task->Triggers.StartTrigger.ConfigureAnalogEdgeTrigger(triggerSource,
                m_referenceTriggerEdge, triggerLevel);
            m_task->Triggers.StartTrigger.AnalogEdge.Hysteresis = hysteresis;
            (omitted a few graphing codes in between)
            // Begin the reading or whatever
            m_reader = std::auto_ptr<CNiDAQmxAnalogMultiChannelReader>
                (new CNiDAQmxAnalogMultiChannelReader(m_task->Stream));
            m_reader->InstallEventHandler(*this, OnEvent);
            m_reader->ReadMultiSampleAsync(samplesPerChannel, m_data);
    By default, triggersource is set to "PFI0" and triggerlevel is set to "1.00". The result, however, is rather peculiar: There will always be a 200284 error, unless the triggerlevel is set to "0" while its previous run is set to "1". In other words, if first run the acquisition using triggerlevel "1", which would still give the error, but then if the next one is set to "0", DAQ sees the trigger. However, if one continues to run using triggerlevel "0", the subsequent runs will give the error. Where did we do wrong?
    Also, is there a way to use Measurement and Automation to measure the trigger signal coming cross GPIB?
    Thanks,
    Jim

    Hi Jacob,
    Thanks for the reply! The error message is as followed:
    Some or all of the samples requested have not yet been acquired.
    To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger,  make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
    Property: CNiDAQmxStream::ReadRelativeTo
    Corresponding Value: DAQmxReadRelativeToCurrentReadPosition
    Property: CNiDAQmxStream::ReadOffset
    Corresponding Value:
    Task Name: aiTask
    Status Code: -200284
    And the rest of the default parameters are below:
    minimum = 0.000
    maximum = 10.000
    samplesPerChannel = 1000
    rate = 1000
    hysteresis = 0.00
    Thanks,
    Jim

  • Daqmx "Done" event not triggering event structure

    I would like the user to be able to abort my daqmx task by pressing a button.
    I am attempting to use the method in this VI:
    https://decibel.ni.com/content/docs/DOC-15815
    It utilizes an event structure with the daqmx Control Task VI to abort.
    The example VI above works for me, on my system with my USB-6356 device, as expected.
    When I attempt to incorporate the same method into my VI it does not--despite having an identical arrangement, so far as I can tell.
    I believe that my problem lies with the event structure, and the dynamic registration.  I am unfamiliar with this and must be using it incorrectly.
    I have attached my VI, though it is cumbersome.  The code which I am struggling with is in the "Acquire" case.  As far as I can tell, I am doing exactly the same this in this particular case as in the example mentioned.  Yet in the example, the event structure completes, or aborts, whatever you want to call it, right after the "Wait Until Done" VI executes.  In my own VI, the "Wait Until Done" and "Clear Task" VIs execute, but the event structure does not register it.
    Here are my specific questions: is there anything extra or special that one must do in order for the Task to properly trigger a "Done" event and pass through the event structure?  At what point is the daqmx task "Done"? 
    thanks,
    Matt
    Attachments:
    BoomTubeMain.vi ‏175 KB

    natasftw,
    My event structure is identical to theirs; what you are seeing are the two different cases that exist in the event structure.  In both the example and the VI, there is a <task out>: Done and a "Dynamic Event": Value Change.  In the dynamic event case, I have my abort button and relevant code--this I believe is the code you were referring to, which you thought I was missing...  Regarding my multiple event structures, they should operate completely independently as they respond to different events.

  • Triggering With DAQmx

    Hi,
    I have a PXI-7344 and PXI-4462 and use LabView 7.0. I would like to automate data acqusition of an analog voltage signal with the stop and start of a short one-axis move. I am trying to use breakpoints to accomplish this with the RTSI 0 line. However, I receive an error (#89139 at DAQmx start task.vi). It lists the  possible reason that "there are no shared trigger lines between the two devices that are acceptable to both devices".  Any idea what's going on here? I've configured this application multiple ways. Any advice on how to set this up or trouble shoot would be appreciated. VI attached.
    Thanks,
    ROB
    Attachments:
    sample for NI.vi ‏169 KB

    This error could happen if you don't identify the type of your PXI chassis in MAX. Please follow the steps in described in this document from our knowledge base.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • PCI-6602 Triggered event counting DAQmx

    Hi
    I'd like to use simple event counting using PCI-6602 (DAQmx) with an internally generated trigger pulse.
    But I don't know how to figure out the error message when I use DAQmx Start Trigger.vi
    Thanks
    Kyu Young
    Attachments:
    EventCountingTrig.vi ‏21 KB

    I'm sorry. I've solved it.

  • How to count number of NI digitizers installed [NI-DAQmx Base]

    I'm the author of a cross-platform scientific data acquisition/analysis program (C++ using Qt: Windows and OS X). I'm just getting started on adding support for NI digitizers. It's tougher than I was expecting - there's so few helpful code examples. On Mac OS X I'm stuck with NI-DAQmx Base. I'd be very grateful if someone could help me with a couple of basic questions...
    1) How do you determine if the computer has an NI digitizer installed?
    1a) Is there a way to count the number installed?
    2) How do you synchronize things so that the input and output streams start at the same sample point?
    Thanks,
    John.
    Dr John Clements
    Lead Programmer
    AxoGraph Scientific

    Hi John,
    DAQmx base does not have property nodes, therefore we cannot
    programmatically determine information about the cards. We typically refer to
    our high-speed scopes (51xx series) as digitzers, in which case, there are no
    drivers for MAC. Our other DAQ cards, E-Series (60xx) and M-Series (62xx) work
    with DAQmx base according to the readme.
    If you are using a DAQ card, I would like a bit more clarification about question 2. When you say start at the same sample point, do you mean start simultaneously so that the input and output start at the exact same point in time? If so, I may suggest triggering them both off of the same digital line.
    David L.
    Systems Engineering
    National Instruments

Maybe you are looking for