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

FPGA onboard clock stability

$
0
0

Hi, 

 

I'm looking for details on onboard clock stability for cRIOs (mainly 9076). Datasheet does not tell much in this. So what kind of oscillator is used for the onboard (40MHz) clock generation, what accuracy does it have? Without this information I don't see how for example, generated signal timing accuracy can be determined.

 

Thank you


How to initialize 6602 MITE in 64 bit Operating System using Register Level Programming

$
0
0

Hello,

 

I was asked to port our existing 32 bit Windows kernel mode driver for the NI 6602 card to 64 bit Windows.

While examining our driver code, I happened to see that our driver contains the following MITE intialization code:

1) It writes to address 0xC4 in PCI BAR 0 the value ((p & 0xffffff00) | 0x8C) where p is physical address of PCI BAR 1.

2) It writes to address 0xF4 there value 0.

It seems that this process is documented in the NI 660X Register Level Programmer Manual, November 2002 edition, page 3-55 - MITE.

The 0xC4 register is called IOWBSR1, and according to the RLP manual, it contains a 24 bit base address (BA_31..8), and a 5 bits field called WSIZE (Window Size).

 

My questions are as follows:

1. If I understand correctly, on 64 bit systems, system RAM can be mapped to physical addresses whose least significant 32 bits can overlap (32 bit) addresses used by BAR 1 of the 6602 card (this is more probable in systems with more than 4 GB of RAM).

What will happen if the CPU will try to write to a RAM address that is mapped to such an overlapping physical address? Will the 6602 card respond to this write, because the IOWBSR1 configures only the BA_31..8 bits of the address)? Or will thje write somehow get ignored. If it will be ignored, what causes it to be ignored? (Excuse me for my lack of knowledge in the PCI field).

I will put some numbers here to make my question more clear:

Let's assume that the 6602's BAR 1 is mapped to physical address 0x8000.

And let's assume that the system contains 8 GB of RAM which is mapped to addresses from 4GB to 12GB.

The CPU wants to write to RAM address 0x100008000, which is a 64 bit address whose least significant 32 bit bytes are 0x8000. Will the 6602 card respond to this write?

2. What exactly does the 6602 card do with the value that the CPU writes to address 0xC4? I detected that in earlier versions of our 32 bit driver, the driver wrote a wrong value (garbage) to register 0xC4 (and soon after that it wrote again to the same register a good value). What can theoretically happen in that case? Note I have not seen any wierd results (yet).

3. What is the meaning of the "Window size" field and why is it set to 12 (0xC) ?

 

Thank you in advance,

Itai

 

how to check digital sensor

$
0
0

Hi all

 

I have a flowmeter sensor, i wired it to my daq correctly but i cannot receive any values.From examples of I used count digital events- pause trig.vi  but i see no flow indication.

 

Here is the sensor manual.

 

Regards,

 

 

How to create a continuous pulse and count it

$
0
0

Hi

 

I would like to create a continuous pulse with my Mio16E-4 DAQ board, and also keep track on how many pulses that are generated. I have a quite slow pace, about 1Hz

I have tried to use one counter to generate pulses and one to count them, but I'm not sure how to route signals internally. Preferably I would like to only allocate one of the counters for this task.

 

Skärmklipp.JPG

 

route 6612

$
0
0

PCIe-6612, LabVIEW 2011.

I want to directly route digital signal (up to 10 MHz) from one PFI (source PFI19) to another (PFI17). Routing table says it will be using counter 7, that is already used in my application, so I have to route manually.

What is the correct way to do it, not to disturb signal and use minimum resources? 

DAQmx connect PFI 19 to say Ctr5Gate, then Ctr5Gate to PFI17? This sacrifices counter5. Both routes have direct connection in routing table. It seems to work, is it the best/correct way?route 6612.png

Autocorrelation function using counting module PCI 6602

$
0
0

Hello everyone,

 

Thanks to anyone who can give me help. I just starting with Counter/Timer applications and I am trying to set up new system for my lab. 

 

