5761 Trigger Leads Analog CH 0 by 10.16 usec

Hi LV Developers,
I am having a bit of a headache here working with my FlexRIO.  I have a 5761 AC Coupled Digitizer connected to a 7954r FPGA.  All of this is mounted on a PXI Chassis 1031DC and I am running the system remotely through Ethernet.  I am trying to do someting that is very simple: Use the SYNC output of my Agilent 33220A function generator to Trigger the TRIG line of my Digitizer in order to collect the waveform coming out of the function generator for a pre-specified amount of time on Channel 0.  My code searches the TRIG line for a rising edge and once it detects it, it collects "X" amount of samples at a rate of 250 MHz until these "X" samples add up to the pre-specified sampling duration shown as "Record length in microseconds" on the screenshot below.  Everything works well, and I can even get this system to trigger on falling edges.  The problem is that the SYNC line is not in phase with my Output line when I record these.  My Output line from the function generator seems to be leading the Sync line by 10.16 usec.  Ideally, the SYNC lines becomes a TTL high (3.46 V) when the Ouput voltage is greater than zero.
Attachments:
Trigger Input 1 Waveform.zip ‏3864 KB

The lead actually depends on the frequency of the Output signal coming out of the function generator. I have found the following table:
frequency            Output lag in Sample points
5MHz            19 samples (@250Mhz Sample rate)
10MHz            9 samples
20 MHz           5 samples
and this is as high as my function generator can go.  I plan to use this FPGA code to run a 10kHz signal.....so extrapolating the graph, I think I may be several hundred of samples out of phase.

