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

PXI-6624 encoder count limits

$
0
0

Hi,

 

I'm using a PXI-6624 card to read from a quad encoder with 1024ppr using Veristand configured to read in X4 mode. 

 

At approximately 11710RPM my signal saturates and doesn't increase anymore. For the 1024ppr encoder, at the saturation speed of the 11710RPM im seeing, the encoder signal is 200kHz for each encoder line (A,B) and pulse width is approx. 5usec


The PXI card states that it can read up to 400kHz with a signal min. pulse width of 1us. 

 

 

Can someone clarify what I am missing? 

 

Regards,
Dave


How to Capture/Log amount of Time a machine (plate saw) is running

$
0
0

I have 6 plate saws that cut titanium plate and bar.

I have been asked to capture that amount of time each one is running (cutting)

Ideally I want to capture this time (start and stop time) to an excel spread sheet which will contain some additional data.  Any help would be greatly appreciated

 

Thanks

 

Mike M

Tracking quadature phase shift between 2 encoders

$
0
0

Hi there!. 

I have a project where I use 2 quadature encoders. 

Im looking into building an solution, that tracks how much further one quadature encoder have driven than the other at a specific time. 

I know the simple solution is to implement just 2x counters and measure the diffrence between those 2, but I would like a bit more of "resolution". 

 

What I essentially want be able to track how much the phase have shifted between the 2 systems, since this gives me an higher resolution than what my encoders provide, since the phase shift between the systems is not tracked in "counts" but offset in position between the pulses.

Does anyone have a good idea how to implement this? It will be used to track the heading of an small vehicle where the encoders are attatched to the wheels. 

DAQ wierd behaviour measuring counter input

$
0
0

I've attached my current benchmarking code in snippet

What I'm trying to do here is using PFI 10 (external TTL pulse from other device) as sample clock and PFI 11 is attached to a digital PMT so I can get photon count when receiving the external pulse.

I have to use external pulse because the experiment requires sending pulses in different frequency over time.

It seems fine when I'm using MAX test panel as the count goes smoothly up, however I'm facing 50% fail when using my external pulse to tell DAQ to make counter acqusition. The first acquisition success, second fail, third success, fourth fail, repeat. Am I doing something wrong making the external pulse failed to be recongnized by DAQ? My current benchmarking is using standard function generator so I don't think the changing interval between pulses caused the acqusition failing.

Example VI for counting voltage pulses

$
0
0

I'm trying to figure out the best way to set up a FP-Quad-510 to count voltage pulses first in MAX so I can learn what the appropriate channels/axis are. Then in LV2014 i will impliment some code to data log the count.

 

Do you know of any example VI's? I did a quick search and didn't come up with much of anything helpful.

 

Buffered gated event counting PCI 6733

$
0
0

Hi!

 

I am trying to do a buffered gated event counting, i.e. I'd like to count photon pulses arriving in the high time of a gate signal. I'm using a PCI-6733 card with NI DAQmx 14.2 and Labview.

 

I'm relatively new to Labview, and I hope I'm just missing some details. I've attached two programme snippets tackling the question from two different points of view - in example1.vi a count-edges-task with a pause trigger is used, in examle2.vi I counted the pulse width of the gate signal in ticks, with the photon pulses as time source.

 

Unfortunately, neither of the two yields the desired results. I tried for a gate signal which is 10µs high and around 20µs low and the following photon pulse rates:

- 10MHz: example2 yields 100 counts/gate signal pulse as expected, example1 yields 300 counts/gate signal pulse -> the pause trigger does not seem to work. What am I missing here?

- 20kHz: example1 yields 0 or 1 count/gate signal pulse as expected, example2 gives out the Error -200140 "Two consecutive active edges of the input signal occurred without a counter timebase edge." -> A count of 0 causes the programme to fail. I'm aware of the problem of duplicate counting, but couldn't find any way to set "duplicate count prevention" to true or to otherwise make the programme work. Anyhow, it does not give me out the same values again but aborts, so I'm not sure if this is actually the source of the problem.

 

Is there any workaround for one of the two versions to obtain a gated event counting? Or is this not at all possible with the hardware I'm using?

 

I'd be glad if you could point me to any forum posts/examples dealing with the problem, I couldn't find any where there has been a solution which worked out for me.

 

Any help is highly appreciated!

 

Thanks a lot for your time,

Britta

 

example1.JPGexample1example2.JPGexample2

power spectrum

$
0
0

Hi, 

I have two questions, the first is that how to combine many power spectrum measurements in one graph and the second how to save the data it to a file. I am having problems saving the graph due to its being a cluster  with three element  so it is hard to find any  compatible  function with it 

NI-9361: "non-timed" output possible?

$
0
0

Hi,

 

I ran into a problem using a NI-9361 counter in a cDAQ chassis.