My hardware consist of a photon-counting APD (SPCM-AQRH-13-FC, Perkin-Elmer) whose output was a stream of transistor-transistor logic (TTL) pulses. The TTL
output generated by the APD was connected to the 32-bit, eight input channel counter/timer board with the maximum input rate of 80 MHz (PCI-6602, National Instruments).which means the fastest input pulses that can be counted are 12.5 ns (1∕80; 000; 000 s) apart. The counter can count the events continuously and store the data in the buffer.

I expected to have data acquistion with have " queue" structure to link “producer” loop and the “consumer” loop, which were in charge of reading photon counts and writing results to a file. Of couse 2 loop can work paralell.

Simultaneously, another labview program detected the latest written photon-counting file and calculated the auto-correlation function by FFT( fast and furious transform)  algorithm.

I take a look some example and this code in attached file can show the counter incresing but the problem is overwritten too fast and I can not handle or hole the photon count signal to apply the autocorrelation calculation. 

 

I am a newbie in Labview programming so I thanks to anyone who can help me with vi code or whatever. I am really appreciate it.

 

Regards,

Phuong

USB 6003: how to drive the trigger and how to trigger AO, and AI after a delay.

$
0
0

Hello,

 

I am quite new to the DAQ, so my question might sound very basic but I could not figure out the answer by myself. My main problem is related with how the trigger works because I could not understand the concept.

 

I have a DAQ USB 6003 and I will use Matlab ToolBox to control it. For my experimental system I need to use 2 analog ouputs and 1 analog input, and I want to trigger the output voltage to a constant DC value at given time intervals, wait a specific time while holding the output voltages and read the analog input. 

 

My questions are:

1.  If I select PFI0 as a source trigger and I want to start it at the rising edge of a pulse signal generated by one of the channels of my DAQ, is this considered Hardware or Software trigger type?

 

2. Which channel type should be used to create the pulse signal and drive the trigger? Analog or Digital? Is there any channel specifically designed to generate this type of waveform (at a given frequency and duty cycle)?

 

3. Can I use the same channel simultaneously, for instance PFI0, to trigger on a rising edge the analog outputs and on a a falling edge the analog input? Or should I have two different trigger sources? Or even a third scenario, where I just use a wait function after the rising edge trigger?

 

Thank you for any help you can give me.

How do I enable the counter debounce function on a USB-6229 device.

$
0
0

 I'm using LabVIEW 8.2.  Calling the property node CI.CountEdges.DigFltr.Enable generates an error that my hardware does not support this property.  The hardware documentation lists 4 debounce settings: 125 ns, 6.425 µs, 2.54 ms, and disable.  Using the example vi "Meas Dig Frequency-Low Freq 1 Ctr.vi" to measure the pulse rate of a flow meter operating between 5 and 300 Hz, I'm getting results that occasionally match the rate displayed on the oscilloscope but more often range between 30 kHz and 5 MHz.  The debounce filter seems like the perfect solution but I haven't been able to figure out how to enable or set it.


Pulse Generation Duty cycle and frequency reset on stopping and starting the task

$
0
0

Hi,

 

I have a task that contains a pulse generation counter output channel (Device: NI 9402 module on a NI cDAQ 9188 Chassis). I notice that if I change the frequency and duty cycle while the task is running, simply stopping the task and starting it again resets the duty cycle and frequency. I have modified the Ansi C example titled DigPulseTrain-Cont.c that ships with NI-DAQmx to implement the following workflow:

1) Create a task
2) Set the counter output duty cycle to 0.1
3) Set the counter output frequency to 100
4) Start the task

 

At this point, we see a square wave being generated at 100Hz with a 0.1 Duty cycle

 

5) Change the counter output duty cycle to 0.001 without stopping the task
6) Set the counter output frequency to 100 (unchanged) without stopping the task

 

The Duty cycle of the square wave now changes to 0.001

 

7) Stop the task
8) Start the task

 

The Duty cycle of the square wave now changes back to 0.1.

 

