DAQmx - Software trigger

Hi all,
I would like to knows if it's possible to start a task with a software trigger if an analog start trigger doesn't appear after a timeout (e.g. 2 seconds)?
Kinds

In fact you need to change trigger type of the task or to have different trigger types, I do not know how to do it directly
The workarounds:
1) Stop task if it gives timeout (= specified time), change trigger type and restart it. Be sure to commit task before first start to increase speed.
2) It may work to connect internal 20MHz timebase to the trigger terminal (Daqmx routing palette) after the specified time

Similar Messages

  • 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

  • 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?

  • Software Trigger from CC1 on PCIe-1433

    Dear Sir or Madam,
    Now I am getting into trouble about NI Measurement Automation explore with my PCIe-1433. I like to make software trigger from this software into my cameralink camera. However I am not so familiar with this software. Is it possible to make software trigger ? If it is possible, I like to know how to generate it.
    Best regards,

    Hello,
    Check out this forum post. It goes through the steps necessary to set up triggering in MAX.
    -Erik S
    Applications Engineer
    National Instruments

  • Help: Can you use software trigger on a digital line.

    Hi:
    We have a legacy DAQCARDard 700 which does not support hardware triggering.
    We have a trigger from our instrument that is 5 V+ and we would like to
    trigger when it drops to 0 V. We have several questions.
    1. Do we need to invert the signal in MAX or is that only for V that are
    negative?
    2. Is there a good example in the examples where the state of this digital
    line is used to trigger an analog acquisition? When we tried using the
    digital trigger examples, we had an error saying that the hardware did not
    support that mode.
    3. We have an analog software trigger mode (based on the Analog Software
    Trigger example) working which we would like to modify over to read the
    digital line, but we have done very little wi
    th digital I/O.
    4. The digital trigger has been assigned a virtual channel of dtrg.
    Any help would be much appreciated.
    Thanks in advance,
    Pete

    Thanks Doug,
    If we read the digital line instead of as an analog line would it improve
    the accuracy of the triggering. Everything works now except we have a
    little bit of timing jitter within about 1 data point scanning at 50 kHz.
    However, I've never done any digital i/o with LabView, but may I should work
    through some of the tutorials. If you thought that this might solve the
    jitter problem. Would checking the state of the digital line allow a faster
    response with softtrig, I guess is my question?
    Pete
    "Doug Norman" wrote in message
    news:[email protected]..
    > Hello Pete,
    >
    > You are correct that the DAQCard-700 has no digital (or analog)
    > hardware trigger. The analog trigger example t
    hat is working for you
    > is using conditional retrieval. This is where data is always being
    > acquired and the driver looks at the values to determine when to
    > "trigger" and read the data into LabVIEW. To answer your questions:
    > 1. I don't think you need to invert the signal. This is for when you
    > want a digital low (below 0.8 volts) to show up as a digital high, and
    > a high (above 2.0 volts) to be read as a low.
    > 2. I don't know of a good example. You would basically have to
    > monitor the digital line. When it goes from high to low you would
    > then start your analog acquisition.
    > 3. I think this could be your best bet. If you have enough analog
    > input lines, why not just connect this digital signal as one of your
    > analog inputs. Then use this example to trigger when the 5 volts
    > drops to 0. It won't hurt to acquire your digital signal on an anlog
    > input along with your other data.
    > 4. I don't understand this question.
    >
    > Best Regards,
    >
    > Doug Norman

  • Saving software trigger in project

    I created a project with Signal Express v3.0 where I use software trigger to start and stop acquisition. When I close signal express and then reopen the project the software triggers do not show up in the bar below the menus.
    Is there a way to keep the software triggers in the bar when we close the project and signal express?
    Thanks,
    Ben

    Duplicate post on Signal Express forum here
    Misha

  • Software trigger

    I created a project with Signal Express v3.0 where I use software trigger to start and stop acquisition. When I close signal express and then reopen the project the software triggers do not show up in the bar below the menus.
    Is there a way to keep the software triggers in the bar when we close the project and signal express?
    Thanks,
    Ben

    Hi John, if you look at the attached screenshots view1 shows the top part of the project when I open it. In view3 the software triggers are present. In view2 I display the start condition settings of the project. When I open the project I have to remove software trigger A and then add it back to have both trigger A and trigger B buttons appears at the top as in view3.
    Ben
    Attachments:
    view1.PNG ‏16 KB
    view2.PNG ‏32 KB
    view3.PNG ‏16 KB

  • IMAQdx external/software trigger

    I use C# & Vision Acquisition Software 2010.
    I setup Vision Acquisition Software 2010 but the IMAQdx examples code just have Grab、Snap and Sequence capture.
    Are there any about IMAQdx external/software trigger sample?

  • Software trigger with PCI-5122

    I am going to program a board with PCI-6552 and in meantime in specific times capture the samples of the anolog output of the board by PCI-5122.
    Is there any way to use software trigger and the data pattern of PCI-6552 (e.g. define a software event) to trigger the PCI-5122. If it is possible, how the software event can be defined and connected to the "send software trigger" block?

    Whe using a software trigger with the 5122, you generate the trigger whenver you call the "Send Software Trigger" function. you can program the software events that cause this funtion to be called in any way you want.
    In the simplest case, you could place the "Send Software Trigger" function in a while loop and only execute it when the user presses a button.
    Jack

  • Software trigger example for NI 5911

    Where can i find the software trigger example for NI 5911,
    thanks

    Hi dreamhawk,
    There are some examples online that demonstrate software triggering with a High-Speed Digitizer such as the NI 5911. Because you didn't specify which programming language you're using, I'll assume you're using LabVIEW. I suggest you take a look at the example program "Software Triggering with NI-SCOPE and a High-Speed Digitizer" at
    http://sine.ni.com/apps/we/niepd_web_display.displ​ay_epd4?p_guid=B45EACE3E89156A4E034080020E74861&p_​node=175383&p_source=External.
    Regards,
    David Shatila
    Applications Engineer
    National Instruments

  • How can I find an example about acquiring waveform data by software trigger using PXI 4070 DMM?

    Anybody could proivde an example or simliar about acquiring waveform data by software trigger using PXI 4070 DMM?
    Thanks!

    hi there
    from the NI main page go to the developer zone http://www.ni.com/devzone/dev_exchange/ex_search.h​tm. select "LabVIEW" and "Digital Multimeter (DMM)" and search for "4070". then you'll find some examples.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Right way to do software trigger?

    I have been doing a program for electronics dropping tester. I am using one drop table sensor and one sensor attached to circuit board. I am dividing all 250kS/s rate two these two sensors. Also when I am using high speed resistance measuring in test I am also dividing the sample rate for those. I am using PCI-6225 card where is not hardware trigger channel so I need to do it with software trigging.
    The trigger starts when the drop table hits the ground and it's undergo the acceleration which is measured from drop table sensor.
    The problem is that the program somehow goes to loop or something in measurement. It remains measuring and doesnt end the measuring. It doesnt do that all the time but sometimes. I have tried to find out that does it go some repeating loop but it doesnt. So is that my triggering done so bad way that this whole Labview language jams ?
    If someone can watch my code and say how it should be done? I have attached some of my code in this post. In the code the measuring structure part is framed with red frame. I know that this my code is badly done because I havent used so many subVIs like it should be done. This is my first Labview code what I have been doing. The layout is also too big because few subVIs but it fits somehow to two monitors.
    Thanks a lot for reading this!
    -Toni
    Attachments:
    Droptester.vi ‏324 KB
    Trigger_and_gate.vi ‏29 KB

    To_ne wrote:
    [...] If someone could tell me that are those DaQmx Create Task--> DaQmx Create Channel (AI Voltage)-> Timing-> Start Task-> Read-> Clear Task -chain with the different loops done okay ?[...]
    -Toni
    If you need all those channels, the chain on itself is ok.... even though you can remove the flat sequence structure without any changes done to the functionality of the code.
    I suggest you to collect all On/Off settings into a boolean array and then pass it to a subVI. In this subvi you can do something like this:
    This will enable you to decrease block diagram size in a quite decent (read: scalable) way.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Is there a way to simplify this? applying functions to 16 channels - software trigger

    hey,
    at first I want to appologize for hurting everybodies eyes.
    Today I ended up with a pretty weird VI and I was wondering if there is any way to do this a littler easier.
    Basicly I want to acquire 16 channels from a device. Unfortunately the device doesn't support analog trigger, so I had to create a software solution. So, I m reading 100 samples on all of the 16 channels in a while loop and compare the first channel, if its value reaches a certain threshold. If it does I end the while loop and enter a for loop, which read 100 samples 10 times. Before exiting the for loop I seperate the 16 channels - so I end up with 16 different arrays of 10 x 100 samples. Then I reshape the Array in order to get a one dimensional array with 1000 samples. At that point I have to do that for every channel seperately. After that I add the 100 samples which I acquired in the while loop in the beginning (which was the trigger) to the 1000 Samples Array. I end up with a array for every channel, which is 1100 samples long.
    As you could see in the attached image, this looks pretty confusing in the end. Is there any way to make that easier and look nicer?
    I know, I could add functions to reshape the arrays in order to end up with an 3 dimensional array (16 channels x 10 x 100 samples) then I could process everything in a for loop - but I guess that would take longer to calculate in the end?!? Any good ideas on that, except buying new hardware with a analog trigger?
    Attachments:
    weirdlabv.jpg ‏131 KB

    as far as I know, my hardware only has memory for 4095 Samples -  when acquiring 16 channels at once, I am able to read chunks not bigger than 256. is this right?
    I am not sure, if I still have some DDT in my latest vi left when converting the sample points as arrays of doubles. I will check that tomorrow, can't remember how I did that in the end. But everything seems to work finde so far. Thank you.
    However, there are still some basic questions:
    I have different parts in my vi, which relate to each other. For example, I have a array which is loaded from a file & edited by the user.  When finishing editing this array the user presses a button and continues with a different part of the vi, which uses the entered data. Therefore a part of the vi should not run before a other is finished. I used a combination of a event structure and a message queue. Is there a simpler way to realize such a construct?
    Just was thinking about creating Sub-VIs - apparently I could get rid of the queues then.. will try that tomorrow..
    If I create an empty array in order to enter values by the user during runtime, the array size increases at the moment I enter a value. In case I entered a value in the wrong field und want to deleted that value again and reset the arrays size to the size it had (before I entered the value)  - how do I do that? There is the right-click-option 'reset to default value', but this only sets the value to 0 in an numeric array, not deletes that field (row, whatever..)

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

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

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

  • Error 200284-DAQmx Analog trigger

    Hi,
    I am trying to start data acquisition (e.g. input channels ai6 to ai10) and save it to a file based on an analog input voltage signal change (acquire whenever ai6 >2 Volts) that will work as a trigger.
    I also found an example that is pretty similar to this (attached). The trigger source in my case is the first analog input channel. Following the attached example, I am always getting the error code 200284 after running the vi. Basically it gives the error after the specified timeout.
    I am using PCI-6289, but the problem is I cannot use any PFI lines for the voltage trigger and have to use ai channels only for trigger.
    Can't figure out what is wrong. 
    Any help is highly appreciated. 
    Thanks,
    Roy
    Attachments:
    cont_acq_volt_analog_start.vi ‏79 KB
    cont_acq_volt_analog_start.vi ‏79 KB

    Yes, you must use a digital channel as your trigger source because it has a different clock.  Remember, something has to activate your trigger!  For instance, let's say you want to use PFI0 as your trigger...when PFI0 goes high, start collecting data.
    How do you plan to control when PFI0 goes high?
    It can be an external trigger.  It can be another, digital, DAQmx task, where the DO line is hard-wired to PFI0.  But something has to cause PFI0 to go high, in order to trigger your task.
    Since you can only have a single AI task, since there's only one AI clock, you have no way of ever generating a trigger.  You won't start acquiring until you receive a specific signal on an AI channel, but you won't receive that signal until you start acquiring.  See why it's a no-go?
    So you want to acquire for 3 seconds after getting a signal on ai6 that's >2V.  So let's think this through, ok?
    If we set our task to finite samples, and we set our number of samples to 3000, what will happen?
    We'll acquire 3000 samples.  Right?  Right!  If our acquisition rate is set to 1kHz, it will take 3 seconds to acquire those samples.
    While we are acquiring those 3000 samples, we may (or may not!) see ai6 go over 2V.  Let's say we see ai6 read >2V after 2 seconds -- that is, our second loop iteration.  Since we've set our # of samples to acquire at 3000, we've already acquired 2000 samples (assuming a 1kHz sample rate).  That leaves us 1000 samples until our task expects to terminate (after which, you'll get an error).  That's not 3 seconds worth of data, is it?
    What if ai6 never goes >2V within our 3000 sample window?  Now you haven't collected anything, and your task will throw an error if you try to collect beyond 3000 samples.
    So no, setting our samples to finite and specifying the collection of 3000 samples isn't going to work, is it?  Clearly not.  That's 3 seconds' worth of data, all right, but it may not be the right 3 seconds' worth of data.  Since you don't know when ai6 will be >2V, you need to continuously acquire samples.
    Do you suppose we could do something with keeping track of time?  Specifically, the time at which >2V was detected?  Compared to the current time?  And take action based on that?  The logic for your case structure will become slightly more complex.
    Do you know about shift registers?  I'm not trying to be insulting, you said you were new and I'm not 100% sure of how new you are.  :-) 
    You seriously do need to take your Write to File out of your DAQ loop...please look into producer-consumers, or you'll be right back on this forum asking us about buffer overflow errors.  :-)  Also, beware of the Write to Measurement File Express VI...you don't have a file path wired in the code you showed, so it's going to pop up a dialog box every time it's called, asking for a file path.
    If you really want to learn LabVIEW, you will get rid of all Express VIs in your code.  At the very least, you need to understand exactly what they do and how they work.  Writing code that you don't understand is only going to cause problems later

Maybe you are looking for

  • How to generate netui controls at run time through some action in pageflow

    Hi, I want to create a dynamic table on jsp but don't want to create any control in design time. I will pass some query to the database and no. of textboxes should be created automatically based on the no. of field in result. Could you please help me

  • ITunes 6... sound is gone, digital only... what happened???

    I just installed iTunes 6 and restarted. Now my internal speakers don't work. In the Sound Preference panel, there is no longer an option for internal speaker output - only digital. My earphone jack glows red inside, which I don't believe it did befo

  • Material Ledger config

    Hi, I need to activated material ledger with different exchange rates. I never done any material ledger config. Can anyone help me regarding the configuration steps from material ledger with different exchange rates. Any input would be appreciated. T

  • Using ValueHolder Indirection With Method Accessing

    I am trying to use method getters/setters with value indirection member as described in the documentation (http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28218/mapcfg.htm#CEGFHCJF). My code modifies the mapping with the following lines:

  • Library on one computer but not another

    I login to two authorized computers and can't see my library on one of them. My account balance shows up on each so I know it is the correct account. Why would my library not be visible on it?