03-05-2010 05:35 PM
How do I set up a digital channel to output a single pulse?
Can I generate a pulse on one digital channel after a specified time from the rising edge of a digital output that is controlled statically?
03-08-2010
01:31 PM
- last edited on
05-28-2024
10:06 AM
by
Content Cleaner
Hello jscinc-
In order to output a single pulse on a digital channel, your device would need to support correlated digital I/O, which is where you can correlate an external pulse or timebase as a clock for a digital output. Unfortunately, the USB-6212 does not. I would recommend looking into our 625x series cards or our X series cards.
If your counters are available, you can use both of them to create one 'pulse'. One counter would take an external trigger to start counting and would output that count to the second counter. The second counter could be configured to wait a specific number of input counts then output a specific number of 'high' counts that act like a single digital high pulse. In this way, you use two counters to receive a trigger and output a single pulse after a specified time. It would, however, be easier to use a card that either has an onboard digital timebase (as in our X Series cards) or supports correlated DIO.
I hope this answers your questions! Best of luck with your application.
03-08-2010 01:57 PM
Gary
I do not have the option to change from the 6212. I am also not supplying an external clock.
Is there a way to generate a single pulse from the 6212 using the internal counters and/or timebases?
Thanks
John
03-09-2010 12:26 PM
Hi John-
Yes, there is. As a matter of fact, you can do it using only one counter. There is an example of this in the LabVIEW shipping examples. In LabVIEW, open the Example Finder by clicking on Help»Find Examples. Then browse to Hardware Input and Output»DAQmx»Generating Digital Pulses»Gen Dig Pulse Train-Finite-Dig Start.vi. On the front panel of this VI, you can configure the number of pulses to send out with this pulse train, and set an inital delay in seconds. You can open or build another VI to read this on one of the analog input channels if you want to observe its functionality. I opened and ran it and it worked beautifully.
I hope this answers your question. Have a great day!
03-09-2010 12:29 PM
Gary,
Sorry, I am using CVI not LabView. Do you have an example in CVI?
Thanks
John
03-10-2010 11:29 AM
Hi John-
There are some examples in CVI that you can use. You will have to adapt features from two different examples, but it should be fairly straightforward. In CVI, go to Help»Find Examples. In the Example Finder, navigate to Hardware Input and Output»DAQmx»Generating Digital Pulses»DigPulseTrain-Cont-DigStart. This program executes a continuous pulse train with a trigger. To generate a finite pulse train, open the DigPulse example. I would start with the simpler DigPulse example, test it out to make sure it works, then use the trigger logic from the DigPulseTrain-Cont-DigStart example to configure a trigger.
This should get you started in the right direction!
10-26-2010 04:36 PM
Hi Gary,
I'm using the M series 6212 and I would also like to generate a digital pulse train. I do not have extensive labview experience and have very little experience with the DAQ assistant. Whenever I try to run a digital waveform, I am not allowed to do N samples in my task. I receive the error 200077. More details listed below:
Property: SampTimingTypeYou Have Requested: Sample ClockYou Can Select: On Demand
I was wondering if there was any way to generate a digital pulse train with a pulse width faster than 1ms on the 6212. I was able to generate an analog pulse train (with slight aliasing) up to the 25 microsecond pulse width range. I am looking to create a digital pulse of width 10 microseconds followed by a lag time of about 90 microseconds and then repeat.
Thanks for your help,
Ben
10-27-2010 09:10 AM
Devil17-
There is not a way to create that pulse train on the 6212. It is only a software-timed digital device, meaning the sample clock is "On Demand". The demand is created by Windows; your 6212 relies on software calls to pull data and time digital acquisitions.
It sounds like you are getting about 1 ms pulse widths - this is about the fastest you are going to achieve with an On Demand device. As aforementioned, you would need to acquire a hardware-timed device to be able to deterministically generate digital pulses.
11-02-2010
05:21 PM
- last edited on
05-28-2024
10:06 AM
by
Content Cleaner
Hi Ben,
If I understand correctly, you can use the counters to do this. Try starting with this example:
Generate Continuous Pulse Train with Buffered Implicit Timing
The example shows Frequency/Duty Cycle but you can instead specify the parameters as high time and low time by changing the polymorphic instance of the DAQmx Create Channel.
Best Regards,
03-14-2013 10:48 PM
Hello John,
First of all, thank you for posting the example: "Generate Continuous Pulse Train in Buffered Implicit Timing" here. It looked exactly what I needed.
However, could you possibly elaborate little more on how exactly you "change the Polymorphic instance of the DAQmx Create Channel". I am a learner... tried different things with no results.
In the first (Create Channel) VI, I have changed frequency to Hi & Low time but it doesn't run (with USB 6212). I tried to create a Polymorphic VI via File -New option and included both VIs needed to run
Gen Dig Pulse Train-Buff-Implicit-Count.vi but that did not help. The second VI runs OK by itself (Generate PWM VI)
Your detailed instructions on how do it would be very much appreciated.
Thank you.