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

NI 9219 connection with Differential Pressure Transducer

$
0
0

Hi,  I have question regarding connecting Dwyer Pressure Transducer Dwyer 647 to NI 9219. I would like a 4-20 mA output configuration

 

Pressure Transducer

http://www.dwyer-inst.com/PDF_files/A_30_647.pdf

 

My connection:

Wire 1:  connected to +24VDC power source (Positive Wire)

Wire 2: Connection [4] in NI 9219

Negative Wire from +24VDC power source to Connection [6] in NI

 

Are my connections right?

 


Trouble with analog output using Matlab - voltage is not what I set it to be

$
0
0

I'm trying to create an analog output signal on a PCIe-6321 using Matlab (while simultaneously collecting data with analog inputs, but I've isolated the problem to the output). I can't get it to actually generate the voltages I set in the output signal. They're always +/- ~0.6 V or just 0. I've tested this both in Matlab and in NIMAX with a task. I put a DMM on the pins and I never see above or below ~0.6 V. The only thing I've noticed that is different from online is that the Matlab help pages have the output channel set as differential, but I get an error when I try that.

Pause logging and start trigger

$
0
0

I don't believe there's a solution for this but I'll ask anyway..

 

I use DAQmx logging (PXI-6281) to offload as much as I can CPU wise, instead of manually logging.  This was the easiest way to approach my needs.

 

But I also want to acquire data while not logging (So the users can preview the realtime data).

 

So, I currently use two tasks:

  1. A preview acquisition task without logging or an acquisition trigger
  2. An acquisition task with logging and a start trigger

 

I then switch between these tasks when the user wants to start logging.  The start trigger is either externally supplied or internally generated.

 

Works fine.... extept now I have a need to prevent any disruptions in the preview data stream when switching back and forth between preview and acquisition modes.  This means I need to use a single always running task.

 

So, can DAQmx logging be enabled and disabled concurrent with a trigger?

 

The Pause Logging feature doesn't seem to function that way.  In Read and log mode, pause logging can only start logging on the NEXT read.  That wont catch the samples between my trigger signal and the point I try to read samples.  Two thoughts come to mind then:

 

  1. Manually logging so that I can catch the sample stream at the trigger point to start logging.  If so, is manually logging to TDMS less efficent than using the built in TDMS logging?
  2. Somehow inserting the missing samples into the start of the first TDMS log file.  Is that even possible?

 

Thanks,

 

XL600

DAQmx read buffer as is?

$
0
0

Here's a funny question to type out: Is there a way to read the circular buffer from beginning to end?

 

That is, in a ten position read buffer that's addressed from 0 to 9 before looping back to 0, is there a way to get all ten values of the buffer in order, starting from that 0, regardless of how many times it's looped during continuous sampling?

 

RelativeTo doesn't make it straight forward: First Sample will be long gone after the first loop, Current Read Position might not be set to the first address, and we can't offset on Most Recent Sample since it has a 9/10 chance of not being aligned correctly.

 

In our use case we're sampling a periodic event at ten times per cycle, and we need the most recent samples at all ten times, but it doesn't matter if 0-3 are from this cycle while 4-9 are the most recent from the previous cycle. Also, I'm using the number 10 to simplify; we're actually doing thousands.

 

The best I can tell, the only way to do this is to make sure all reads actually are 10 samples long to maintain the read alignment. It would be nice not to have that limitation, though.

 

Thanks for any hints.

 

Advantech USB-4704 data acquisition

$
0
0

Hello
I have an advantech USB-4704 data acquisition card. I've installed the requirements existed in its CD and the LabVIEW driver is also installed and it has been added to the list of modules in block diagram window, but I can't acquire data. When I add an "ADV AI Acquire Waveform.vi" block it needs to determine a device number and I don't know what to write for that. By using an arbitrary number (e.g. 0) and running, the error "The specified device does not exist or the device has not been configured using the Advantech Device Manager or AI Config VI." is shown. In the Advantech Device Manager window the Advantech USB-4704 doesn't have a cross mark on it but the add button is inactive and it can't be added to the installed devices.
I'll be thankful if you could help me.
Best Regards

