Differences in DAQmx Trigger (VI)

I am trying to figure out why DAQmx Trigger VI works differently with different hardware.
Case 1; using PXI-6133 and Reference Analog Edge version of VI
Case 2; using PXIe-6368 and Reference Digital Edge version of VI
My users have shown me that using an analog signal on an analog channel for a trigger source in both cases works.  Now, using the same trigger source conditions, I want to use a PXI-6133 and Reference Digital Edge version of VI.  This does not work.  Why?
My goal is to create a subVI that will use the appropriate DAQmx Trigger VI, given the source trigger hardware.  My application will aquire 2 sets of data simultaneously on different hardware.  One set based on a trigger, one set continueuosly.  Does this seem unreasonable? 

TrigConfig.png - code from main VI that create parameters for Trigger
Setup Triggers.vi - subVI that configures Trigger
Kevins_Triggered Fast DAQ.vi - working VI for PXI-6133 and PXI1045
Attachments:
TrigConfig.png ‏177 KB
Setup Triggers.vi ‏39 KB
Kevins_Triggered Fast DAQ.vi ‏45 KB

Similar Messages

  • DAQmx Trigger Property Node in NI-9235

    我使用DAQmx Trigger Property Node不會顯示Analog Edge
    請問是否有辦法設定
    DAQ設備為cDAQ-9172和NI 9235
    另外想問
    NI 9235有辦法設定量測到的數據在超過某個值後才開始紀錄數據

    http://www.labviewpro.net/forum_post_detail.php?post=2010&fid=1
    請先閱讀上面文章
    再參考下面類似方法
    http://digital.ni.com/public.nsf/allkb/4859504F14AF68DB8625721100640F26

  • PXIe-4499 DAQmx Trigger

    I'd like to trigger off a rising edge on one of the analog channels, let's say AI0, on a PXIe-4499 card however I can't seem to figure out how to specify the trigger source. I'm using the "DAQmx Trigger.vi" and the documentation says the following:
    "source is the name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger"
    I tried creating a virtual channel with no luck and have looked through the 4499's documentation but haven't been able to find a reference to source names.
    Can anybody offer a suggestion or point me in the direction of an example?

    Hello bww,
    The example you are looking for can be found on this page. The source you specify will be the signal that triggers the acquisition.  This signal can come through the PFIO for your device, the PXIe chassis backplane, or the Analog Input channels. For your purpose (correct me if I am wrong) you want to acquire on AIO and begin the acquisition when the analog signal (AIO) is above a certain level? Then I would recommend configuring the example to look like the item below.
    Regards,
    Izzy O.
    Applications Engineer
    National Instruments
    www.ni.com/support

  • What is the difference btwn DAQmx ANSI C and VC?

    NI'CD gives some examples, some in DAQmx ANSI C and some in VC? What is the difference?
    How to use DAQmx ANSI C and write it into VC6? Thanks.

    Hello,
    We provide examples in both Visual C++ and ANSI C separately because they are different in nature. ANSI C is a procedural language...when programming on it the general method of solution is to break the task into successively smaller subtasks (top-down design.)
    C++ is an object-oriented language. In C++ generally the first step is to design classes that are abstractions of physical objects. These classes contain both the state of the object, its members, and the capabilities of the object, its methods. After the classes are designed, a program is written that uses these classes to solve the task at hand.
    In order to use DAQmx on VC 6, I would encourage you to look at the NI-DAQmx C Reference Help (it installs with NI-DAQ.)This help contains all the information you should need to program DAQmx in C, it explains NI-DAQmx concepts, functions, properties, etc. You can find this help by going to Start >> Programs >> National Instruments >> NI-DAQ.
    Hope this helps,
    LA

  • Use Daqmx Trigger to initialize software

    Hello,
    I am using an NI PCIe-6537B to run an SMB-2163 High-Speed DIO Accessory.  I have a high speed camera sending out triggers whenever a frame is captured.  Each time the trigger is received into PFI4, a digital output (DIO#) sends out a waveform. 
    I would like to know if it is possible to read that trigger so that I can use it to trigger other things in the software "simultaneously."
    I have attempted to simply read PFI4 as a digital input (Digital Bool 1 Line1 Point) while also using it as the external trigger.  It worked for a while but after I left the project it now seems to only randomly read when the trigger is sent.  Not knowing what changed since it last worked, am I doing this correctly or is there a better way to do this?  Perhaps using the Daqmx events.
    Any help is greatly appreciated!
    Thanks,
    Mike S.
    CLAD
     

    Hey Mike,
    A couple of things here.  Firstly, for the Change Detection timing type, you will not need to use the event structure in your program.  This is implemented in hardware, with samples being latched when the configured lines show the change.  Basically, every time the configured line changes, the DAQmx read will return the values of all lines configured for your channel.
    Also, you will not be able to use PFI4 as the source for change detection.  You will have to specify a data line (ports 0-3) for use with the change detection timing type.  Here's some documentation I could find about using this:
    http://www.ni.com/white-paper/4102/en/
    http://digital.ni.com/public.nsf/allkb/4B9452520950566A86256F31006C9AEF
     

  • Daqmx Trigger Indication

    How can I get an indication to the front panel that an acquisition event has triggered using Daqmx?
    I've set the system to pretrigger on a falling edge, which works fine, however, the end user does not get an indication that the system has triggered until after Daqmx Read.vi has finished reading all the data.......12 seconds later (duration of acquisition event).  I'd like the user to get the indication at the moment the trigger threshold parameters have been met.
    I'm using LabVIEW 7.1, DAQmx 7.2.
    Thanks.

    I agree that a software trigger might be your best answer.  I cannot think of a good way without additional hardware to indicate to the user the occurrence of a hardware reference trigger.  The properties for available samples and total samples acquired will not give you the indication you are looking for with a reference trigger.  These are valid options for a start trigger.  If pretrigger samples are important to your application you can continuously read the samples into LabVIEW and programmatically determine the location you wish to trigger, saving your desired number of pretrigger samples and discarding the rest of the pretrigger data. There is an example already built for this in Help>>Find Examples by the name of "Cont Acq&Graph -Analog SW Trigger.vi".
    Hope this helps,
    Jennifer O.

  • DAQmx Trigger

    I have two questions for the VI in attachment. I hope someone can help me :-)
    1° The trigger does not work properly: measurements should start whenever the given value ( "Level" * hammer sensitivity) is reached on channel 0. In fact, if I make the value almost 0, it still doesn't work.
    2° The charts should have a "memory" of 6 seconds: ( 10kHz rate at 10k samples per second and chart memory is set to 60k ).
    After plotting those 6 seconds the program should stop ( therefore I used a for-loop, but I'm not too sure what number I have to attach to 'N').
    Any suggestions?
    Thank you in advance.
    Dries
    Attachments:
    Daqmx_trigger.vi ‏40 KB

    Thank you for your reply.
    I don't know property nodes very well, but I already read something about wiring an empty array to the History Data property. The problem which occurs here is the following: if I create an empty array and I want to wire it to the History Data property of that Chart, the following error shows up:
    Array element conflict:
    The type of the source is 1D Array of Double, the type of the sink is 1D array of waveform.
    I've tried to change the 'represetation' of the array, but the '1D array of waveform' type is not shown in the list.
    About the reference trigger:
    If I change the Trigger to a Reference Trigger, set the pretriggered samples to 1000 and run the VI, I get the following error:
    Possible reason(s):
    Measurements: Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available.
    Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.
    Attempted to Read Sample: 22362
    Property: RelativeTo
    Corresponding Value: Current Read Position
    Property: Offset
    Corresponding Value:
    Task Name: _unnamedTask<8>
    Now if I take a look at the Labview Help for Reference Analog Edge Triggering, I read the following:
    "When you use a Reference Trigger, the default for the read RelativeTo property is First Pretrigger Sample with a read Offset of 0."
    Does this mean that I have to use the DAQmx Read Property Node? If so, could you explain me how I have to use it?
    Many thanks in advance,
    Best regards,
    Dries

  • DAQmx trigger AO from AI signal (error -200265)?

    Here's my problem:
    I have a PXI-6115 i/o card and I'm observing a waveform on ai0.  When the waveform reaches a threshold, I want to generate a waveform on ao0.  I tried looking at the example, "Cont Gen Voltage Wfm-Int Clk-Analog Start.vi," using ai0 as the trigger source but I get error 200265 (using an invalid trigger source).  I realized that the channel should be in the task if I want to use it as a trigger, but I can't add an AI channel to an AO task, so I'm kind of stuck.
    I've attached part of the code that I'm trying to use.  Any advice would be greatly appreciated!
    Attachments:
    trigger_ao_from_ai.vi ‏50 KB

    If your timing between Analog In and Analog Out is not critical, you could just use software triggering.  Get your AO setup with Start Trigger set to None.  Don't run it yet.  Get your AI setup to read 1 sample.  In a loop, put the AI read function.  Each loop iteration should return one reading.  When the reading goes below the threshold, call the AO Write function to send an output. 
    The trick is to not continuously call the AO write whenever the AI input is below the threshold, or it will be called on each loop iteration as long as the AI reading is below the threshold.  You can use a shift register to hold a boolean flag.  Drag down the shift register on the left side to create a previous state terminal.  Send the threshold compare output to the shift register.  On the left, you read both shift registers.  Trigger the AO when the top terminal is True and the bottom terminal is False (using AND and NOT).  This will trigger only once because on the next iteration, both will be True.  The threshold compare will have to go to False and then True again before the next trigger will occur.
    - tbob
    Inventor of the WORM Global

  • DAQmx trigger: start digital edge

    Buongiorno a tutti.
    Mi trovo a lavorare su un VI creato in precedenza da altri colleghi, quindi sto cercando di migliorarne alcuni aspetti.
    Lo strumento si occupa dell'acquisizione di segnali di temperatura e pressione da svariati sensori. I colleghi hanno inserito una fonte di trigger esterna attraverso un generatore di funzione (tektronix AFG3021C). In allegato una immagine della sequenza precente al ciclo while di acquisizione ed elaborazione dei segnali.
    La mia domanda è questa: "è possibile ovviare all'utilizzo del generatore esterno di funzione?"
    Grazie
    Luca 
    Allegati:
    acquisizione.jpg ‏155 KB

    Ciao Luca,
    strano che non ti compare niente, prova a cancellare l'intera funzione e richerla, dovrebbe almeno apparirti i vari PFI della scheda DAQ che hai collegato al PC... Sei sicuro di aver collegato qualcosa?
    In ogni caso ***** vuoi come trigger una forma d'onda generate internamente, quello è un trigger software, prova a guardare questo esempo:
    https://decibel.ni.com/content/docs/DOC-35941
    Buon lavoro e buona giornata,
    Valerio

  • 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

  • Use virtual channel name as input to DAQmx Write? LV8 and DAQmx

    I've created a task for digital output that contains 8 named channels using the DAQmx Create Channel VI in Labview. Is it possible to use the channel name as an input to the DAQmx Write VI to reference the desired channel? I tried wiring a string with the channel name to the "task/channels in" input but I get a -200428 error that says the Value passed to the Task/Channels In control is invalid.
    The help "name to assign" input for the DAQmx Create Channel VI says
       If you use this input to provide your own names for the virtual channels, you must use the names when you refer to these channels
       in other NI-DAQmx VIs and Property Nodes
    OK, so how do you use the name assigned in other VIs?
    George

    George,
    I think that there may be some confusion here about the difference between local and global virtual channels.  First of all, please take a look at the following knowledge base:
    Physical Channels, Virtual Channels, and Tasks in NI-DAQmx
    As discussed in this KB, local global channels are created inside a task, and they only apply to that task.  In the help file for the DAQmx Write VI, the "task/channels in" description says "if you provide a list of virtual channels, NI-DAQmx creates a task automatically."  When you wire a string to this input, a new task is being created, and unless the channel name that you wire in is a global virtual channel (listed in MAX), you will get the error 200428 that you mentioned.  This is because that virtual channel that you are specifying is local to another task and is not associated with this new task. 
    One solution to this issue is to use the DAQmx Save Global Channel VI to save your local virtual channel as a global virtual channel before calling DAQmx Write.  Once this is done, you can then wire the same string constant to the "task/channels in" input of DAQmx Write or other DAQmx VI's. 
    The help text is still correct, but is only applicable in certain situations.  For example, if you create and name an analog input local virtual channel with DAQmx Create Channel, you could then use this channel name as the source input to a DAQmx Trigger VI configured for an analog edge start trigger.  You could also use that channel name as the input to the "ActiveChans" DAQmx Channel Property, which would enable you to modify the properties of that particular channel. 
    Hopefully this information is helpful to you.

  • How to use Counter/timer PWM Pulse as a trigger to aquire data??

    (1) I'm using the NI DAQpad 6015 multi-function card with the new DAQmx Driver. I'm using the counter/timer (counter 0, and counter 1) to generate 2 different PWM pulses to supply my sensor circuit. each pulse is a 1 second in duration. The pulse with 5m.sec duty cycle is the supply for my sensor. In addition to that, I'd like to use the 5 m.sec as a trigger to aquire the sensor reading. The DETECTIN POINT should be the middle of the HIGH State of the 5m.sec pulse (i.e just at the 2.5 m.sec point of the high state).  
    (2) another point is: how to display the counter/timer pwm output pulses on the front pannel?? 
    Attached is the VI i'm using (Complete PWM.vi)
    regards,
    Attachments:
    Complete PWM.vi ‏49 KB

    Hello alaali,
    It sounds like what you need is a trigger delay property node.  This property node specifies an amount of time to wait after the Start Trigger is received before acquiring or generating the first sample. This value is in the units you specify with Start.DelayUnits.  This way you can still acquire using the trigger, and you can specify the delay to be 2.5 ms so that the point that you actually acquire will be 2.5 ms after the trigger.
    Hope this helps.
    Regards,Message Edited by Raajit L on 04-23-2007 04:34 PM
    Raajit L
    National Instruments
    Attachments:
    DAQmx Trigger Delay.jpg ‏6 KB

  • How to generate sequence of pulse trains with DAQmx?

    I need to generate a sequence of pulse trains with DAQmx (the card I have is a PXI-6229 card). As an example:
    - 10'000 pulses at 20kHz every 5 seconds with an initial offset of 2 seconds (let's say 10 pulse trains in total).
    If I use the CreateVirtualChannel.vi in "CO pulse ticks" mode, I can only specificy offset, high ticks and low ticks, but not that the sequence of pulses should be repeated after some time. 
    Now I thought that I could solve this problem if it were possible to multiply two counter outputs: the first counter would generate the pulses (continuously) whereas the second one would switch between low and high on a slower timescale in order to gate the first counter, thereby providing an initial offset and the "off" phases between the pulse trains.
    Is it somehow possible to multiply two outputs with DAQmx and the card I have? Or is there another solution to the problem?
    Thanks a lot in advance for any hints!

    Hi dlanger,
    what you want to do requires a little bit more work. 
    First look at the example "Gen Dig Pulse Train-Continuous.vi" from the LV example finder.
    This example generates a continuous* pulse train. As you see, you need a sample clock VI for setting the sample mode. 
    * NOTE: Generating a finite pulse train with a M-series card requires 2 counter.
    With a pause trigger (DAQmx trigger property node) you can gate the output of that counter.
    Now you have to generate a gate-signal with the the 2nd counter. That means, only if  Ctr1-out is high Ctr0-out outputs the 20 kHz-signal. 
    Maybe you have to adjust the times in my example a bit. 
    Unfortunately there is just one "small" problem: "let's say 10 pulse trains in total" 
    This is not possible, because a 3rd counter would be necessary (*). 
    As a workaround you can modify the while-loop that both tasks are cleared after 50s. This is not brilliant, but should work fine for you. 
    A more sophisticated way is to perform a correlated DIO. So you can generate custom pattern for multiple outputs. 
    A good example can you find here: 
    Retrigger and Repeat Finite Digital Pulse Train in LabVIEW
    http://decibel.ni.com/content/docs/DOC-8473 
    or here:  
    Generating More Than 2 Pulse Trains Using CompactDAQ
    http://decibel.ni.com/content/docs/DOC-2167 
    Hope this helps.
    With best wishes,
    Ralf N. 
    Attachments:
    Gen Gated Dig Pulse Train-Continuous.vi ‏38 KB

  • How can i use an ao card (pci 6723) to output data and to trigger an ai o acquire the data coming from the ao card?card (pci 6254) t

    Hello
    I am trying to perform AO (pci 6723) and to trigger my AO card (pci
    6254) to read the data coming from the AO card. I am using LV7,1,
    win2000.
    Is an RTSI cable necessary or I can connect the trigger signals externally ?
    I am using the LV example " multi function - synch ai-ao.vi" but i can't for some reason configure the trigger lines.
    thank you in advance for your time.
    Yiannis

    Hello Yiannis,
    If I understand you correctly, you want to synchronize your analog input and analog output that are started by a trigger on the analog input board. If you don't want to use the RTSI lines, your best bet is to export the AI Sample Clock and then read it in to the AO board. There is an example on ni.com called DAQmx - Synchronized AIAO Shared Clock. It appears to be having techincal issues so I have attached the example below. To export ai/sampleclock, use DAQmx Export Signal.vi after Get Terminal Name with Device Prefix.vi. Export Sample Clock to PFI3 (There are only connections between the sample clock and PCI3/4/8/9). Connect PFI3 on your AI board to PFI0 on your AO board (with a wire). Then change the source for the AO Timing.vi to Devx/PFI0. If you want to do triggering, stick the DAQmx Trigger.vi between the Timing property node and the DAQmx Start.vi on the AI task. I have shown how to do this in the modified version below. Please take a look at it and let me know if you have any questions. If you still get an error please take a screenshot of it and post to the forum. Have a great day!
    Sincerely,
    Marni S.
    Attachments:
    Synchronized_AIAO_Shared_Clock[Modified].vi ‏140 KB

  • Sync output timing to hardware trigger (PFI?)

    I'd like to sync the output of my cards (2 PCI-6733 connected with an RTSI cable, and using  BNC-2110's) to the AC power line of the lab I work in. That is, when told to output, they will always wait and output at the same point in the 60Hz cycle.  
    To that end, I've built a circuit that gives a TTL signal that is synced to the building's AC line. I now need to find a way to take this TTL signal and use it as the starter for my experimental sequence. If there is a delay that's ok, however it needs to be a consistant delay (to within a few microseconds preferably). This is so that everytime I run my experimental sequence, I'm starting at the same point in the AC power cycle.
    Is it correct to use the PFI port to try and do this? Other suggestions?
    The sequence would be:
    Step 1: Cards are ready to write
    Step 2: Cards write once, started by hardware trigger of the TTL from the circuit I built.
    Step 3: Other Labview code runs, and then returns to step 1.
    Solved!
    Go to Solution.

    Ok. Knowing about DAQmx export signal is definitely helpful. I don't think I've got everything set up quite right though, as it's giving me an error with what I tried. 
    Error -89136 occurred at DAQmx Start Task.vi:1
    Possible reason(s):
    Specified route cannot be satisfied, because the hardware does not support it.
    Property: StartTrig.OutputTerm
    Destination Device: Dev1
    Destination Terminal: PFI0
    Task Name: _unnamedTask<1E>
    I'm not sure on the correct order of the DAQmx functions. I currently have: Create Channel -> Timing -> Write -> Export Signal (?) -> Start Task. This doesn't seem to be the correct way to do this though. The sample you linked to had the Write after the Start Task... which doesn't quite make sense to me... In addition, I'm not sure where to put the DAQmx Trigger.vi in this sequence.
    Any pointers to set me in the right direction? I've attached a screenshot and vi of my current code to show you what I do now. 
    Attachments:
    Write2PCI6733 (SubVI).vi ‏54 KB
    WriteToPCIscheme_Mar9_2012.PNG ‏59 KB

Maybe you are looking for

  • How do you transfer pictures from the iPad to a PC?

    I thought I should be able to upload pictures from my iPad to an SD card so I could transfer them to my pc but I can't figure out how to do it.

  • Printing from 10.6.6 to an HP Officejet 6210xi All-in-One printer

    I have a brand new iMac - 27-inch, 3.2Ghz running 10.6.6 - connected to an older printer, an HP Officejet 6210xi All-in-One printer, and I am unable to print. Running the Printer System Preferences sees the printer via USB, and I install the print-dr

  • Promotion for high school students?

    Is there any promotion or sale for High School students? How does it work? Thanks.

  • Issue relating to Cost Sheet

    Hi, Can any one tell me how to create cost sheet for each production order. As each cost sheet has different rates for material overhead, production over head and admin overhead. Whether one cost sheet is sufficient to maintain overhead rates. Please

  • Performance monitoring by service operation

    Hi, We are using PI 7.1 I am drafting naming conventions for our company's PI development and using PI Best Practices : Naming Conventions as a starting point. Now one issue I have , and I beleive it is quite a big one, is that the best practice reco