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

using counter on NI 9401

$
0
0

Hi,

 

we ordered the cRIO 9035 system with several Modules.

One of them is the NI9401.

I want to use this module to count the pulses of a flow-meter.

Infront, I'm a beginner and just startet to watch lots of tutorials and created basic VI's

 

  1. Does this Module have counters on board, or is it only possible to use the "hardware"-counters in the Chassis via this Module?

    I'm asking this, because I can set the Module via "Speciality Digital Configuration" as counter.
    If I do so, would it be possible to simply create a while loop, place the channel inside and link it to a numeric element?
    Or is the only way to count pulses (rising edge) to use VI's like the "Edge Counter VI" from the example VI's?

  2. My flowmeter uses a Hallsensor and produces rectangular pulses at max 40 Hz.
    Is it absolutely required to use FPGA or can I use a VI on the Host-Computer?

 

We use 4 of these flowmeters (and many more sensors like Termocouples (NI 9211), magnetic valves (NI 9482) or an AKD-Servomotor (NI 9472).

All the measured Data has to be written in a File (e.g. exel sheet).

 

The magnetic valves have to be activated if a certian number of pulses is counted.

Again, is it absolutely required to use FPGA or can I use a VI on the Host-Computer?

 

I know there is a lot to do and I have to learn much more, but I'm on it (its for my Masterthesis).

For the moment, answers to the questions about the existing or not existing on-board counter would be great.

 

Thanks for your support.

 

Greetings from Germany,

 

Lukas


Noise filtering - NI 9361

$
0
0

Hello everybody,

 

I'm using a NI 9361 module to measure the rotation speed of a shaft that is rotating thanks to an electric motor.

 

I'm facing big noises due to this electric motor; when I launch it, my counter directly measures frequencies up to 1 MHz, even when my shaft is not rotating. I can the see the same phenomena when I'm looking at the edge counting results...

 

I tried to use the pulse width filter inside my Labview application to filter the signal but I could not find nothing sufficient.

 

Has anyone ever face this kind of issue, and if so, is there a solution to face it ?

 

Thank's very much.

Communicate USB-4301 with LabView 2009

$
0
0

Helo everyone.

I'am begginer to LabVIEW. I have a problem with install a Counter/Timer USB device: USB-4301. 
I installed all (i hope) required software: MCC DAQ Software (Istacal), LabVIEW 2009. 
Instacal recognize USB-4301. I click on "calibrate" panel and then click "ok".
Next, in NI MAX (Measurment & Automation Explorer) in "Devieces and Interfaces" panel it is not displaying any information about my USB-4301. I guess, it is bad. I tried to create new device, so i clicked on "Create New..." -->"Simulated NI-DAQmx Device or Modular Instrumend" and the list of avaliable devices are not including my board (USB-4301).

Please, can ayone help me with that?


How to set Timestamps to several Counters using NIDAQmx and CSharp

$
0
0

Hello,

 

I'm using a single PCIe-6612 card to read six TTL Signals from different sources with different frequencies (25 Hz-100 KHz).

 

For every Counter there is a counter task (DAQmxCreateCICountEdgesChan()) and i read it with DAQmxReadCounterScalarU32() which for the span of the measurements is enough.

What I need is to put a common Timestamp from a highfrequency generator/source to every counter. As there is no other external source in the system I'm trying to generate it from the DAQ board.

I'm using:

 

DAQmxCreateCOPulseChanFreq(taskHandleTick,"Dev1/ctr0", "", DAQmx_Val_Hz,DAQmx_Val_Low, 0.0, 1000, 0.01));
DAQmxCfgImplicitTiming(taskHandleTick, DAQmx_Val_ContSamps, 1000);

 

which generates signal with configurable frequency, but how can I read it as it is on the output of ctr0? Or is there a better why to do that? Any suggestions are highly appreciated

9401 counter output

$
0
0

Hi, i have a NI 9401 in a cDAQ-9171.

I'm trying to generate 4 continuous pulse trains, each with a different initial delay, in order to have staggered (in time) pulse trains. For this, I basically added 3 counters in the "Counter - continuous output.vi" from Labview Examples. In the past, i've done something similar with a PCI 6602 and it worked well. Here, with the NI 9401, my oscilloscope shows that the pulse trains are not well synchronised: With all initial delays at 0, the pulse trains are not simultaneous.

 

Can the NI 9401 not generate 4 simultaneous pulse trains? Or am I coding this wrong?

 

Attached is an example of my VI with only 2 counters, ie I added one counter to the "Counter - continuous output.vi" from the Labview Examples.

 

THanks!!!

Marc

 

TwoCountersOut.png

What is the maximum differential quadrature encoder frequency an NI 9361 can handle?

$
0
0

What is the maximum differential quadrature encoder frequency an NI 9361 can handle?

The module is installed in aa cDAQ9188 chassis.

Continuous counter measurement with NI 6212 possible?

$
0
0

Hi,

 

is it possible to read a counter signal countinuously with NI 6212 and synch it with the analog inputs?

 

