Quantcast
Channel: Counter/Timer topics
Viewing all 1244 articles
Browse latest View live

Counter Semiperiod resolution

$
0
0

Hi,

 

We have 2 similar measurement setups for pulsetrain measurement (measure duty cycle). We however see very different results in measurement resolutions :

 

Setup 1 : PCI-6602 (8x 32-bit counter)

We configure a counter to measure a pulsetrain with this code :

Capture.PNG

After this code, we just do a "DAQmx Start" and "DAQmx Read"

- With this code, we see that the measurement resolution is 0.25 µs

- If we change toe Digital Filter.MinPulseWidth from 5E-7 (=0.5µs) to 1.5µs, we see that the measurement resolution lowers to 0.7µs.

 

Then we have :

2nd setup :  PCIe-6321 (4x 32bit counter) 

that has the exact same SemiPeriod measurement. With the MinPulseWidth at 5E-7, we have a measurement resolution of at least 0.01µs.

(25x better than other setup).

 

Can anybody give any advise on :

- what (and why) is the influence from the digital filter on the SemiPeriod Measurement resolution?

- why does the PCIe-6321 give much better resolution that the PCI-6602?

 

Some more details :

- LabVIEW 2015

- DAQmx version 18

 

Kind regards,

Thomas.


Any information about DAQmxGetCIEncoderZIndexEnable

$
0
0

I am sorry for posting a software programming question in a hardware forum but either there isn't an appropriate forum for my question or it takes more than a 35-year software engineering experience, with two Master of Science degrees qualification to find it.Smiley Wink

 

My question is about the DAQmx "C" programming language reference for accessing a counter/timer property, and more specifically, any information about the function DAQmxGetCIEncoderZIndexEnable. The only information in the help files and online is the function declaration:

int32 __CFUNC DAQmxGetCIEncoderZIndexEnable(TaskHandle taskHandle, const char channel[], bool32 *data);

and it states its purpose as "getting the value of the property". Nothing more. While for anyone who has used the DAQmx C library it would be obvious what "taskHandle" means and that "data" is the value of the property, it is by no means clear what the "channel" string designates. There is no hardware channel name that would be assigned to the Z index, and I don't think it would make sense to call for the name of an input terminal (PFI).

 

I don't use LabVIEW anymore and I can't drill through the respective VI, and I don't feel like spending hours trying to reverse-engineer the functionality, so I hope someone who has dealt with encoder indices might have an insight as to what that parameter might be. Thank you in advance.

 

Kamen

Counter with external Timing stops after a few measurements

$
0
0

Hello everyone!

 

This is my first project using Nidaqmx and I've run into a problem:

I want to measure the incoming signals with respect to a timing signal I create with the following code:

 

    DAQmxCreateTask("timing", &task_timing);
    DAQmxCreateCOPulseChanFreq(task_timing, timing_ctr, "timing",DAQmx_Val_Hz, DAQmx_Val_Low,0.0,hz,0.5 );
    DAQmxSetChanAttribute(task_timing, "timing", DAQmx_CO_Pulse_Term, timing_slot);
    DAQmxCfgImplicitTiming(task_timing,DAQmx_Val_ContSamps,1);
    DAQmxStartTask(task_timing);

 

This seems to be working as intended, but in my counter there seems to be a mistake:


    DAQmxCreateTask("counter", &task_ctr);
    DAQmxCreateCICountEdgesChan(task_ctr,counter_ctr, "counter", DAQmx_Val_Rising, 0, DAQmx_Val_CountUp);
    DAQmxSetChanAttribute(task_ctr, "counter", DAQmx_CI_CountEdges_Term, counter_slot);
    DAQmxCfgSampClkTiming(task_ctr, timing_slot, hz, DAQmx_Val_Rising, DAQmx_Val_ContSamps, hz);

 

or in the function responsible for reading from the counter:

 

    while (true)
          {
            DAQmxReadCounterU32(task_ctr, -1, 10.0, data, hz, &read, NULL);
            for (u = 0 ; u<read; u++)
            {  delta_t++;
                if (data[u] > cnt)
             { cnt=data[u];
              cout<<  delta_t << '\t' << cnt;
                 delta_t = 0;
            }
        }
   }

 

Shouldn't this function write a continuous stream as such:

    1000   1

    1000   2

        ...

        ...

        ...

 

Instead it stops after 2 or 3 lines.

 

Thank's in advance!

Markus

 

 

DAQmx Read seems to skip counter Period measurement

$
0
0

