Quantcast
Channel: Multifunction DAQ topics
Viewing all 6883 articles
Browse latest View live

USB-6363 BNC singe-ended measurement

$
0
0

Hello,

Thank you in advance. I have a question regarding analog input measurement in USB-63xx-BNC devices. Could you measure voltage in single-ended mode when there is BNC-type connection on front panel, or there are only a differential inputs?

 

Thanks


Pulse Width Modulation Signal

$
0
0

i want to generate Pulse Width Modulation With  USB 6001

Can Any one Help me Please ?

Connecting analog voltage measurements to DAQs of PXI I/O modules

$
0
0

Hey together,

 

we would like to measure voltages with a bandwidth of up to 1 MHz, 40V by means of analog I/O module PXIe 6378.

 

This is the equipment we currently use for this purpose:

We connect the probes as single-end connection with AI- and AIGND being shorted. We would like to have a isolation inbetween several analog inputs, probably a differential connection would be better.

What is the recommendation for voltage measurements with the described setup of PXIe analog modules? Which voltage probes are recommended or which alternatives for measurements with I/O modules are out there?

 

Thanks in advance for your help,

Martin

Acquisition en parallèle

$
0
0

Bonjour,

J’ai un problème avec mon acquisition sur une carte PXIe 6363.

Je souhaite faire l’acquisition des temps d’un compteur pour cela j’utilise une boucle cadencée. Cette partie marche très bien. Cependant je souhaiterai que cette acquisition ce déclenche dès qu’un signal physique est supérieur à une certaine valeur et s’arrête lorsque le signal passe en dessous d’une certaine valeur. Pour cela j’essaie d’utiliser une boucle while en parallèle qui interroge la valeur du signal physique. Je ne veux pas utiliser la boucle cadencée pour cela car sinon lorsque je n’ai plus de signal qui arrive au compteur il devient impossible de récupérer la valeur du signal physique.

Voici en PJ mon vi,

Merci d’avance

DAQ USB6211 works in NI MAX but doens't in LabVIEW VI

$
0
0

Hello everyone!

 

I'm working with a DAQ NI USB 6211.As a first VI I implement analog voltage reading.

 

I've installed labview 14 and DAQMX 14. When I plug the DAQ via USB, It appears in NI Device Monitor and i can test every pin in NI MAX.

 

I created a new task called MyVoltageTask(3.png) and i set all the features about the reading i need.

If i connect AI0 to internal +5V source the reading is right.

 

When i run the VI in labview, the reading is zero(that is wrong) but it doens't return any kind of error.

 

Any suggestions?

 

Thanks!

 

Accessing timer/counter functions on USB-6001

$
0
0

I am working with a USB-6001 and trying to use the timer/counter functions to generate a frequency output signal for a stepper motor drive.

 

It appears that the PFI channels (P2.0 and P1.1) can be adapted to counter/timer functions. However, none of the example VIs recognize either PFI0 or PFI1 or P2.0 or P1.1 as counter/timer.

 

How do I configure the USB-6001 to access this functionality? How do I specify these ports in a VI?

Continous aquisition through callback software event

$
0
0

Hello!

 

I'm trying to aquire sensor data using a NI PXIe-8840 RT.

8 modules are connected to the PXI controller: 6 PXI-6238 boards for measuring current and 2 PXI-6230 boards for measuring voltage.

Each board uses up to 8 analog input ports with sensors attached.

 

One DAQmx task is created for each board with the following configuration:

sample rate = 10kHz

number of samples read  per cycle = 5000

 

Within the task, one voltage/current channel is created for each analog input (i.e. 8 channels/board)

 

Each task is connected to a callback event:

 

retVal = DAQmxRegisterEveryNSamplesEvent(

   taskHandle,
   DAQmx_Val_Acquired_Into_Buffer,

   5000,
   0,

   pointer to callback function,

   NULL);

 

https://zone.ni.com/reference/en-XX/help/370471AM-01/daqmxcfunc/daqmxregistereverynsamplesevent/

 

I'm expecting a callback to be triggered every 500ms (based on sample rate and number of samples read) and it works most of the times, but every ~6h or so a random board seems to be skipping/missing an aquisition somehow.

 

In the callback function I'm first checking which measurement task that triggered the callback, and then reading the aquired data for all ports into a large buffer.

 

retVal = DAQmxReadAnalogF64(

   taskHandle,

   5000,

   10.0,

   DAQmx_Val_GroupByChannel,

   inputBuffer[boardIndex],
   (8 * 5000), /* 8 ports with 5000 samples each */

   &samplesRead,

   NULL);

 

