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

NI 9269 AO: Set output to high impedance

$
0
0

I'm using the NI 9269 module in a cDAQ-9185. When the cDAQ boots, the 9269 output is high impedance (~280k ohms), as specified in the datasheet. However, as soon as I do anything on the cDAQ chassis (including reading AI from the adjacent NI 9205 module have), the output goes to low impedance (0.1 ohms on handheld multimeter). 

I've tried "DAQmx Reset Device" to no effect (just sets the output to zero). It seems I have to reboot the entire cDAQ chassis to get it to go back to high impedance.

 

So, how do I set the output of the NI 9269 to high impedance (in a cDAQ chassis)?

 

SW:

DAQmx 17.5

LabVIEW 2017

C# drivers written for DAQmx drivers (my real use-case, I'm just trying things out in LabVIEW)

 

Use-case:

I have a test case where an AO channel on the 9269 is active low - meaning I can't just write zero to the output to "turn it off" so to speak.


Queueing data slowing down over time

$
0
0

I have written a controller in .Net using the daqmx libraries.  I have tested this on a number of daqs and it works fine except on the cDaq where I see a small cumulative slow down when queueing data (specifically using the commands 'WriteMultiSamplePort' and 'WriteMultiSample').  I am changing the timing of the tasks between some runs and each time I do the commands to queue output data take about ~1ms longer to complete.  This isn't a problem at first, but ideally my controller will be running for a long time with many different timings.

Since I only see this issue on the cDaq I am wondering if this is a known problem with this hardware and if anyone has any advice about how to deal with it.

I'd really appreciate any advice anyone can provide

Adam

Can not find NI9237 module in DAQ assistant or MAX but its visible project explorer

$
0
0

Hi Guys,

 

as in the title already stated I have problems finding the NI-9237 module in the DAQ assistant or in the MAX (see pics) althougth the module is visible in the project explorer (see pic) when starting new project. I want to use the NI9237 module to measure temperature via a half-bridge setup but cannot find the analog inputs when using the assistant.

Currently I am using a cRIO-9014 in a cRIO-9114 chassis with just two addtional modules (NI-9476 and NI-9237). The NI-9476 I/O module works perfectly (can control fans and heating elements) but was not able to get the NI-9237 module running via the DAQ assistant.

 

Would be grateful for any information or hint to a solution of my problem.

 

Thank you very much!

 

Purtschomatic

 

 

 

USB-6001 - Synchronized analog and digital reading

$
0
0

Hello,

I have for some time been struggling with a C# application for a USB-6001 device.

The purpose of my application is to:
-    Sample 8 analog inputs at 100 Hz.
-    Read the status 8 digital inputs in a way that analog samples and digital reading are synchronized.

