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

I am getting 89132 while using 6602

$
0
0

Hi,

 

I am using daqmx utility for Linux for generating pulse train on all the channels.

When I am generating a square wave on ctro and ctr1, I am not getting any error.

After I tried to generate the same pulse on others from ctr2 to ctr7, it is popping up an error which is as follows:

 

Error -89132 occurred at Test Panels

 

Possible reason(s):

 

Specified Property Value can not be used, because it requires resources that are currently in use.

 

Property: CO.Pulse.Term

Destination Device: Dev1

 

Please help me with this issue.

 

 

Regards,

Ashish


Count the whole time off a while loop

$
0
0

Hi

I would like to measure acquisition data in a specified amount off time labview. It's for an application where I can choose between a number of measures or measures in a specified time.

Please help 

 

kind regards

using internal clock

$
0
0

Hi

can you use an internal clock to controle a while loop. This is for taking measures in a period of time. The measures are random so i can't use a counter that counts the iterations, the iterations are random in time.

 

kind regards

What is error 50808

$
0
0

Hi,

I have a vi that monitors two encoders by measuring PERIOD and then sends updated serial commands to two motor controllers in a WHILE loop structure.  It takes the period values, does some simple arithmetic with the encoder values, and based on the values of the encoder period values, new serial commands are output to motor controller, in a feedback loop, 3 basic steps...i.e.

 

1.) Measure period

2.) Convert period value to command

3.) VISA write serial command to motor controller

REPEAT.....

 

So, the code works fine at slow speeds, but, as the motors increase speed and the period value becomes lower and lower, the vi shuts down and throws this Error 50808, for which I cannot find anything on this forum board.

 

I am measuring period with the counters in a cDAQ9174 using module NI 9401 and writing the serial commands through NI USB-232, maybe 3 to 5 times per second, so, not exactly a superfast rate.The commands are only sent if the encoder speed is out of range, so, there are also executions where no command is sent.

 

The serial commands are output through USB port....am I pushing too many serial commands through the USB ports? 

 

Thanks,

Dave

can't get IRIG on MAX

$
0
0

I have a PCI-6682H card in slot 2 of a PXIe-1075 chassis.  MAX has no problem seeing the card and running the self test.  But the test panel cannot find the IRIG time reference.  It will only display the PC system clock.  I am using IRIGB AM type.  I've checked my IRIG source and connections and haven't found a problem.  Any suggestions?

Setting 6250 counter threshold

$
0
0

I have a power supply that provides a voltage signal that is proportional to the current draw.  I need to detect a short current spike of around 70 amps.  The baseline voltage varies from .2 to around .5 volts and the spike is around around 7 volts.  Is there a way to set the threshold  of the counter to say 4 volts?

These are the two functions I am starting with.

 

INT32 CDAQCounter::StartCounting()
{
   DAQmxErrChk (DAQmxCreateTask("",&m_TaskHandle));
   DAQmxErrChk (DAQmxCreateCICountEdgesChan(m_TaskHandle,m_CardID/*"Dev1/ctr0"*/,"",DAQmx_Val_Rising,0,DAQmx_Val_CountUp));
   DAQmxErrChk (DAQmxSetArmStartTrigType(m_TaskHandle, DAQmx_Val_DigEdge));
   DAQmxErrChk (DAQmxSetDigEdgeArmStartTrigSrc(m_TaskHandle,m_SourceID/* "/Dev1/PFI0"*/));
   DAQmxErrChk (DAQmxSetDigEdgeArmStartTrigEdge(m_TaskHandle, DAQmx_Val_Rising));
   DAQmxErrChk(DAQmxStartTask(m_TaskHandle))
}

 

INT32 CDAQCounter::GetCount()
{
   uInt32 data = 0;
   DAQmxErrChk (DAQmxReadCounterScalarU32(m_TaskHandle,10.0,&data,NULL));
   return (INT32)data;
}

 

I am going to be polling the GetCount() function while I programatically increase an output frequency.  When I get back a value, (I should get back a one), that will be the end of the test.

 

Error -200685 DAQmx Write Counter Frequency

$
0
0

I have to generate 4 finite pulse trains with Counter Output and a X-series board (NI PCIe-6321). I know that with X-series boards only one counter is used to generate finite pulse train. I use LabVIEW 2010 sp1 and DAQmx 9.3.5.

 

One task for each counter is created.

When only one task runs, everything is ok, but, when more than one task runs, i receive "error -200685: Pulse frequency specified is not supported for this device given the Counter Timebase Rate." from DAQmx Write Counter Frequency. Error reports invalid data: 0,000000

 

I have checked data supplied and no zero frequency is passed to the VI. In fact, counter frequencies lower than 100 are forced to be 100 through a previous VI.

 

