Hallo ich bin Labview Anfänger und habe nicht viel Ahnung von Elektrotechnik,
Ich will einen Durchflussmesser an einen NI 6001 anschliessen.
Wie muss ich die Verkabelung durchführen ?
Hallo ich bin Labview Anfänger und habe nicht viel Ahnung von Elektrotechnik,
Ich will einen Durchflussmesser an einen NI 6001 anschliessen.
Wie muss ich die Verkabelung durchführen ?
Hello I am Labview beginner and do not have much idea of electrical engineering.
I want to connect a flowmeter to a NI 6001.
How do I have to perform the wiring?
Hello community,
i have a common problem to solve and i'm stuck with it.
Problem:
I have a analog voltage signal which i want to sample synchronized to a rotary encoder. I have these signals:
A _|---|__|---|__|---|__|---|__|---|__ .... _|---|__|---|__|---|__|---|__|---|__ ....10240 pulses
B |__|---|__|---|__|---|__|---|__|---|__ .... |__|---|__|---|__|---|__|---|__|---|__ 10240 pulses
Z ___________|---|_____________....___________|---|______________ zero index
Analog Signal ............
The rotary Encoder gives me 20480 pulses for one rotation.
When i start my measurement, i want to wait till the zero-index comes. Then i want to aquire for example 20500 samples (voltage and angle), which is a little bit more than one rotation. I also need the number of pulses counted from the first occurence of the zero-index-pulse (Z) to the next. If the counter counts correctly 20480 pulses should be counted. Otherwise there would be dirt on the encoder and i can't use the data.
What i achived so far:
Sample the analog signal with 20500 samples and use the zero-index as start-trigger. Therefore i "xor"ed the signal A and B, to have my 20480 pulses.
DAQmxCreateTask ("", &taskHandle);
DAQmxCreateAIVoltageChan (taskHandle, "/Dev1/ai0", "", DAQmx_Val_RSE, -1.0, 1.0, DAQmx_Val_Volts, NULL);
DAQmxRegisterDoneEvent (taskHandle, 0, DoneAquisition, NULL);
DAQmxCfgSampClkTiming (taskHandle, "/Dev1/pfi0", 5000, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 20500); // pulse train
DAQmxCfgDigEdgeStartTrig (taskHandle, "/Dev1/pfi1", DAQmx_Val_Rising); // zero-index
DAQmxStartTask (taskHandle);
In the "DoneAquisition" Callback i save my sampled data and clean up the task.
This works so far, but now i'm stuck.
Question:
How can i sample 20500 samples with voltage and the corresponding angle and how can i check if 20480 pulses are counted for one rotation?
Thanks Christian
Hi!
I need to configure a pulse generator to mantain a high output for N pulses sourced by a flow meter. (So that I can use another counter to measure this time.)
Is it possible to generate such a pulse without any delay ticks (null/zero delay)??
So that I could arm this measurement and I wouldn't need to wait this dull pulse before the N pulses I want to measure their time duration.
Thanks!
I am using a PXI-6221 DAQ card and LabVIEW 2012.
I have linear encoder that gives a quadrature signal and I have four proximity sensors that give a digital output.
I have successfully implemented example code that runs a while-loop and updates a display of the encoder position and digital inputs at regular interals.
I would like to capture the exact encoder value when each of the four digital inputs changes state. The simplest method might be to have the loop compare the previous state of the digital inputs via a shift-register and save the encoder value if there is a change. I would prefer to use hardware-triggering to get a more acurate measurement. Is there any example code that does something like this?
Hello,
I am currently trying to execute the "GenDigPulseTrain_ContBuff_ExtClk" example.
But whenever I click the start button, the following error message appears:
No matter what value I use for the duty cycle I can't seem to get rid of this error.
I am using a NI PCIe-6321.
Any help appreciated.
Hi NI! (This will be my first post.)
I have an encoder setup where I just want to read the leading edges of signal A (from an encoder. As the encoder is turned, I want to be able to find an angular displacement, which I believe there is already such a selection in LabView.
Modifing the example: Read Encoder. VI, I am still not able to get my edges to translate into a time-series of displacement...Any advice at all to give?
I'm using an onBoard clock on the cDAQ -9178 with a NI 9402 Digital I/O module.
Thank you!
Sam
I have a 6683H connected to a PPS source. The PPS has a good long term (> about 1 minute) accuracy (About 20us) but a terrible short term stability (+/-250us).
When I use the 6683 to time stamp a test reference with a very high accuracy (1us) I get jitter in the resulting timestamps from the 6683 which looks about as bad as the incoming short term PPS jitter.
Is there a way to smooth out the 6683 so it adjusts more to the longer term stability of the PPS signal rather than the second by second jitter?
I don't have a better incoming PPS source so I'm looking for a configuration/software approach if one exists.
Thanks,
XL600
I would like to provide a syncronized reset pulse (once every 1.5 seconds) using a 6602 card and generate a continuously repeating analog waveform using a 6723 card. I require these signals to remain synconized (to better than 0.2 ms) for one month in a lab environment.
I generate a 5,000 Hz base clock on the 6602 card. I down-convert this clock using a counter for 10 samples HIGH and 7,490 samples LOW (one tick every 1.5 seconds).
I pipe the 5 kHz signal into the 6723 card over an RTSI cable. I use this clock as an analog sample clock to iterate through a table of 7,500 samples (a continuous non-regenetive waveform) to create an analog signal output. I set a trigger for the table to begin continuous output on the rising edge of the 1.5 second reset pulse.
How can I be assured that after one month of continuous cycling every 1.5 seconds that the analog waveform and reset pulse will still be syncronized? I am relying on the counter on the 6602 card to downconvert the 5 kHz base clock, and the 6723 FIFO buffer outputting at the same 5 kHz base clock, to both output samples perfectly over the span of a month without any form of feedback syncronization (I receive an error that re-triggering is not suported by these cards, so that is not an option). Is there documentation stating that the counters on these cards are infalable at this operating speed?
Thank you for your time.
Hello,
I would like to calculate the uncertainty of a measurement using a counter (pulseweight measurement or period).
I'm reading N samples and sum them at the end to know my total test time. I supposed in this way my uncertainty must be high (Uncertainty times N samples ...).
This is why I'm looking for several information I didn't find on the NI website.
1) The counter resolution is 32 bits, but what is its range voltage input ? I would like to know the minimum timing change detectable.
2) How can I know the accuracy in % of the measure time ? 50 ppm on a 80 MHz clock ok, but there must have a relation with the measured time too no ?
3) What is the clock deviation in time ? (calibration will be necessary but it's to have an idea)
4) I saw a numeric filter in my channel settings too, but I don't know how it's supposed to work and what can be the impact on the uncertainty of my measurement ?
Thank you all in advance
I have been successfully using a counter to read out a quadrature encoder syncronously with an external clock. Now I would like to try syncing this to a series of regular start triggers so that I only acquire data when the position sensor is actually being actuated. The goal is to have a trigger start reading out the encoder using the clock, acquire a fixed number of measurements, and then ignore clock edges until the next trigger occurs, at which point the sync should begin again. If I understand correctly, the way to do this is to:
1) Setup the counters using the clock and encoder pins via CreateAngularEncoderChannel and ConfigureSampleClock.
2) Use ArmStartTrigger to set the trigger to arm the acquisition
3) Call a function like ReadMultiSampleDouble or use a callback to read the samples at the end of the acquisition.
Unfortunately, if I set ConfigureSampleClock to FiniteSamples, the counter is reset between calls, when actually I need it to preserve the encoder position between calls, just ignore clock edges. If I set to ContinuousSamples, the counter (if I understand correctly) remains armed and will generate samples independent of subsequent triggers which is not what I want. Is there a way to do a finite acquisition of X samples on each trigger, but continue counting until the next trigger?
Can the 6683H be synchronized to the PXI controller system clock? I have a time sync mode (Fail over or while my IRIG board is slowly slewing to its proper sync state) where I use a UDP packet for incoming time but I can't find any mention of how to get the 6683H to track that. The users manual only mentions PPS, 1588, IRIG, and freewheel as the potential modes of operation.
My first thought was to create an internal PPS using a RT loop programmed to create a digital edge once a second. But if there's a way to just send time to the 6683H and have it track that, it'd be far simpler and wouldn't waste.
I am using the "CI Angular Velocity" DAQmx task with an NI9361. It works for the most part. However, I am running into a problem where the velocity value hangs at the last valid measurement. In practical terms, this means if the encoder comes to a sharp stop, then the velocity continues to read whatever value it was at before the encoder stopped.
This is always an issue when taking frequency type measurements. Normally specifying the "CI.MaxMeasPeriod" property on the task takes care of the issue; if the time since the last pulse received exceeds the maximum measurement period, the frequency measurement value is artificially set to a value of 0. I would expect the same behavior out of encoder velocity. However this same method is just not working.
For now, I am using some dirty logic to set the value to zero after the task read if the encoder position value hasn't changed in a second or so. I would like a cleaner solution. I could just use a frequency task and scale into deg/s but I also don't like that method. If anyone has any tips they could share with me that would be greatly appreciated.
Thanks,
Corey
Hi everybody. I'm using a 3 channels quadrature encoder (http://www.maxonmotorusa.com/maxon/view/product/sensor/encoder/Encoder-HEDL-5540-500imp/110518) with myRIO. Im using the Encoder function from myRIO library to get the counter value.
I am using only A and B channel, and I get about 2000 counts/rev . However, as you can see in the encoder specification, it should be 500 counts/turn.
So does anybody have any idea why its 2000 counts instead of 500? is it because its a x4 enocder and I should devide it by 4?
Thank you in advance for your response.
I have some pretty simple code that tries to read out a counter at <8 Hz for display on an X series. On each read 1024 samples are requested and then displayed. I've noticed that reading out the counter is remarkably slow given how few samples are requested (~90-100 ms) such that doing this without an asynchronous read is almost impossible (nearly 100% of thread time is spent in the counter read call). Is there a reason for this? The counter is buffered and the data being requested is negligable (few KB). Am I missing something?
Rough code:
int numberOfSamples = 1024;
myXCounterTask->CIChannels->CreateLinearEncoderChannel("Dev1/Ctr3", "X Counter", CIEncoderDecodingType::X1, false, 0, CIEncoderZIndexPhase::AHighBHigh, 200E-9*1000, 0, CILinearEncoderUnits::Meters);
...some ommitted code to configure PFI lines for reading
myXCounterTask->Timing->ConfigureSampleClock("/Dev1/PFI0", 8000, SampleClockActiveEdge::Rising, SampleQuantityMode::ContinuousSamples, numberOfSamples*10);
myXCounterTask->Triggers->ArmStartTrigger->Type = ArmStartTriggerType:igitalEdge;
myXCounterTask->Triggers->ArmStartTrigger->DigitalEdge->Source = "/Dev1/PFI4";
myXCounterTask->Triggers->ArmStartTrigger->DigitalEdge->Edge = DigitalEdgeArmStartTriggerEdge::Rising;
//buffer a lot of samples to be sure we don't lose any
myXCounterTask->Stream->Buffer->InputBufferSize = numberOfSamples * 4 * 20;
counterXInReader = gcnew CounterReader(myXCounterTask->Stream);
Then my read out function just calls:
counterXInReader->ReadMultiSampleDouble(numberOfSamples);
I time almost 100 ms per call! My read doesn't happen until after the counter samples have already been recorded, so I don't think its waiting for samples to arrive. I also don't see any dropped or missing samples. I can of course refactor this to use async callbacks, but its surprising to me that the daqmx function call is so incredibly slow, which makes me wonder if I'm doing something wrong.
Hi,
I am using NI USB-6353 to measure an analog input signal and counter periods. The two created tasks must start synchronously.
I used this VI as a template and only changed the Encoder Configuration from CI Angular Encoder to CI Period. The problem is, that I always receive error -201314 (Multiple Sample Clock pulses werde deteceted within one period of the input signal). Isn't it possible to synchronize CI Period and an analog input?
I want to have 3 PWM control channels and 1 RPM measurement channel using a 9401 module and the cDAQ-9178 chassis. I want to make sure I'll be able to utilize all 4 counters, as I think according to some reading that this may be a problem if I am using timed loops in my program. If this will indeed be a problem, is there any other hardware I can purchase or will I need to look into upgrading the chassis?
Thanks.
Hi,
I've configured a PCIe-6612 counter to generate a single pulse every time an external trigger occurs. Triggers occur at ~1KHz. Now I'd like to gate that output pulse - the pulse should only occur if an "enable" signal is high.
I thought that this "enable" function was the purpose for the counter's "gate" input, but connecting the enable signal to the counter's gate had/has no effect.
I don't think "Continuous" pulse generation is an option - since we need one output pulse for every external trigger (if enabled-signal is high).
Thanks in advance!
Hi,
I'm getting occasional bad counts on my pcie 6323 that cause the instrument to drift out of position with where the NI board thinks it is. Although the signals out of the encoder do not look that noisy, experimenting with digital PFI line filtering has not made much difference.
I suspect the problem is that I've tied the negative differential line of both phases to the common digital ground on the NI board, negating the noise immunity provided by differential signaling. Can anyone recommend a 5v 4MHz differential line to TTL adapter suitable for use with a NI PFI input? I see some discussion in old threads, but the product links are discontinued or dead.