Sampling errors NI 9188 VeriStand

$
0
0

Hi everyone,

 

I have some problems with the acquisition of a TTL in VeriStand. I'm using a NI 9188 chassis and 9403 digital module, and what I noticed is that VeriStand makes bad acquisition, in fact in 5 s of logging I have more than 100 HP Count, with a target rate of 1000 Hz and a signal rate of 200 Hz. Furthermore it seems that it is acquiring wrong values and the signal that I obtain is very different from how it should be. I tried to acquire it also with LabVIEW and the signal is perfect. Does anyone have an idea of what is happening? In order to let you understand clearly I attached the System Definition File and two tdms files containing VS and LV acquisitions.

Thank you for your attention.

 

Francesca

Generate Analogout using a digital input as a start and a STOP signal

$
0
0

I would like to generate a analog output that is conditional on a rising flank of a Digital Input to start the signal generation and that terminates in a flexible manner using a falling edge of the Digital input. Unfortunately I cannot find an implementation that uses a falling edge to flexibly terminate an analog output. I calculate a long waveform that exceed that max duration of the ao and would simple like to turn is down to 0V, when the falling edge of the DIO is arriving. Any suggestions of how to do this with AO?

Save data read from daqmx in a formatted text file

$
0
0

Hi

 

I am using daqmx to read data from 20 thermocouples in a task and saving the data with Write to Measurement File in 20 columns along with time stamp.But the data is not formatted properly and the X value of time is not right. I don't want to save it in TDMS format. I have attached the the text file and screenshot of the program. I am actually converting the data type from 2D Double to dynamic to write it to the file. Is there any other way of saving in a format like in the WriteToMeasurementFile without conversion


Using PFI0 on cDAQ 9132 as DI?

$
0
0

Hi,

 

a quick question: Is it possible to use the PFI0 on cDAQ 9132 as a readable Digital input, instead of a timing source/trigger?

strain gauge with ni usb 4431

$
0
0

Hello,

 

would you please tell me can I read strain gauge with NI USB 4431?

 

Regardsa

Sync two NI USB-6351 to generate and read a signal of up to 200MHz

$
0
0

Hello!

 

I'm currently trying to use two USB-6351 DAQs to drive a blue LED and detect that high frequency signal after it has passed by a fluorescent sample.

 

The objective is to determine the sample's fluorescence life time and to do that I need to determine the phase difference between the excitation signal and the response signals.

 

I understand that these DAQs aren't capable of simultaneous acquisition so I'm trying to sync two of them and them pass those signals trough a virtual lock in.

 

My current difficulty is in how to achieve the synchronization and in how to effectively generate and detect a good signal at frequencies of up to ~500Mhz.

 

for reference, my current program is in the attached VI.

 

Thans in advance for the responses

A question about DAQcard PCI-5153

using 40 ethernet cDAQ chassis with 1 PC: is it safe/feasable?

$
0
0

For a structural health monitoring solution we are offering a configuration using about 40 compactDAQ:

20 cDAQ-9184 (4 slot)

10  cDAQ-9188 (8 slot)

10 cDAQ-9181 (1 slot)

managed by a LabVIEW SW in 1 PC. Anyone already tried a similar configuration.

Do you think there are driver limitation, hardware limitation, software limitation with this architecture ?

 

Gianluca

Significant Noise on 9213

$
0
0

Hello,

 

I recently inherited a LabVIEW based data acquisition system that among other modules, uses an NI 9213 TC module in a 9181 chassis. This module is used in an industrial environment to record temperature data from some ovens, both J and K TCs. The system worked well for many months until I recently added some new TCs to the system. Unlike the previously installed ones that worked fine, these TCs are not permanently installed in an oven. For the new thermocouples, from the enclosure box containing the chassis, TC wire runs through its own conduit to a location near the furnace where I can plug in some TCs to be used in the ovens as survey thermocouples. These new TCs are ungrounded K TCs.

 

