Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Pulse in fixed times

Hi all , 

 

I have the NI USB 6356 and I want to use it's timers to create pulse ,

 

I want to set a time table for lets say :

 

0.01 sec

0.04 sec

0.06 sec

0.07 sec 

 

and at each time to do an DO pulse.....Total of 4 pulses.

 

I've found the some examples with 1 pulse ( high & low time ) but I want to create sevral pulses in different times....

 

Any ideas ?

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 8
(3,236 Views)

Kobi,

 

If I'm correct in understanding your project, you're wanting to create multiple pulses each at a particular time whereas you've found examples to do only one at a specified time. Or, for a particular channel, you're wanting to specify a 'changing' time interval between pulses. Which scenario are we looking at here?

 

Regards,

 

Renee M

Applications Engineer

National Instruments

 

Regards,

Renée M
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,188 Views)

Hi Renee, 

 

It's just like you said but I already found how to it 🙂

 

The NI 6356 that i have , has an internal clock with one of the DO ports so i use it's clock to create an arrary with values of "1" and "0"

 

The time diffrence between each array cell that i'm sending throw the DO is determaine by the DO rate so i can calculate the pulse width

 

Thank you for your response. 

 

 

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 3 of 8
(3,151 Views)

Kobi,

 

You're quite welcome. I'm glad you found an answer!

 

Regards,

Renée M
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,140 Views)

Hi Kobi,

 

Another option would be to use one of the counter outputs on the 6356 (there are 4 counters).  You can actually output a buffered array of high and low times using the X-Series counters (see this example--it outputs an array of frequencies and duty cycles but you can change this to high time and low time instead if desired). 

 

The benefit of this method is a higher resolution (there is a 100 MHz timebase available on X Series devices) and presumably also a more simple programming method.  The DO method you have proposed would also work well but it's less straightforward (in my opinion) to build the digital waveforms manually.

 

 

Best Regards,

John Passiak
0 Kudos
Message 5 of 8
(3,132 Views)

Hi John,

 

Your sulotion was the first thing i tryied but since i need 5 DO Pulses i'm using PORT0.

 

I didn't know about the higher resolution so i'll look in to it ,

 

Thank you.

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 6 of 8
(3,124 Views)

Hey Kobi,

 

If you need 5 pulses then you should probably just stick with the digital outputs on port 0 (rather than go through the extra steps of synchronizing the counters and the DO together) unless your requirements necessitate the use of the counters.

 

Your initail post said you needed 4 pulses which is why I mentioned the counters.

 

 

Best Regards,

John Passiak
0 Kudos
Message 7 of 8
(3,111 Views)

You right ,  sorry 🙂 it was an example.

 

Thank you for your help.

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 8 of 8
(3,099 Views)