https://documentation.help/NI-DAQmx-C-Functions/DAQmxReadAnalogF64.html

 

When the fault occurs the return code of  DAQmxReadAnalogF64 returns -200279 which tells me:

 

"The application is not able to keep up with the hardware acquisition.

Increasing the buffer size, reading the data more frequently, or specifying a fix
ed number of samples to read instead of reading all available samples might corre
ct the problem."

 

This seems to be accurate since I've measured the time between the data aquisitions when the fault occurs (more than 1 second).

But I believe that I can't read any faster, since the callback should be triggered when 5000 values are read. Am I correct?

 

Currently overriding the input buffer size to 15000 samples, but I'm afraid that it will only hide the problem by not throwing an error message when an aquisition is in fact missed.

 

Any help is very appreciated since it is a very time consuming task to debug when the fault only occurs every 6:th hour or so...

 

Thank you (and sorry for the long post)!

 

 

Can I connect 2 chassis SCXI 1000 in PCI 6259?

$
0
0

I'm trying to connect 2 chassis SCXI-1000 on my computer through PCI 6259, but the second chassis connected (connector 1) just isn't responding. I don't know what I'm doing wrong.

 

I've already tested my SCXI chassis, modules and cables on 1st slot, everything was ok.

 

Please help!

 

Capture.PNG

 


USB-6008 outputs high on start

$
0
0

Hello,

 

i am using a USB-6008 and i registered a high state or max volts on every output (Digital and Analog) on start. So the first thing i do is to set the voltages or states to low. But if I restart the outputs are set to high again.

 

On our HiL testing system with PXIe 6739 everything works fine. All outputs are low on start.

 

Does any1 have an idea why the USB-6008 is doing that?

 

Thanks for help. 🙂

 

Greetings

USB-6000 series Digital I/O switching

$
0
0

Regarding the USB-6000 series of DAQ modules, I need both 10 Digital Inputs and 10 digital outputs.  Since the I/O is switchable, can I switch the function of the I/O in the VI, or does it need configured in the VI and left that way?

 

Thanks.

 

 

Program phase shifted pulses from DIO/counter lines in USB-6343

$
0
0

I am trying to generate 3 phase shifted pulse trains (with variable frequency)

from DIO lines of a USB-6343 device. This is to simulate a hall effect speed sensor.

 

I haven't used DIO/Counter lines for this purpose before and just started learning Labview. Can anyone help me with this problem or direct me to relevant resources? 

 

Thanks 

propagation delay NI cDAQ-9174

$
0
0

Hello,

I am using labview for data acquisition, the HW i am using are : 

-NI cDAQ-9174 CompactDAQ Chassis

-NI 9205 AI card

-NI 9401

The program i am using acquire two differential voltages at channel0 and channel1 with the 9205,

The 9401 is also used to acquire data from an encoder ( A+, B+, Z+), 

i want to acquire both data at the same,

My question is what is the propagation delay of each card ? is there a way to measure the propagation delay ? or a way to synchronize the acquisition of both data ?

NI-9205 and NI-9263 Multi Sensor Configuration

$
0
0

Hi,

 

I am trying using a cDAQ-9132 with a NI-9205 voltage input module and a NI-9263 voltage output module in order to measure a Campbell Scientific 109SS ground temperature probe and a Campbell Scientific CNR4 net radiometer. The ground temperature probe requires a 2.5V excitation from the NI-9263 and a single ended configuration. The CNR4 net radiometer is used in a differential configuration connected to the NI 9205. The CNR4 net radiometer also has a built in thermistor that is needed to accurately measure pyrgeometer irradiance. This thermistor also requires a excitation voltage from the NI-9263 and a single ended configuration.

 

Right now we only have one wire (the 109SS purple thermistor wire) connected to the COM terminal on the 9205 and both the COM terminals on the 9263 are not connected to anything.

 

We are experiencing noisy data and getting data/results that do not make sense. I believe this is a wiring/configuration issue more than a LabVIEW issue. See the table below on how this should be wired according to the 109SS and net radiometer manuals.

 

Some confusion I am having is that the shield wires for the 109SS, net radiometer and net radiometer thermistor all need to go to analog ground. The 109SS and net radiometer thermistor also each have a thermistor reference wire that needs to go to analog ground as well. So my question is then do all the shield wires (3) and thermistor reference wires (2) need to go to the one COM terminal on the 9205? The CNR4 net radiometer also says in its manual that jumpers should be used to connect wires (6, 8, 10 and 12) to analog ground as well. This would give you then 9 wires that need to go to analog ground. The 9263 will also have two COM terminals that need to be referenced to ground as well correct?

 

