Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a digital pulse on a specified line?

I would like to generate a ttl pulse on a specified digital line but I am not sure how to do this. I used a shift register to do this but it is way to slow. I am sure there is a much better way to output this pulse but I am not sure how to do this, can someone help me? Thank you.
0 Kudos
Message 1 of 15
(13,389 Views)
Hello:

Judging from your attached VI, I believe you have an E-Series Multifunction board b/c you have AI and DIO. Is this true? If so, use the onboard counter to generate your TTL pulse / pulse train. The DIO lines are software timed only so you will never be able to produce a deterministic output period using the DIO lines. However, you can program you counter to output a single pulse or a pulse train. Open LabVIEW and go to "Help >> Find Examples >> Hardware Input and Output >> Traditional DAQ >> Counters >> DAQ-STC" and try out these examples:
Generate Single Pulse (DAQ-STC).vi
Generate Pulse Train (DAQ-STC).vi

Since you have LabVIEW 7.0, you could also use our new DAQ driver, DAQmx. The examples for DAQmx are located in "LabVIEW >> Help >> Find
Examples >> Hardware Input and Output >> DAQmx >> Generating Digital Pulses" and all of those examples are related to generating pulses and pulse trains. Just remember to do you AI with DAQmx if you use DAQmx for the pulses (you can only use one driver at a time).

Good Luck!

Sincerely,
Brooks B
Applications Engineer
0 Kudos
Message 2 of 15
(13,389 Views)
Great thank you. I had actually looked at that example yesterday, but I did not know that that there was a GPCTR0_OUT pin for that vi to output on. I kept looking for a way to connect it to DIO pin. Thanks.
0 Kudos
Message 3 of 15
(13,389 Views)
Hi there,

I've also used the counter to generate a pulse train and the second couner to count the edges with the same frequency. But now I use an USB-6009 NI-Card that has only 1 counter, but I need two pulse trains simultaneously! I think the only way to solve the problem is to output the pulse train on a digital line, isn't it?

Can anyone please tell me how to do this the best way?

Kind regards peter

PS: It's important that I can count the pulses!!


0 Kudos
Message 4 of 15
(13,095 Views)
Hello jolly jumper,

One important point to remember about the USB-6009 is that the counter on that device is a simple event counter.  It cannot be used for any type of pulse generation.  In this case, the only option you have is to use software-timed digital I/O to generate you pulse train.  If you want more deterministic results, you should use an M Series multifunction DAQ board with two counter/timers.  If USB connectivity is important for you, we do have two M Series devices, the USB-6251 and USB-6259, that have USB connectivity. 

Let me know if this answers your question!

Best regards,
0 Kudos
Message 5 of 15
(13,083 Views)
Hello Jarrod,

well your explanation was very helpful! I have two NI-Cards I can use:
PCI-6024E (2 counters -> it works with this device)
USB-6009

Would you possibly be so kind as two give me an example? I don't know how to output a software generated pulse. (Only in a timed loop.. when I use a bool that changes its state, but the max. frequency I can get this way is 500 Hz, because my device only supports time loops with 1 kHz). I need to control the pulse in a range between 100 and 2000 Hz.

Best regards Peter
0 Kudos
Message 6 of 15
(13,077 Views)
Hello jolly jumper,

You can use any of the software-timed DAQmx examples that are installed with the driver.  For example, in LabVIEW, you could use the Write Dig Chan.vi example as a starting point.  You will have to generate your own boolean array or digital waveform to use for the data output and index this data structure element by element to output each sample individually. 

I hope this helps!

Best regards,
0 Kudos
Message 7 of 15
(13,055 Views)

I'm using a PCI-6602 that I would like to generate a pulse train with.  I'm trying to make the pulse as fast as possible, and according to the manual I should be able to generate a pulse of 40MHz.  I've been playing around with a few of the built in VIs such as Generate Pulse Train.vi and Continuous Pulse Generator Config.vi but I have not been able to generate any with a frequency faster than 5MHz.  If I enter anything larger than that, it will only generate a 5MHz pulse.  I'm using Labview 6.1.  Any help, please?

H

0 Kudos
Message 8 of 15
(12,623 Views)
Hello h@il,

This issue is described in the KB What Is the Maximum Output Frequency I Can Obtain with the PCI-6601 or the PCI-6602?.  The 5 MHz output frequency is due to the fact that your code is using the 20 MHz timebase and the "toggle" output mode by default.  What you need to use to obtain a 40 MHz output is the 80 MHz timebase and "pulse" output mode. 

Let me know if you need any clarification after reading through that KB.

Best regards,
0 Kudos
Message 9 of 15
(12,573 Views)

Thank you for the reply.  Yes I've looked through that document and have followed the instructions but am unable to get anything faster than 5MHz.  I know I must be doing something wrong but can't figure out what.  Would it be possible for you to post a sample VI that sets the the 80MHz timebase and pulse output mode?

Thanks again,

H

0 Kudos
Message 10 of 15
(12,572 Views)