Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6071E GPCTR doesn't change GATE polarity for Bufferred semiperiod measurement

Hi,

Problem description:
I'm using the GPCTR channel on PXI-6071E series, to analyze PWM signals.
The timer/counter application used is Buffered, asynchronous semi period measurement (ND_BUFFERED_SEMI_PERIOD_MSR).
What I'd like to get is to have in the measurement buffer always in the buff[1] the positive semiperiod, so I configured the GATE polarity to ND_NEGATIVE.

But during measurements I get in buff[1] or the positive semiperiod or the negative semiperiod in a randomly manner (~50% ratio between the values).

Question:
How can I do to always get the counter latching always the positive pulse in the buf[1] and the negative one in the buf[2] aso.?
Silvius Iancu
0 Kudos
Message 1 of 4
(3,560 Views)
Hi silvius-

The buffered semi-period measurement function actually returns both the low and high semi-period values. These values will both be returned in the array, so arranging low- and high semi-period readings into two arrays will be as simple as decimating the single array into two equivalent arrays of the "even" and "odd" indexed readings.

Please let us know if you have any additional questions.

Thanks-
Tom W
National Instruments
0 Kudos
Message 2 of 4
(3,543 Views)
The ability to determine whether you start on a rising or falling edge of a semiperiod measurement on an E Series device is somewhat difficult as there is no way to explicitly configure the hardware to start measuring on a rising or falling edge (unlike TIO and M Series devices where this can be specified). You do have a few choices, though I'm not sure how practical they will be for your application.

1) You could just use two counters, one measuring high pulses and the other measuring low pulses. This would work, but you might run into correlation issues depending on how fast your signal is.

2) If your application can handle slowing down the signal, you can use a counter to divide the input signal by two using a pulse generation task with a start trigger (which would be configured for high or low depending on what your desired first sample is) and then measuring the period of the divided signal.

3) Perform an analog measurement of the signal to figure out what the first pulse looks like.

Like I said, I'm not sure that either of these will do much for you, but it may be a start. Good luck!
gus....
Message 3 of 4
(3,541 Views)
Hi Gus,

I also thought of the first solution, but I could not figure out that E Series can't be configured to start measuring on a rising or falling edge.
Or at least the GATE modifiers are accepted by the GPCTR_ChangeParameter function without any complaint.

Thnx a lot!
Silvius Iancu
0 Kudos
Message 4 of 4
(3,527 Views)