Any suggestions on how to go about wiring this setup in order to get accurate readings by referencing a common analog ground between the three separate sensors and the COM terminals on the 9205 and 9263 (if this is even possible to be done with the existing equipment)?

 

Wire #

Sensor

Wire

Purpose

Connection To

1

109SS Temperature Probe

Black

Voltage Excitation Input

NI-9263 AO-0

2

109SS Temperature Probe

Red

Analog Voltage Output

NI-9205 AI-0

3

109SS Temperature Probe

Purple

Thermistor Reference

Analog Ground

4

109SS Temperature Probe

Clear

Shield

Analog Ground

5

CNR4 Net Radiometer

Red

Pyranometer Upper (+)

NI-9205 AI-1

6

CNR4 Net Radiometer

Blue

Pyranometer Upper (-)

NI-9205 AI-9

7

CNR4 Net Radiometer

White

Pyranometer Lower (+)

NI-9205 AI-2

8

CNR4 Net Radiometer

Black

Pyranometer Lower (-)

NI-9205 AI-10

9

CNR4 Net Radiometer

Grey

Pyrgeometer Upper (+)

NI-9205 AI-3

10

CNR4 Net Radiometer

Yellow

Pyrgeometer Upper (-)

NI-9205 AI-11

11

CNR4 Net Radiometer

Brown

Pyrgeometer Lower (+)

NI-9205 AI-4

12

CNR4 Net Radiometer

Green

Pyrgeometer Lower (-)

NI-9205 AI-12

13

CNR4 Net Radiometer

Clear

Shield

Analog Ground

14

CNR4 Thermistor

Red

Voltage Excitation Input

NI-9263 AO-1

15

CNR4 Thermistor

White

Analog Voltage Output

NI-9205 AI-5

16

CNR4 Thermistor

Black

Thermistor Reference

Analog Ground

17

CNR4 Thermistor

Clear

Shield

Analog Ground

Formatting time axis for reading analog inputs

$
0
0

Hello,

 

I've recently been working on DAQmx with cDAQ 9178 and we have a few thermocouple modules. I have never used Labview or other NI software before so pardon if this is a simple question. I have a thermocouple connected and was acquiring data to display, but I cannot format the time axis. as shown in the image attached. Any help in this matter will be appreciated.

EveryNcallback buffer overflow on 6321 device

$
0
0

I need some help.

On machines of ours we use the 6321 PCIe-6321 multifunctional I/O device.
They have been running fine for a few years, but since about 1 year ago we ran into problems.
We assume the problems we have are related to the fact that a customer application is running on the same PC and interferes with our application.
This client performs web-access to a central server in Sweden.
It seems the problems are more severe the further away a machine is from sweden.
We have machines in sweden, holland, france and brasil. And Sweden does not report the problem but the other locations do.

 

So what is the the actual problem :

2020-11-23 06:13:03,86-DAQmx callback error: Attempted to read samples that are no longer available.
The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples
to read instead of reading all available samples might correct the problem.
Property: DAQmx_Read_RelativeTo Requested Value: DAQmx_Val_CurrReadPos
Property: DAQmx_Read_Offset
Requested Value: 0
Device: Dev2
Task Name: _unnamedTask<3>
Status Code: -200279

 

Now the source code I am using.
The appliction is not a Labview application, but a c++ application build with Embarcadero.
we also have a PCI-6518 Digital IO card in the system, so DeviceNr points to the correct board
and at startup AnOut0 and 1 are filled with the correct settings.
If the 6321 is device1 :
AnOut0 = "Dev1/ao0";
AnOut1 = "Dev1/ao1";


Initialisation of my tasks:
(DWprintf writes debug information to a seperate window. The error description above is taken from that window)