My problem is that whenever one of these survey TCs is an oven and the temperature gets above ~650 C, I begin to see huge fluctuations in the incoming signal. Sampling the signal in NI MAX shows the signal jumping from what I believe to be the actual temperature of somewhere between 600 and 700 to anywhere all the way down to 200C. I originally believed this to be caused by the higher current draw of the furnace at higher temperatures inducing significant noise into the system. However this problem will sometimes still exist even if I shut the oven down and watch the signal while it’s cooling down. This problem also induces noise for every other channel on the module. When I sample the signal from the built in TCs from either the active or inactive oven, I see these same fluctuations. Some of these inactive ovens are 30+ feet away and the TC wire travels in separate conduit until they all meet in the enclosure box.

 

I bought some twisted and shielded TC wire too but that hasn’t helped the issue. I still believe there to be some issue with grounding, but I haven't been able to identify anything yet. Thank you for any help at addressing this issue!

Error -224606 Internal Software Error in MIO

$
0
0

Hi,

 

I'm have a USB-6002 card to acquire data through the analog inputs using the DAQmx assitant configured to take 100 finite samples at a sampling rate of 1000S/s inside a while Loop which runs every second. After some time of testing (usually 1 to 5 days), I get the error "Error -224606 Internal Software Error in MIO" and the acquisition task "blocks" taking the measurements each 5 seconds (normally it shoul take only 0.1 seconds).

 

I'm using LabVIEW 2016. My version of DAQmx is 15.5.0.

I'm trying to understand the source of this error but so far I've had no success.

 

Any solutions?

Thanks


Signal problem using NI-USB-6361

$
0
0

Hi, I'm Kwangmin.

 

Currently, I try to test the HTS coil using DAQ system.

 

The DAQ system is composed of SCXI-1000, SCXI-1125(with 1328) --> SCXI-1349-->NI-USB-6361--> LabVIEW.

 

But, the measured signal has the big problem.

 

I connected NI-USB-6361 to the module-1 of SCXI.

 

Module-1's signal is good but module-2, module-3, mudule-4 signals are very unstable.

 

If, I connected NI-USB-6361 to the module-2 of SCXI.

 

Module-2's signal is good but module-1, module-3, mudule-4 signals are very unstable.

 

I didn't find the reason of this problem.

 

My English is very poor and not enough for explaining to this situation.

 

So, I attached the test results.

 

Please give to me your good comment.

 

-Kwangmin Kim

Diagram for routing triggers

$
0
0

Hi, can someone point me to a diagram of some sort to provide a visual guide for how it is possible route triggers among the different functions in a DAQ?  I know this is a vague question, so a vague answer would be okay.  I'm thinking something like a block diagram with switches and stuff, and what DAQmx function applies to which switch.

 

thanks

Configuring PXIe 6363 Analog Output and Counter synchronization

$
0
0

Using 6363 with DAQmx C interface.

I'm trying to configure the DAQ in two different ways (let's call them A and B).  I have them both sort of working, but it's using a lot of software callbacks, starting and stopping the tasks, etc., and I'm certain this is not the right way.

 

