Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit pulse measurement and Digital Input on X-series

I want to acquire a PWM signal, measuring duty cycle with a counter measurement. To do so I use the CI Pulse Time version of DAQmx Create Channel and use Implicit timing. It works fine. (1)

 

Now, I want to add a DI task to read another digital input aside from the counter task , while still performing the above task. This new task is set on Port0/Line0 of my PCIe-6343. (2)

 

I was under the impression that the DI task will use its DI-specific timing engine as per X-series manual. However, when I run my acquisition the counter task only returns 0 as the Number of Samples Available and fails to read data.

 

Both tasks works fine individually, but I must be missing something else... 

 

Thx.

L.

DI-CI.jpg

 

PS: 

LV 2011, running all this on a RT target.

0 Kudos
Message 1 of 10
(7,332 Views)

Hello,

 

Since these functions work on an individual basis but not when wired within the same VI it is possible that the timers are interfering with one another.  On your DAQmx Create Channel for you counter measurement try changing CI Pulse Time to CI Pulse Ticks and adding the 20MHz Clock as your Source of Ticks.  This will allow your DAQmx Create Channel to reference a different time source.

Untitled.png  

 

Regards,

 

Marcus 

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 2 of 10
(7,228 Views)

Marcus,

The addition of the timer does not do the trick. Would it be a bug with Daqmx adn X-series?

I am using buffered  DI, but initially I was just doing a simple software DI which was all I needed. In any case, the issue is still here.

Can you reproduce the issue on a X card, a M card? 

 

I am attaching a small VI that shows what does not work.

 

Thx

L.

 

 

0 Kudos
Message 3 of 10
(7,224 Views)

Hello,

 

I just wanted to let you know that I am collecting the necessary hardware to replicate the issue that you are seeing.  I will get back to you as soon as I have completed my testing.  

 

Thank you, 

 

Marcus

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 4 of 10
(7,207 Views)

Ok. Thx.

L.

0 Kudos
Message 5 of 10
(7,205 Views)

Hello,

 

I have found a NI 6343 and have tested it to see if it can simultaneously measure the high time and low time of a signal while reading in another digital input.  I did find that this was possible on my NI 6343.  When I tested the functionality of this board I did not use the implicit timer or start task for the high time and low time measurement.  I also left out the property nodes and case structures to make it less complex.  I would suggest building this program as simple as possible to ensure it works before you add any additional features. 

 

Thank you,

 

Marcus 

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 6 of 10
(7,194 Views)

Well... It should work with the Start Task though. I don't see why not.

L

0 Kudos
Message 7 of 10
(7,192 Views)

Hello,

 

A start task is not necessary because the VI will start automatically.  However, inserting a start task will not cause the code to throw any errors.  I have tested the functionality of this card and it works with and without a start task in the code.

 

Regards,

 

Marcus  

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 8 of 10
(7,186 Views)

Ok, I will give it a try, do you mind posting your version please?

Thx

L

0 Kudos
Message 9 of 10
(7,183 Views)

Hello,

 

Here is the program that I used to test the functionality.  I've also included a screen shot of the front panel showing the signal that I inputted along with the readings LV gave of the high and low times, and a graph of the digital signal read.  

 

Thank you,

 

Marcus 

Marcus M.
PXI Product Support Engineer
National Instruments
Download All
0 Kudos
Message 10 of 10
(7,181 Views)