Timeout for analog trigger

I've written a C program to control my PCI MIO 16E4 Daq Board using
asynchronous function.
The trigger is defined in Configure_HW_Analog_Trigger and the
aquisition is done with DAQ_Start.
I want to set a timeout to avoid the board waiting too long for the
trigger to occur but the only NIDAQ function that I've found in NIDAQ
is Timeout_Config which is used for synchronous function only.
Any help appreciated.
Greetings.
Claudio

You are likely to get more responses to this question if you post in the Multifunction I/O category rather than the LabVIEW category.
I am also not seeing a timeout parameter for the asynchronous NI-DAQ functions, but there are ways to implement a timeout scheme. In the DAQsingleBufAnalogTrig.c example, you see that they call DAQ_Check in a loop to get the status of the analog operation. You could set your program to loop a fixed number of times and if the acquisition is still not finished and the number of retrieved samples is 0, you can conclude that a timeout has occurred. Or instead of setting a fixed number of loop cycles, you could keep track of the time elapsed using the Timer functions provided by your compiler environment.

Similar Messages

  • Monitor multiple channels for analog trigger with DAQmx drivers

    Hello! I would like to start a data acquisition of multiple analog channels (16) from an analog trigger. I would like trigger to monitor four of the (same) channels, and trigger when any one of them reaches a certain voltage. I found an example that would work with the Traditional DAQ drivers (using occurances), but can't figure out how to do something similar in DAQmx.
    Time is also an issue, as I would like to collect the first 80 milliseconds of data after the trigger (at a rate of 500,000 Hz).
    I'm using LabView 7.0 and collecting data off of two PXI-6133 cards.
    Thanks for your help!

    Hi Denise-
    After some research, I have found that it is not possible to use the functionality of DAQ Occurrences in DAQmx. Ironically, the reason that this functionality is available in Traditional and not DAQmx is due to the exploitation of an inherent limitation of Traditional that was upgraded in DAQmx. The multi-thread capability of DAQmx is a major advantage for most applications, but in this case it prevents the use of occurrences as they existed in Traditional DAQ.
    In short, this means that you can't directly use this functionality in DAQmx. You can however emulate this functionality with minimal software analysis of the incoming signal. I have attached a modified example VI that logs data to a chart only when the analog level of one of the channels being measured has exceeded a user-defined reference value. Basically, the task is running continuously in the background but the data is not actually logged until the signal is above a predetermined "trigger" level.
    Please let me know if the attached example is helpful for your application. You will see the input channels listed in the format "DevX/ai0:y" where X is the device number and y is the highest channel number of interest.
    Regards,
    Tom W
    National Instruments
    Attachments:
    Cont Acq&Graph Voltage-Int Clk Analog SW Trigger.vi ‏83 KB

  • I use a PCI MIO 16E board with an analog trigger. So I wire chann

    el 0 to the PFIO line, and I enter "PFI0"as the triggering channel on the front panel , I put a level,and I declare channel0 and 1. When I do a DAQ it seems that PFI0 detects the signal as I haven't a timeout, but it doesn't trigger off at the good level.

    el 0 to the PFIO line, and I enter "PFI0"as the triggering channel on the front panel , I put a level,and I declare channel0 and 1. When I do a DAQ it seems that PFI0 detects the signal as I haven't a timeout, but it doesn't trigger off at the good level.I noticed you posted an earlier question that generated several responses about the valid sources of an analog trigger. Was there a reason you decided to use the PFI0 option over just telling LabVIEW to use Analog channel 0 as the trigger source? At what voltage level are you wanting to trigger?
    Also, if you use the Analog Trigger examples in LabVIEW or the DAQ examples for your compiler, do you get better results?

  • PCI 6025 analog trigger capabale?

    Hello
    Is the PCI 6025 capable of being triggered by an analog signal? I get this
    error while running the demo program
    error -10403 deviceSupportError The specified device does not support the
    requested action (the driver recognizes the device, but the action is
    inappropriate for the device).
    Thanks
    lvilla

    Thanks I found the example for CVI and is sure works. One moe thing, If the
    function times out the system becoms sluggish. Is there a way to increase
    this timeout value?
    Thanks
    LVilla
    "Filipe A." wrote in message
    news:[email protected]..
    > Ivilla;
    >
    > That device you have doesn't support such operation.
    > What you can do to workaround that fact is to configure the DAQ task
    > to do Conditional Retrieval. That is sort of an analog trigger, the
    > difference is that the NI-DAQ driver compares the input values to the
    > specified trigger level, as opose to the hardware, as it is on boards
    > that supports analog trigger.
    >
    > That would make the acquisition a little slower, since every point
    > needs
    to be checked by the driver. If you need faster acquisition than
    > that, you will need to purchase a board with analog trigger
    > capabilities.
    >
    > Hope this helps.
    > Filipe A.
    > Applications Engineer
    > National Instruments

  • How can I set up a delayed analog trigger on PCI 6115 DAQ

    I have an S-Series PCI 6115 DAQ which I’m running with Labview. I’m using it to measure signals from an acoustic emission sensor and two force transducers. I’d like to set up a delayed analog trigger which will start acquisition on all three channels a period of time after a selected channel’s voltage exceeds a threshold.
    Currently I’m using the AI Config VI in line with the AI Start VI and AI Read VI to capture data after a analog hardware trigger occurs. A software trigger probably wouldn't work because I have to sample my data at 10MS/sec. My setup works fine for triggering without any delay or skip counts. However, if I set the delay or skip count in the additional trigger parameter field of the AI start VI, there is no effect, and the device still starts capturing data immediately after the trigger is received. What is the cause of this, and how can I get around it?
    Also, is it possible to sample the channels of a PCI-6115 DAQ at different rates? Right now, I’m sampling all my channels at 10MS/sec and throwing away data on all channels except one. However, this seems relatively slow and eventually I would like to attempt pseudo-real time control using my data.

    rpursley8 is right about needing to get the counters involved if you want a hardware timed delay in your application.
    Concerning whether or not you can sample at different rate, check this document out.
    Sampling Different Channels at Different Rates with NI-DAQmx
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How to take a single data point for each trigger pulse ( synchronou​s acquisitio​n).

     hi
              im using the pci-mio-16E1 card, with the IDE VC++, so  im looking for an example to explicate me how to make an synchronous acquisition data using an external timing, so the idea is to acquire (take) a single data point for each trigger pulse  from one  input channel ,and saving  the data in a file .
    now im making a code using the AI_setup and DAQ_op functions, im getting  a speed acquisition (it is the start of acquisition data), and  it is  a synchronous acquisition just for one trigger pulse, and me i looking for an acquisition for each trigger pulse. 
      so to  understand my problem you can see my code :
    iStatus = Timeout_Config(iDevice, lTimeout);
             iRetVal = NIDAQErrorHandler(iStatus, "Timeout_Config", iIgnoreWarning);
       //  configuration and selection of  signal trigger  
             iStatus = Configure_HW_Analog_Trigger(iDevice, ND_ON, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
            iRetVal = NIDAQErrorHandler(iStatus, "Configure_HW_Analog_Trigger", iIgnoreWarning);
      iStatus = Select_Signal(iDevice, ND_IN_CONVERT, ND_PFI_2,ND_HIGH_TO_LOW);
             iRetVal = NIDAQErrorHandler(iStatus, "Select_Signal", iIgnoreWarning);
        iStatus = AI_Setup(iDevice, iChannel, iGain);
       iRetVal = NIDAQErrorHandler(iStatus, "AI_Setup", iIgnoreWarning);
       while ((iReadingAvail != 1) && (iStatus == 0)) {
     /* Wait until reading is available. */
             iStatus = AI_Check(iDevice, &iReadingAvail, &iReading);
            iRetVal = NIDAQYield(iYieldON);
           //  Acquire data from a single channel 
        iStatus = DAQ_Op (iDevice, iChannel, iGain, piBuffer, ulCount, dSampRate);
       while ((iDAQstopped != 1) && (iStatus == 0)) {
            iStatus = DAQ_Check(iDevice, &iDAQstopped, &ulRetrieved);
            iRetVal = NIDAQYield(iYieldON);
           iStatus = DAQ_VScale(iDevice, iChannel, iGain, dGainAdjust, dOffset,ulCount, piBuffer, pdVoltBuffer);
          iRetVal = NIDAQErrorHandler(iStatus, "DAQ_VScale",iIgnoreWarning);
       /* Set analog trigger mode back to initial state. */
           iStatus = Configure_HW_Analog_Trigger(iDevice, ND_OFF, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
      /* Set PFI line back to initial state. */
           iStatus = Select_Signal(iDevice, ND_IN_START_TRIGGER,ND_AUTOMATIC, ND_DONT_CARE);
              iStatus = DAQ_Clear(iDevice);
     /* Plot acquired data  */
          iRetVal = NIDAQPlotWaveform(pdVoltBuffer,ulCount, WFM_DATA_F64);
    so this is the data acquired -0.900879,-0.900879,-0.900879,-0.900879,-0.900879,​-0.900879,-0.900879,-0.900879 and i think that is a noise because all time i get this data.
    tank you very mutch fo your help

    Hello,
    Please see the responses to this thread at the following post.
    http://forums.ni.com/ni/board/message?board.id=250​&message.id=13686
    Also, please only post one thread per issue.
    Regards,
    Sean C.

  • Negative analog trigger voltage

    Hello,
    I am currently working on a program in Labview 6.1 with two E-series devices acquiring data simultaneously.  I am currently using a analog channel to trigger the acquisition.  My application uses a signal that has both positive and negative voltage sources.  Right now, when I set a voltage, the devices wait until the voltage level is reached before acquiring data.  Well, if I am relying on a voltage that is always going to be negative, that value will never be reached.  I guess I need to take the absolute value of the voltage coming from the trigger channel and then trigger if the absolute value reaches a preset value.  Can anyone help me with this?
    Thanks a lot,
    Taylor

    Taylor,
    Since you are using an analog trigger, you should be able to set the analog level in the AI Start vi.  I have attached a vi with just the AI Start.vi and the needed settings for what you are trying to accomplish.  Let me know if this helps.  Thanks and have great day!
    Regards,
    Lon
    Attachments:
    Trigger Config.vi ‏19 KB

  • Start Counter Output on a Analog Trigger in the PCI 6259 Mseries board

    Hi,
    My question is regarding how to use Analog Triggering to start a counter in the PCI 6259 M-series board.
    I have attatched a program here
    'Mult_Device_Digital_Analog_Out_on_Analog_Trigger.​vi'
    and I'll explain my problem regarding this program.
    I've tried to include all the details about the program in the documentation for the VI, but what the program
    does is essentially output a set of digital and analog patterns as specified by an end user, and at times
    specified in the front panel.
    Problem 1.
    I wish to start the whole operation on a analog trigger signal, in the program its the boolean "Line Trigger",
    but I get an error saying that trigger type is not supported, when the M Series board manual clearly says it can be done.
    Is there something wrong with my program ?
    Thanks.
    Shomu
    Attachments:
    Programs.zip ‏101 KB

    Shomu
    Admittedly, it might take a little time to find the documentation, but it is there. Also, the error you are getting indicates the proper trigger signals to use. In the help look at the analog Triggering Considerations for E Series, M Series, and S Series.
    With that being said the easiest thing to do is to setup an Analog Input task configured to start on an Analog Trigger. Then, setup a digital edge trigger for the Counter task. The signal you are going to want to look for is the Analog Comparison Event. This signal won't show up by default in the list. What you need to do is right click on the trigger source constant or control and select I/O Name Filtering. Then check Include Advanced Terminals. Once you have done this you can select the Analog Comparison Event
    StuartG

  • Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?

    I would like to start several PCI 4472 and a PCI-MIO-16E-1 simultaneously. All boards are connected via a RTSI cable.
    My program works fine if I use software trigger, or an analog trigger from a PCI4472 channel. However, the analog trigger works only when I set pre-trigger (or pre-scan) to 0.
    Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?
    Thanks.
    Ian Ren

    Hi, Bill
    I think it is possible to set more than 38 pre-trigger scans on a single 4472 card. I've done this before. You can verify this by running the Labview example "Acquire N - Multi-Analog Hardware Trig.vi" which comes with LabView.
    What I try to do but without success/luck so far is to start data acquisitions of several 4472 cards and a PCI-MIO-16E-1 card using an anlog trigger (with pre-trigger).
    Thanks for your help.
    Ian

  • Acquiring 4 channels at 10kHz using PCI-6070E card and Labview 7.0. I need to average a signal that is time-locked to an analog trigger. Is their an available vi to accomplish this?

    I am acquiring 4 channels of data, sampling at 10 kHz. I am using a PCI-6070E board. I need to average a biological signal time-locked to an analog trigger that occurs at about 3/second. Is there a vi that will accomplish this?

    If you are looking for a way to do a "retriggerable" acquisition, there is a shipping example called Acquire N - Multi-Analog Hardware Trig.vi that accomplishes this. However, please note that this example achieves this effect by reconfiguring the task for each trigger in software. This means there is a delay between reconfigurations. If a trigger signal comes during this reconfiguration, it will be missed. This delay is system dependent on how fast your computer can execute the reconfiguration code. The 6070E does not support hardware retriggerable acquisitions.
    However, if you are wanting to acquire continuously and then do some post-acquisition analysis, I couldn't find any examples that accomplish this, but it wouldn't be too hard to build one yourself. Y
    ou would probably want to include your trigger signal as an additional input channel. Then once you've acquired all of your data, in software you can scan through the data acquired for the 5th channel and then segment your data according to that signal. I hope this information helps.

  • Can PCI-6023E support hardware Analog trigger

    I try to use the PCI-6023E to do the hardware analog triggering, but it gives me the Error-10403 while I test with the vi example, Aiacquires N Scans Analog Hardware Trig.vi. Is there any way for this board to do the hardware triggering?

    Jack,
    The PCI-6023E DAQ board only supports digital triggering. You can check all the features of this board in the Data Sheet and Specifications on the Catalog page (see link below)
    2002 Catalog - PCI-6023E
    http://sine.ni.com/apps/we/nioc.vp?cid=1063〈=US
    If you need to perform analog triggering, you have three options:
    1) You can simulate it by acquiring continuosly all the signals that you want to monitor including the one that acts as the analog trigger. Compare the value read from this last one with the boundary that is supposed to trigger the acquisition, and when the value read reaches this boundary, you can save or display the data from all your channels.
    2) You could implement an external circuit that will compare the analog trigger signa
    l with the boundary value, and when they coincide, will generate a digital pulse that you can use as a digital trigger. This option optimizes your CPU usage.
    You can find detail information on how to set up the digital trigger in Chapter 4>>Timing Connections of the User Manual linked below.
    6023E/6024E/6025E User Manual
    http://digital.ni.com/manuals.nsf/websearch/0C88F40FFE7F28CD862569AE00574AC1?OpenDocument&node=132100_US
    3) Finally, you could get one of our boards that supports analog triggering. The PCI-MIO-16E-4 board has similar specifications that the PCI-6023E, and it has some additional features as well. See link below for more information.
    2002 Catalog - PCI-MIO-16E-4
    http://sine.ni.com/apps/we/nioc.vp?lang=US&cid=10795
    Good luck with your application,
    Claudia Lorente
    Applications Engineer
    National Instruments

  • Stop trigger, how to specify the analogy trigger channel?

    Dear All,
    In fact, I am using DAQ2204 cards from ADLINK, which is more or less equivalent to NI E-series muttifuntion board. However, I have some problems with regard to my data acquisition program. Basically, it is about a middle/stop trigger application, which means data acquisition will be starting once the specified analogy channel (for example, channel 0) exceeds a prescribed value.And, data both before and after trigger will be acquired. However, I do not quite understand how to physically make the I/O connection and specify the analog trigger channel and level.
    According to the board User's Guide, 'SRC1 can be used for all trigger modes while SRC2 can only be used for post and delay trigger modes'. I have come across similar description with NI examples before. It would therefore be very appreciated if anybody can help. Thanks in advance.

    Hi dragondriver,
    I'm providing below links to 2 documents that discuss wiring considerations that are applicable to your device.  Hopefully this information is helpful!
    E Series User Manual
    http://www.ni.com/pdf/manuals/370503k.pdf
    Field Wiring and Noise Considerations for Analog Signals
    http://www.ni.com/white-paper/3344/en#toc5
    Josh B
    Applications Engineer
    National Instruments

  • Ex stream to disk analog trigger

    Dear NI engineering,
    i'm using the example program called "Stream to disk" with a PCI 5112. I was wondering, can i use an analog trigger in place of the software one (like i have done in the vi i have attached here).
    This is because i'm trying to synchronize a PCI 5412 and PCI 5112 (by using two different vi).
    Moreover i saw also the example from your website called "3784.vi" (i have attached it here), but when i start it, it does not do anything. How come?
    Thanks a lot for your help,
    kind regards,
    Gianna
    Attachments:
    niScope EX Stream to DiskTEST01_analog_trigger.vi ‏49 KB
    3784_DOES NOT WORK.vi ‏27 KB

    Hi ,
    I think that this forum is the same as the  SR 7354392 in the mailbox of National Instrument. So I think that I can close this forum and you can follow me in that SR.
    Regards,
    Hossein

  • Analog Trigger with PXI-6229

    I have an application using a PXI-1010 chassis, PXI-6229 DAQ, communicating with MXI-4 to the host computer.
    For task triggering, the only direct option I'm finding is the digital trigger. However, I need to trigger on a low-lever analog signal (180mv). Can this be accomplished indirectly and start the task with a minor delay? If I can trigger the signal on the positive slope, I could have potentially a 1ms delay to begin the task and not affect my data.

    Hello Russ,
    The M Series 6229 should be able to support hardware analog triggering. Take a look at the following example to see how to accomplish this in LabVIEW.
    http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=DC9C549F7FDC1973E034080020E74861&p_node=DZ52000&p_rank=&p_source=External&p_submitted=N
    If this doesn't work out for you and you don't mind having a delay between the low-level analog signal and the start of the task, you could always use a software analog trigger. Examples of this can be found in the LabVIEW NI Example Finder.
    Take care,
    E.Lee
    Eric
    DE For Life!

  • Hardware Analog Trigger on MIO6052E

    Hi,
    I am using PXI-MIO6052E for 8 analog inputs as differential. Two analog inputs are requiring very time-responsive actions in case of exceeding certain limit values. So on the moment of exceeding limits, I would like to have the signal to do my works as required.
    According NI's Function Reference,I would like to use Configure_HW_Analog_Trigger and Select_Signal.
    Any idea or help concerning these function will be appreciated.

    Hello,
    Here is an example program that ships with DAQ and is installed when you choose to install the support for CVI or Visual C++ from the NI-DAQ installation process.
    It illustrates how to setup an Analog Trigger.
    Attachments:
    daqsinglebufanalogtrig.c ‏6 KB

Maybe you are looking for

  • Bonjour no longer an option

    Hi there, This morning I received a new cable modem from Shaw, my ISP. Since I received the new modem, though, I've had great difficulties with what once was a problem-free setup. My cable modem is plugged into a D-Link Ethernet switch. Both my Airpo

  • An error occurred during creation of the central repository. (BODI-300020)

    I am trying to create a central repository for Data Service, the following error appear Creating repository... (BODI-300026) Reading SQL file <C:\BO\DataServices_12\admin\repo\MSSQL\ms.sql>. (BODI-20001) Executing SQL file <C:\BO\DataServices_12\admi

  • Got home wifi again

    What did it cost? A new router (got the Apple Airport Extreme). Even though DH's new iPod Touch was able to access our home wifi my 3 month old iPod Touch (same model and memory size) stopped being able to access it as soon as I d/l 3.0 OS. We kept h

  • Mac os x version 10.5.8 safari not working

    mac os x version 10.5.8 safari not working Process:         Safari [665] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         5.0.6 (5533.22.3) Build Info:      WebBrowser-75332203~3 Code

  • What is about:blank and how do I get rid of it ?

    When I put an address in my search browser about:blank comes on and the page doesn't so I would appreciate any help in getting rid of this!