LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered pulse with variable delay using 6023E, getting started

I am having a hard time getting started with my PCI-6023E.  My goal is to use it to create a programically controlled delay between the pulse I am inputting and the pulse I hope to output from the 6023E.  I have installed the 6023E into a computer and am trying to trigger using a function generator.  I am looking at the output using a scope.  I think that maybe I have to "turn on" the output of a certain pin.   I can't figure out which pins to connect where.  I think I am supposed to use Counter Group Config.vi to control the delay, but i'm not sure.  Any help or direction to helpful documents would be very much appreciated.
Thanks,
Emily
0 Kudos
Message 1 of 4
(2,994 Views)
Hi Emily,

The PCI-6023E is supported by both the Traditional NI-DAQ driver and the NI-DAQmx driver.  Since you are getting started with development of a new application, I would highly recommend the NI-DAQmx driver (right now I believe you are using Traditional NI-DAQ because of the Counter Group Config.vi).  See the article here for information on the advantages of the NI-DAQmx driver.

Let's first take a look at the hardware level and what the 6023E is capable of:
The 6023E digital I/O lines are static, meaning that they either output a digital value or read a digital value at the instant the software function is called.  Ideally, you would receive a digital trigger and specify in software a delay past the trigger to output the digital value from another line.  However, the 6023E does not support triggers for digital tasks.

Any timing or delay will have to be taken care of on a software level.  You could continually poll the digital line connected to your function generator to look for the trigger occurrence.  When that trigger is detected, a software delay could be implemented before making a digital write to another line.  If you choose to go the route of NI-DAQmx, there are a number of shipping examples included with the driver that could get you started.  They can be found by going to Help>>Find Examples in LabVIEW to bring up the NI Example Finder.  From there you would browse in the directory Hardware Input and Output>>DAQmx

Regards,
Andrew W
National Instruments
0 Kudos
Message 2 of 4
(2,975 Views)
The problem with using a software delay is that I want to delay on the order of around 10ns.  We also have a 6602 laying around.  Do you think that would be up to the job?
Thank you so much for all your help.
0 Kudos
Message 3 of 4
(2,975 Views)
The 6602 does have the capability of triggered counter output.  There is a shipping example included with the DAQmx driver called "Gen Dig Pulse-Dig Start.vi" that demonstrates this.  You can specify the PFI line that is receiving the external trigger, and then the counter pulse output can be configured with an initial delay.  However, there is a minimum value required for the initial delay.  The best resolution you could get with this kind of application is by generating the digital pulse based upon the number of ticks of the internal clock.  The minimum number of ticks required for the 6602 is 2.  With an internal clock of 80Mhz, this gives you a minimum of 25ns delay past when the trigger is received to when the pulse is generated.

I want to point out that this functionality is also supported by the 6023E (earlier I was thinking in terms of digital line output rather than counter output).  The downside is that the 6023E has an even larger minimum initial delay because its internal clock is 20MHz (2 ticks = 100ns).  Let me know if you have any other questions.

Regards,
Andrew
0 Kudos
Message 4 of 4
(2,969 Views)