6221 pulse generation using external digital trigger

Hi there: I am trying to do something very basic, but cannot figure out how to do it. I have an NI 6221 USB I/O device.  I want to program it to generate a digital output 100ms after receiving a digital input. I am trying to create a task to do this using NI Max, but all of the options on the trigger source menu are greyed out. There is no way to specify an external hardware trigger.  Do I have to program this functionality using DAQmx in the code?

I found the solution to this question in Gen Dig Pulse-Dig Start.vi from the NI example finder. The answer is that you do need to configure the input trigger programmaticaly using the DAQmx functions. See example code for more details.

Similar Messages

  • Determine when Counter Pulse Generation has been digitally triggered to start

    A counter task has been configured for continuous pulse generation with a digital edge start.  How in LabVIEW can I determine when an external digital trigger has been received and the counter started ?  It seems that a timed loop with DAQmx Create Timing Source wired to its source could be made to work but I cannot figure out how or the most appropriate instance to use.  I would simply stop the timed loop once the counter start had been detected.
    Steve

    Querying the output state and looking for a change would probably work for many typical square-like pulsetrains.  If you have an extreme duty cycle like 1% or something though, your queries are likely to keep finding the counter in the same output state long after pulses have started.
    Some other ideas of a similar nature may work better, though I'm not near a LV machine to test them.  I can vouch for idea #1 from past usage though.
    1. Query the counter's 'count' property and look for a change.  You're pretty unlikely to query the same count value several times in a row during pulse generation.
    2. You could try querying the DAQmx property for "TotalSamplesGenerated" and look for a non-zero value.  I'm not sure if this gets updated for counter outputs though.
    3. Counters also have a property called "TC reached?" where TC means terminal count.  When you query and get a True, It automatically resets itself back to False until reaching TC again.  Again, while I know this works for counter input tasks, I'm not sure if it gets updated for counter outputs.
    -Kevin P.

  • Reading a PWM and determining pulse width using a digital input pin on a NI 9425 DAQ

    Hello!
    I have been experimenting with LabVIEW for about a week now and have run into a brick wall.  I have found a fairly effective way of reading a PWM signal through an analog input and determining the pulse width.  However, it is becoming necessary for this project to do this same thing using a digital input.  I've been playing with this for about a day now and am not making much headway.
    For reference, I will be using a 9524 device
    Any ideas?

    Also, if it is helpful at all, I've attached two vi's.  One, functions just as I need it to - but it doesn't involve data aquisition.  The second should be similar to the first, but is non functional - I keep getting an error that my amplitude is zero.
    Any thoughts?
    Attachments:
    DigitalEdgeDetectionKnown.vi ‏47 KB
    DigitalEdgeDetectionRead.vi ‏148 KB

  • Connecting an external digital trigger to a DAQPad 6015

    Hi. Im trying to externally trigger a series of concentration probes that I have connected through the DAQPad 6015 and on to LabView.
    I do not have any external ports on my DAQ device for receiving a trigger signal and so I am trying to connect it through the screw ports that are available.
    However, I have never done anything like this before and have come a little unstuck.
    I just want the probes to start acquiring information once they receive a 5V rising edge signal from an external piston.
    Any help that you could give me regarding connecting the system up, would be greatly appreciated.
    Thanks
    Nial

    Hi Neil,
    You need to setup triggering in your LabVIEW application and then use the trigger line you have setup in your application to wire in the trigger signal. We usually use PFI0, Attached is an example program that reads in 5 voltages from a DAQpad-6015 on Dev4 and then triggers on PFI0 on a rising digital edge.
    To find the pinout of the 6015, you need to go to MAX >> Devices and interfaces >> NI-DAQmx >> DAQpad 6015
    Right-click select Device Pinouts.
    Hope this helps
    Regards
    JamesC
    NIUK and Ireland
    Attachments:
    Neil.zip ‏106 KB

  • How to sync. 50Hz sample rate with 5Hz external digital trigger signal?

    Hello there,
    I want to sample an analog input at 50Hz, where I further want to use
    the 5Hz PPS signal of a GPS receiver as an external trigger/clock
    signal for the NI DAQ USB-6008 device. However, I do not want to read
    10 samples every 200ms (= 50Hz avg. sample rate), but I want to read 1
    sample every 20ms, i.e. with "real" 50Hz.
    The "natural" way, it seems would be to use a task that waits for a
    rising edge on the ext. trigger input, then reads 10 samples, then
    waits for the next trigger edge, and so on.
    However, it seems that with this approach I cannot read the data from
    the DAQ with real 50Hz, further it seems that every 10 samples the task
    needs to be restarted, which takes longer than the 20ms (corresponding
    to the 50Hz target sample rate).
    I hope the problem description is clear enough....
    Thank you in advance for any advice.
    Regards,
    Oliver

    You have to use the counter together with the analog input to achive this. You could configure the counter to generate 10 pulses with 50 Hz whenever the counter sees a rising edge on the inpput of the counter. The output of the counter would be used as the external clock for the analog input.

  • How to set & use digital trigger for AIN on a DAQmx?

    1) How I configure a task to allow a digital input line to trigger a AIN reading in VB6.0 with a USB-6210?
    2) To help me answer the above I created a task in Measurement & Automation Explorer that used a digital trigger (TRIGGER TYPE= DIGITAL EDGE, TRIGGER SOURCE = PFI0, EDGE=RISING).  Then from VB I tried to figure out the parameters that were set.  I had no luck.  So, once I understand to achieve (1) above I want to be able to verify the resulting settings.  What command(s) would I use?

    Hi Hjehan,
    I recommend checking the following knowledge Base that can point you to the different DAQmx examples.
    Regards,
    Faris A
    Bueller

  • Generate counter output based on a digital trigger

    I am trying to output a train of pulse based on a digital trigger (GO bit). When the GO bit goes high, I want to output a pulse train after an initial delay (ie: 2 seconds). When the GO bit goes low, I want to stop this pulse train. When the GO bit goes high again, I want to start the same pulse train with the same initial delay.
    The output pulse train has 2 frequencies so I am using 2 counters that generate the same pulse but one of them is delayed by a certain amount. Then I combine the output from both counters into one output using simple BNC T connector. Since I am using 2 counters (max # of counters available to me), I can't create a finite pulse train.
    If I use a pause trigger, the only problem is that  the second time the GO bit goes high, the initial delay is not used (each channel or counter has a different delay).
    So far the only way I can think of is by software timing the counter (by counting the time since the task has started) and stopping the task once certain amount of time has passed. Then I wait for a second trigger which should start the pulse train again with the initial delay.
    Is there a better way to do this? 

    One more thing:
    Is there any way to use a digital trigger that is based on two different digital signals ANDed together? I basically want to output the pulses when 2 digital inputs are binary 1 at the same time.

  • Reusing digital trigger on PCI-6733

    I am working with a PCI-6733 analog output card. I would like to use the digital trigger to start a waveform, then use it to start another waveform without stopping the first (then start a third while the first two are running, and so on). I don't need to reroute the trigger signal - all the pulses can (but don�t have to) come through the same PFI terminal.
    I haven't been able to do this with NI-DAQmx (I get errors, e.g. -50103, -89137, saying the "resources are in use"). Is it possible? Can it be done using register level programming? - looking through the register level programming guides, I didn�t see anything that indicated setting a new trigger would stop the currently running waveforms.
    Thanks in advance,
    Matt

    Hello Matt,
    I believe you can do it only if you use different PFI lines to trigger your waveforms. You won't be able to do it with one digital trigger, that's why you were getting those errors.
    Try using three PFI lines to trigger each waveform and let me know if it works please.
    LA

  • How do I generate two finite pulse trains using counters on PXI-6251

    I'm trying to use Counter 0 and Counter 1 on the PXI-6251 to generate two finite pulse trains.  But, I get this error:   "The specified resource is reserved. The operation could not be completed as specified."  See attached example.
    Inside the disabled box is what I'd like to run on both counters.  I stripped things down to creating the task, starting, and stopping.  I then started to add things to see what my problem was.  The timing VI seems to be what causes me issues but I don't know why. 
    My end objective is two identical pulse trains with one delayed by 5us, which I figured would be easy to do in the initial delay.  I tried both in a single task and as separate tasks with no avail.
    Attachments:
    2_counter_outputs.vi ‏32 KB

    Hi SirMutt,
    Creating a finite pulse train requires
    two counters. What’s really happening is that one counter is creating a
    continuous pulse train while the other counter applies a finite pulse to “window”
    the pulse.
    What you want to do is correlated DIO. I’ve
    done a search on our website for “correlated DIO” and have come up with a few
    resources. Hopefully that will help you get started.
    Digital Output and Pulse Generation
    Performing Correlated Digital IO with an M Series Device in LabVIEW
    M Series Hardware-Time DIO with Counter Clock Generation
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

  • Hardware digital trigger to start stop continuous analog acquisition

    Hi I have seen the following example to use digital trigger to start and stop for finite number of samples. The example names is (DigitalStartandStopTrigger.vi)
    in this example Reference Digital edge is used to stop acquisition but if I change to  continuous then Reference Digital edge stops and show an errir. Could you please let me know how can I use hardware digital trigger to start stop continuous analog acquisition. An example would be really great
    many thanks

    HI tintin_99,
    The way that example works (by modifying the read position of the buffer) essentially performs the same operation that the continuous samples mode does. That is to say, it is already a continuous acquisition.
    The article below explains this in more detail, and the reasoning behind specifying buffer size manually and other tricks used. You may have already visited it in order to get the example VI, in which case it may be worth another read over.
    http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB
    Kind Regards,

  • How do I auire data at every third pulse of an external trigger?

    I need to aquire 2048 data points where each one is triggered by the third pulse of an external trigger (TTL). Currently I can aquire 2048 data points where each is triggered by every pulse of an external trigger but I need to be able to do this at every third trigger pulse. It seems that I can't do this simply by entering "2" into the "skip count" input of the "Additional Trig Parameters' input of the "AI Start" VI. My attempt is in the VI titled TriggerScanA.
    Further more I will need to know the actual trigger scan rate for data analysis. This is also prooving difficult since even when I am triggering off every external trigger pulse the actual scan rate only returns zeros. My attempt is i
    n the VI entitled TriggerScanB.
    Thankyou.
    Attachments:
    Trigger_Scan_VI's.llb ‏211 KB

    Greetings,
    This sounds like an interesting application. I would suggest that you use your external pulse train as a scan clock, not as a start trigger. Furthermore, since you want to acquire data every third pulse, you will need to use one of your device's counters to divide-down this signal. To accomplish this task, you will need to configure the counter for pulse train generation with an external source - your external pulse train. You will then need to choose the correct "raw counts" to generate a pulse train with a frequency that is 1/3 of that of your external signal. I would suggest that you examine the example Generate Pulse Train (DAQ-STC).vi for this purpose. Now, you can perform a finite analog input acquisition of 2048 data points u
    sing this pulse train as your scan clock. Finally, to determine the frequency of your scan clock, you will need to us your device's other counter to perform a frequency measurement of either pulse train.
    I believe that this will be your best approach to accomplishing this task. Good luck with your application.
    Spencer S.

  • How do I use a push button digital trigger with my 6034E DAQ board?

    I am only a Lab View toddler.
    I am currently using a push button, wired to PFIO/TRIG1 and DGND, with a anolog trigger. However noise is causing my program to be triggered. I was told that a digital trigger would help to reduce the random triggering. How do I create a push button digital trigger?
    Thanks

    implement a schmitt trigger.
    Struggling with Labview wrote in message
    <[email protected]>...
    >I am only a Lab View toddler.
    >I am currently using a push button, wired to PFIO/TRIG1 and DGND, with
    >a anolog trigger. However noise is causing my program to be triggered.
    >I was told that a digital trigger would help to reduce the random
    >triggering. How do I create a push button digital trigger?
    >Thanks

  • 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

  • Pulse Train Generation using PCI-MIO-16E-4

    I need to generate pulse trains of changing pulse widths using PCI-MIO-16E-4 daq card using Igor Pro.
    I have tried to use the CTR functions (but always keep getting errors and it doesn't work). I also used the general purpose counters (GPCTR functions) but cannot visualise them on a CRO. If someone can help in regards to the programming aspect, it will be greatly appreciated.
    Thanks
    Vakul

    Hi Vakul,
    Some questions that might help me to get you a solution.
    Are you using Traditional DAQ, or DAQmx and which versions are you using?
    What operating system are you running?
    When you say you can't visualize them on CRO, I assume that you are hooking the counter out to a cathode ray oscilloscope and can't see the pulse train?
    Are you going to need more than two different pulse widths for your pulse train?
    There are several online knowledge bases describing how to change the frequency of a pulse train on the fly.
    This link explains how to use software to create a new pulse width.
    http://digital.ni.com/public.nsf/websearch/7B1B0427C39FE33086256CEE00752133?OpenDocument
    This link discusses using frequency shift keying, which will only allow you to have 2 different pulse widths.
    http://digital.ni.com/public.nsf/websearch/EC1F089252F33B248625696E006FB6FC?OpenDocument
    I assume that you are writing this program to compile in Igor Pro using C. I can help you with the C code development, but don't know anything about the Igor Pro API.
    Please get back to me about those questions and let me know if you need further help.
    Michael Denton

  • Using Digital Trigger in VILogger

    I am using Ni-6033E with VILogger 1.1.
    The question I have is, if I can use the +5V signal (terminal 34) and wire it back to DIO0 (terminal 25) through a switch, and start acquisition/logging in VILogger using the switch? I have configured DIO0 as a digital input line in VILogger under Virtual Channel.
    If not, how do I trigger data acquisition/logging in VILogger using the digital input (DIO0 to DIO7)?

    Hi Jogwa,
    The answer is yes, you can start logging in VILogger using your switch and a digital input line. However, you cannot use DIO0 for the digital trigger input line. You must use one of the PFI channels, which are designed for triggering input. So, in your case wire the +5V signal back to PFI0. Then, you can create your Virtual Channel and use that as your trigger in VILogger.
    Hope this helps!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

Maybe you are looking for

  • Vendor Bank_Pmt

    Hello Friends, Vendor "A" has 10 bank accounts. There are 10 open invoices which we need to pay to Vendor "A" i want to settile Inv.No.1 to vendor Bank.No.1                        Inv.No.2 to vendor Bank.No.2                        Inv.No.3 to vendor

  • Messages Opening Image Cache Folder when Sending Files

    Messages / iChat seems to be opening my image cache folder every time I send an image to my contacts the image cache folder opens in Finder and stays open with the copied image. Is there a way to get rid of this? It's really annoying. It started happ

  • Lost my iphotos how to transfer from Xdrive

    I downloaded all my photos to an Xdrive, somehow they all ended up on the desk top, over 8K photos. They put the computer into slow motion, so I selected them all and sent them to trash. This freed up the computer but had no photos left. I have iPhot

  • Does a Macbook Pro have iWeb already on it?

    I'm purchasing a MacBook Pro and have always loved iWeb, does iWeb come on the MacBook Pro?? And does Garageband and iMovie too??

  • Too many jars

    Hi, Friends, For some good reasons, I received a lot of jar files (25) and I have to include them in my classpath. Now I have a problem. When I use javac or ant, I got The input line is too long. The syntax of the command is incorrect. I don't know i