Config A goal: Write analog output at a slow rate (2 Hz or so), and printf something to the console at each sample.  Currently I write the minimum of 2 samples at a time, one of which is a  dummy value, then in the DoneWriteCallback, I printf to the console, stop the task, write the next sample, then start the task again.  I get an error if I just try restarting the task, without stopping it first.  I'm certain I tried writing all the samples at once, along with EveryNCallback, but for some reason I couldn't get this to work (this was last year, so I don't remember what I tried).  I'm also not sure whether DoneWriteCallback gets called as soon as the data has been written to the buffer, or 500ms later at the end of the sample period.  This technique seems to work, so it appears to call DoneWriteCallback at the end of the sample period, but I couldn't find any documentation about this.

 

Config B goal: Write analog output, and for each sample, printf to console, wait a few ms, and output several pulses from counter, taking an analog input with each pulse, then go to the next analog output value; the analog input value should be available in software before the pulse is sent.  It seems I should trigger the CTR0 output with the AO start trigger, then when the CTR0 output stops, make the AO task go to the next sample.  Or I could set up the analog input to output its start trigger on the digital output as my pulse instead of a CTR0 task.  I have no idea where to start with this.  I have just modified config A to stop and start the CTR0 task with every DoneWriteCallback, along with the AO task itself, and the AI task runs completely independently.

 

Perhaps I can learn to fish instead.

 

 

Below is the abbreviated code which does everyhing:

// ANALOG INPUTS
char aiPhysNames[] = "Dev1/ai16,Dev1/ai17,Dev1/ai18";
char aiNames[] = "AUX X,AUX Y,AUX Z";

DAQmxErrChk(DAQmxCreateTask("Analog Input Task", &hAItask));
DAQmxErrChk(DAQmxCreateAIVoltageChan(hAItask, aiPhysNames, aiNames, DAQmx_Val_NRSE, -10.0, 10.0, DAQmx_Val_Volts, NULL));

DAQmxErrChk(DAQmxSetStartTrigDelayUnits(hAItask, DAQmx_Val_Seconds));
DAQmxErrChk(DAQmxSetStartTrigDelay(hAItask, 1e-3));
DAQmxErrChk(DAQmxCfgSampClkTiming(hAItask, "", inRate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, sizeof(Triple64)));
DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(hAItask, DAQmx_Val_Acquired_Into_Buffer, 1, 0, DAQ::_everyNReadCallback, this));
DAQmxErrChk(DAQmxRegisterDoneEvent(hAItask, 0, DAQ::_doneReadCallback, this));
DAQmxErrChk(DAQmxCfgInputBuffer(hAItask, 0));
DAQmxErrChk(DAQmxCfgInputBuffer(hAItask, numSamples)); // * 3??

// ANALOG OUTPUTS
char aoPhysNames[] = "Dev1/ao3,Dev1/ao2,Dev1/ao1";
char aoNames[] = "XDRIVE,YDRIVE,ZDRIVE";
int32 aoWritten = 0;

DAQmxErrChk(DAQmxCreateTask("Analog Output Task", &hAOtask));
DAQmxErrChk(DAQmxCreateAOVoltageChan(hAOtask, aoPhysNames, aoNames, -10.0, 10.0, DAQmx_Val_Volts, NULL));
//DAQmxErrChk(DAQmxCfgSampClkTiming(hAOtask, "", outRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, numSamples));
DAQmxErrChk(DAQmxCfgSampClkTiming(hAOtask, "", outRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 2));
//DAQmxErrChk(DAQmxWriteAnalogF64(hAOtask, numSamples, 0, -1, DAQmx_Val_GroupByScanNumber, (float64 *)outData, &aoWritten, NULL));
//DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(hAOtask, DAQmx_Val_Transferred_From_Buffer, 1, 0, DAQ::_everyNWriteCallback, this));
DAQmxErrChk(DAQmxCfgOutputBuffer(hAOtask, 0));
DAQmxErrChk(DAQmxCfgOutputBuffer(hAOtask, numSamples)); // * 3??
DAQmxErrChk(DAQmxRegisterDoneEvent(hAOtask, 0, DAQ::_doneWriteCallback, this));

 

// COUNTER 0 PULSE OUTPUT

DAQmxErrChk(DAQmxCreateTask("Pulse Output", &hPUtask));