Similar behavior is observed when one changes the counter output frequency. Is this intended behavior? If this is unexpected behavior, can you provide us a CAR number so that we can track this.

 

Thanks,

Varun Hariharan

MathWorks

2つの出力のタイミングを任意で決めたい NI USB-6361

$
0
0

いつもお世話になっております。

件名の装置を使ってテスト装置を組もうと考えています。

2つの出力ポートを用いて2つの電磁弁を制御します。

 

2つの電磁弁は同時にオンすることはなく相互に動作します。

例としてあげると下記のようになります。0,1はオフ、オンを示します。

1単位5msとします。つまり100msの例を示しています。

 

ch0  0000001110 0000001110

ch1  0111000000 0111000000

 

上の例のように同時にオンすることなくデューティー比も若干オンが短くなっています。

 

できればカウンタ1つ2つの出力が制御できればいいのですが可能でしょうか?

もし2つ必要な場合、どのように同期すればいいのでしょうか?

デューティー比も任意に決めたいのでCOパルス時間を用いようとおもっております。

 

お手数ですがご教示お願いいたします。

I want to create a countdown timer with a visual readout

$
0
0
I like to Create/buy a countdown "readout" timer
There are Manny out there with big led Screen, and with buzzers at run out time but I need a numbering readout

Mod 16 Counter how to stop counting at 1111.

$
0
0

Hi I have a mod 16 counter I am require to stop it from counting at 1111 with a 74LS151 multiplexer how am i suppose to do this ? Picture and file of my circuit is attach below need help asap thanks.

[Help] Difference between Channel Length (.tdms save data) and samples calculated

$
0
0

Hi guys, im  in trouble with my VI DAQ, i have a huge difference between Length data (.tdms files) and my samples calculated in the same loop, i dont know if im doing something wrong in my code or if is it normal when u save data with DAQ, i appreciate any help or guide , I attached evidence (frecuency: 1000 Hz, total time: 7,366 s, but with f= 100 Hz for example is the same issue ) and a picture of my labview code.  

 

Cheers !

 

pd: i used to Instacal and the library Ulx for labview, and my DAQ is USB-1208LS (MCC), and i dont know how to use hardware timing.

PCIe 6351 and quadrature encoder + voltage sensor.

$
0
0

Hi! All experts,

 

I'm considering PCIe 6351 to use as a counter and taking data set.

The question is how to use equipped quadrature encoder input channels in PCIe 6351 and correspond to voltage sensor data.

 

1.

Ex)

At every count of quadrature encoder pulse, take each voltage value with counted value (Crank angle) 

 

Rising edge of A pulse     1       2       3       4       5       6       7       8       9       10       11       12       13  

Vol. value from sensor    0.1   0.6    0.8    1.2    1.5    1.9     2.1    2.4    2.8    3.0      4.0      4.2      3.5

 

I'd like to know how to get the data by using PCIe 6351 quad. function..

 

 

2.  Also,

     Do you know how to directly transfer the voltage values of sensor from PCIe 6351 to FPGA VI ?

   

Ex)

               Vol. value from sensor ====>   PCIe 6351 ======>  FPGA VI ( analog channel in FPGA)  

 

 

Could you give some advices?

 

All advices are welcome!

Thank you so much!

 

 

Best regards,

Hyo 

Frequency measurement clock teminology.

$
0
0

 

An NI document explains "high frequency" two counter measurement using this diagram:

 

 

If I understand the Device Specifications correctly, my USB-6259 BNC has "Internal base clocks" with frequencies of 80 MHz, 20 MHz, 0.1 MHz.  Is an "Internal base clock" the same as the "Internal Timebase" shown in the diagram above?

 

How do I know which clock/frequency is used in a given measurement? Can I specify which one to use?

 

The document also says to use two counter measurements for "high frequency" measurements. What's a "high frequency" measurement?

 

Why does the device have more than one clock/frequency? Why would I want to use any frequency other than the fastest one?

 

thanks!

 


Error -200371 while starting a task containing counter output channels on the same terminal id of different modules on a cDAQ chassis

