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

What counter/timer boards are available for apple computers?

$
0
0

What counter/timer boards are available for apple computers?

Thanks


USB-6211 for single photon counting

$
0
0

Hello,

I am planning to use the USB-6211 to sweep an analog output across a 2D raster pattern based on this example by John_P1 for single photon counting. I am wondering whether the USB-6211 could replace this high resolution timing module that is provided also with LabVIEW drivers. The tech specs of the USB-6211 and the TDC seems to overlap and it would be good to use the inputs of the DAQ for the clock (approx. 20MHz) and the signal from the detector with a laser pulse width around 10ns. In addition to this, as I understand, the analog output from the detector would need to be converted to a TTL one. Any suggestion?

Am I being too naive and/or missing something?

Thanks

"Internal Software Error (-224707)" encountered when calling DAQmxReadCtrTicks (implicit buffered pulse measurement)

$
0
0

Im am using v9.8.0 of NI-DAQmx, the NI hardware is a PCIe 6320 in a Siemens IPC running Windows 7 Enterprise. My software is writte in Delphi (and uses a Delphi adaptation of the C API).

We have been using this and similar setups very successfully for over a decade.

 

I am setting up an implicit buffered pulse measurement (for obtaining the high and low pulse lengths of a TTL encoder signal, counted in ticks) like this (only the parts that I think are relevant):

- I am calling DAQmxCreateCIPulseChanTicks with a minVal of 2 and a maxVal of 1000000.

- I am calling DAQmxCfgImplicitTiming, choosing continuous sampling

- After starting the task (which is done using an arm start trigger), I am calling DAQmxReadCtrTicks, where I choose to read whatever values are present (-1) with no timeout (0).

The error code returned by DAQmxReadCtrTicks is -224707 (which is undocumented), the error message reads "Internal Software Error occurred in C_API software. Please contact National Instruments Support. (-224707)".

 

(Note: I am also doing some other stuff in my setup, e.g. another one of the 6320's counters is used for a different counting task (quadrature encoder position). There is also other NI hardware present & used, like a PCI 6133 and a PCIe 6509. The error message happens only if I add the above to my otherwise happily working setup. So there is a possibility of "interference" with the stuff I do. Normally the NIDAQmx error messages are quite helpful in pinpointing the root cause. In this case, however, I triggered something bad ...)

 

Has anyone ever encountered this error message / code?

Verifying Digital Counter Output in USB-6210

$
0
0

Hello,

 

This is my first Labview project and have gotten stuck on something a little trivial that I can't find help for. I am currently counting digital edges on the Counter 0 Source. After counting n rising edges, I wish to output a TTL signal using the counter output.

 

I have two problems:

 

1) It seems I cannot output from counter 0 if I am accepting input from it at the same time. When I try to do so, it says "The specified resource is reserved. The operation could not be completed as specified." Wouldn't Input/Output be two different resources?

 

2) Instead, I am using the output from Counter 1. Is there a way that I can verify that I am indeed generating TTL pulses from this port at the correct time? At the moment I cannot wire up anything from the output port to physically verify it and was hoping there'd be a way through LabVIEW or NIMAX.

 

Thank you

Resource reserved error on adding 2 counter input channels from NI 9361 cDAQ module

$
0
0

Hi,

 

While working with NI counter input channels in the past, we have been advised to add channels to their own tasks. 2 counter input edge count channels thus require 2 tasks. However, while working with an NI 9361 module (on a cDAQ-9188 chassis), I notice the following error: 

 

DAQmx Error: The specified resource is reserved. The operation could not be completed as specified.
Task Name: _unnamedTask<1>

Status Code: -50103

 

I have attached my C code to reproduce the issue. Is this different from other devices? Should I be using a different approach in this case. Please let me know your thoughts.

 

Best,

Varun Hariharan.

MathWorks

The output voltage problem of NE555

$
0
0

I'm trying to make a simple astable circuit. It should be one of the easiest ones in history of electronics, but I can't figure out what's wrong with my design:

 

8G9Xk.png

 

The output voltage remains too low. About 1.5 V peak to peak.

(For my application this is less important, but maybe it could be useful to note also that the calculated frequency differs from the real one of about 30 KHz.)

I tried a different power supply and also a different NE555 IC. Could someone please explain to me why the voltage is so low?

 

QA4qD.jpg

 

 

How to set the external clock of counter for sampling the signal AquadB (Quadrature) interface

$
0
0

Hi everyone,

 