Similar Messages

  • Digital trigger for analog scan

    I need to synchronize the start of several measurements with a trigger. I am using a NI 4472 input card and PCI-6731 output card. I need to trigger an analog scan on the 4472, a voltage output from the 6731, and trigger a dmm to start scanning with a digital output from the 6731.

    To trigger acquisition on the 4472 from a DIO line on a 6731, you would need to follow recommendations similar to Sal's. You could route the DIO line to a RTSI line on the PXI backplane, and then set up the 4472 to trigger acquisition off that RTSI line. You could also use an external connection and wire the DIO line to the "External Trigger" input on the 4472, and configure it to trigger off that signal. Probably the most important thing for you to do is make sure that everything that you want to trigger off that DIO line is setup and waiting for it before the trigger occurs.
    You can also use the example finder to find examples that will work with each individual device. In the bottom left-hand corner of the LabVIEW example finder, there is a button that you
    can click on to select or add the different pieces of hardware you want examples for. After you have configured that correctly, if you limit results to that hardware (check box), the only examples that you will see will be work with that piece of hardware. There are numerous examples of triggering on a digital line for the 4472. Hopefully this get's you moving. Good luck!
    Logan S.

  • Data acquisition from analog start trigger to analog stop trigger

    Hi,
    I'm trying to start and to stop a data aquisition by using an analog input trigger. I'm using NI-USB-6251. At input channel ai0 is a sin-signal connected. At input channel apfi0 is an analog trigger signal connected. I can start the trigger signal by pushing a button on my frequency generator. Here's a part of my code:
    Hi,
    ich versuche eine Messung mit einem analogen Eingangssignal zu starten und zu beenden. Ich benutze die Messkarte NI-USB-6251. An Eingang ai0 ist ein Sinus-Signal angeschlossen. An Eingang apfi0 ist der Triggereingang angeschlossen. Das Triggersignal löse ich immer per Tastendruck auf dem Funktionsgenerator aus. Hier ist ein Teil des Quellcodes:
    TaskHandle taskHandle = 0;
    int32 read;
    float64 *data;
    float64 sampleRate = 1000; //Samples per Channel per Second
    uInt64 sampsPerChan = 4000; //Samples per Channel to read
    int sumOfChan = 1;
    double triggerLevel = 2.0;
    double min = -0.2;
    double max = 0.2;
    double timeOutReadAnalog = 10.0;
    void calculate()
    DAQmxCreateTask("", &taskHandle);
    DAQmxCreateAIVoltageChan(taskHandle, "/dev1/ai0", "", DAQmx_Val_Cfg_Default, min, max, DAQmx_Val_Volts, NULL);
    DAQmxCfgSampClkTiming(taskHandle, "", sampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
    DAQmxCfgAnlgEdgeStartTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel);
    DAQmxCfgAnlgEdgeRefTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel, 3000);
    DAQmxStartTask(taskHandle);
    if( (data=malloc(sampsPerChan*sumOfChan*sizeof(float64)))==NULL )
    MessagePopup("Error","Not enough memory");
    //set start and stop trigger
    //set breakpoint here
    DAQmxReadAnalogF64 (taskHandle, -1, timeOutReadAnalog, DAQmx_Val_GroupByChannel, data, (sampsPerChan * sumOfChan), &read, NULL);
    I've choosen the sample rate (1000/s) and the samples per channel (4000), that the aquisition needs 4 seconds to be complete. I can start the aquisition by Start-Trigger, but I think I have a problem with the function DAQmxCfgAnlgEdgeRefTrig. Actually the array will always be filled with 4000 values. I thought I can start the aquisition by triggering once and e.g. after two seconds triggering again for stopping aquisition with result of 2000 values in the array. I hope you can help me with this problem.
    Ich habe die Sample Rate (1000/s) und die Samples pro Kanal (4000) so gewählt, dass die Aufzeichnung 4 Sekunden dauert. Ich schaffe es auch die Aufzeichnung über den Trigger zu starten, jedoch funktioniert das Stoppen mit der Funktion DAQmxCfgAnlgEdgeRefTrig nicht. Aktuell ist es so, dass das Array immer mit 4000 Werten gefüllt wird.
    Ich hatte mir erhofft, dass ich durch einmalige Triggerung die Messung starten kann und beispielsweise nach zwei Sekunden erneut triggere und die Messung damit stoppe und dann nur 2000 Werte eingelesen habe.
    Ich hoffe, ihr könnt mir dabei helfen.

    Hi Martin,
    I looked over your code and noticed that you called the function without checking the returnvalue.
    Try to change the line to the following:
    First: define a new int32 value and call it for example: errorcode
    Second: The function returns a status code, wich if it fails, includes an error code so save this code in the new generated value
    errorcode = DAQmxCfgAnlgEdgeRefTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel, 3000);
    and try to run the programm and read out this value.
    If you got this value, please post it here and I will try to help you if I can.
    Regards
    Philipp

  • How to use digital trigger with analog I/O

    How do I program analog input and/or analog output to start on a digital trigger (PFI pin) on PCI-4451/4551.
    I have tried out various configuration and succeeded in starting analog input, simultanuous input and output triggered by the the anlaog input signal. I have also succeded i triggering 4551 from the dedicated EXTTRIG pin.
    The problem is to trigger on a selectable PFI pin. I find the help for "AI Trigger Config" and "AO Trigger and Gat Config" misleading - some unsupported features seem to work while selecting PFI pin as source make the PC restart immediately.
    I have not been able to find any LabVIEW example that shows how to use PFI pin as trigger input.
    Using LabVIEW 7.1, NI-DAQ 7.3 on Windows 2000.
    Kind regards / Med venlig hilsen
    Torben

    Hello
    The PCI-4451 does not have any PFI lines. If you look at the user manual in the link beneath you will be able to confirm this by looking at the connector signal discriptions. The same is valid for the PCI-4451
    http://digital.ni.com/manuals.nsf/websearch/6A32358C53BB15F086256660007392DC?OpenDocument&node=132090_US
    The two ways of triggering that you have succeded are the analog triggering and digital triggering that you can peform with the PCI-4451.
    Regards
    Mohadjer

  • How to trigger from analog input channel

    I am using a BNC-2110 into a 6062E card. And I am sure this question has been posted several times but I was unable to find a clear answer. I am trying to use the devices ai0 channel as my trigger source. I tried using a voltage source in the trigger reference, and that almost works but it only works for several loops before coming up with an error. If someone knows what I may be possiblely doing wrong or where to find this information, any assistance would be great.
    - there is always an easy way, but it is always the hardest to find

    Hey Henry,
    The BNC-2110 is just the connector block. What card do you have the is interfacing this block with your computer? (should be a PCI or PCI-express card). Are the GPS receivers outputting digital signals that conform to TTL compatible logic levels (are the signals 5V or 0V with no more than 1.6mA of current)? If they are outputting a digital signal, then you can send these signals into any of the PFI lines to act as a trigger (or to the trigger lines). 
    For example, if you would like to perform an analog acquisition each time the trigger hits and have an X series card, you can open up example finder (help»find examples...) and then open Hardware Input and Output»DAQmx»Analog Measurements»Voltage»Cont Acq&Graph Voltage-Int Clk-Retriggerable.vi. Then make sure your Trigger Source parameter is set to the same PFI line that you are sending your GPS signal to (on the BNC-2110, the trigger connections are really just PFI0 and PFI12, but these are common lines to use for triggers, but any PFI line will work). If you have an M series card, and cannot do retriggerable analog input, you can reference this example for how to use counters to workaround this limitation of our M series cards: https://decibel.ni.com/content/docs/DOC-6801
    If your GPS signal isn't digital, and is some arbitrary analog square wave, you can use an example like this: https://decibel.ni.com/content/docs/DOC-4657 to use the analog value to trigger you're reading (you just need to set the appropriate window for your analog signal in the VI).  I hope this helps!
    -Nathan H
    Software Developer
    National Instruments

  • A quad B signal as trigger for analog daq trigger

    Hi everyone,
    I'm trying to use an A quad B signal to trigger my daq device to acquire current input.
    The system information is: 32-bit Win XP, NI PCI-6236 counter card.  The A quad B signal is generated by a hardware circuit simulator to work as the output of optical linear scale which is not installed yet.
    All I want to do is collecting a current data at certain positions, like 20nm, 40nm, 60nm.... (for example, I use X1 coding, a period of A channel is 20 nm) so that I can plot out the current signal as a function of position. I specified the trigger as uprising.
    I'm confused by the mechanism of "Sample Clock" and "Trigger" because they are both physically implemented by the A quad B signal. Am I right? So how to specify the sample mode and sample rate according to the trigger?
    I attached the vi here and I can not get any chart plot out. I appreciate that if anyone could give me some hints on it.
    Thanks,
    Kang
    Attachments:
    use external A quad B singal as daq trigger.vi ‏57 KB

    Hi Kang,
    It seems that the circuit that you have generates a digital signal; I would suggest you to use this signal as your clock for the analog input.
    You can find an example related to this if you open your NI Example Finder and go to: Hardware Input and Output  » DAQmx  » Analog Measurements » Voltage » Cont Acq&Graph Voltage-Ext Clk.vi
    You’ll need to wire your digital signal to one of the PFI lines of your device.
    Regards,
    steve.bm
    AE | NI

  • Trigger an Analog Signals Acquired Continuously

    Sto acquisendo un segnale periodico tramite una DAQmx e devo triggerrare questo segnale.
    Il mio problema sta nel fatto che devo poter impostare da front panel 3 parametri:
    1 livello del trigger
    2 isteresi
    3 hold off

    La scheda in questione non dispone di circuiteria per hardware analog trigger. Sostanzialmente questo significa che non e' possibile far partire l'acquisizione in seguito all'evento hardware scatenato dal superamento di soglia di uno dei canali analogici.
    L'unica cosa che puo' pensare di implementare e' un conditional retrieval software. in altre parole, bisogna programmare l'applicazione per far partire una acquisizione bufferizzata continua in background e monitorare in parallelo il buffer di dati acquisiti per verificare quando si verifica la condizione di soglia desiderata con relativo ciclo di isteresi e decidere quindi di prendere i dati successivi e farne log a video o su file.
    Questo Esempio puo' essere usato come punto di partenza per sviluppare il codice. E' necessario sostituire il clock esterno che questo esempio usa con il clock interno della scheda (Timing configuration) e quindi implementare il codice per gestire isteresi e holdoff.
    Saluti
    AlessioD
    NI

  • How to trigger an analog waveform from a generated waveform

    Hello all, 
    I have an analog waveform via DAQmx and I have created waveform shape and amplitude limits by using generated square waveforms. I am having trouble aligning these waveforms so that I can test the shape and assure that it is within my limits. 
    Thanks

    There really isn't any method for aligning an acquired signal and a generated signal.  I looked into "Align Waveforms (Continuous).vi", but it doesn't appear to work with Square Waves.  
     http://zone.ni.com/devzone/cda/epd/p/id/5800
    One method you could do is manually align the squre waves by adjusting the phase of the "Square Wave.vi".  From what I understand, that won't work for your testing since it will require interaction.  What parameters of the wave are you trying to measure and test?  Just the amplitudes?  Frequency too?
    I hope this helps.
    -Nathan
    Product Support Engineer
    National Instruments

  • Trying to trigger multiple analog measurements with each pulse of a 500PPR encoder

    I am trying to take multiple analog measurements form 6 sensors with each pulse of a 500 ppr encoder and write these to a file.  Problem I have run into is I am not getting 500 readings with 1 revolution of the encoder the most I have received is 187 however this isnt consistant.
    using
    6024 E Series card
    BEI L25G encoder
    Still relatively new to labview along with using an older version 7.0
    Thank You in advance
    Solved!
    Go to Solution.
    Attachments:
    Rotary.vi ‏213 KB

    Never mind after looking at it somemore i found i was using the wrong sample rate

  • Analog Trigger unavialable in PXIe-4353

    Hello,
    I'd be grateful for some help with my case. I'm building a VI for acquisition of multiple signals from thermocouples. My hardware is NI PXIe-1073 chassis with PXIe-4353 module to read the signals.
    The problem is that I want to use an Analog Edge trigger for the start of the measurement but it is unavialable to choose in the DAQ Assistant properties window (I have only None and Digital Edge to choose form). I also tried to do the same with DAQmx functions but I got the Error which says that I can only choose Digital Edge Trigger or None.
    The hardware (PXIe-4353) does seem to support Analog Triggering: http://zone.ni.com/reference/en-XX/help/370471W-01/cdaqmxsupp/pxie-4353/ or am I mistaken ?
    Also I want to note that I currently use hardware simulation and not the actual hardware - can this be the reason?
    My VI and SubVI are attached to this post. I'm new to Labview so I may have made some silly mistake. Please let me know then
    Attachments:
    poczatek.vi ‏124 KB
    poczatek.vi ‏124 KB
    DAqass.vi ‏70 KB

    Dear pancarlos,
    Unfortunately, the hardware does not support analog triggering, as stated in this thread. If that is necessary in your application, you might want to consider adding another PXI card to the system that does trigger on analog input, and use the trigger lines to start your PXIe-4353.
    Regards:
    Andrew Valko
    National Instruments Hungary

  • How to use counter output pulses to trigger analog input?

    Hello all,
    I hope the kind people using this forum can help me, a lowly beginner LV programmer! I have been attempting to create a VI that produces a user defined number of TTL pulses, separated by every n seconds. Each TTL would be outputted to a stimulator, which in turn generates its own TTL. Using the stimulator-generated TTL, I would like to trigger finite analog data acquisition (e.g. for every TTL, trigger the collection of a data sweep that contains 4000 samples (collected at 4000 Hz), with 1000 samples collected pre-trigger. I would like to also be able to see each data sweep as it is triggered on a chart. As I understand things (lots of online/book/forum reading), I should be using the counter output to generate my TTL pulses, and syncing each counter produced TTL with analog input, as well as using a reference trigger. Also, the AI part should be started first, so that I don' t miss any counter outputs. If it matters, I also need to use one of the AI channels to acquire the TTL, so I can see my stimulator-induced responses to the stimulator in time.
    I am able to generate the TTL pulses from the counter output, but I am having a problem with the AI part. I am unsure how to sync the counter output with AI. Also, since I need to acquire pre-trigger samples, I would be needing to acquire samples continuously, but when I set 'continuous samples' on daqmx timing, the VI doesn't work (hence why's its set to 'finite samples').
     I hope someone out there can help, as I have been at this for what seems ages, with limited success. I am using a USB-6259 and LabView v8.2. Thanks!
    Attachments:
    RC001 v_1.vi ‏49 KB

    Hello,
    Due to the fact that analog tasks themselves are not retriggerable, a
    pulse train produced by a counter is always used as the sample clock
    for the analog input task in order to recreate a retriggerable effect
    for analog input. This can be done by creating a finite pulse train set
    to retriggerable using the DAQmx Trigger Property Node, or the pulse
    train could be continuous and just be gated by another signal. Neither
    of these methods can be properly applied in hardware to create a
    retriggerable reference trigger. You can however implement something
    similar in software by just stopping and restarting your reference
    triggered analog input task within a loop. There will be some delay
    between when the task is stopped and restarted, as these events require
    software intervention, but if there is enough time between when each
    trigger signal is generated, there should not be any noticeable delay
    or missed samples.
    I have attached an example of this!
    Mark B
    ===If this fixes your problem, mark as solution!===
    Attachments:
    RC001 v_1mod.vi ‏25 KB

  • Analog trigger with NI9205 PFI0

    I have a problem to trigger an analog acquire with NI9205 (C module in  Compact DAQ)
    i use the PFI0 line, but the acquire don't start when i send a trigger gignal (5 to 0V)
    the error:
    could you help me?
    Thanks a lot!

    You set your task up to run at a rate of 2400 samples per second, and request 64 samples to be read. This means that it will take at least 37.5ms to take the data.
    Your DAQmx Read function has a timeout of 10ms set.  This means that the read will always timeout before the required samples are read as the error is indicating.
    For this configuration you should not need to wire the timeout setting of the DAQmx read at all, I recommend removing that input!
    Craig H. | CLA | Systems Engineer | National Instruments

  • My question has to do with analog input and triggering? Does anyone have any suggestions on how i can improve the attached vi so it can trigger on a 50kHz ten cycles pulse after the pulse has been sent out on the output?

    Could you just look at this vi and tell me if i am doing anything wrong? I get errors that are different each time I change something. here are the inputs I am using
    Output Side:
    amplitude = 1
    freuency = 50kHz
    Sampling Frequency = 1MHz
    3 of Samples = 200
    Input Side:
    Input Buffer 4000
    trigger type = analog
    pretrigger = 5
    edge or slope = rising
    scan rate = 500kHz
    # of scans = 2000
    Conditional Retrieval
    mode = on
    slope = rising
    skip count = 0
    level = .1
    offset = 0
    hysteresis = 0
    So what we want to do is capture the ten
    cycles of the 50k output pulse on the input and need to store that so we can plot it later, do you have any suggestions. we are using the PCI-MIO- 16E board.
    Thanks,
    Jarrod
    Attachments:
    InputOutput2.vi ‏88 KB

    1) Toss the sequence frames (no flames please).
    2) Set you read and have it ready to trigger before oing the output.
    3) After the output, go back and read the data that is waiting for you.
    4) If you have errors tell us what they are and under what conditions they occured.
    End of Ben's suggestions for now.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can i capture 6 differential analog in lines using PFI0 as a clock?

    Alright here's my setup, i've got labVIEW 8.6.1; i'm using a PXI-6259 i've got 7 diff. analog in lines and a parity line sending parallel data into the 6259. I also have a "strobe" line, which is to be used as the clock. When sending the data on the analog lines into the 6259, the strobe will go high when there is valid data, and only when there is valid data. the width of the strobe is 330u seconds with a 170u second low between each pulse. there is a total of 368 pulses. i have the strobe line wired into the 6259 on pin 11 (PFI0). The data lines go valid 15u seconds before the strobe goes active, and remains valid for another 15u seconds after the strobe goes low. I'm trying to capture one sample on the analog-in lines for each strobe, put the values into an array, and translate them into ascii characters based on the data sheet for the piece of equipment i'm emulating. My daqassistant doing the capturing is timing out, and never showing any data out. is it because i'm using a digital trigger with analog diff. inputs? any ideas?
    thanks,
    Kris

    I don't see the connection between your test vi and your actual setup.  If you have equipment sending data and the trigger, your vi only needs to configure one DAQ device.  Your test vi shows and AO and some POs.  Not sure what those are.  Look at the snippet below to see how it should be done with discrete DAQmx functions instead of an express vi.  This way you can see all of the settings.  What are you using for a clock source?  It should be on-board clock.  Make sure your rate is set correctly and your number of samples is set correctly.
    - tbob
    Inventor of the WORM Global

  • 1ms Time Loop / Event Trigger from Counter

    Hi.  I'm pretty new to LabView so I'm am hoping this is an easy question:
    I need to read the pulse signal from some reluctors (toothed wheels that pulse a signal with each passing tooth).  The amplitude of each pulse is above 2.2V so I was planning on using TTL counters.
    I need to record the status of 5 counters with each increment of one of the counters  For the RPM and tooth count, I can do this with a 1ms timed loop.
    Question:  Can windows successfully give a 1ms (accurate) timed loop?  I know this depends on how much I am doing inside the loop but, for now, I just need to read 5 counters and store the data with a timestamp.
    Is it possible to make a counter throw an event?  If the counter is incrememented, can LabView be notified to then go off and handle a block of code?
    Thanks for any help you can offer!

    I assume you also have an analog input card for the chasis?
    So, it's probably possible to get 1ms timing with software timed loops, however based on my quick check of the manual for your chasis
    http://www.ni.com/pdf/manuals/372780c.pdf (see section 2-2 for example)
    You can use an Analog Comparison Event or a PFI channel to trigger a sample (i.e. your generated pulse is the sample clock). This could allow you to use your pulse to trigger an analog sample. Now, this doesn't get you timing information (it just gets you the value of the analog input at the time the event occurs). To get a time, you can use the counters on the digital card in the same way. You have the counters be driven by a fast sample, on-board clock. Then you can use your pulse events again to sample that clock. So each pulse, you get one analog voltage sample and one time sample from the counter. The resolution on this counter will be great, depending on how fast your counters can be driven (sometimes NI counters can actually be driven faster than the fastest available clock on the card or chasis). 
    Or you can just do the software loop.