DAQmxErrChk(DAQmxCreateCOPulseChanFreq(hPUtask, "Dev1/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, pulseDef.frequency, pulseDef.duty));
DAQmxErrChk(DAQmxCfgImplicitTiming(hPUtask, DAQmx_Val_FiniteSamps, pulseDef.count));

//DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(hPUtask, "Dev1/ao/StartTrigger", DAQmx_Val_Rising)); // <- didn't work

 

// START EVERYTHING

DAQmxErrChk(DAQmxStartTask(hAItask));

wprintf(L"Setting initial field value %d to %f, %f, %f\n", outputIndex, out.x, out.y, out.z);
DAQmxErrChk(DAQmxWriteAnalogF64(hAOtask, 2, 0, -1, DAQmx_Val_GroupByScanNumber, (float64 *)outData, &aoWritten, NULL));
DAQmxErrChk(DAQmxStartTask(hAOtask));
DAQmxErrChk(DAQmxStartTask(hPUtask));

 

int32 CVICALLBACK DAQ::_doneWriteCallback(TaskHandle taskHandle, int32 status, void *callbackData) {

    // Other stuff to choose next sample

    wprintf(L"Setting new field value %d to %f, %f, %f\n", pThis->outputIndex, out->x, out->y, out->z);
    DAQmxErrChk(DAQmxStopTask(taskHandle));
    DAQmxErrChk(DAQmxStopTask(pThis->hPUtask));
    DAQmxErrChk(DAQmxWriteAnalogF64(taskHandle, 2, 0, -1, DAQmx_Val_GroupByScanNumber, (float64 *)out, &aoWritten, NULL));
    DAQmxErrChk(DAQmxStartTask(taskHandle));
    DAQmxErrChk(DAQmxStartTask(pThis->hPUtask));

}

 

int32 CVICALLBACK DAQ::_everyNReadCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData) {

    DAQmxErrChk(DAQmxIsTaskDone(pThis->hAOtask, &done));
    DAQmxErrChk(DAQmxReadAnalogF64(taskHandle, nSamples, 10.0, DAQmx_Val_GroupByScanNumber, (float64 *) &pThis->inData, 3, &readAI, NULL));

    // Other stuff to make data available elsewhere

}

 

Determining DAQ for Galvo Control

$
0
0

Hi all,


I've recently purchased a dual axis galvo set from ThorLabs (GVS012) and I'm trying to figure out how I'll interface with it.  It came with 2 servo boards, and the accompanying manual says I should use a DAQ that has dual, biploar -10V to 10V  DAC analogue output (differential), must be able to sample at least 5kiloSamples/second, and has at least 16bits of resolution on the DAC.  I'm a little overwhelmed by the choices that'll fit my application.


For context, I'll be using the galvos in an epifluorescence setup to raster scan a laser along a sample and identify where my fluorescent molecules are located. The beam will be coming off the galvos and into the back of an objective lens, which will then focus the light down onto my sample.

Further, I'd like to know how I might, after acquiring the DAQ, control the galvos.  How do I send a waveform to the servos?  How do I change the voltage steps?

NI USB 6225 M-Series Number of Mux and assigned ports

$
0
0

Hi Guys,

I'm currently working on setting up a pressure scanner array with 32 pressure sensors for my institute's transsonic compressor test rig (specifics on the hardware setup are noted below).

Basically everything is up and running but I'm experiencing odd sensor returns which seem to be dependant on sample rate(5-30K) and the position of the sensor in the circuit itself. I've attached 4 screenshots showing the dependancy on the sample rate. Furthermore, the first sensor of every circuit is very sensitive to the touch or slight vibrations while the following sensors are not.

 

Given these issues, I want to check whether or not the internal multiplex might be responsible for this. So my specific question is:

How many multiplexers are build into the USB 6225 and which ports do they address?

 

Am I right in assuming that there are 8 Mux and each addresses 5 ports?

 

Any input is highly appreciated!

 

Happy Holidays!

 

Info on the hardware setup:

Power:

4 parallel circuits each utilizing a tempco constant current source (using LM134H triodes) and powering one row of sensors. Each row holds 8 sensors which are conected in series. So the first sensor sees the highest voltage (Vin) and every following sensor experiences a lower voltage in relation to the voltage drop over the previous sensor(s).

Sensors:

The sensors are piezoresistive membranes driving a tuned wheatstone bridge.They are floating, meaning that they have no ground connection and are directly connected to the ai+&- ports (differential measurement) of the NI USB 6225.

Grounding:

Every AI GND port (ai+&-) and the chassis gound lug are connected to the casing of the entire array which in turn is connected to the ground of the supplying wall socket.

 

Viewing all 6896 articles
Browse latest View live


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