void __fastcall TAnaThread::StartRTdata(int cycletime, int NrItems)
{
DWprintf("Start RT data called");

/*********************************************/
// DAQmx Configure Code
/*********************************************/
if (AnOutputs == 0)
{
// analog output task :
DAQmxErrChk (DAQmxCreateTask("",&AnOutputs));
DAQmxErrChk (DAQmxCreateAOVoltageChan(AnOutputs, AnOut0.c_str(), "", -10.0,10.0, DAQmx_Val_Volts, ""));
DAQmxErrChk (DAQmxCreateAOVoltageChan(AnOutputs, AnOut1.c_str(), "", -10.0,10.0, DAQmx_Val_Volts, ""));
}
if (AnIns == 0)
{
// analog input task :
DAQmxErrChk (DAQmxCreateTask("",&AnIns));
if (DeviceNr == 1)
{
DAQmxErrChk (DAQmxCreateAIVoltageChan(AnIns, "Dev1/ai0:5", "", DAQmx_Val_Diff ,-10.0,10.0,DAQmx_Val_Volts,NULL));
DWprintf("Analog input task created for dev1");
}
else
{
DAQmxErrChk (DAQmxCreateAIVoltageChan(AnIns, "Dev2/ai0:5", "", DAQmx_Val_Diff ,-10.0,10.0,DAQmx_Val_Volts,NULL));
DWprintf("Analog input task created for dev2");
}
DAQmxErrChk (DAQmxCfgSampClkTiming(AnIns, "", 100, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 100));
DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(AnIns, DAQmx_Val_Acquired_Into_Buffer, 10, 0, EveryNCallback, NULL));
DAQmxErrChk (DAQmxRegisterDoneEvent(AnIns, 0, DoneCallback, NULL));
}
if (Freq1 == 0)
{
// timer tasks :
DAQmxErrChk (DAQmxCreateTask("",&Freq1));
if (DeviceNr == 1)
{
DAQmxErrChk (DAQmxCreateCIFreqChan(Freq1,"Dev1/ctr0","", 0.1, 1000.000000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, ""));
DWprintf("Freq1 task created for dev1");
}
else
{
DAQmxErrChk (DAQmxCreateCIFreqChan(Freq1,"Dev2/ctr0","", 0.1, 1000.000000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, ""));
DWprintf("Freq1 task created for dev2");
}
DAQmxErrChk (DAQmxCfgImplicitTiming(Freq1, DAQmx_Val_ContSamps, 4000));
}
if (Freq2 == 0)
{
DAQmxErrChk (DAQmxCreateTask("",&Freq2));
if (DeviceNr == 1)
{
DAQmxErrChk (DAQmxCreateCIFreqChan(Freq2,"Dev1/ctr1","", 0.1, 1000.000000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, ""));
DWprintf("Freq2 task created for dev1");
}
else
{
DAQmxErrChk (DAQmxCreateCIFreqChan(Freq2,"Dev2/ctr1","", 0.1, 1000.000000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, ""));
DWprintf("Freq2 task created for dev2");
}
DAQmxErrChk (DAQmxCfgImplicitTiming(Freq2, DAQmx_Val_ContSamps, 4000));
}
/*********************************************/
// DAQmx Start Tasks
/*********************************************/
DAQmxErrChk (DAQmxStartTask(AnOutputs));
DAQmxErrChk (DAQmxStartTask(AnIns));
DAQmxErrChk (DAQmxStartTask(Freq1));
DAQmxErrChk (DAQmxStartTask(Freq2));

XmitSetpoint(0, 0.0);
XmitSetpoint(1, 0.0);
RTdataNrItems = NrItems;
RTdataTimer->Interval = 100; // cycletime;
RTdataTimer->Enabled = true;
return;
Error:
if( DAQmxFailed(error) )
{
DAQmxGetExtendedErrorInfo(errBuff,2048);
DWprintf("DAQmx Error Start RTdata: %d %s\n",tel, errBuff);
}
}

The actual error occurs in my callback routine :

int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
{
int32 error=0;
char errBuff[2048]={'\0'};
static int totalRead=0;
int32 read=0;
float64 data[2000];
int tel;
float64 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5 = 0.0;

/*********************************************/
// DAQmx Read Code
/*********************************************/
DAQmxErrChk (DAQmxReadAnalogF64(taskHandle, 10, 10.0, DAQmx_Val_GroupByChannel, data, 2000, &read, NULL));
if( read>0 )
{
tmp0 = 0.0;
tmp1 = 0.0;
tmp2 = 0.0;
tmp3 = 0.0;
tmp4 = 0.0;
tmp5 = 0.0;
for (tel = 0 ; tel < read; tel++)
{
tmp0 = tmp0 + data[tel];
tmp1 = tmp1 + data[tel + read];
tmp2 = tmp2 + data[tel + (read * 2)];
tmp3 = tmp3 + data[tel + (read * 3)];
tmp4 = tmp4 + data[tel + (read * 4)];
tmp5 = tmp5 + data[tel + (read * 5)];
}
AnIn0 = (AnIn0 * 0.7) + ((tmp0 / read) * 0.3);
AnIn1 = (AnIn1 * 0.7) + ((tmp1 / read) * 0.3);
AnIn2 = (tmp2 / read); // (AnIn2 * 0.7) + ((tmp2 / read) * 0.3);
AnIn3 = (tmp3 / read); // (AnIn3 * 0.7) + ((tmp3 / read) * 0.3);
AnIn4 = (tmp4 / read); // (AnIn4 * 0.7) + ((tmp4 / read) * 0.3);
AnIn5 = (tmp5 / read); // (AnIn5 * 0.7) + ((tmp5 / read) * 0.3);
if (LogData)
{
LogData0[LogPointer] = FreqIn0;
LogData1[LogPointer] = FreqIn1;
LogData2[LogPointer] = AnIn0; // data[tel];
LogData3[LogPointer] = AnIn1; // data[tel + read];
LogPointer++;
if (LogPointer >= NrOfSamples)
{
LogData = false;
}
}
}

Error:
if( DAQmxFailed(error) )
{
DAQmxGetExtendedErrorInfo(errBuff,2048);
/*********************************************/
// DAQmx Stop Code
/*********************************************/
DAQmxStopTask(taskHandle);
DAQmxClearTask(taskHandle);
DWprintf("DAQmx callback error: %s\n",errBuff);
}
return 0;
}

 

