We are trying to use an incremental encoder with the 9411 board. The difference between the inputs A and Ā never goes negative. So, for example, the difference will vary between 3 and 18V. This is also true of B and Ḃ. The specification of the 6411 board suggests that to detect a negative going pulse, the difference has to go negative. Is this correct ? if it is, can anyone suggest a way to read this encoder, or failing that, any product that would convert the signals to something more easy to read?
Incremental Encoder with 9411 Board
Issues with Counter on 9411
I am a new Labview user, so some of this is a little overwhelming. I am using a cDAQ-9188 with several modules but the one I have having issues with is the 9411 that is being used to measure the speed off a torque meter.
I attached the program I set up. What I would like it to do is measure the number of edges over a 3 second interval so that I can divide by the number of pulses/revolution*60*1/3 to get rpm. However, the number of edges is not behaving in a linear fashion as I expected. I measured the speed of the shaft using a strobe light and graphed it vs. the number of edges. The results are attached on the excel file.
What am I missing? Should the number of edges not increase as I increase the speed of the shaft, or am I going about this all wrong and not measuring what I think I am?
Thanks in advance.
Counting 3 pulse outputs on the 9178
Hello everyone,
Please note that I am very new to Labview. My issue is related to measuring 3 independent pulse outputs.
Currently I am using a 9178 chassis. Two pulse outputs are coming from Omega FTB800B Pulse meters (water flow) which should output 20 pulses/gallon of water flow. The third pulse output originates from a wattnode pulse meter. I am attempting to create a very simple vi (to test all three outputs).
The wattnode seems to be working perfectly and the pulse outputs seem reasonable (connected to a 9402 card).
The two flow meters, on the other hand, are giving me some trouble. I have attempted to run them through both the 9402 card and the two onboard pfi ports.
The wattnode works using the daq assistant and selecting edge count. Since the Omega flow meters are not supplying voltage or current (reed switch), I figured this was a good guide to count pulses internally https://decibel.ni.com/content/docs/DOC-9061. Unfortunately I have been unable to measure the pulse outputs using the aforementioned method.
I have one USB-6009 unit which does not seem to have a problem measuring flow from either meter (one at a time due to the internal counter limitation).
Please see the attached vi examples
Thanks
problem with Counter
hi
A signal gives a correct value, if the speed is under 20km/h. above, somethime not correct. is there a opportunity to don`t show the incorrect value? I mean only the max. value in time?
DAQmx Counter Input Measure a single pulse's pulse width
Trying to measure a single pulse's pulse width. It appears that the DAQ only makes the measurement on the read command instead of after starting the task. I just get a timeout error. Is there any way to arm to counter for measurement or am I better off making a seperate thread to trigger my single pulse?
double measured;
int numSamp;
TaskHandle taskHandle;
DAQmxCreateTask("", &taskHandle);
DAQmxCreateCIPulseWidthChan(taskHandle, "Dev1/ctr0", "", 0.025, 0.120, DAQmx_Val_Seconds, DAQmx_Val_Rising, "");
DAQmxSetChanAttribute(taskHandle, "", DAQmx_CI_PulseWidth_Term, "/Dev1/PFI10");
DAQmxStartTask(taskHandle);
//Trigger the single pulse here
DAQmxReadCounterF64(taskHandle, DAQmx_Val_Auto, 10.0, &measured, 1, &numSamp, NULL);
Thanks,
Dan
starting and stopping timer using external inputs interfaced with labview
hello,
I have trouble finding how to start and stop the timer using external voltage or current pulse. we are interfacing a circuit to labview. so for that we need to count the time it takes between the two external voltages. We have to keep on comparing the voltages to some reference voltage. And when the external voltage crosses the reference voltage we have to start the timer and again we have to stop the timer using tha same logic. We need it for time calculation between the triggers.
hope you can help.
Measuring time of arrival with simple circuitry
I am trying to measure time of arrival of a high speed object to then calulcate the velocity of the object.
The kit I will be using is a cDAQ-9174 with which I will either use the NI9401 or the NI9223.
I am want to make the circuit so that when it is broken the time taken is recorded.
The physical switch is easy to create however I am having trouble knowing where to start with labview.
Could anybody give me a point in the right direction, even something simple like which of the two harware would be most appropriate.
Thank you
How can I adjust the threshold voltage of edge counting?
Hi all,
I'm using PCI-6602 with BNC-2121 for photon counting purpose.
I connect the input to PFI39 channel, nothing is connected to BNC-2121 terminal without this.
After some test, it is clear that my 6602 only count the event which has higher voltage value than 800mV. It has no response(counting) with input signal below 800mV. It only get the count when input voltage increases over 800mV.
But you know, voltage from photomultiplier is usually lower than 800mV. It is impossible to make PMT voltage higher than 800mV for all of my samples.
So I need to find out the way to adjust this kind of 'threshold voltage for counting'.
Thank you for reading.
How to count with PCI-6601 for short periods, quickly?
The application I have in mind is to count TTL pulses for short periods (~500 us) at a rate of ~2 kHz to use in an FFT. I haven't been able to find a way to code something like this... I've tried using DAQ assistant with edging counting for N samples. I also have a program that opens a to port to one of the counters on the card and counts for a specified time, but this is inside a for-loop and I don't have control over the frequency of the sampling. How can I make such a program?
Measure frequency of Z pulse of an accu coder shaft encoder to measure speed using an 6034 E card
Hi,
I would like to measure the speed of a engine which has an accu coder encoder hooked onto it. It provides 3 pulses A, B, and Z. I am using a 6034 E PXI card. I wanted to know if there are any examples/ideas that could help me with this (I am new to the digital programming in Labview). I have moved to NI Daqmx 9.8 recently from the older version which supported legacy codes and hence in process of updating the code. I also want to know if an external clock source is required to do this. this.
Falling edge events of counter output
Hello,
Using labVIEW, I would like to capture the falling edge event of the output of a counter. Below is LV code that captures both rising and falling edge events of a particular counter, I would like to only record the falling edge events.
Is this possible?
Thanks in advance!
Bernie
I am trying to use both DaqMx and DaqMxBase on the same (Windows) PC
Context: I am seeking to build and test the EPICS driver for "National Instruments - Various DAQ cards" - see http://www.aps.anl.gov/epics/modules/manufacturer.php for Windows.
This depends on NiDaqMxBase because it is built for Linux.
Consequently, I have installed DaqMxBase 3.7 on my (Window 7 /x64) PC, which already held DaqMx 9.7.5.
I cannot get DaqMxBase to recognise my pci-6601 counter/timer card.
It it recognised by DaqMx.
Should this card be recognised by DaqMxBase on Windows?
Is it OK to have both driver versions installed on the same PC?
Some problems in using the NI-9411 & cRIO scan and quadrature mode to measure the angle.
How to set therotary encodernumber of linesper revolution(Z),using theNI-9411incRIOscan andquadraturemode to measureangles.
Use a DAQmx write to increment a counter
I have a program that is writing output waveforms which go to some actuators, then some strain cards that are being read (essentially command-response). The issue we have is that we are always reading and logging, even when a test isn't running and nothing is being output to the actuators. This is done so data is still captured in the case where the parts may somehow go into resonance and break (yes this does happen). There are some weighted average calculations we need to do based on the number of waveforms that have been output and responses read, but we are trying to ensure the responses read line up with the correct sine wave output. My thought was if we could somehow use a buffered counter which was incremented every time a write was performed, then read every time a read was performed, we could ensure the data read is lined up with the correct count.
Now, in general, the data that is output should align with the data that's read, and we could hold a counter in software. I just foresee a potential problem where for some reason the daq read loop gets a little behind and we do two writes before we do a read. Then our software counter would be +2 but the data we had actually read off the hardware buffer into software would be behind. This would throw off our calculation.
I don't know if this makes sense, so feel free to ask clarifying questions.
How to change the data time stamp from hh:mm:ss:ms to hh:mm:ss?
How to deal with counter wrapping on negative (below zero)
I am using the DaqMX Angular position VI's to read quadrature encoders. I find thatthe encoders do not wrap "correctly" when going through zero, even when I use the Double rather than U32 data type option. In other words, the counter counts down like this 3, 2, 1, 0, +4billion & change.
How have people dealt with this? Should I set the starting count to + 2billion&change and then subtract that off of all my readings? I suppose it can be made to work, but is ugly.
Is there a better way?
Thanks.
Mark Holm
varied adc input to be displayed on a 7 segment display
Hi,
I constructed an ADC (8bit) using LM339 and a variable resistor. I want to have a display on a 7segment using 7490ic and 7447ic by varying the variable resistor. Also, i would like to know or better if instead counting only upwards when the variable resistor is varied or both up and down.
Theoritically, the circuit should work but am having difficulty piecing the ADC to the "display end".
Please find attached.
Can DAQmxRegisterEveryNSamplesEvent function be used for the Counter Input Channels
Hi, All,
I have an application to count the digitial pulse number. I want to know the time of the coming pulses which start from 1 and increased 4 later, like 1, 5, 9, 13..... The time interval between each pulse is not a fixed value. So I tried to use DAQmxRegisterEveryNSamplesEvent and DAQmxCreateCICountEdgesChan functions. But afterI called the DAQmxStartTask function, it always failed. The board I used is the NI-PCIe-6320. Here is part of my code.
DAQmxErrChk (DAQmxCreateTask("",&m_taskhandle));
DAQmxErrChk (DAQmxCreateCICountEdgesChan(m_taskhandle,"Dev1/ctr0","",DAQmx_Val_Rising, 0, DAQmx_Val_CountUp));
DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(m_taskhandle, DAQmx_Val_Acquired_Into_Buffer, 4, 0, EveryNSamplesCallback, this) );
DAQmxErrChk (DAQmxStartTask(m_taskhandle));
I don't know the reason. Can Anyone give me some help. Thanks.
Yang
Save time in a table
Hi people!
I have a doubt and I think someone from here have the soluction.
In the picture I add you can see a "result" , this is the time 00:00:00.000 and when the max value is less than 4,5 start time if not reset the time. I want to save this time in a table but...I'm bit confused...
I have to use a shift register or what..?
Any idea?
thanks,
PCI 6602 two edge separation
Hi, I'm trying to trigger the counter card (PCI 6602) with start and stop signal and read back the total amount of rising edges occurring between start and stop triggering events. The start and stop signal are defined as the rising and falling edges of an external logic signal. I need the data to be acquired between only one rising and falling edges. With this signal I need to trigger two different counting channels of the counter card.
I'm operating with Labview 2010 with DAQmx where the most suitable solutions appears to be "two edge separation" or "measure pulse width" channels. This two channels combined with an external timing signal (my signal to be counted) seems to meet my needings. Labview examples for both channels do not work, however the counter examples do work, thus I know that a signal could be read from the counter card.
Working examples:
Hardware and Input>>DAQmx>>Count Digital Events>>Count Digital Events.vi
Hardware and Input>>DAQmx>>Count Digital Events>>Count Digital Events-Pause Trig.vi
Not Working examples:
Hardware and Input>>DAQmx>>Meas Two-Signal Edge-Separation>>Meas Two Edge Separation.vi
Hardware and Input>>DAQmx>>Period or Pulse Width>>Meas Pulse Width.vi
error message is very similare for both examples and reads:
Error-200474 Occured at Meas Pulse Width.vi possible reason specified operation did not complete because of the specified timeout expired.
The signal fed into was a square logic signal of period 200ms and could be used with the counting examples. Min and maximum pulsewidth time was adjusted accordingly inside the vi.
Thank you for your help