Maybe you are looking for

  • The tool was unable to install Application Server Role, Web Server (IIS) Role.

    Hi, After running the prerequisiteinstaller.exe of SharePoint 2013 I am getting the below error in the logs The tool was unable to install Application Server Role, Web Server (IIS) Role. Web server role,application server role  is already there in th

  • Looking for a client side JAXP-RPC HandlerChain example

    I would like to add a handler to the client side of a RPC call using 7.0.1. I can't find any examples to follow for this logic in WebLogic or at Sun's site. Does anyone know of some sample code I can browse to? I believe I want to add some files as a

  • Install Oracle 10g on SUSE Enterprise 10

    Hi, I'm having some trouble with my Oracle installation and it would be great if someone could please point me in the right direction! At about 62% into the install I receive the following error message: Error in invoking target 'client_sharedlib' of

  • Maxtor Basics Personal storage

    Hello Mac Users!. I've just changed over to Mac after many years as a PC user. I have an iMac using V10.4 Tiger as its OS and I'm struggling with the new system. I have brought over a Maxtor Basics Personal Storage 3200 as an external hard drive whic

  • Result Recording QM

    My problem is I Choose 100% Inspection Sample Procedure Is 100% When I Go To Result Recording ,I have lot of 20 nos the Sample are 20but ICan Do Recording For Only 15 nos What setting I Do To Record Results For 20 Nos . Please Mail me At [email prote