The hardware features timed output, so I can set the sample rate to lets say 10kHz and collect the data like analog data.

Is there a mode to run the hardware in "old fashion" counter mode? I'd like to have one single entry in the output-array for each falling edge (without reading the same data over and over again if the signal has not changed).

 

 

In my application I need to decode a digital signal and I need to know the times between falling edges. At the moment I read the timed data and look for changes in the values (assuming that the times between falling edges differ a little bit). Every now and then the timing of the signal is so accurate that there's no change in the output data stream. Thus I miss this edge.

I have found a workaround to check for missing edges, but that need a lot of calculation power.

The best solution would be to get only the times of the edges fron the hardware. Is that possible with the 9361?


data acquisition: data was overwritten.

$
0
0

Dear Labview helpers,

 

I am searching through the discussion forum for a question/problem that I have. Although I read some suggestions, I would like to have something confirmed, since I also  have read things that contradicted with one another. I am simply not that confident with labview yet and I hope you folks can help me out with a (hopefully) straightforward question.

 

General remark:

I have a DAQ card (PCI-6024E) installed. Then I code the following:

1. I created a pulse train (using counter 1 on device).

2. A second counter (called 'counter 0') is configured to read the time stamps between incoming pulses (from the pulse train).

 

see attached VI.

 

Problem:

Up to 100 kHz the program can follow the amount of data coming in and there is no error.

However, at around 200 kHz I get error -200141: 'Data was overwritten before it could be read by the system.'

 

Their suggestion: 'If Data Transfer Mechanism is Interrupts, try using DMA or USB Bulk. Otherwise, divide the input signal before taking the measurement.'

 

My questions:

1. Labview suggests to make sure DMA is used when data is transferred. I know how this can be programmed, using the 'channel property node' under DAQmx subpallete. However,

I have read in several topics that the driver takes care of this and by default, DMA is used. So I do not need to program this explicitly, I would say.

 

2. In other topics I have read, people suggest 'producer-consumer loops'. This is what I would like to confirm. Is this the only solution for the error I get?

I was hoping that someone could check my VI to see if I could do something else to prevent the error. 

 

Further remarks:

1.When I choose the pulse train frequency to be a certain value, I always make sure that the sampling rate of the DAQmx Timing function is twice as high, to prevent undersampling. PCI-6024E has a max. sampling rate of 200 kS/s. I am aware of the fact that, choosing a pulse train frequency higher than the sampling rate, leads to undersampling. However, 

I would say that this does not create the error described above. 

 

2. I know that, by choosing a certain sampling rate, Labview automatically creates a pre-allocated buffer. However, one can also tell the size of the buffer explicitly in the DAQmx Timing function.

 

3. In the DAQmx read function is set 'Number of samples' to -1, meaning that whatever data is available in the buffer, it will read it. 

 

I hope my question is clear.

 

Thank you in advance, 

 

Monique

 

 

 

 

 

 

Measuring the time signal

$
0
0

Good day! My program reads the signal from the oscilloscope and displays it on the screen. I need to measure the time between two points. Tell me please, how can this be done and are there any similar examples? Thank you in advance! The coordinate of the first point is specified separately. Suppose that -1ma.

EXTCLOCK Connection with the 9401

$
0
0

I need to sample an angular encoder at 10KHz using the NI-DAQ Assistant.

 

The assistant tool says I need to use an external clock.  What do I need to connect on the 9401 to be able to sample the encoder at 10KHz? I need to be able to dynamically sample at different frequencies (1KHz to 10KHz).

 

Thanks!

Two pulse trains, one with delayed time

$
0
0

Hi,

 

I am trying to get two pulse trains using VI I attached here. I am able two produce two pulse trains but the amplitude of one is very low (0.2V) than expected. Can you please help me how to get same amplitude (5.0V) foe both pulse trains?

 

Regards,

Bharat

1-D Boolean array to be used as a Pause Trigger input of a counter

$
0
0

Hello everyone,

  

The issue that I have is I couldn't find an efficient way of creating a custom digital signal to feed the counter's gate input. I'll elaborate the problem later but first here are the details of the system that I am using: 

 

*DAQ device: PCIe-6363 (Port 0/line0-7 can be used for buffered operations, Port 1 and Port 2 can be used for unbuffered operations or as PFI lines) 

*SW: LabVIEW 17.0

*External 10 MHz clock is connected to PFI4. A 10 KHz continuous pulse is generated using a Counter Output Pulse Tick Task (ctr0) based on the 10 MHz external clock. The 10 KHz pulse will be used as the main clock (MAIN CLK) in the system. 

 