With my cDAQ 9174 chassis + DI card + AI card I can simply use the AI/SampleClock as Sample Clock for my CTR in MAX and it works. With my NI 6212 it does not...

retriggerable Digital IO with X Series

$
0
0

Hello Forum Members,

                                          I'm something of a greenhorn when it comes to DAQ programming and would appreciate your help. I am essentially trying to do time correlated single photon spectroscopy with a Perkin Elmer SPCM-AQR photon dector module and a a 6321 X series DAQ card. I am exciting a sample with a laser and would like to obtain an accurate timestamp of the first photon detected after shutting down the laser. I intend to repeat the measurement to build up a histogram from which I can obtain the lifetime of my sample (~1 micosecond).

                                             

I started with a program (SimpleTimeStamping_v2)  from an earlier thread:

http://forums.ni.com/t5/Counter-Timer/Photon-Counting-Time-Stamping-and-basic-help-with-how-DAQmx/td-p/224447

 

After a recieving a digital trigger it counts all the subsequent photons and accurately gives them timestamps. In my modified version (SimpleTimeStamping_mod) I would like the prgram, after recieving a digital trigger i.e. the falling edge of the signal that shuts down the laser, to count and timestamp the first photon signal and then be ready to recieve another trigger signal to repeat the measurement. In order words, it has to be retriggerable.

 

I read that this kind of retriggering required a work around with M series cards:

http://forums.ni.com/t5/Counter-Timer/start-a-counter-with-digital-trigger/m-p/3254895/highlight/true#M13003

 

Does anyone know about X series cards? If they could start me off on the right programming track I would be very grateful.


Regards,

                R

 


Increase rate of frequency measurement

$
0
0

Hello,

I'm new to Labview. I'm trying to measure the speed of a motor using a rotary encoder coupled to the shaft.

 

There I use DAQ Assistant to acquire counter input which gives me the frequency of rotation. Then I just multiply 60 to get the speed. That's fine and works well.

 

But, when I save the data using write to measurement, I get only 4-5 samples per second. Whereas, I need at least 300-400 samples per second. Even if I run from the DAQ Assistant setup I can see that the update rate is very slow.

 

I'm using a 9401 in slot 5 on a cDAQ-9188 chassis. I have attached figures of my configuration.

 

My deadlines are closing in, any help is appreciated.

9361 pause trigger using PFI0

$
0
0

Hi all!

 

My question is straightforward I guess, but I cannot find a suitable C# .NET example for the following situation.

I have a CompactDAQ 9178 with an 8 counter module 9361. I want to program or route the global PFI0 from the CompactDAQ to gate some(!) of the counters of the 9361. So, when PFI = high, counters (i.e. 1,2,7,8) should be active and counting. PFI = low, counters should be paused. Other counters should be active all the time.

 

I have the following test code. Later on I want to split the counters into gated/ungated counters.

 

for (int i = 0; i < this.countCounters; i++)
{
counterName = string.Format(@"{0}", this.cinList[i]);
counterReadTaskGated.CIChannels.CreateCountEdgesChanne(counterName, "", CICountEdgesActiveEdge.Falling, 0, CICountEdgesCountDirection.Up);
counterReadTaskGated.CIChannels[i].CountEdgesTerminalConfiguration = CICountEdgesTerminalConfiguration.Rse;
counterReadTaskGated.CIChannels[i].CountEdgesGatePauseState = CICountEdgesGatePauseState.Low;
counterReadTaskGated.CIChannels[i].CountEdgesGateTerminal = "/cDAQ1/PFI0";
counterReadTaskGated.CIChannels[i].CountEdgesGateEnable = true;
}

 

Getting the error:

 

"Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

 

Property: NationalInstruments.DAQmx.CIChannel.CountEdgesGateTerminal

Corresponding Value: /cDAQ1/PFI0

 

Channel Name: cDAQ1Mod4/ctr0

Task Name: _unnamedTask<23>

 

Status Code: -200077"

 

 

Any help is appreciated and thanks in advance!

 

Martin

Third party software Twincat3 of Beckhoff how to receive 9144 through EtherCAT FPGA bitfile after processing the data?

$
0
0
Hello, I am now want to use 9144 EtherCAT and the above board, 9215 and 9402, to gather information, now I am writing the FPGA program in 9402 and 9215 to 9402, set up the mode is to electricity to run mode.Then is put 9144 connected to the beckhoff EtherCAT, according to official website is 9144 above XML files for the board of 9215 and 9402 by NI website provides XML file generator to generate.Then I'm putting their XML files on the official software Twincat3 beckhoff installation directory.This  can be found in the twincat3 software 9144 and 9215 9402, and so on.But now I want to use 9144 FPGA pattern to the data through the EtherCAT sent to Twincat3 after processing, the process is excuse me how operation, how to use 9144 FPGA mode bitfile file??

correlated time stamping

$
0
0