$
0
0

Hi,

 

I have simulated a cDAQ-9178 chassis (cDAQ1) and 2 modules:

1) NI 9402 - cDAQ1Mod1

2) NI 9481 - cDAQ1Mod2

 

I created a task and add 2 channels to it:

1) ctr0 of cDAQ1Mod1 

2) ctr0 of cDAQ1Mod2

 

If I attempt to start the task, I see the following error message:

Error -200371 occurred at DAQ Assistant
Possible Reason(s):

Requested multiple virtual channels that correspond to the same physical channel within a task. A task cannot contain multiple physical channels of a specified type.

Use different physical channels for each virtual channel.

Channel Name: PulseOutput
Physical Channel: _ctr0
Channel Name: PulseOutput_0
Physical Channel: _ctr0

 

Is there a method you would recommend to generate a pulse train from 2 different cDAQ modules on the ctr0 channel of the individual modules? 

 

Thanks,

Varun Hariharan

MathWorks

start a counter with digital trigger

$
0
0

I want to use a counter in my DAQ card to count TTL pulses and I want this counter is started by a external trigger.

I run the example progrem 'counter-count edges.vi' provided by Labview and choose the tag of "Digital Arm Start". There is a error message which shows "Specified property is not supported by the device or is not applicabel to the task".

My DAQ card is PCI 6733 and my labview version is 2012 service pack1.

Does that mean the counter in my DAQ card cannot be triggered by external pulse? How can I do if I want to start a counter by external trigger? Thanks

 

Removing the analog signals changes my frequency measurement

$
0
0

I am trying to record signals from four sensors (analog output, differential, 0-10VDC) connected to the AI terminals of a NI-6215USB, simultaneously with the signal from an anemometer. The anemometer generates a pulse output and I connect its + cable to the PFI1 (Gate) terminal, and the - cable to the DGND terminal for a frequency measurement. When everything is connected I get correct readings for the analog channels and erroneous readings for the measured frequency. When I disconnect the analog signals completely from the terminals, I get correct frequency readings but a residual alternating voltage is also logged in the analog channels.

 

I don't know if it's matter of wiring or it is impossible to simultaneously acquire several analog and counter signals. I have attached two screenshots (from Signal Express 2015 that I am using). The first one (analogs in) shows the case where the analog signals are connected, but I get unphysical high noise-like signal in the frequency measurement, in the order of thousand Hz. The second one (analogs out) shows the case where I disconnect the terminals from the analog sensors, I get the correct expected frequency of around 83Hz coming from the anemometer (with the exception of some spikes) but there is also an alternating-like voltage in the analog channels (where no sensor is connected at all).

 

I have trying changing the sampling period in the Counter Frequency Step Setup panel, but nothing helps. I also tried connecting the + cable of the anemometer signal to the PFI0 (Source) terminal, but the result is still the same.

Generate a Continuous Digital Pulse Train With a Variable Duty Cycle

$
0
0

Hello guys I am currently trying to generate a continuous digital pulse with variable duty cycle. I have managed to do this thing on frequency but would like to do the same with the duty cycle. Any help please ? 

time sampling rate

$
0
0
I have a doubt about the recorded data by NI cDAQ 9234 (data obtained by accelerometer transducers). I am recording data with Rate (Hz) 2048 and samples to read 1024 and acquisition mode : continuous samples.
 
Now, to undestand the time between two samples, that it is equal to 1/2048= 0.00048828125, but in the file obtained by "write to measurement" the sampling rate is 0.000488 or 0.000489 and it changes in a random way ( I think that it is normal because the software have to do an approximation because it is not possible to have an integer real sampling rate).
 
My doubt is if there is a way to correct this random way to changing values, and more important, if the software works with the correct value (therefore 0.00048828125) but the problem is only the data in the time stamp.
Finally, if there is a guideline where I can study in depth these problems.
 
I am attaching a jpeg about the problem.
 
Thanks a lot for the availability and the help.
 
Viewing all 1271 articles
Browse latest View live