I have some questions about sampling the quadrature signal from a HDMI port by using the PCI 6221 DAQ card and would like to have your support. Thanks!

 

1.Question of connection

 

Can i use a HDMI to BNC conventor to connect the HDMI cable and BNC cable, so i can connet the BNC port to the SCB-68 channel box. Through this connection to acquire quadrature signal?

 

2. Question of Counter task set up

 

What i am going to acquire is the signal from a interferrometer. This signal should indicate the strain difference of my object. When i use DAQ assistant, which typ of counter Input should i choose, is that Edge Count or Linear Positon?

 

And to acquire this quadrate signal precisely, i shoud set the clock of DAQ card faster than the clock of the HDMI interface which will be configured in the sofware of interferrometer. When i open the DAQ assistant, there this a option for sample clock type under adanced Timing, and i can only choose the "external", and have to also choose a clock source, and this step confused me. Can i use a function generator to connect to a PFI channel, and and set the frequency of the signal from function generator as a external clock?

 

 

 

 

 

Linear Position reading zero in C

$
0
0

New to using NIDAQmx. I need to do a simple test and log some linear position readings from a quadrature encoder. I create a task in Measurement & Automation Explorer in which I create a Linear Position channel and configure as shown below. I can see that my encoder readings are correct.

But what I need to do is log this data, so following the ANSI C examples I wrote a small C program to open this task and read. But every reading returns 0.