I'm doing buffered period measurement with a 6602.  I start the task, then I would like to have the DAQmx Read task take place in a while loop so that I can update indicators with period measurements as they are coming in.  My issue is that it seems like every Read task causes one period measurement to be skipped.  For example, I can set up a function generator to output a burst of 101 cycles.  If I set my Read task to read 100 samples (via wiring 100 to the "number of samples per channel" input), it will complete as expected and output an array of 100 periods.  If I set the Read task to only read 1 sample, however, it will only execute 50 times.  Likewise, if I set the Read task to read 10 samples, it will only execute 90 times.  

I've been trying to use the AvailSampPerChan and TotalSampPerChanAquired properties to troubleshoot and see how many periods are actually in the buffer, but those properties always show 0.  I also am not able to use the Read (it just times out) in any other combination of RelativeTo and Offset property values besides CurrentReadPos and 0 respectively.  What am I doing wrong?

 

Thanks,

David

NI 6030e ctr 0 out and ctr1 interference

$
0
0

Hi,

    I am using a NI 6030e connected to SCB-68.

    And use CTR1 out and CTR0 out to generate pulse train to control step motor.

    But I found that if CTR1 or CTR0 is generating pulse train, at the beginning of the pulse, the other channel will have a voltage rise too as shown in the image. 

     any way to solve this issue?

     thank you very much!

1.jpg2.jpg

Please recommend a counter/timer card for a encoder to find phase angle

$
0
0

Hi, 

We are Using PXIe 8135 controller and PXIe 1082 chassis. I want a card compatible with this that can acquire data from an encoder.

 

Our current requirement is to get data from an encoder with 1000 pulses per revolution rotating at a rate of 6000 rpm.

So the card should be able to read 100,000 pulses per second.

 

We are using this setup for a vibration analysis. To find the phase angle. (We already have a vibration card).

To get the exact phase angle we need to observe the rising edge of each encoder pulse with a minimum time error.

Therefore sampling at the Nyquist sample rate won’t be enough.

If we can go for a higher sampling rate, it will be the ideal scenario.

 

I’m thinking of purchasing PXI 6608 (Counter timer card for this purpose).

I would appreciate you guys expert opinion on whether this card will be suitable for our application or not?

And can I use a digital I/O card for this purpose instead of a Timer/counter card?

If so, could you please recommend a card for this application.

 

I look forward to hearing from you guys

Generating multiple overlapped pulse trains

$
0
0

I need to generate 4 Continuous Pulse Trains. Each pulse train needs to be 90 Deg out of phase from the previous  (0 deg, 90 deg, 180 deg, 270 deg).  I'm using a PXIe-6358 which has 4 counters.  Each train has the same frequency, but I'm having difficulty with the phasing. Ideally, I would like to start and stop the pulse trains individually, but if I have to start them all at the same time, I can settle for that.....as long as the phasing is accurate and consistent.

 

Any help will be appreciated.

Frequency measurement clock timebase.

$
0
0

Hi there,

I am currently working on acquiring high frequency counter signals from rotary encoders, typically accurate to few nanoseconds. Previously I was using NI 9401 to acquire signals but it receives at a rate of 10 MHz, so it's necessary to get a higher value time base now. And for that, I would really like any assistance in this regard. Please help me, people! Smiley Happy

 

Thank you.


Accuracy of PXIe-6614 ?

$
0
0

I did not find direct specification on clock accuracy . There are "Temperature drift only" and "Temperature and 1 year drift (excluding retrace error)", but there is not accuracy information.

Did anybody encounter with this task ?

Continuously Measure RMP of BLDC Motor: 3,000RPM Max, 24 Pluses per revolution. NI 6009

$
0
0

Hello,

 

Can someone please help, I need to measure the RMP of 2 BLDC Motors they are 3,000RPM Max, 24 Pluses per revolution from the encoder. I have the NI 6009 and I'm using LabView 2017.

 

Can the NI 6009 effectively measure the RMP of these motors accurately and can someone please post a VI of the solution to doing this.

 

Thanks.

Hardware needed to control 100 PC fans

$
0
0

Hello,

 

I am fairly new to picking National Instruments products and I am a bit confused about the hardware I need. The project I am working on requires 81 PC fans to be independently controlled with PWM using the clock on board the chassis (not software based timing). I will be using a cDAQ-9174, cDAQ-9178, or cDAQ-9179, depending on how many modules I need. From my understanding, I will require modules that can access the chassis' on-board counters. According to the link below, the most channels I can get on 1 module with access to the on-board counters is 8. 

http://www.ni.com/product-documentation/54453/en/#toc2

 

My main questions are;

1. Is it true that I need modules with access to the on-board counters to produce the PWM signals for the fans? If not, can I use a simple C series Digital Module like the NI 9476?

