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

How generate two pulses per cycle? PCI-6251/6255

$
0
0

Hi. I want to generate two or more pulses per cycle like the timming diagram. This pulses will be used to trigger sampling data.

 

timediagram.png

 

I'm ussing the PCI-6251. The examples VI's for counter outputs can easy generate the first line, but for the second i have no idea. Any information can help.

 

Another problem could be the synchronization of that lines and the DAQ.

 

Regards

Ivan C.


Implement a timer on a PXIe-6361

$
0
0

I need to implement a timer using one of the Counter/Timers on a PXIe-6361 Multifunction DAQ module. I find no help on the NI web sight for implementing timers.  I assume from studying the X Series User Manual that I would use the Single Pulse Generation with Start Trigger Function.  I would need to assign an on-board clock as the SOURCE, assign a PFI input as the GATE (Start Trigger), define the value of the pulse delay for my timing, define the pulse width and assign a PFI as the OUT terminal.  However, I find no information as to what nidaqmx functions I would use to accomplish this action.

 

Can anyone address this operation?

NI 9401 9174 chassis multiple quadrature decoders

$
0
0

Can a single 9401 digital IO board be connected to more than a single counter (for quadrature decoding) in a 9174 chasis using Measurement Studio (not Labview VI) and  ContinuousInputDaqComponent "component" (mxb) model? When I create a second component I get  an Initialization Error (Device cannot be configured for input and output because lines and/or terminals on this device are in use by another task or route.  ... Status Code: -201133

 

I tried moving the PFIs around with no success. Added Reserve code to Task with no success as well.  This is a 1 Sample (On Demand) MXB generated component model.

 

If there is an example of multiple decoder code (in C#, C++ or ever VB) somewhere not using the component model

 

Snippet Below:

 

            myLinearEncoder = new MotorLinearEncoderComponent();            myLinearEncoder.TaskReserve();            myLinearEncoder.TaskCommit();            myLinearEncoder.DataReady += OnLinearEncoderCounterDataReady;                        myRotaryEncoder = new MotorRotaryEncoderComponent();            myRotaryEncoder.DataReady += OnRotaryEncoderCounterDataReady;            myLinearEncoder.StartRead();   <--- fails here            myRotaryEncoder.StartRead();

counter timer recording memory

$
0
0

I have a USB-6289. I am presently using it as a counter. I want to do the following. I want to record the counts in memory at a rate of 400Hz. I want to be able to store this data in memory for 10 minutes. At the end of this time I would retrieve these counts and store them in a file. I do not think the USB-6289 has this capability but if it does I would like to know how I could program it to do this. I am willing to purchase another device that wiould fulfill my needs so if anyone knows of one pleas let me know. Thanks in advance.

How to communicate with 2 boards PCI-6601

$
0
0

I worked with PCI-6601 using 4 channels for counters. Now I need more channels and buy one more board PCI-6601. Now to address to the second board? How to switch between the boards?

Quadrature not working for linear encoder

$
0
0

Hello All,

I have an application where I acquire counter signals from a flowmeter. This flowmeter has A and B signals like a traditional quadrature encoder.

Theese signals are wired to a PCIe-6612 counter board.

I have discovered that when I select the linear encoder instance of the "DAQmx Create Virtual Channel.vi" and set it as X4 decoder, it's not working. It behaves as a X1 counter.

I have to select the Angular encoder instance instead to have the X4 decoding working properly.

 

Is it a bug or a known behaviour?

 

Regards

USB 6211 with 2 Encoders labVIEW Interface

$
0
0

Hi,

 

I am trying to use 2 encoders (780251-01) to measure shaft rotation of 2 shafts to assure that they are rotating at the same velocity.  The encoders I plan on using are 780251-01 with a NI USB 6211.  I am seeking assistance on creating a VI.  Any help would be appreciated as I am a beginner to LabVIEW.  In the futiure, I plan to implement a National Instruments load cell. ( 783212-01)

NI PCIe-6321 PWM Generation

$
0
0

Hi Everyone,

 

The NI PCIe-6321 X-Series board has 4x general counters, which can be used for PWM generation. However, when conducting tests using the attached VI we were unable to general PWM signal using all the counters. It would generate when Dev1/ctr1 and Dev1/ctrl3 were selected. Is there any DAQ configuration required or something?

 

Thanks,

Mitch


Oven control

$
0
0

I am trying to control 5 heaters independently through PWM of stand alone SSRs with feedback from five sensors (RTD or Thermocouple) and need to detemine which modules I need with a Cdaq. I have a cdaq 9172, modules ni9211, ni9472, ni9485, and ni9481 from a previous job that I was hoping to use. My thought was to use the 9472 to modulate the standalone ssr's based on the temperatures read from the 9211.  As I wrote the code and began testing/invetigating I ran into some problems. I'm not sure the cdaq can support 5 seperate PWMs and am thinking the 9211 is slowing the system down.  Can anyone offer any input? 

 

 

Enable Debounce Filter in Signal Express

$
0
0

Hallo everybody,

 

I want to measure the frequency from a rotary encoder but I the enviroment is electromagnetical noisy. The encoder is near an inverter and as a result the proper measuring of the pulses is inevitable. I use the 6211 usb ni card. From my search in the forums, I discovered that enabling the debouncing filter will solve the problem but I cannot figure out how this can happen in Signal Express. 

 

Any suggestions will be helpful. Thank you.

LED Blink Elapsed Time

$
0
0

Hello everyone,
I'm making a measurement of heart rate using PPG. The LED will blink synchronously with the heart beat. The problem is, i want to make the first blink of led start the elapsed time and second blink of LED stop the elapsed time (using one LED). I can only make the blink of LED stop the time elapsed, but the reading is wrong due to delay..Can anyone help me please?

200010 warning at DAQmxStopTask.vi

$
0
0

Hello!

 

My task is to measure some random TTL pulses of 50ns smallest period from the photodetector (PD) while it's gate is opened for a particular time only when a motor, on which a head of the PD is mounted, is at angles that are multiple of fives. Motor is supported with an ActiveX lib, and I use event programming through RegEventCallback to catch when the motor reaches angles 0, 5, 10, 15 and so on. In the loop, iterating every time the callback was called (I use notifiers here to communicate between the loop and the callback) I use for the data acqusition the following VI: Read.png

which is in the "Scan" section of the case structure in the loop. The initialization section of the case structure in the loop contains the following code:Init.png

Here I have to explain that without a "gate task" there would be no counts at all (PD's feature).

 

I continiously get the warning (not the error) 200010 form the DAQmxStopTask.vi, although I have measurements done (non-zero values). I think, there should be something either with the acqusition rate or with the buffer size, but I actually can't get exactly what to change: 20M is plenty enough, 2 samples is twice more than enough (requested by LabView, however)...

 

Please, recommend me something!

Preprocessing for DAQ Counter Input

$
0
0

Greetings,

I am using an NI DAQ device (USB-6431) to capture angular motion via a three-channel optical quadrature encoder. I have constructed my LabVIEW VI with DAQmx VIs to configure my DAQ (I'm using one of the onboard counters to measure angular position). I noticed throughout the process that there are many built in 'conveniences' that make the setup of the counter quite simple; the VI will automatically process the signals using X4 encoding and Z-indexing with the introduction of a few constants. I am making the assumption that the DAQ device and/or the computer does preprocessing on the input stream before it enters a buffer in order to convert ticks on three channels to values such as '-5.13 radians'. Firstly, is that a correct assumption? Is this is indeed the case, I would like to do some of my own preprocessing to deal with some of the idiosyncrases of my encoder. I am concerned that my computer would not be able to keep up if I do this processing within a LabVIEW loop using the DAQmx Read VI to grab the data from the buffer, so my next thought was to do the processing along with whatever code manages the position measurements from the counter BEFORE it enters the buffer and gets logged to disk. My question is, how would I go about adding this preprocessing behavior to my workflow? I am not at all opposed to writing some C if necessary. I would also appreciate any comments/corrections on my method; I am new to LabVIEW and data aquisition, so I am not sure if this is the right way to go about gathering and processing my data. Thank you for your time.

help daq arduino

$
0
0

good afternoon I need a help of as to transform this one I vi in one I subvi then to use in one interface interface graph that I am developing,attached file of labview to help me

Do I have to use an external clock with a cDAQ-9188 and NI 9401 to read a linear encoder? I'm seeing error message that implies that but the example code doesn't show it.

$
0
0

We can set up a task that works on demand but when we go to continuous sampleing we see Error -200303, which claims an external sample clock source must be specified for this application.  However, some of the NI linear encoder example code doesn't show that (uses the cDAQ 80 Mhz clock) and the documentation didn't mention that. 


simultaneously generation and measurement of pulse

$
0
0

hello every one,

i am generating a pulse for specific time.Now I want to measure it within same daq card.I have made Vi for it but it has some error.I have USB daq-6343.I am attaching my Vi here.

The problem is i am able to get generated pulse on PFI 6 pin but reading Vi is showing Time out error.

I have connected wire between PFI 1 pin and PFI 6 pin on DAQ card.

So plz suggest me what to do for eliminating this errors.

 

thanks & regards,

convert counter rate to DC analog

$
0
0

hi,all

 

    I use PCI 6601 and NI BNC-2121 to count the pulse from avalanche photodiode( APD,PerkinElmer SPCM AQR 14). The photon intensity detected by APD can be displayed on the labvew software. It works well.  But previous members in my lab did the build-up job. I am new to NI hardware and labivew.

 

  Now I am trying to feed the TTL signal from APDs (SPCM AQR 14) to an Atomic force microscopy (AFM)  controller. But only DC signal can be fed to the BNC channels  on that controller.  So  I need to not only count  pulses but also convert the TTL  pulses into a DC voltage depending on the pulse rate. The DC voltage can then be fed into the controller.  Is there any solution offered by NI?

 

  Thanks!

 

 

 

Rate of Fire

$
0
0

We are looking to create a program that will allow us to calculate the rate of fire of a firearm.  We will be using a cDAQ 9174 with a 9233 or 9234 module (have both).

The DAQ will be looking at data from a connected infrared screen (Oehler Model 57).  Data aquisistion will be triggered by the first bullet passing through the infrared screen.  What I would like to do is then be able to get either the time between each shot or the time from the initial shot to the current shot.  Is there a way I can do this?

I'm fairly new to LabView so any help is much appreciated.  Please let me know if you need more information.

Thank you.

40kHz ultrasonic pulse and time it take to receive the Pulse.

$
0
0

Hi,

 

 i have developed  the following circuits:

 

Tx: a Circuit that generates a 40kHz frequency using an LM555, the LM555 is wired to an AND gate which when using the test panel on MyDAQ(6216) i set cntr0 and set it to edge detecting i can count the number of edge detections when i enable the port High and when i switch it low it stops recording the counts.

 

Rx: Recieving circuit contains an OpAmp which is fed into an LM567CN tone decoder which is tuned to 40Khz. when the recieving circuit PLL locks on to the 40kHz signal the output of the LM567 pin 8 switches to ground.

 

Question: I am very new to NI and wondering where the starting point would be to create a VI that will trigger the Tx circuit and then measure the time it takes the Rx circuit to recieve the signal, this will intitial be done through air and then i would like to move it through a meduim such as water. Has  anyone tried or seen anything that would be of use to create a vi that would match this.

 

Any help would be greatly appericated.

 

Phil

filter pxi-6602 LabVIEW DAQ-mx

$
0
0

Hi,

 

I have a PXI-6602 card.

The signal to measure is on the gate pin.

On the source pin, it is the internal 20MHz.

The counter uses the ND_BUFFERED_EVENT_CNT mode.

I have a LabWindows code with NI driver DAQ for this card which uses filter with this function <<< Line_Change_Attribute( device number, line name, ND_LINE_FILTER, ND_5_MICROSECONDS) >>>

 

I must rewrite the code to LabVIEW with NI driver DAQ-mx.

I use the counter to count edge mode.

I don't know how to configure the same filter in LabVIEW with DAQ-mx.

 

Can you help me ?

thanks

 

best regards

 

 

Viewing all 1271 articles
Browse latest View live


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