I'm sure I'm missing something very simple, how can I read the data from this task? Thanks

 

        int32		error=0;
	TaskHandle	taskHandle=0;
	float64		data;
	char		errBuff[2048]={'\0'};
	int32		read;

	/*********************************************/
	// DAQmx Configure Code
	/*********************************************/
        DAQmxErrChk(DAQmxLoadTask("MyLinearPositionTask", &taskHandle));

	/*********************************************/
	// DAQmx Start Code
	/*********************************************/
	DAQmxErrChk (DAQmxStartTask(taskHandle));

	/*********************************************/
	// DAQmx Read Code
	/*********************************************/
	uInt32 numSamples;
	DAQmxGetReadAvailSampPerChan(taskHandle, &numSamples);
	while (1)
	{
//data is always 0 DAQmxErrChk(DAQmxReadCounterScalarF64(taskHandle, 10000.0, &data, NULL)); // printf("Data acquired: 0%f\n", data); } Error: if( DAQmxFailed(error) ) DAQmxGetExtendedErrorInfo(errBuff,2048); if( taskHandle!=0 ) { /*********************************************/ // DAQmx Stop Code /*********************************************/ DAQmxStopTask(taskHandle); DAQmxClearTask(taskHandle); } if( DAQmxFailed(error) ) printf("DAQmx Error: %s\n",errBuff); printf("End of program, press Enter key to quit\n"); getchar(); return 0;

 

MAX.png


Use of Traditional NI-DAQ and DAQmx on the same pc (but not at the same time). It does not seem to work.

$
0
0

We are upgrading a system and would like to start using DAQmx in some of our applications - but not in all.

 

 

New system:

NI PCI-6601

Windows 10 IOT 32bit

DAQ traditional 7.5

DAQmx 15.5

 

The issue is that after I have used the device in DAQmx it can no longer be accessed from DAQ Traditional.

 

It is supposed to be possible but it does not seem to work:

http://digital.ni.com/public.nsf/allkb/890B0DA164567EAD86257AAE0057E1E2?OpenDocument

 

Does anyone have experience with this?

 

As described in the link a reset is needed after a device has been used. We are using the C library for DAQ Traditional and the C# (Measurement Studio) for DAQmx. It is easy to reset a device in DAQmx:

var dev = DaqSystem.Local.LoadDevice(device);
if (dev != null)
{
dev.Reset();
dev.Dispose();
}

But there is no function i C to reset the device. How is this done?

 

Hope someone can help me on this, I would prefer not to port all our DAQ code to DAQmx.

 

BR

Simon

communication between PCI-6602 and PXIe-4492

$
0
0

I recently moved the PCI-6602 card from an old windows machine to a new one.  With the 6602 card, I need to send 5 individual signals out to trigger lasers and cameras.  Matlab is currently not recognizing the 6602 card, so relevant questions I'm attempting to debug:

1. Does 6602 work on Windows 10, or is this only for older systems?

2. Will I need a new download of Measurement & Automation Explorer on the new computer / where can I get this if this isn't a new order from NI?

 

Once that works, we also have a new PXIe-4492 card to synchronize pressure sensors with cameras.  Basically, once the incoming pressure reading reaches a certain value, it will trigger the camera to start recording and the pressure data to be saved.  I'd also like to send a signal to begin the laser system on the 6602 side.  Both will be controlled by the same computer, ideally, but we are not sure how to interface them.  We know it can't be impossible but are not sure to start, so any ideas would be hugely appreciated.

 

Thanks so much!!

PXI-6624 only writes one sample in pulse mode

$
0
0

Hello all

 

I am trying to write a pulsetrain to the counter output of a PXI-6624, however only the first sample is ever written.

 

My pulsetrain has 50 samples, and with simulated hardware the output "number of samples written per channel" matches that. If I build the application and run the program on the target system it only outputs one sample indefinitely and also "number of samples written per channel" is always 1.

 

I tried adjusting the value for "numSamplesWriten" in "DAQmx Write (Counter 1D Time 1Chan NSamp).vi" to a non-zero value without any influence. The timing is set to 50 samples in continuous sample mode with implicit timing.

 

What am I missing, how do I get the counter to go through the array of samples one by one to output the desired timing series?

 

Thanks in advance,

Raphael

Not getting pulse data from PCI card E 6320 using .net

$
0
0

We have purchase PCI card E 6320. We are getting torque data from PCI card thru .net example. but we are not able to get the data of speed thru encoder by using .net examples given in the CD. we are using PFIx channel. Does anybody have .net sample code to read the pulses in edge counting mode.

its very urgent can somebody help. We want to develop similar program in vb. net as attached with this email.

Regards

Ankush Poreddiwar

9167234245

Wiring "Open Collector Output Wiring" to NI-9361 counter module

$
0
0

Hello,

I'm trying to install a wheel encoder on our test truck so that we can more accurately measure distance and speed of the truck while we do the tests.  The issue I am having is that I do not see the counter signal in NI MAX to make sure I wired the thing correctly.

 

I bought the wheel encoder (a Red Lion zmd1000b) from Omega.  Its data sheet says it has an open collector output.  Quoting the data sheet: "NPN open collector outputs are current sinking devices. An output signal will not be generated unless a pull-up resistor is connected from the open-collector to the positive side of an external supply. The same supply can be used for powering the unit and for the pull-up resistor."  The data sheet shows the cable wire color:

Red - +VDC,

Black - Com,

A - White,

B - Green,

Bare - Shield.

 

We have a 4 slot cDAQ-9132 so I also bought a dedicated counter module NI-9361 with the DSUB 9923 connector block to wire everything.  The documentation for the 9361 module shows that it has an internal pull-up resistor that can be enabled or disabled.  I figured I could enable it to be able to get the signal from the wheel encoder.  However, I have not been able to find the option to switch it on or off.  I have tried the wiring configuration as in Figure 6 of the NI-9361 Starting Guide but the counter does not increment.

 

Do any of you have recommendation of what I could try next to get the encoder to put out the signal?  Thank you.

 

More pertinent info about our system running:

-LabVIEW 2015

-DAQmx Device Driver 16.1.0

-NI-9237 and NI-9201 modules to monitor load cells and stringpot

-External 10V power supply to power load cells and encoder

DAQmx Basics / Trouble to get pulsetrain out of NI-6612 PCIe (Simulation)

$
0
0

Hello,

I'm a Newbie with counter/timers or any other data acquisition/generation task with hardware. So please be forgiving, when this seems to be a pretty basic question.

I am trying to get used to NI-DAQmx (without LabView). I managed to create a simulated NI-6612 Device (2 Ports, 32bit/8bit) and selftest of it is successful. I also get some sort of signals in Testpanel which I do not fully understand yet but am able to adress specific lines (PFI0-39) and put a finite/continuous signal on them by myself which makes sense to me. However, when I try to measure a pulsetrain on any of the 8 counters, the corresponding signal-to-measure-channel is already given by the internal routing as given by Pinout-Description. Given that my input-signal lies on the right channel in a separate task, nothing appears to happen when I press run. I get no error, but it does not count the edges at least. Beside that it is confusing, that some counters refer to Port1-Lines which doesn't support buffered signals at all. So I guess I have a lack of understanding how the tasks/internal routing of MAX work (although I read the manual) or what I have to do, to get the edges of my pulsetrain counted (in simulated mode).

 

Thank you in advance!

Définir un temps d'acquisition

$
0
0

Bonjour, 

 

Je suis stagiaire en mécanique aéro dans une entreprise et je dois réaliser un/des programmes Labview permettant d'acquérir des mesures de pressions et de températures via des capteurs ainsi que des sondes. 

Je suis déjà parvenu à créer un programme pour l'acquisition de pression cependant je voudrais pouvoir décider du temps de fonctionnement du programme: par exemple si l'opérateur veut acquérir des pressions ou/et températures pendant 3h, comment puis-je faire pour que le programme s'arrête au bout de 3h ? Dois-je relier une horloge à la condition d'arrêt de ma boucle While ? Si oui quelle horloge choisir et comment la configurer ? 

Merci d'avance pour votre aide.


Stopping BeginReadMultiSample acquisition in .NET?

$
0
0

I have setup a long term acquisition using BeginReadMultiSampleDouble, a delegate to receive N samples and then start the next read.  This works well enough:

 

 

counterReader->BeginReadMultiSampleDouble(numberOfSamples, continuousCallback, object);

...

ContinuousSaveCallback(System::IAsyncResult ^ar)
{

counterData = counterReader->EndReadMultiSampleDouble(ar);
counterReader->BeginReadMultiSampleDouble(numberOfSamples, continuousCallback, object); //starts N+1 read
//save data here

}

 


What is less clear to me is how I am supposed signal the end of an acquisition?  One option is to set a timeout for the BeginReadMultiSampleDouble, and then at the end of the time out, check to see if the user hit stop, and if not, just redo the read.  This seems a little ugly though.  Or am i supposed to just do an infinite read with no time out, and then somehow signal to  counterReader that the acquisition is over?

Changing the direction of simple dc motor using one or max two counters

$
0
0

Hello
I am new to Labview. I was trying to run a simple linear dc motor by generating pwm using NI 9401. I have been successful in that. Now I want to change the direction of the motor digitally in the same program. I have used the second counter as well but it is also driving the motor in forward direction. How can I reverse the direction. Please help
Thanks

Improved While Loop Speed/Timing

$
0
0

I am controlling two solenoid valves using an NI 9482 relay. The first valve will open 500 ms after beginning the program, and the second needs to open anywhere from 15-50 ms after the first valve. There is also a pressure check which will terminate the while loop and close the valves if the pressure does not reach 50 psig within a specified amount of time. When I write to the file to determine when the valves opened, the difference between the x-values are about 100 ms, when I need the while loop to iterate at most every 5-10 ms. What are some suggestions for timing this while loop to run every 5 ms OR just run faster so that the x-values have a deltax of less than 5 ms? Thanks.

Timestamp skipping while direct logging

$
0
0

Hello,

I'm logging data coming on from VISA continuously. I take the data directly, convert it to string together with the measurement time stamp and write it directly into a log. The time stamps seems to skip ~6 minutes about every 6700 measurements. I do not do any timestamp arithmetic, I just take the value, convert it to string and write it to the end of a log file. Any ideas why this could be happening?

Using PFI as a Counter Source (USB-6003)

$
0
0

Hi,

I have an issue with my USB-6003 card and counter operation. Below is part of my Python script that I'm using. My understanding is that those CreateCICountEdgeschan and ReadCounterScalarU32 are needed. And actually those seems to work 'cause that initialCount value can be read with ReadCounter-function. I have learned that CfgDigEdgeStartTrig can no be used with counters, and instead of that ArmStartTrig should be used.

So I added SetArmStartTrigType(DAQmx_Val_DigEdge) between CreateCICountEdgesChan and StartTask but following error was printed out.

DAQError: Specified property is not supported by the device or is not applicable to the task.
Property: DAQmx_ArmStartTrig_Type

Task Name: _unnamedTask<F>

Status Code: -200452
 in function DAQmxSetArmStartTrigType

 

datatype = ctypes.c_uint
data = datatype()
initialCount = 1

 

CreateCICountEdgesChan(devport, '', DAQmx_Val_Rising , initialCount, DAQmx_Val_CountUp )

#SetArmStartTrigType(DAQmx_Val_DigEdge)

StartTask()
ReadCounterScalarU32(-1, data, None)

 

Any ideas what might be wrong? With MAX this seems to work smoothly. I created Counter Input (Edge Count) and after rising edge the measured value is updated. And now my goal is to make this work with Python.

Thanks and regards,

Antti

Viewing all 1243 articles
Browse latest View live


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