Delay trigger

Hi,
I am trying to program a Labview application.  The application monitors an analog signal.  After the signal reaches a given threshold the VI should send a digital pulse after a user specified delay.  In the attached wire diagram, I simulate the input trigger with the lower loop.  Once the counter of this loop reaches 100 it notifies the main loop with the trigger signal.  The main loop then generates a digital pulse after the given delay (delay in millisecond control).  I think I have the logic right but was wondering if there was a more efficient way to do this.
thanks
Azim 
Solved!
Go to Solution.
Attachments:
delayedTrigger_vi.jpg ‏275 KB

Hi zimR,
      Thank you for the Kudos!
Your message suggests that there might be another way to proceed without using a notifier. could you explain?  
Also, I notice that in the loop that waits for notification you wired the error terminal of the wait on notifier node to the case structure instead of the notification terminal.  Can you explain why you wired it this way.
I don't know why, but I thought you might need to re-trigger - in which case the Notifier method seemed to introduce a potential response latency, necessitating a different approach!
In my example the Notifier is being used to:
1) communicate an event (though we don't care what value - True or False - is sent!)
2) terminate the top loop when Notifier is destroyed (in bottom loop)
3) prevent execution of pulse when [top] loop is stopped (by Notifier destroyed)
But since we don't need to re-trigger, the top loop goes away!  So point 2) is moot and point 3) is of questionable value.
The attached example uses the Occurrance to communicate trigger-event instead of a Notifier - see warning-note on diagram!
Cheers!
Message Edited by tbd on 12-12-2008 01:19 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Attachments:
DelayedPulse_Occurrance.vi ‏16 KB