Now let's go back to the description of the issue. Assume one (ctr1 in the VI) of the counters (in total there are four counters) in the DAQ device  is being used to count the raising edges of some digital signal available at the input port of the counter. For this task, the "Sample Clock Task.vi" is configured such that the source of sampling (source input of the task) is connected to MAIN CLK (output of the associated counter). Furthermore, a Pause Trigger Property  Node is used to pause/resume edge counting task. Attached VI shows the system configuration so far. 

 

Here my question is: If the information of shape and time (with respect to MAIN CLK) of the pause trigger signal are known prior to start of all the tasks in the system, how am I going to generate and implement the pause trigger signal at Pause.DigLvl.Src input?

 

To clear things up:

Assume, I have a 1-D Boolean array (not necessarily be periodic), whose elements and size are known and going to be used to generate the pause trigger waveform. AT EACH rising edge of the MAIN CLK,  if the current element of the Boolean array is TRUE (or FALSE), then the state of the Pause Trigger will be HIGH (or LOW).  That waveform should appear at the GATE input of ctr1. Is it possible to achieve this? If yes, what would be most efficient way in terms of using resources? Two counters (out of four) left, for example, it would be better if less number of counters are utilized at the end. 

 

Attempts:

I, first, tried to use Digital Output Write Task, which is sampled with MAIN CLK to write the elements of the Boolean array to one of the output ports. However, GATE input of the counter cannot be set to hardware-timed Digital I/O lines (in this case port 0/line0-7). I can select one of the PFI lines (Port1 and Port2) but now those lines are not available for buffered operation that I am using during Write Task.

 

Second attempt that I am considering is to use "Change Event Detection" feature to realize the pause trigger waveform from a custom Boolean array. This approach is again based on updating the line Port0/line0  at each clock edge, where any transition from LOW to HIGH can be captured by Change Event Detection. I don't know the details of this feature so any feedback regarding the method and/or other issues would be greatly appreciated.  

 

Thanks for reading.

Best,

CHA 

RESET ESCAPE TIME ON WHILE LOOP BY USB - 6525

$
0
0

Hello.

I have problem with sequence loop. First start(USB-6525) while loop program run complete when I start(USB-6525) run again program start run normally but escape time is not reset. I need reset escape time when I start(USB-6525).

Please help to explain how I revise it.

Thanks.

Ai

Data acquisition using FPGA in a while loop

$
0
0

I am currently trying to read from and encoder using a SEA 9521. The encoders datasheet states the kind of timing that needs to be done with variables iI am not quite sure how to figure out. Attached pictures are of how I have it set up in labview and the encoders data sheet on the timing. I am lost on it if there is not enough information please let me know. 


NI9401 counter port is interferenced by NI9482

$
0
0

NI9401 is used for calculating encoder signal, but when NI9482 is activated to control 220Vsolenoid valve, there are a lot of noise are found in the NI9401 port while the encoder signal isn't generated.  NI9401 is located in the first groove and  NI9482 in the fourth groove of NI 9174.

 

How can I eliminate the noise?  

Counter/Timer device PCI-6602 output frequency.

$
0
0

Dear Community, 

 

I am in the process of building a HIL (Hardware in the Loop) setup to test Automotive ECU's. I am currently using Simulink Real Time R2016B to do this.

 

I need to generate a crankshaft and camshaft signal. This is a block signal with fixed amplitude and variable frequency, a so called: Hall effect sensor. 

 

To simulate a drive cycle, I wish to update the frequency 500 times per second. Up to a frequency of around 3.5 Khz. The signal amplitude should range from 0-5V. Furthermore, I need to simulate 5 different hall effect sensors to the ECU. 

 

I have narrowed down that I need the NI 6602 PCI card, since it has 8 timers, where the other cards have only 4.

 

Is it possible to generate stable engine or wheel speed signals with this hardware board?

 

Kind regards, 

Peter

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.

Counter Encoder Plotting

$
0
0

I have been trying to plot an encoder position over a counter channel and receive a fairly smooth plots. When executing my plotting VI all alone this is easily achieved, once added into my application the plot seems to become very jagged almost as if samples are being skipped. The loop in the application seems to be executing at the desired speed as well as the signal being plotted. Not sure what would cause this behavior, the application isn't very large, only includes two modbus task and data acquisition indicators. There are quite a few property nodes for enabling visibility of certain indicators but these are called in their own loop separate from plotting loop. Any suggestions or tips would be helpful, thanks. 

PXI 6238 Counter Output Frequency

$
0
0

Hi,

 

I have a PXI 6238 and want to use the counter output application. I use ctr1, see also the attached image. However, i only get a constant HIGH signal at the port with the 24V level that I set at P1.VCC. I also use the same port as digital out in the same VI, but in a different case. There, the task is stopped when the case is finished. Therefore I tried ctr0, but no difference.

 

Thanks in advance.

 

Viewing all 1271 articles
Browse latest View live


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