I have no control over what the other application is doing, so I am trying to find a fix in our application.
The only task that gives the error is task 2. I have not seen it for task 1, 3 and 4.

Any help/suggestion/workaround is welcome in finding a solution for keeping the tasks running (even with sometimes a buffer overflow).
If I can keep running the tasks (currently the Error section stops the task that reports the problem) and have valid data i am happy.

 

Thanks in advance for any help.

 

Rob


I need to measure from 0 to 2 Amperes range of DC current. Which NI current input module would be suitable?

$
0
0

I need to measure from 0 to 2 Amperes range of DC current. Which NI current input module would be suitable? All I see is the range is from -20 mA to 20 mA.

cDAQ Chassis: Real Time vs Windows vs 9178

$
0
0

Hello,

 

I am constructing a DAQ system to take voltage measurements from several accelerometers and a torquemeter, while giving flexibility of more sensors in the future. We have tentatively selected the NI-9215 as the module for the above sensors. We would just be collecting data from a rotating machinery test rig and saving that data locally. I'm at the chassis selection stage and I'm having a hard time finding an answer to the following:

 

  • Would something like the cDAQ-9178 suffice?
  • What's the difference between this, and Windows / Real time cDAQ chassis like 9132?
  • I read Real Time / Windows chassis are standalone computers, whereas I would just plug the 9718 into our existing computers, is this correct?

Thanks!

Medicion de temperatura con termopar tipo K y NI DAQ-6008

$
0
0

Hola que tal saludos... Últimamente me encuentro trabajando en un proyecto de medición de distintas variables en LabVIEW junto con la tarjeta DAQ-6008, pero estoy teniendo problemas con la medición en la variable de temperatura, para esto estoy utilizando un termopar tipo K y la tarjeta DAQ-6008...

En realidad me ayudaría mucho si alguien me pudiera apoyar y poder realizar las mediciones adecuadas para mi proyecto final.

Muchas gracias.

-----------------------------------------------------------------------------------------------------------------------------

Hello there, greetings ... Lately I am working on a project to measure different variables in LabVIEW together with the DAQ-6008 board, but I am having problems with the measurement in the temperature variable (i can´t do it), for this I am using a thermocouple type K and DAQ-6008 card ...

It would really help me a lot if someone could support me and so make the proper measurements for my final project.

Thanks a lot.

DAQExpress missing hardware

$
0
0

I can't use my NI device in DAQExpress.

I have recently installed DAQExpress (version 5.1) and after clicking “Add hardware” on SystemDesigner, it showed my “NI USB-9215A (BNC)” under “MISSING SYSTEMDESIGNER SUPPORT” with the action “Install NI-DAQmx 20.1”, witch I did (I had an earlier DAQmx version). But after the installation and restarting the PC, it still shows the same thing! And now if I click the Install action, the NI Package Manager shows up with “No operation to be performed.”

 

I know there is a similar post called Install problems on PXIe hardware, but the DAQExpress online manual lists my device as supported (see this page).

 

I am using Windows 10 and this device is connected to my PC through NI USB-9162 USB Carrier. I have used it with LabVIEW 2019 without any problem and I can test it in NI MAX. My LabVIEW license has expired and I just need a simple application to get analog waveform charts that can be manipulated (like zooming in, witch can't be done in NI MAX DAQmx Tasks).

Fixing the screw pin USB-6229

$
0
0

Hi all,

 

I have been trying to generate two identical TTL signals using the USB-6229, which has two counters.

 

However, one of the counter outputs (PFI-12) has a screw whose screw head has been worn away severely - I have no ability to remove it. Is there anyway for me to replace this head without sending it back to NI ?

 

Cheers,

Alister

Viewing all 6883 articles
Browse latest View live


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