Similar Messages

  • Error 1074396154 received during delayed trigger.

    I am using a GigE camera to capture an image and then check for a hole using IMAQ Find Circular Edge.  Each time the camera receives a trigger the image is captured and the while loop processes and the results are displayed.  If the trigger is delayed for more than about 5 seconds, I get Error 1074396154 (IMAQ Spoke - Image not large enough for the operation). 
    My understanding was the while loop would not try to process until a new image was received.  Is there possibly a setting which controls the while loop operation?
    Regards,
    Doug

    The Oracle database doesn't support the returning clause for database views using instead-of triggers. ADF BC inherently includes the returning clause, if in a relating EO you have the refresh-after-insert or refresh-after-update property set on for an attribute.
    Hope this helps.
    CM.

  • Using PXI 6251 counter to delay a trigger on PXI

    Hi at all,
    I need to synchronize some devices on an PXI chassis. Basic operation is a user waveform generation on a PXI5401 that routes the Trigger Signal for the generation to one of the PXI (RTSI) lines. I'd like to use this trigger signal to start a counter on a PXI 6251 counting the PXI 10MHz Clock. No problem so far ( at least none that I see What I need is a possibilty to set another sync signal as soon as a certain counter value is reached in order to use this signal as a delayed trigger signal. Is it possible? And how? I've taken a look at the LabVIEW Example finder, but haven't found an example yet...
    Thanks!
    Oli
    P.S. Using LabVIEW 7.1.1, NIDAQ7.4 and a PXI 1042 via MXI4
    Programming languages don't create bad code, programmers create bad code....

    Nathan,
    Thanks for your excellent solution. I'm ordering the Aux100 cable (9-Pin DIN to two BNC Female) to export the trigger signal from the PXI to the Device_2. I will test the program (Echo_Mode_PXI_5122.vi) to be sure it will be suitable for my application.
    Another problem, when my system is working on ultrasound Pulse-echo mode (Pulse_Echo_Mode_PXI_5122.vi), the input trigger must be set a delayed trigger acquisition (by setting the trigger delay to, for example 3µs) to remove the signal of power source. Could you please tell me how I can configure the digitizer in this case?
    Regards,
    John C.
    Attachments:
    Echo_Mode_PXI_5122.vi ‏49 KB
    Pulse_Echo_Mode_PXI_5122.vi ‏49 KB

  • Trigger alram delay on STM links.

    Hi Team,
    Problem description:
     Configuring delay trigger alram on STM Sonet controller to reduce Multiple flaps observed in STM1 links.
    Root cause shared by reliance:
    it was found that BB links are getting affected even in single fiber cut where the switching time is <50msec.On ring
    This is mainly due to path alarms (Path AIS,  RDI, LOP etc) that are appearing at the end interface .
    Path alarms raise during fiber cuts   & auto cleared after completion protection switching.
    This is an expected behavior of any SDH/SONET convergence network & has no adverse effect on end user services.
    Mitigation:
    In order to mitigate these short time path alarms during network convergence we need to configure delay trigger on Sonet controller.
    However we are not getting the command to configure the same.
    Here logs attached and need further suggestion on this

    See here http://forums.adobe.com/message/3447643#3447643
    Gramps

  • 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

  • How to sync and/or trigger NI-DAQmx devices in LabView

    I am using LabView 2009 with a cDAQ-9174 chassis that includes a NI 9263 analog out device and a NI 9222 analog input device. I've learned from the examples that I can sync the devices to the same sample rate. But I am looking to sync the devices such that the exact moment I start acquiring input data on a 9222 channel, the 9263 starts generating an output. Secondly, I am interested to know when using just this equipment, is there a way to very accurately trigger one device off the other with some delay. So in summary I am interested in two behaviors:
    1) Synchronize a 9263 output channel to a 9222 input channel, such that the start of a 9222 analog input measurement triggers a 9263 analog waveform output. and,
    2) Have the 9263's analog output start for example EXACTLY 100 samples (provided sample rates are synced) after the 9222 starts collecting data. In other words, a delayed trigger.
    I imagine this is preferably done in hardware such that no software delays occur. Is this possible using these devices? Or do I need some external clocking mechanism?
    Thank you!
    Solved!
    Go to Solution.

    Hi tzoom84,
    Going back to your original questions,
    To do 1) and 2), I don't think you need to use counters.
    The shipping example LabVIEW 2010\examples\DAQmx\Synchronization\Multi-Function.llb\Multi-Function-Synch AI-AO.vi is probably a good starting point for 1). (Possible problem: if you're using multiple AI timing engines at the same time, this example's assumption that the AI task has "ai/StartTrigger" is not valid. If this turns out to be an issue, you may need to replace Get Terminal Name With Device Prefix.vi with the DAQmx Trigger >> Start.Term property and add a call to reserve the task.)
    For 2), add the DAQmx Trigger >> Start.Delay and DAQmx Trigger >> Start.DelayUnits properties to the AO task:
    If you really do need to use counters, you can do so without the NI 9401 by using cDAQ1/_ctr0 through cDAQ1/_ctr3, which are internal channels: How do I Access Internal Channels on any DAQmx Device?
    Brad
    Brad Keryan
    NI R&D

  • Delayed Start with PCIe-6535B

    Hi 
    I need to delay the digital generation (around 10ms) after the trigger comes up on PCIe-6535B.
    This board does not have teh Start Delay feature and it does not have any counter to use for generating the delayed trigger. 
    Is there a good way to generate a 10ms delay on these boards apart from wrinting tousands of 0s in the buffer?
    thank you

    Hey,
    Since your board does not support the Start delay property node and there also no counters for generating the delayed triggers, writing 0s in the buffer is actually the easiest way to do this. If you really want to avoid doing this there is a possible workaround:
    Use your trigger to start generating a signal: for ex. A Boolean Array with False values and a True at the end (the number of false values will determine the delay). This Digital Output will work as a trigger for your actual digital generation (in this case for ex. Start Digital Edge Rising).
    Please let me know if this was helpful for you. 
    Kind regards,
    Andreea

  • CRS-1 plaspa port and jacket slot

    Hi Expert,
    I need to replace SPA card to resolve the error
    %L2-PLIM_ASIC-4-HW_WARNING : plaspa instance 0: (plaspa port 2 jacket slot 0) RSI Spi Error was reported
    The plaspa port 2 jacket slot 0 would be SPA slot 0 (0/0/0), correct? 
    NAME: "0/PL0/*", DESCR: "Cisco Carrier Routing System SPA Interface Processor Card"
    PID: CRS1-SIP-800      , VID: V04
    NAME: "0/0/0", DESCR: "2-port OC48/STM16 POS/RPR Shared Port Adapter"
    PID: SPA-2XOC48POS/RPR , VID: V02
    NAME: "POS0/0/0/0", DESCR: "OC48 SR/STM16 I-16"
    PID: SFP-OC48-SR         , VID: V01 , 
    NAME: "POS0/0/0/1", DESCR: "OC48 SR/STM16 I-16"
    PID: SFP-OC48-SR         , VID: V01 , 
    NAME: "0/0/2", DESCR: "2-port OC48/STM16 POS/RPR Shared Port Adapter"
    PID: SPA-2XOC48POS/RPR , VID: V02
    Thank you for all replies

    I didn't see any errors on SONET interface from command show controller SONET 0/0/0/0 and 0/0/0/1
    RP/0/RP0/CPU0:TH-ICR-TT1#sh controller SONET 0/0/0/0
    Thu Apr  5 17:29:23.737 GMT
    Port SONET0/0/0/0:
    Status: Up
    Loopback: None
    SECTION
      LOF = 38         LOS    = 20                           BIP(B1) = 2761538
    LINE
      AIS = 4          RDI    = 63         FEBE = 21712298   BIP(B2) = 6871279
    PATH
      AIS = 112        RDI    = 441        FEBE = 674410     BIP(B3) = 4673236
      LOP = 62         NEWPTR = 422        PSE  = 10093      NSE     = 17398
      PLM = 136        TIM    = 60         UNEQ = 0        
    Line delays trigger:      0 ms clear:  10000 ms
    Path delays trigger:      0 ms,      0 ms (configured), clear:  10000 ms
    Last clearing of "show controllers SONET" counters never
    Detected Alarms: None
    Asserted Alarms: None
    Mask for Detected->Asserted: None
    Detected Alerts: None
    Reported Alerts: None
    Mask for Detected->Reported: None
    Alarm reporting enabled for: SLOS SLOF SF_BER PLOP
    Alert reporting enabled for: B1-TCA B2-TCA B3-TCA
    Framing: SONET
    SPE Scrambling: Enabled
    C2 State: Stable   C2_rx = 0x16 (22)   C2_tx = 0x16 (22) / Scrambling Derived
    S1S0(tx): 0x2  S1S0(rx): 0x2 / Configured
    PATH TRACE BUFFER : STABLE
      Remote hostname : SG-ICR-GS1             
      Remote interface: POS0/0/0/1   
      Remote IP addr  : 122.144.20.28
    APS
    No APS Group Configured
      Rx(K1/K2) : 0x00/0x00
      Tx(K1/K2) : 0x00/0x00
      Remote Rx(K1/K2): 01/0   Remote Tx(K1/K2): 01/0
    BER thresholds:  SF = 10e-3  SD = 10e-6
    TCA thresholds:  B1 = 10e-6  B2 = 10e-6  B3 = 10e-6
      Optics type: OC48 SR/STM16 I-16
      Clock source: internal (actual) internal (configured)
      Rx S1: 0x2  Tx S1: 0x0
    Optical Power Monitoring (accuracy: +/- 1dB)
      Rx power = 0.0032 mW, -24.9 dBm
      Tx power = 0.2181 mW, -6.6 dBm
      Tx laser current bias = 22.0 mA

  • Jumping to a point after specific time

    I have created buttons to run different animations. At the end of each of these animations, I want to stop for 3-4 seconds and then jump back to a common starting point in the timeline.
    How do introduce the wait time of 4 seconds in the following code?
    sym.stop();
    // play the timeline from the given position (ms or label)
    sym.play("startPoint");

    Ok amber_abb,
    We use an upDown symbol containing a basic animation. A first instance upDown-1 has a playback action play() (black triangle on white background) at label start. The second instance upDown-2 has a playback action play() a bit after label mid and a third  instance upDown-3 has a playback action play() later.
    We wrap all the needed variables in a TIMING object defined in the compositionReady event handler :
    TIMING =
      loopCounter: 0,
      maxLoops: 5,
      delay: 2000 // in ms
    Trigger at label mid :
    if (TIMING.loopCounter++ < TIMING.maxLoops)
      sym.$('loopCount').text( TIMING.loopCounter);
      sym.play('start');
    else
      sym.stop();
      setTimeout( function()
        sym.play('mid');
      }, TIMING.delay);
    Trigger at label end :
    sym.stop();
    The JavaScript method setTimeout() delays the execution of the function passed as its first parameter (here an anonymous function). Its second parameter is the delay given in ms.
    http://w3schools.com/js/js_timing.asp
    Downloadable example here : https://app.box.com/s/7m6dz8zzmrjirv8a34fx
    Gil

  • 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

  • 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

  • Gen Digital Pulse Train Finite Retriggerable - Initial Delay is only for first trigger

    The DAQmx example Gen Digital Pulse Train Finite Retriggerable has an Initial Delay parameter. It appears (6602 and an E series card) that this Initial Delay only delays the pulse generation for the first trigger. Subsequent triggers show no delay. Is this the designed behavior ? Any way to get the Initial Delay to occur for all triggers ?
    Steve

    So, yes, you are seeing the appropriate behavior. However, it is possible to get a re-triggerable finite pulse train with an initial delay. What you have to do is set up a re-triggerable pulse, and have that pulse act as a pause trigger for a continuous pulse train. Let me explain further with an example.
    1) Set up counter 0 as a re-triggerable single pulse (Gen Dig Pulse-Retriggerable.vi). Set the low time = initial delay = X, and high time = Y. The re-triggerable pulse will be low for X, then high for Y after every trigger (it applies the initial delay to the first pulse, and the low time to every pulse after the first). The trigger source is your actual trigger.
    2) Set up counter 1 as a pause-triggered continuous pulse train (Gen Dig Pulse Train-Continuous-Pause Trigger.vi). This pulse train will be the frequency of the finite pulse train you want. The pause trigger source will be the output of counter 0.
    I have attached the VIs I used to accomplish this. There are three VIs, the two mentioned in 1) and 2) and another VI I used just to monitor the signals. These could be combined to a single VI if you would like. Hope this helps!
    -Alan A.
    Attachments:
    Retrig_Finite_Pulse_Delay.zip ‏135 KB

  • Trigger delay about 2 days

    Hey guys,
    my idea to start virtual machines in SCVMM which are offline and to perform a client action (via SCCM) to roll out the new updates our company released, only needs a lil piece in that puzzle. If the newest updates are deployed and installed, I want to shut
    down the virtual machines. The trigger delay, that you can set up in the "links" between the actions, can only set up to 999 seconds. 
    Do you have an idea to trigger a delay, that can shut down the virtual machines after 2 days, for example? I don´t know that much about scripting, maybe there is a easier way.
    Thanks for your help and best regards,
    Simon

    You can use a "run .net activity" and use PowerShell:
    Start-Sleep -seconds 172800 #pause execution for 2 days
    There should be a better way than to have a runbook sit idle for two days. You might look into triggering the runbook from an external scheduling application like Control-M or something similar.

  • Unexplaine​d Trigger Delay in NI-SCOPE Software

    Hello,
    I am using NI-SCOPE to configure my 5122 digitizer card for multi-record acquisition.  My trigger signal is connected to the TRIG input of the card, and my data will be acquired on Channel 0.
    I have an X stage that I move in to position.  Then I configure my SCOPE software to begin acquiring data on an External Trigger, and initiate the acquisition.  Then I begin moving my X stage and after it moves 20 microns the first trigger is generated.  After the initial trigger, subsequent triggers are generated every N microns, where N can vary between different scans but is a constant within a scan.  After the acquisition is complete I display the resulting waveforms.
    Please refer to the attached vi (LabVIEW 8.0) and jpg of the block diagram to see how I have the code set up.  I've combined a few different sections of my code into this single vi.
    You'll see that I have a trigger delay - in this vi it is a constant, but in my application it is a Control.  I've run various tests and for some reason my data is always offset by 1.04E-5 seconds, which is why I've had to put in that trigger delay.  What I mean is that if I set the trigger delay to 0, then the first 1.04E-5 seconds of my data is noise.  After I use this trigger delay, my data is accurate beginning with the first data point.
    Can anyone figure out where this trigger delay comes from?  Thanks.
    Steve
    Attachments:
    5122 Scope Test.zip ‏88 KB

    Hi Steve_G,
    There doesn't seem to be anything fundamentally wrong with your VI and so there should not be any delay between your trigger and your data acquisition. I suspect that you may be generating your trigger signal a bit prematurely and that your step motor may not have settled to its final value. This will cause your digitizer to acquire unsettled data and this may be why you are seeing noise. Also, I noticed that you have set some wait timers in your VI and although these will delay your data fetch, it will not delay your data acquisition. So although you are delaying your data fetch call, as soon as the "niscope initiate acquisition" is called, your hardware is configured and is programmed to start acquiring data onto your on-board memory buffer as soon as it receives a trigger signal.
    One way to troubleshoot this system would be to simply acquire both the trigger channel and your input channel to see if the trigger lines up with your data. This will give us a good indication if we are in fact seeing any delays. I would also like to point out that there are tons of great NI-Scope shipping examples in LabVIEW that you could refer to. You can view these in your Example Finder by accessing it under Help  Find Examples.... The examples we are particularly interested in should be under Hardware Input and Output » Modular Instruments » NI-Scope » Continuous Acquisition.
    I hope this helps,
    S_Hong
    National Instruments
    Applications Engineer

  • Trigger delay in NI-Scope 1.6

    I am using NI-Scope 1.6 with PXI 5102. I can't seem to set the trigger delay
    parameter of niScope_ConfigureTriggerSource() to any value other than 0.0.
    My code looks something like this:
    niScope_ConfigureVertical( vi, "1", m_VertRange, m_VertOffset,
    NIVerticalCoupling, m_ProbeAttenuation, VI_TRUE );
    niScope_ConfigureHorizontal( vi, m_RecordTime, RecordLength, 0.0 );
    niScope_ConfigureTriggerSource( vi, "1",
    NISCOPE_VAL_EDGE,
    0.0,
    0.0 );
    The call to ConfigureTriggerSource will fail if the trigger delay parameter
    is anything other than 0.0. (At least it fails with the handful of values I
    have for a 10ms delay: 0.01, 10, 1, -0.01, -10 )
    The failure reason given is: "BFFA0010 Invalid Value...Elaboration: Tri
    gger
    Delay is invalid."
    How do I use the trigger delay with NI-Scope 1.6 and a 5102?
    Thanks,
    Chris Lincoln
    ULTRAX, Inc.

    Mr. Lincoln,
    Thanks for using NI Developer Exchange! Unfortunately, the NI 5102 is not able to perform delayed triggering. Delayed triggering is supported by the NI 5112 for PXI, so this functionality appears in the NI-SCOPE instrument driver. The NI 5102 and NI 5911 also use this driver, but cannot support this feature in hardware. The NI-SCOPE driver call "ConfigureTriggerSource" is only meant to have a non-zero delay for the NI 5112 for PXI. One alternative (without changing hardware) is to start sampling immediately, then calculate how many points to delete in software to reach the desired starting point. Hopefully this answers your question.
    Thanks,
    Jace Curtis
    NI Applications Engineering

Maybe you are looking for

  • Conditional SQL ( Want to avoid having to write a PL/SQL block )

    I have a SQL statement and I was hoping to not have to write an IF-THEN-ELSE condition. Here is the SQL in hand which I need to expand. I need to list the personal information including address of all the employees. However, in the event that I encou

  • When I delete itunes match song from itunes, download icon is greyed out

    Now that my songs are in the cloud, I want to delete my ripped version and download the iTunes Match version, but I can't see how since the download icon is greyed out. Anybody know how? Thanks!

  • Ipod mini was doused

    Hi, My ipod mini was in my athletic bag today, and my nalgene spilled all over both my ipod and cell phone, the phone is fine but my ipods screen is turning various shades of the greyish color backgroud and nothing will come up. however, at the top w

  • Help me I post this topic from tow week and no replys

    hi I use Apple USB External Modem Dial Up and it work good but now when I try to connecting and the modem dial phone and make dial tone and after 40 seconds give me this message ((The modem disconnected. Try reconnecting. If the problem continues, ve

  • Type shift between design mode and preview mode in Muse.

    My type shifts / moves positions between design and preview modes. It then justifies differently in differnet Web Browsers. This mean I end up positioning things incorrectly in design mode to accommodate the error when published. I am using the Droid