Thanks for the help

 

 

two counters, large range frequency measurement in fpga

$
0
0

Hello NI-community,

 

I'm trying to implement the "Measure Time of Known Number of Cycles" in FPGA (for explanation see http://www.ni.com/white-paper/3619/en#toc3 ). I'm using the NI cRIO-9074 chassis and a 9401 DI/O module. The signal to measure is in a range of 1000 to 10000 Hz. I expect to get the most accurate results from the methode mentioned with two counters. 

 

I just found some usefull hints for doing this with a DAQ device. (https://decibel.ni.com/content/docs/DOC-11542 ).

 

How do I code the first counter? Am I right to look for ex. an rising edge, count n (= divisor) zero crossings switching the signal to pos during this period (= logic-high of the divided down signal), repeating that for the low-level and forward it to counter 2?

 

two counters

 

I would be very thankfull for some help.

 

Regards

Martin

 

 

 


Multivibrator CD4047BC

$
0
0

Hi!

 I'm new into Multism. I need to add in my circuit a multivibrator CD4047BC , but I can;t find it although I have the latest update. Can anyone guide me a bit?

Thanks!

Connect optical encoder with ni usb 6221

$
0
0

Hi, I am trying to connect EM1 incremental quadrature encoder with digital i/o pin outs of NI USB 6221. I want to connect channels A and B, power and ground.

I have already connected Channel A with pin 76 (PFI 3), pin 94 for ground and pin 96 for +5V power supply. I need to know where I have to connect the channel B.

Also I need to connect two EM1 optical encoders in the same card.

I will appreciate a lot if you can help me about this.

6601 sample and hold

$
0
0

Hi,

 

I have a probe set in quadrature count mode. I have it connected to an SCB-68, which is in turn connected to a PCI-6601 card. I am using a C program to read the counter values from this probe.

 

I also have a swinging arm (parallel to the floor) mounted on a rotary encoder which is connected to an MID-7652 box, which is in turn connected to a PCI-7342 card, used to control the servo motors to move the swing-arm. The 6601 and 7342 card are connected by an RTSI cable. The idea is to read the probe counter value while the arm is swinging about its pivot in order to measure surface profiles. It is important to know the exact arm position when the probe is read, and so latency is an issue. I am able to create an use breakpoints for the swing-arm.

 

Since latency is an issue I am looking to trigger a reading of the probe counter every time the arm reaches a breakpoint. I can do this using a C program but there is a delay between the breakpoint being reached when the arm reaches a breakpoint and the probe being read while the software executes lines of code.

 

How can I use the breakpoint output from the 7342 as a trigger to latch the value of the counter of the probe 6601 onto one of the NI-TIO registers?

 

Thanks

This should be very simple...

$
0
0

using the usb 9171 chassis and a ni-9411 module and Labview 2012

I have one reflective optical reader wired to the 9411.

this is mounted to the side of a conveyor bed to detect boxes passing by

 

I've been trying to setup a VI to count the number of boxes that pass by the optical reader (that part is the easy part) but to also give me a gage that tells me boxes per minute (which could be as low as 1 box passes by per minute or up to 60 boxes per minute)

 

any help??

Timing latency

$
0
0

We're trying to get accurate (ms level) measurements from one pre-processed analog signal, one (python) program performing some processing, and a post-processed analog signal. Currently we have the two analog signals fed into a NI USB-6212 box. Additional processing is performed by other systems before the signal reaches our program and after it as well. What we'd like is a measurement of what part of the total lag is the analog signal getting to the python program and what part is after.

 

Since the NI DAQ box can get highly accurate time measurements from a recorded start time using LabView, we figured that having our python script also record the system time would suffice. However, based on our readings, we're not completely confident that the clocks are matching up - our code seems to get the signal before the NI DAQ box records the signal, which should be impossible.

 

We're considering trying to get our program to output a signal to the NI box so all measurements are performed on the same clock - in which case, getting the lowest latency signal possible is important.

 

The other approach is to move the NI DAQ code inside our code (using pydaqmx) - but my understanding of how data is collected in this way in batches sounds like it doesn't guarantee more accurate timing. 

 

Any thoughts or advice would be appreciated. This is my first time working with a NI DAQ system.

Auto stop at Nth continuous square cycles whose amplitude exceeds a threshold

$
0
0

HI all,

 

I am getting high freq Sqaure waveforms into my DAQ card.  The waveform starts at low amplitude but will undergo a jump that are of concern,  I'd like to stop running LabView automatically when it's detected that there are N continuous square cycles whose amplitude exceeds a threshold y.  I use a DAQ card having 2 counters, and frequency is within its limit.

 

Any help would be highly apprecciated. Thank you.

 

-Ian

Connect PWM Compass Modul CMPS10

$
0
0

Hi,

 

For my Bachelor Projekt i have to work with an NI USB-6210 Device.

I want to connect an Compass Modul (CMPS10  Docu: http://www.robot-electronics.co.uk/htm/cmps10doc.htm) to this device.

 

I've Connected The PWM Output Pin with Pin1(PFI 0 alias CTR 0 SRC).

 

I want to record the Impulse width in ms.

 

My Problem is how to configure LabView/the USB-6210 Device to Record this Values.

 

Hope somebody can help me.

 

best regards Andre


LV 2012 crash during finite pulse generation (integer divide by zero)

$
0
0

LabVIEW randomly crashes during finite pulse generation with X-series board (PCI-e 6320) under Windows 7 64 bit and LV 2012 SP1 f3 32-bit.

 

Exception: Integer divide by zero (0xC0000094) at EIP=0x09F11544 (see attached image)

 

Do anyone encounter this error?

 

I can attach source code, but the project is very large. I'm trying to reproduce crash with a smaller program.

 

why does period display NaN? what does "NaN" mean?

$
0
0

I have a vi that is supposed to measure 3 period values and 2 voltages using DAQmx.  The vi is attached. 

 

When I run the vi, I get no errors, but, one of the counters is displaying NaN instead of a period value (in seconds).  Why would this counter not show up?  See the .jpg image of the screen capture, which shows the front panel indicators, after running and stopping the vi.  Notice that period 2 shows "NaN" but, period 1 and 3 display a real value.  The "NaN" displays only in "Period 2" during the execution too. "Period 2" never displays a numeric value.  By the way, what does "NaN" actually mean?

 

Appreciate your thoughts.

 

Thanks,

Dave

 

(using 3 counters in the cDAQ 9174 and NI 9401 module plugged into the cDAQ chassis; periods are measured from encoders)

measure rpm

$
0
0

Hello,

 

I am new to LabView. I have a cDaq 9172 and three modules (9263, 9201, and 9401). I am trying to measure rpm of a shaft with a 24 tooth gear and magnetic pick up. The shaft is expected to rotate in a range between 0.5 and 5 RPM which corresponds to 0.2-2Hz square wave signals (analog acquisition). I've tried using the frequency channel on the digital module (9401) but I couldn't get the programming to wait to aquire the relatively low frequencies. I've also tried post processing the analog signal (module 9201) but the Tone Measurement VI gives me inaccurate measurements at low frequencies (<1Hz). 

 

Could someone please offer me a simple solution for measuring frequency accurately for the expected range so that I can calculate the RPM?

 

Much appreciated,

 

Jake

:-( NEED HELP: digital counter

$
0
0

Greetings friends, first of all ... Thanks for your time and read this post.
 
 
I was looking at other publications on this topic and somehow solved already, however, when I download the examples can not get to them because the programming is in LABVIEW 2011 or 2012 .... : smileysad: and I have is labview 2010.
 
good .... They know I'm connecting a 6009 ENCODER my DAQ, the encoder sends a pulse to the DAQ and I want to count how many pulses sent ....
I know you can use in the PFI O, but in my case I do not use are demanding that port, but that makes a digital counter .... Here I leave a picture of what I programmed.
 


Dibujo.JPG
 
What I can not do is that every time you send a pulse DAQ, the program agrege ONLY numbers and NO more to counter the massive amount of numbers you added when "just" the DAQ sends a single pulse.
 
finally ... Acurio I also put a "TIMING" retarded, but I like the idea of condemning sampling over time ... but then when the pulse arrives.

Friends thanks for your attention, I remember I use labview 2010 ...... when sending their sujerencias take into account that detail.

PCI 6602 / 6229 synchronous frequency acquisition

$
0
0

Hello, i'm facing a problem with my ni device. I have a 3  ni6229  and some 6602 card. We have to mesure simultaneous frequency of 2 optical coder, then display them in time domain.

Signal to measure in range 0 to 10khz and change  with frequency betwwen 20 and 100Hz. (like a sin waveform of 5Khz timebase, moving +- 512hz at 100hz).

 

It's very important to have common time measurement because we need to compare behaviour of one signal from the change in the first one.

 

I've tested some code (labview or nidaq C) (Measure Pulse Frequency - Buffered - External Clock - Arm Start) but i've error -200300 in labview (Invalid timing type for this channe, Property: SampTimingType Requested Value: Sample Clock
You Can Select: Implicit, On Demand).


How can i achieve this measurement

 

Regards

Viewing all 1271 articles
Browse latest View live


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