I use following configuration of the device:
            NationalInstruments.DAQmx.Task analogInTaskPendulum = new NationalInstruments.DAQmx.Task();            
            anInputCh_PendulumCylinder = analogInTaskPendulum.AIChannels.CreateVoltageChannel("dev1/ai0", "pendulumAna", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_PendulumCylinder = new AnalogSingleChannelReader(analogInTaskPendulum.Stream);

            NationalInstruments.DAQmx.Task analogInTaskHeightCylinder = new NationalInstruments.DAQmx.Task();
            anInputCh_HightCylinder = analogInTaskHeightCylinder.AIChannels.CreateVoltageChannel("dev1/ai1", "heightAna", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_HightCylinder = new AnalogSingleChannelReader(analogInTaskHeightCylinder.Stream);

            NationalInstruments.DAQmx.Task analogInTaskLeftTilt = new NationalInstruments.DAQmx.Task();
            anInputCh_LeftTiltCylinder = analogInTaskLeftTilt.AIChannels.CreateVoltageChannel("dev1/ai2", "leftTiltAna", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_LeftTiltCylinder = new AnalogSingleChannelReader(analogInTaskLeftTilt.Stream);

            NationalInstruments.DAQmx.Task analogInTaskRightTilt = new NationalInstruments.DAQmx.Task();
            anInputCh_RightTiltCylinder = analogInTaskRightTilt.AIChannels.CreateVoltageChannel("dev1/ai3", "rightTiltAna", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_RightTiltCylinder = new AnalogSingleChannelReader(analogInTaskRightTilt.Stream);

            NationalInstruments.DAQmx.Task analogInTaskUltra1 = new NationalInstruments.DAQmx.Task();
            anInputCh_Ultra1 = analogInTaskUltra1.AIChannels.CreateVoltageChannel("dev1/ai4", "ultra1Ana", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_Ultra1 = new AnalogSingleChannelReader(analogInTaskUltra1.Stream);

            NationalInstruments.DAQmx.Task analogInTaskUltra2 = new NationalInstruments.DAQmx.Task();
            anInputCh_Ultra2 = analogInTaskUltra2.AIChannels.CreateVoltageChannel("dev1/ai5", "ultra2Ana", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_Ultra2 = new AnalogSingleChannelReader(analogInTaskUltra2.Stream);

            NationalInstruments.DAQmx.Task analogInTaskUltra3 = new NationalInstruments.DAQmx.Task();
            anInputCh_Ultra3 = analogInTaskUltra3.AIChannels.CreateVoltageChannel("dev1/ai6", "ultra3Ana", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_Ultra3 = new AnalogSingleChannelReader(analogInTaskUltra3.Stream);

            NationalInstruments.DAQmx.Task analogInTaskUltra4 = new NationalInstruments.DAQmx.Task();
            anInputCh_Ultra4 = analogInTaskUltra4.AIChannels.CreateVoltageChannel("dev1/ai7", "ultra4Ana", AITerminalConfiguration.Rse, -10.0, 10.0, AIVoltageUnits.Volts);
            anReader_Ultra4 = new AnalogSingleChannelReader(analogInTaskUltra4.Stream);

A thread is setup to read each inputs every 10 msec:                                                       
            analogDataInPendulum = anReader_PendulumCylinder.ReadSingleSample();                
            analogDataInHeightCylinder = anReader_HightCylinder.ReadSingleSample();               
            analogDataInLeftTiltCylinder = anReader_LeftTiltCylinder.ReadSingleSample();                
            analogDataInRightTiltCylinder = anReader_RightTiltCylinder.ReadSingleSample();                
            analogDataInUltra1 = anReader_Ultra1.ReadSingleSample();                
            analogDataInUltra2 = anReader_Ultra2.ReadSingleSample();                
            analogDataInUltra3 = anReader_Ultra3.ReadSingleSample();                
            analogDataInUltra4 = anReader_Ultra4.ReadSingleSample();                                             

            digPortVal = DigInReader.ReadSingleSamplePortByte();

My problem is that each call to "ReadSingleSample" apparently takes more millisconds. Also I have tried to configure the sample behaviour by adding following calls to the configuration:

analogInTaskPendulum.Timing.ConfigureSampleClock("dev1/ai0", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskHeightCylinder.Timing.ConfigureSampleClock("dev1/ai1", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskLeftTilt.Timing.ConfigureSampleClock("dev1/ai2", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskRightTilt.Timing.ConfigureSampleClock("dev1/ai3", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskUltra1.Timing.ConfigureSampleClock("dev1/ai4", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskUltra2.Timing.ConfigureSampleClock("dev1/ai5", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskUltra3.Timing.ConfigureSampleClock("dev1/ai6", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
analogInTaskUltra4.Timing.ConfigureSampleClock("dev1/ai7", 100, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);

Which gives me an exception regarding the sample clock source:

NationalInstruments.DAQmx.DaqException: 'Requested sample clock source is invalid.
Property: NationalInstruments.DAQmx.Timing.SampleClockSource

I hope that somebody can point me to an example of how to do stuff like this correctly.





DAQmxReadAnalogF64 error -200492 error in Excel VBA 2016

$
0
0

I would like to read 1536 samples on channel 1 of my USB 60001. I’m using Excel VBA 2016.

This is the code:

Private Sub CommandButton1_Click()

Dim taskHandle As Long

Dim Status As Long

Dim data(1535) As Double

Status = DAQmxCreateTask("", taskHandle)

Status = DAQmxCreateAIVoltageChan(taskHandle, "Dev1/ai1", "", DAQmx_Val_InputTermCfg_Diff, -10, 10, DAQmx_Val_VoltageUnits2_Volts, "")

Status = DAQmxCfgSampClkTiming(taskHandle, "OnboardClock", 15360, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_FiniteSamps, 1536)

Status = DAQmxReadAnalogF64(taskHandle, 1536, 10, DAQmx_Val_GroupByChannel, data(0), 1536, 1536, ByVal Nothing)

Status = DAQmxClearTask(taskHandle)

End Sub

 

Status = DAQmxReadAnalogF64(taskHandle, 1536, 10, DAQmx_Val_GroupByChannel, data(0), 1536, 1536, ByVal Nothing)

Gives error code

Error -200492

Reserved parameter must be NULL.

 

 I have tried using  ByVal 0& , ByVal Nothing and  bvNullString and none worked.

Can please somebody help?

Thanks,

Gilbert

generate and acquire signals

$
0
0

I write to give information about the project that I am doing with a embedded controller PXIE 8840 and its module PXIE 6356. Initially we want check the speed of capture and writing of a similar signal between a frequency range from 100HZ to 500KHZ. This signal is read by one of the analog entries and immediately without any modification sent or written for one the analogous outputs. Our goal is that this signal can enter at different frequencies and can be reproduced with the same characteristics (only slightly delayed by ADC and DAC times), which is successful for a cutoff frequency according to the parameters set in the block, but for a range of frequencies the signal is not reflected in the outputs, which has a continuous 0V output. Our concern is how to configure the block so that it allows us to capture the entire frequency range of the input signal or if there is another way to do it differently than using the DAQ Assistant in Labview. Attached with this mail sent a project of how we are using the DAQ and some images of the configuration used

Driver and Recovery Media DVD which comes along with the NI cDAQ 9133

$
0
0

Hi can someone share the link of the Driver and Recovery Media DVD which comes along with the NI cDAQ 9133 (Windows embedded Standard 7). I'm in need of that

 

Thanks in advance. Any other recovery media which comes with other controller DAQ should also be fine

Maximum cDAQ trouhgput

$
0
0

Hi there,

 

If I have cDAQ 9179, full with 14 NI 9220 C Series Analog Input Module, would it be possible to acquire continuously the full 448 channels (32*14) at a sample rate of 100kS/s ?

 

If no, what are the limitations ?

 

Thx,


cDAQ - Integrated or Separate Controller

$
0
0

Hi,

 

I'm specing out the hardware for a data acquisition project that will have mostly low speed acquisition (10Hz) with a few higher speed sources (~5kHz).  I don't need an FPGA and want to use NI-DAQmx so I want to go with a cDAQ.  It will be an unsupervised system so I need a controller to interface with the cDAQ.

 

Should I go with a cDAQ model that has an integrated controller (like the cDAQ-9137), or should I get a panel mount computer instead?  The cDAQ with the integrated controller seem quite expensive.  What does it provide that makes it worth getting over a separate computer?

Cross correlation to identify time delay between 2 signals

$
0
0

Hi all, I am new to Labview. I am struggling to create a cross correlation function for my project to identify the the time delay between two signals. Two sensors are connected to DAQ assistant and I failed to build my cross correlation, can anyone help me by providing example of that?

NI 9219 Fast Sampling Rate

$
0
0

Hi NI Community,

 

I have a NI 9219 DAQ recording resistance at very fast rate (20S/s) but the module cannot keep up the sampling rate. I used the sample program for resistance and added a few arrays to record the time and data on the table. Apparently the module can only record a change in value for every 5/10 of a second. How do I improve my structure so that the program records the data for every 1/10 of a second or 1/100 of a second based on the sampling rate input? Would the hardware be capable in achieving this task?

 

Unable to work with qDAQ-9172 due to Status Code: -209852 The specified device is no longer supported

$
0
0

Dear members,

 

When trying to connect to my older NI cDAQ-9172 I got following error:

Status Code: -209852
The specified device is no longer supported within the NI-DAQmx API.
Visit ni.com/info and enter the Info Code: Cseriesdoc

 

When I go check this sit I get following text:

 

cDAQ-9172

Minimum Software Support

SoftwareCompactRIO (FPGA Interface)RIO Scan InterfaceNI-DAQmxEtherCAT (FPGA Interface)EtherCAT (Scan Interface)
LabVIEW
7.0 to 2017
LabVIEW FPGA Module
LabVIEW Real-Time Module*
Device Driver Software
NI-DAQmx 8.1 to 17.5
Other Minimum Software
Notes
*  Refer to the DAQmx Readme for LabVIEW Real-Time Supported .
•  LabVIEW Real-Time Module is only required if the cDAQ Controller is running a Real-Time Operating System.
•  Refer to NI C Series Module Compatibility Chart for more information on supported modules.

 

First of I installed the newest version of Labview which I have 2017 and Device drivers 17.5, they didn't work. So I thought that maybe by saying to 17.5 they meant that 17.5 in not included. But now that I installed 17.0, I still get the same error

error.gif

Does anybody know how to fix this error or what I should do to get this fixed?

Thank you in advance.

 

Best Regards,

Bart

Running PCI-6509 with .NET

$
0
0

I try to work with  PCI-6509 on Visual Studio 2017 (C#).

First I include dll's into a project.

NationalInstruments.DAQmx.dll

NationalInstruments.Common.dll

Then in the code

using NationalInstruments.DAQmx;

private NationalInstruments.DAQmx.Task daqmx_task;
private DigitalSingleChannelReader digital_reader;

 private void ScriptManager_Shown(object sender, EventArgs e)
        {
            try
            {
              
                daqmx_task = new NationalInstruments.DAQmx.Task();
string[] channels = DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.DILine, PhysicalChannelAccess.External); daqmx_task.DIChannels.CreateChannel(channels[0], "myChannel", ChannelLineGrouping.OneChannelForAllLines);
digital_reader = new DigitalSingleChannelReader(daqmx_task.Stream); // Configure digital change detection timing daqmx_task.Timing.ConfigureChangeDetection(null, channels[0], SampleQuantityMode.ContinuousSamples, 1000); // Add the digital change detection event handler // Use SynchronizeCallbacks to specify that the object // marshals callbacks across threads appropriately. daqmx_task.SynchronizeCallbacks = true; daqmx_task.DigitalChangeDetection += new DigitalChangeDetectionEventHandler(myTask_DigitalChangeDetection); // Start the task daqmx_task.Start(); } catch (Exception ex) { MessageBox.Show(ex.Message); daqmx_task.Dispose(); } }

The code compiles OK. But when I run it crushes with the exception

Could not load file or assembly 'NationalInstruments.DAQmx.dll' or one of its dependencies.

 

I suspect the dll is not compatible with the .NET framework (V 4.6.1) I compile the project.

Where can I find dll for .NET 4.6.1 ?

NI card digital output voltage configuration

DAQmx and PXI-6683H

$
0
0

Right now, I use a PXI-6683H synchronized to an external IRIG time source.  To synchronize my PXIe RT system controller, I use the Sync Labs custom time reference TimeSync function.  This produces roughly a 10:1 worse system clock sync than the 6683H is maintaining to the IRIG time source.

 

Am I doing something wrong here?  My intent is to have the system clock follow IRIG so that DAQmx WFM T0's are as close to the IRIG source as possible.  Somewhere I recall hearing that DAQmx can interact with NI Sync (6683H) directly, but I can't find any actual documentation mentioning how this works.

 

Does anyone know if DAQmx can actually timestamp WFM data using the 6683H?  It's easy enough to use the NI Sync timestamp functions for other timestamping needs, but not for DAQmx.

 

Thanks,

 

XL600


DAQ input does not fit with pressure measurement

$
0
0

Hi everyone,

 

I have a setup which uses a sinewave input to increase and decrease the pressure inside a cavity with a membrane. This seems to work so far, but when I log the sinewave next to the pressure measurement inside the cavity I get readings that are slightly off and get worse over time. I ploted both in a picture.

 

What would be your first guess? What might cause this shift?

blue: input signal

orange: measurement

 

kind regards,

reading/writing cDAQ Hardware Property node information (NI9220 or general)

$
0
0

I have a CompactDAQ system with a 9188XT chassis and several 9220 A/D modules. Using a Hardware Property node, I am able to read "Calibration Notes" (CalNotes) and it returns an empty string.  I would like to store some information on the card, does anyone know how to write to this (or a similar) property?  I could use the Comments section for the 9188XT, but these are more easily visible (and editable) in MAX.  In addition, this field is limited to 64 characters.  Thank you.

Python multi-tasking using cfg_samp_clk_timing question

$
0
0

Hi,

I've been trying to use the python nidaqmx package to create an acquisition program to simultaneously do the analog input and analog output task on the PCIE-6259 board.

I've been trying to use the general scheme of create task - set sample clock - run task - wait for completion - clear task.

The code is simplified as follows:

 

from nidaqmx.task import Task 

from nidaqmx import constants 

import numpy as np

 

# configuring ai task

ai_task = Task()

ai_task.ai_channels.add_ai_voltage_chan(physical_channel= '/Dev1/ai1')

 

ai_task.timing.cfg_samp_clk_timing(rate= samp_rate, samps_per_chan= 1000, sample_mode=constants.AcquisitionType.FINITE)

 

# configuring ao task

ao_task =Task()

ao_task.ao_channels.add_ao_voltage_chan('/Dev1/ao1')

 

ao_task.timing.cfg_samp_clk_timing(rate= samp_rate, samps_per_chan= 1000, sample_mode=constants.AcquisitionType.FINITE)

 

ao_task.write(np.zeros(1000)) # just give a voltage 0 to output

 

# run the task

ai_task.start()

ao_task.start()

 

ai_task.wait_until_done()

ao_task.wait_until_done()

 

data = ai_task.read(number_of_samples_per_channel = 1000)

 

ai_task.close()

ao_task.close()

 

So, in the underlined part, I tried to add one more option to both of the two tasks in order to achieve synchronization, (source = 'Dev1/ai/SampleClock'), which is inspired by the labview nidaqmx tutorial. However it returns with error. The error says the hardware doesn't support this kind of routing. 

So I checked the actual source used by the default task. They are Dev1/ai/SampleClockTimebase, Dev1/ao/SampleClockTimebase. But it still won't work when I supply one of the above two to both clock source.

I am wondering is there a way to achieve this synchronization, and what is the problem with what I've done?

Using USB-6343 counter outputs

$
0
0

I am migrating a VB project from Windows XP to Windows 10.  As part of the change, we are upgrading our DAQ hardware from a DAQPad-6016 to a USB-6343.

 

The old code set up a pulse channel using the CTR0 output:

                daqPulseTask = New Task
                daqPulseTask.COChannels.CreatePulseChannelFrequency( _
                                    "daq1/ctr0", _
                                    "Time Sync Pulse", _
                                    COPulseFrequencyUnits.Hertz, _
                                    COPulseIdleState.Low, _
                                    localDelay, _
                                    localFreq, _
                                    localCycle)
                daqPulseTask.COChannels.All.PulseTerminal = "/daq1/Ctr0Out"

Does this need to change for the USB-6343?  I was told that this hardware does not have a dedicated CTRx output and the counter needs to be reassigned to another pin.  How would I set this up in the code?

 

Analog wire connection to coaxial cables to DAQ

$
0
0

Hello everyone
My flowmeter has 4 outputs (2 wires for power and 2 analog outputs for temperature and flowrate). I want to connect the single wire (my analog flowrate) to a coaxial wire to connect it to a DAQ. How can I connect a single wire to a coaxial? Do I need a ground? Generally is it possible.

+ I want to connect it to coaxial to prevent noise 

 

Thank you

Viewing all 6881 articles
Browse latest View live


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