Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

retriggerable counter single pulse generation issue

Hi!

I have difficulty with pulse generation with counters on M-series MIO
device under DAQmx 7.4 and LV 7.1.
When I configure simple pulse generation with idle=low, high, low
time and initial delay, then I have, as it is stated in help, 0 for
initial delay, then 1 for high time and then 0 for low time. Now I try to
set Retriggerable to true and want to drive this counter from another
counter (which generates continuous pulse train). The pulses are
generating ok, but initial delay is ignored and pulse goes 0 for low
time and then 1 for high time. So, the order in which high/low time
are treating is changed. Is it correct behavior (feature) or
DAQmx bug? Does anybody have such an issue?

As for me, I can be satisfied with such behavior in my task after I
have discovered that, but it is interesting to know, is it intended or
not...

Many thanks in advance!

Ivan Baturin

0 Kudos
Message 1 of 4
(3,005 Views)
Hello Ivan,

I am having some trouble determining exactly what settings you are using for your retriggerable pulse generation.  I am using the example program Gen Dig Pulse Train - Finite - Retriggerable.vi, located in the NI Example Finder under Hardware Input and Output > DAQmx > Generate Digital Pulses.  I change the DAQmx Create Virtual Channel to Counter Output > Pulse Generation > Time.  The important parameters for this type of task are idle state, initial delay, high time, and low time.  The idle state can be either 'low' or 'high', and the inital delay, high time, and low time are all represented in seconds.

You stated that you are using "idle=low, high, lowtime".  I'm assuming that means that your idle state is set to low.  You also stated that you are using "0 for initial delay", which corresponds to no delay at all, but then stated that the "initial delay is ignored".  How can you tell this when there is no delay selected?  Finally you state that you are using "1 for high time and then 0 for low time", but this should cause the DAQmx driver to give you an error.  The high and low times for your pulse generation task must be greater than or equal to 2/(counter timebase rate).  For an M-series card with an onboard counter rate of 80MHz, the minimum high or low time you can specify is 25 nanoseconds.  A high or low time less than that will produce error -200746.  Let us know some more information about how your Counter Output > Pulse Generation > Time task is configured and we can try to replicate what you are seeing.

Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 4
(2,995 Views)

Hi Ivan-

It sounds like you are experiencing the behavior described in this KB.  This is indeed intended behavior, so you should expect to see this behavior in your application.  If this behavior is a problem in your application, I would suggest that you simply set your initial delay to the same duration as your low time and you should see consistent behavior throughout.

Hopefully this helps- 

Tom W
National Instruments
0 Kudos
Message 3 of 4
(2,991 Views)

Hi, Travis!

I am sorry for not exact explanation 🙂

You stated that you are using "idle=low, high, lowtime".  I'm assuming that means that your idle state is set to low.  You also stated that you are using "0 for initial delay", which corresponds to no delay at all, but then stated that the "initial delay is ignored".  How can you tell this when there is no delay selected?  Finally you state that you are using "1 for high time and then 0 for low time", but this should cause the DAQmx driver to give you an error.  The high and low times for your pulse generation task must be greater than or equal to 2/(counter timebase rate).  For an M-series card with an onboard counter rate of 80MHz, the minimum high or low time you can specify is 25 nanoseconds.  A high or low time less than that will produce error -200746.  Let us know some more information about how your Counter Output > Pulse Generation > Time task is configured and we can try to replicate what you are seeing.

I have a task of Pulse generation (Time). Yes, I have Ti for initial delay, Tl for low time, Th for high time and idle=low. If I generate just one pulse, without retriggering, the order in which pulse generates is: low for Ti, then high for Th and then low for Tl. That is what stated in help about pulse generation. But, when I set retriggerable to true, the order is changed (not for first pulse): pulse goes low for Tl and then high for Th, but initial delay is omitted. All times are far from lowest possible values.

For the first time it seems confusing. But the post of Tom has clarified this situation.

It sounds like you are experiencing the behavior described in this KB.  This is indeed intended behavior, so you should expect to see this behavior in your application.  If this behavior is a problem in your application, I would suggest that you simply set your initial delay to the same duration as your low time and you should see consistent behavior throughout.

This is exactly what I mean. Thank you a lot!

0 Kudos
Message 4 of 4
(2,982 Views)