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

Similar Messages

  • All acquisitions wait for digital trigger, why?

    On one computer I have 2 eseries 6023 daq boards installed. One for a digital triggered acquisition, and the other for a continuous (chart recorder type) acq. When running the two seperate VI's, why does the the cont. acq. VI wait for the trigger on the other VI? Appreciate any help.

    Hi digger,
    AI Read.vi waits until the samples are in the buffer.
    Do following: Call AI Read.vi with 0 scans to read. Look in scan backlog output if any samples are available. If there are samples waiting call AI Read.vi with this output contected to the input scans to read otherwise do nothing.
    This prevents AI Read.vi from waiting until samples are in the buffer.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • HSDIO conditionally fetch hardware compare sample errors (script trigger to flag whether or not to wait for software trigger)

    I am moderately new to Labview and definitely new to the HSDIO platform, so my apologies if this is either impossible or silly!
    I am working on a system that consists of multiple PXI-6548 modules that are synchronized using T-CLK and I am using hardware compare.  The issue I have is that I need to be able to capture ALL the failing sample error locations from the hardware compare fetch VI... By ALL I mean potentially many, many more fails than the 4094 sample error depth present on the modules.
    My strategy has been to break up a large waveform into several subsets that are no larger than 4094 samples (to guarantee that I can't overflow the error FIFO) and then fetch the errors for each block.  After the fetch is complete I send a software reference trigger that is subsequently exported to a scriptTrigger that tells the hardware it is OK to proceed (I do this because my fetch routine is in a while loop and Labview says that the "repeated capbility has not yet been defined" if I try to use a software script trigger in a loop).
    This works fine, but it is also conceivable that I could have 0 errors in 4094 samples.  In such a case what I would like to do is to skip the fetching of the hardware compare errors (since there aren't any) and immediately begin the generation of the next block of the waveform.  That is, skip the time where I have to wait for a software trigger.
    I tried to do this by exporting the sample error event to a PFI and looping that PFI back in to generate a script trigger.  What I thought would happen was that the script trigger would get asserted (and stay asserted) if there was ever a sample error in a block, then I could clear the script trigger in my script.  However, in debug I ended up exporting this script trigger back out again and saw that it was only lasting for a few hundred nanoseconds (in a case where there was only 1 injected sample error)... The sample error event shows up as a 1-sample wide pulse.
    So, my question is this:  is there a way to set a flag to indicate that at least one sample error occurred in a given block  that will persist until I clear it in my script?  What I want to do is below...
    generate wfmA subset (0, 4094)
    if scriptTrigger1
      clear scriptTrigger1
      wait until scriptTrigger0
    end 
    clear scriptTrigger0
    generate wfmA subset (4094, 4094)
    I want scriptTrigger1 to be asserted only if there was a sample error in any block of 4094 and it needs to stay asserted until it is cleared in the script.  scriptTrigger0 is the software trigger that will be sent only if a fetch is performed.  Again, the goal being that if there were no sample errors in a block, the waiting for scriptTrigger0 will not occur.
    I am probably going about it all wrong (obviously since it doesn't work), so any help would be much appreciated!

    Please disregard most of my previous post... after some more debug work today I have been able to achieve the desired effect at slower frequencies.  I did straighten out my script too:
    generate wfmA
    if scriptTrigger1
      clear scriptTrigger0
      wait until scriptTrigger0
    end if
    generate wfmA
    scriptTrigger1 = sample error event flag
    scriptTrigger0 = software trigger (finished fetching error backlog in SW)
    However, I am still having a related issue.
    I am exporting the Sample Error Event to a PFI line, looping that back in on another PFI line, and having the incoming version of the Sample Error Event generate a script trigger.  My stimulus has a single injected sample error for debug. For additional debug I am exporting the script trigger to yet another PFI; I have the sample error event PFI and the script trigger PFI hooked up to a scope.
    If I run the sample clock rate less than ~133MHz everything works... I can see the sample error event pulse high for one clock period and the script trigger stays around until it is consumed by my script's if statement.
    Once I go faster than that I am seeing that the script trigger catches the sample error event occasionally.  The faster I go, the less often it is caught.  If I widen out the error to be 2 samples wide then it will work every time even at 200MHz.
    I have tried PFI0-3 and the PXI lines as the output terminal for the sample error event and they all have the same result (this implies the load from the scope isn't the cause).
    I don't know what else to try?  I can't over sample my waveform because I need to run a true 200MHz. I don't see anything that would give me any other control over the sample error event in terms of its pulsewidth or how to export it directly to a script trigger instead of how I'm doing it.
    Any other ideas?

  • How do I continuous​ly wait for a trigger?

    using labview and GPIB to control tektronix 3034B oscope. want to continuously wait for trigger. how do i get rid of timeout? I am using IVI instrument driver for 3034B

    Hi,
    You can use the low level adquisition VIs. First call Initiate Acquisition. Then use the Acquisition Status VI to determine if the acquistion is complete. This wait you can wait indefinitely.
    Of course, you could also set the timeout value of the ReadWaveform VI to something like 86000000 ms, which is aprox. a day of timeout .
    DiegoF
    National Instruments.

  • Using A2 Trial while waiting for Box Version

    I currently have Aperture 1.5.6. My questions are:
    1) If I download the A2 trial, while waiting for boxed version (which is on order), when I get it can I just enter the valid serial number (from the boxed version) and Aperture A2 trial updates to 2.0 properly?
    or
    2) Do I have to delete the trial version and do an actual (boxed version) upgrade once I receive it?

    just enter the serial from the boxed version on the trial ... no reinstall necessary ...
    upon starting you should be seeing a screen for "activate" "buy" and soemthing to the effect of continue to use trial ...
    activate is what you want ...

  • Have 4S and when syncing with iTunes using WiFi I get waiting for change to be applied.  But this seems to never end.  I have waited for an hour and still getting message.

    Have been attempting to sync my iPhone 4S with iTunes using WiFi.  It appears to complete the 5 or 6 syncs, but then waiting for change to be applied comes up and it never completes the sync.  Waiting for changes to be applied continues for every.

    ALSO, on the iPod under Settings>General>iTunes Sync, you may need to back out of the "iTunes Wi-fi Sync," and reopen it to get it to update.
    (I use iTunes 11.1.5.5)

  • Can trigger wait for another trigger before it is fired?

    i have table TAB1
    and i have TAB1_HISTORY
    when row gets inserted into TAB1 i have some logic in TRIG1 to updated few fields using rowid ARRAYS just to be safly updated everything in case more than one rows gets into TAB1.
    now TRIG1_HISTORY suppose to move data from TAB1 into TAB1_HISTORY but some fields are null because TRIG1 may be not finished updating fields yet.
    Any way to trig1_history follows trig1? I know one way is to make TRIG1_HISTORY as store proc .
    i am usign 10g
    thanks

    There is no such thing as unassigned rowids.
    If there is a rowid, the row exists and it can be updated.
    The general strategy for your problem is
    before statement trigger: set up an array with empty values.
    before or after for each row: do whatever you want, and buffer the primary key (or rowid) in the arrary you set up.
    After statement: do anything you want to do with the collected primary keys/rowids.
    This is being processed in the correct order and it shouldn't fail.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • With DAQmx, how to use AO start trigger for AO/AI synchronization with finite AI sampling

    I am a new user to DAQmx and I am trying to synchronize AI (finite samples) with AO in LabVIEW 7.1 using a PCI 6229 card. I want to generate a finite waveform (AO) and, subsequently, collect a finite number of voltage samples (AI). I would like to repeat the AO-AI cycles in a while loop.
    Alternatively, I could use an infinite AO generation and collect finite number of voltage samples on AI but always exactly at the same spot of the AO buffer.
    Using traditional DAQ and a 6024E card, I used a counter triggered by AO start trigger signal (example attached). I have problems with translating this example into DAQmx.
    Please help!
    Ruber
    Attachments:
    AIAODelay_traditional_Eseries.vi ‏155 KB

    Lesley,
    Thank you very much for your suggestion. Late last night I actually tried a to use AI start trigger instead of AO start trigger and it worked (since I tried the AI & AO to start simultaneously, it does not matter what triggers what), even in the loop. The devil is in details, as I had to carefully wire the number of data points and what to place inside/outside the loop.
    The problem with shared clock is that I need to sample the AI and AO at different rates but using AO and AI clock separately did not seem to affect the performance.
    I still want to try to use the AO start trigger (as you suggest) because I would like to delay the AI by a few ms from the AO. Is there a simple way to to that?
    I suppose, switching from traditional DAQ to DAQmx requires your brain to be rewired - after playing with it for a couple of days and nights I developed a "feeling" for it. One of the differences was that, in order to use this example in the loop, one has to use 'stop task' inside and 'clear task' outside the loop.
    Thanks again!
    Radek Uberna

  • NIScope CPU usage 100% when waiting for trigger

    Hello, I'm using a NI 5102 DAQ card and want to acquire single bursts. However when the Multi Fetch.vi is waiting for a trigger (and this can be up to a minute) the CPU usage goes up to 100 %. Is there any way to overcome this?
    Attachments:
    Current_ProjectSWEEP2withoutAgilentNEWScopeWrite_to_FilePOSTED.vi ‏98 KB
    ScopeSUB.vi ‏108 KB

    Yea, Ive noticed the same thing.  The niSope dll in the Fetch.vi grabs 100% CPU if timeout is larger than 1 or 2 seconds. 
    Has anyone talked to NI about this?  The problem is in that dll which is polling the PCI Scope Card.  That dll is not giving back any CPU if it waits for more than a second or two.
    John Dailing
    [email protected]

  • When to use Initiate and when Start Trigger?

    Hello I am talking about Scope5122 and DigitalIO6552.
    Im little confuse, what is the relation between Initiate VI to Start Trigger trigger.
    Thanks.

    HaD,
    Basically, the Initialize VI just gives you a session reference to the device where you can modify properties of the device and configure the device (sample rate, number of sample to acquire, channels to use, etc.). These properties all have to be configured before the device begins to acquire or generate. (Note: some properties can be modified or accessed after the device is acquiring or generating, but not all)  The Initiate VI will basically start the acquisition or generation to the device if some sort of trigger is not already configured. The Start Trigger VI allows you to configure a trigger for the device, if you do configure a trigger you will still have to call the Initiate VI, but only once you call this Initiate VI will it begin to wait for a trigger. If you do not configure a trigger the acquisition / generation would begin as soon as the Initiate VI was called. Hope this helps.
    Aaron W.
    National Instruments
    CLA, CTA and CPI

  • Stopping program without waiting for trigger

    Hi everybody
    I have a problem that I just can't get my head around. I have a program that I use to aquire data. The program goes through the motions of waiting for the trigger, aquiring the data on the appropriate channel, displaying it, and loops back to waiting for the trigger. The problem is That when I want to stop my program while it is waiting for a trigger I must wait for it to recieve a trigger before it will stop excution.
    Is there a way for my program to stop the trigger vi when I select to end the program?
    Thanks
    Beaton
    - there is always an easy way, but it is always the hardest to find

    Hi Beaton,
    you have to split the 'wait for trigger time' into shorter sub-steps.
    Let's say you wait 10sec for trigger signal. Make a loop instead waiting 1 second for 10 times! After each iteration you can check for: 'break the loop (end program)' or 'trigger received' or 'any other error occured'. This way you can stop your program very easily - you can also make your own error state saying 'Error number 123456: stopped by user'...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Wait for trigger

    Hello
    I need help making a VI for waiting for a trigger. I am working with a TDS 2024 scope.
     I have to tell  the scope how long to wait for the trigger and if it does not find it in that time, then it will tell the user that no trigger was found.
    Can anyone help me with this?
    xxmidna

    Midna19 wrote:
    Hello
    I need help making a VI for waiting for a trigger. I am working with a TDS 2024 scope.
     I have to tell  the scope how long to wait for the trigger and if it does not find it in that time, then it will tell the user that no trigger was found.
    Can anyone help me with this?
    xxmidna
    Time to break out the scope manual and see what commands are needed to achieve this.  Put a VI together and then we can talk about refining it. 
    Alternatively, you can see if you can find some drivers for this scope.  I think Tektronix has pretty good LV support.
    (This assumes you know how to use the scope.)
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How to use scb-68 board to send a trigger signal

    I am using Labview 8.5. Our DAQ card is scb-68. I want to send a trigger signal out by using the DAQ. Could anybody tell me how to do that?

    There is a program in another computer waiting for the trigger signal. We don't need to worry about that computer.
    We had a program which can collect data from a temperature controller. When the program start, it also sends a trigger singal out so that the two computers can work simultaneously. But now our temperature controller is changed to a new one. I've built a program to collect data. All what I need now is just sending a trigger signal when the program starts.
    One attachment is the former program (writted by using Lab  windows), another attachment is my new  VI for trigger signal.
    Attachments:
    trigger4.vi ‏28 KB
    diode_scan3.c ‏12 KB

  • Hi speed non-regen AO with LV DAQ Occurrences

    Hi
    I need to output 6 non-repeating patterns to 3 PCI-6111's @ 150kHz.
    Can anyone explain to me why the attached LV7 Development Library example, with modified defaults and utilizing DAQ occurrences, will not work when more than one copy is run? When I try to run a second copy (with the device number different) the first copy produces a -10803 error.
    Another example (also attached) will successfully allow 3 copies to run simultaneously. While it can get the job done, I was wanting to use the DAQ occurences, because I thought that would allow the minimum amount of CPU usage. This is the first time I've had to do anything more with AO than state levels. Am I missing something basic here?
    Thanx.
    Attachments:
    Generate_Continuous_Sinewave_Occurences_dev1.vi ‏117 KB
    Generate_Continuous_Output1.vi ‏451 KB

    Hi,
    I believe what is happening is that your first VI is using DAQ occurrences and locking the driver. This is because traditional NI-DAQ (before DAQmx) is single threaded meaning it can only execute one DAQ process at once. When you try to start another VI with occurrences it times out (error -10803) because it cannot access the part of the driver that does occurrences.
    Since DAQmx is multi-threaded it is able to run multiple VI's and can actually trigger on multiple boards. DAQmx will support the PCI-6111 in NI-DAQ version 7.2. Until this is released I would suggest using continuous generation without occurrences when using multiple boards.

  • In an approval workflow, how do I wait for either Approval or Reject to proceed?

    I have a field that will get set to Approved or reject in the form.  In the workflow I inserted the action "Wait for a field to change in current item".  The program is it reads:
    WAiT FOR "SOMEFIELD" TO EQUAL "VALUE"
    the value could be "Approved" or "Reject".  How can I set the wait till the value is changed to proceed to next action in the workflow?
    Thank you.

    Hi,
    According to your post, my understanding is that you wanted to create a workflow to wait for the filed changed and then proceed to next action.
    As Matt
    Milsark's Blog said,
    in the SharePoint Designer 2013, the value of the action has to be equal to.
    However, we cannot use parallel blocks to wait for the item to change.
    When the column’s value of the List is “Approved” at the first and not changed, the workflow also will start and perform the next action.
    The reason is that if we create an item which set the column value to “Approved”, the workflow will proceed to the Approved Step without any changes and then wait for the filed changed to Rejected.
    As a workaround, we can use the “Stage” and the “Wait for Filed Change in Current Item” action.
    You can follow the steps as below to implement it.
     Create a Custom List > Create a Column with the type of “choose” > Set the Column’s value is “Approved” or “Rejected.
       Open the SharePoint Designer 2013 > Create a Workflow for this List > Add some conditions and actions
    as below:
       3. Click “Save” to save the workflow.
       4. Go to the “Navigation” and click the “Workflows” > Open the new workflow > Go to “Start Options” > Check “Start workflow automatically when an item is created”.
       5. Click “Publish” to publish the workflow.
    In addition, we can use the “Wait for Event in List Item” action to achieve what you want.  Please create workflow as below:
    Then if the “Approved” Column’s value of the current item is changed to “Approved”, the workflow will log “Approved Column changed to Approved”.
    If the “Approved” Column’s value of the current item is changed to “Reject”, the workflow will log “Approved Column changed to Rejected”.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for