2. Will I need to use a module that has 5V/TTL outputs to control PC fans?

 

Thanks in advance for any input.

Generate PXI backplane Trigger From Multiple Channels

$
0
0

I have 7 counter channels running on the 6614 timer card.  Each channel is triggered by an externally generated digital pulse.  I would like to generate a single back plane trigger if any of these channels are triggered.  There is a lot of information on triggering multiple channels from a single source trigger, but I can't find any information on setting a trigger from multiple sources.  Is this possible?  What degree of timing accuracy can I expect?

FPGA photon counter low voltage

$
0
0

Hi! I'm currently building a photon counter using the USB-7856R R series multi function rio. I have attached the labview program I'm using to count 1VPP square waves, and it works just fine. However, I eventually want to use it for photon counting, and our photon counter only outputs a signal of 200mV, which from what I understand is too low for any of the FPGA logic structures. Am I correct in this, and if so, is there any way to circumvent the issue?

 

Thank you!

Capture.JPG

Generate and measure PWM on cDAQ without any module

$
0
0

So, I can generate a PWM Signal, i.e. 1kHz 50% duty cycle on let's say /cDAQ4/Ctr0InternalOutput.

Can I anyhow measure the frequency and duty cycle of this, without using any module in the cDAQ Chassis? I mean, route this Signal to another internal terminal and create a frequency measurement Task for it.

 

Any help is appreciated!

PCI-6602 Generates Finite Pulse-Train Generation Per 7 Millisecond Though Card'Interrupt

$
0
0

 

 

 

 

4.Can I cooperate with two counters, counter A is used to generate pulse train, counter B generates GATE signal, when GATE signal is activated, counter A has pulse train output, when GATE signal is low, counter A has no pulse train output?


PCI-6602 Generates Finite Pulse-Train Generation Per 7 Millisecond Though Card'Interrupt

$
0
0

1.Can the 6602 generate Finite Pulse-Train every 7 Millisecond, and the frequency and duty cycle of the pulses produced in different times are different. If the anser is yes, how can I achieve it(my programming language is c/c++)?

2.Can I cooperate with two counters, counter A is used to generate pulse train, counter B generates GATE signal, when GATE signal is activated, counter A has pulse train output, when GATE signal is low, counter A has no pulse train output? How can I realize the synchronization between gate signal and output pulse ?

Running a counter in actual time (seconds) with varying values (including decimal values) in each iteration

$
0
0

Hello everyone. 

I am making a program in which a counter starts from 5 and goes to 0 and then a LED light gives an indication by turning on. After that a random event occurs whose value is added to or subtracted from original counter value of 5 and the counter runs again to 0 and then LED turns on. This process repeats itself unless its stopped. Now, the value of the counter due to random event can be in decimals like 4.36, 5.12, 4.89 etc. I want this counter to decrement in real time with counter values to be considered seconds. Currently I am using time delay but it will be applicable only for the initial counter value of 5 and not the later updated values in decimals. Please help me with this issue. I have attached the VI and image of block diagram.

Best regards,

Fahad Bin Zahid

Countdown Timer help

$
0
0

Hello everyone. 

I am making a program in which a counter starts from 5 and goes to 0 and then a LED light gives an indication by turning on. After that a random event occurs whose value is added to or subtracted from original counter value of 5 and the counter runs again to 0 and then LED turns on. This process repeats itself unless its stopped. Now, the value of the counter due to random event can be in decimals like 4.36, 5.12, 4.89 etc. I want this counter to decrement in real time with counter values to be considered seconds. Currently I am using time delay but it will be applicable only for the initial counter value of 5 and not the later updated values in decimals. I have tried using Elapse time express VI but have not been able to get it run properly. Please help me with this issue. I have attached the VI and image of block diagram. Your help and guidance will be highly appreciated.

Best regards,

Fahad Bin Zahid

PXI-6612 Max frequency counter

$
0
0

Hello everyone,

 

I have a question about NI PXIe-6612 frequency counter card.

I saw on datasheet that we can measure 80MHz frequency on one input but is it possible to push it further? I mean to measure 100Mhz with using double counter? or using prescaller x8 to reach 100MHz frequency measure?

 

Thanks.

 

Thomas.

USB 6353 Counter Triggering

$
0
0

I'm currently developing a VI which uses a trigger signal to specify a reference point which I need to use to synchronise an analogue input, which can use the trigger, and a digital counter, which doesn't have an option to do so nor will it take trigger blocks. Does anyone know if the USB 6353 supports counter triggering? It seems likely that it does not.

 

Thanks for any help you can give. 

Viewing all 1244 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>