Hello Forum,

                  My previous post went unanswered and so I've stumbled through on my own. My goal was to perform time correlated single photon spectroscopy. I'm using a 6321 X series DAQ card, a Perkin Elmer SPCM and a pulsed laser. I am exciting a sample with a laser and would like to obtain an accurate timestamp of the first photon detected after shutting down the laser. I would then repeat the measurement to build up a histogram from which I can obtain the lifetime of my sample (~1 micosecond).

                 As I understand it, the counter on X series cards can't be retriggered. My solution is to reset the counter with the falling edge of the signal that modulates the laser and then timestamp the first photon after that (attached). At the moment my program is giving me the timestamps of all the photons from the buffer, but I only want the first one. Is there a simple, elegant way to get just get the first element of the buffer on each shutdown without slowing down the  data Acquisition loop?

 

Thanks in advance,

                              R 

        

correlated time stamping

$
0
0

Hello Forum,

                  My previous post went unanswered and so I've stumbled through on my own. My goal was to perform time correlated single photon spectroscopy. I'm using a 6321 X series DAQ card, a Perkin Elmer SPCM and a pulsed laser. I am exciting a sample with a laser and would like to obtain an accurate timestamp of the first photon detected after shutting down the laser. I would then repeat the measurement to build up a histogram from which I can obtain the lifetime of my sample (~1 micosecond).

                 As I understand it, the counter on X series cards can't be retriggered. My solution is to reset the counter with the falling edge of the signal that modulates the laser and then timestamp the first photon after that (attached). At the moment my program is giving me the timestamps of all the photons from the buffer, but I only want the first one. Is there a simple, elegant way to get just get the first element of the buffer on each shutdown without slowing down the  data Acquisition loop?

 

Thanks in advance,

                              R 

        

Route Sample Clock Through External PFI

$
0
0

Hello all,

 

I am trying to configure my PXI-6733 AO board to route an AO task sample clock to the PFI channel. I am doing this in Visual c#.

 

I want to be able to use this signal external to the PXI chassis. I have this so far (AOTask is an instance of the c# class representing an analog output task):

 

AOTask.ExportSignals.ExportHardwareSignal(ExportSignal.SampleClock, "PXI1Slot4/PFI5");

 

I have tried putting this before and after the AOTask.Timing.ConfigureSampleClock(....)

 

I verify the task and everything appears as it should, and I get no errors when trying to debug. So everything would have appeared to work, except nothing appears externally on PFI5, which is the PFI channel with a direct route to the AOSampleClock.

 

Do I have to specifiy somewhere else that PFI5 should be configured as an output - it just sits there at 5V for the duration of the output task.

 

This is driving me crazy, thanks in advance for any help.

 

Kyle

NI-PCI 6602 intervalzero RTX - Simple Event Counting

$
0
0
Hi, We have a sample for NI-PCI 6602 interval zero RTX driver - Count pulses from an external source using an external gate using counter 0. We are looking for a way not to use the Gate == Simple Event counting. Can you please send us a code example for NI-PCI 6602 interval zero RTX driver for Simple Event Counting? Best Regards, Efrat Gur

USB-6501 Counter Problem?

$
0
0

I have a USB-6501 (connected to a a Ritter gas flow meter) and would like to use the counter function, in MAX the self test runs ok, the digital I/O test panel port0/line0 flashes as one would expect in the test panel. Counter I/O is unresponsive in the test panel, am I missing something?

How to access counters in cDAQ9174 / NI9403 with C / Matlab

$
0
0

Hello,

 

I read that the cDAQ9174 has four counters available. However, they need to be interfaced through some other Card and they're now directly available to the user. How do I do that with the NI9403 digital I/O card? How could I do that with LabVIEW but with C/Matlab?

 

Thank you

 

Jan

Why not always use an X4 decoder?

$
0
0

Hello All -- When using a quadrature encoder when is is benefitial to use a X2 decoder rather than X4 even though an X4 decoder offers double the angual resolution? Is the existance of X1, X2, and X4 decoders becuase of the limitation of some DAQs which are not compatible with say X4 decoding and therefore the use has no choice but to use X2 decoding? Thanks!

Error Code: 50103. Frequency Measuring using 2-counter method (High Frequency)

$
0
0

Hi all,

 

I am trying to measure the frequency produced by a quartz oscillator I have in a circuit.  I have a function generator generating a 36KHz sine wave which is running through the oscillator.  I want to measure the output frequency from the oscillator.  To do this, I've taken the output from the oscillator and connected it to SOURCE 0 (for counter 0).  Then when I try and set up the software, the DAQ Assistant gives me error code 50103.  On the DAQ assistant I've set my range from 32KHz to 40KHz, I selected counter 0, PFI of SOURCE 0, and selected the two counters method and am trying to do N samples.  Why am I getting this error?

 

Thanks for your help!

Routing a Counter output in a change detection with 6612

$
0
0

Hi, I need to know if it is possible, with ni-daqmx, c++ and 6612, to send a counter (used as a frequency divisor) output to a change detection task without using an other DI terminal. If yes how ?

Viewing all 1271 articles
Browse latest View live


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