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

Change the sampling rate for digital signal generation

$
0
0

I have a question about changing the sampling clock rate when using the digital output
lines to generate signals. 

I'm using DAQmxCfgSampClkTiming (TaskHandle taskHandle, const char source[],
float64 rate, int32 activeEdge, int32 sampleMode, uInt64
sampsPerChanToAcquire); to set the sampling clock source for digital signal
generation.

But I found out the parameter float64 rate doesn't really change the sampling
frequency. For example, if I use "100kHzTimebase" for the const char
source[] clock source parameter, no matter what number I specify for  float64
rate, the sampling rate is always 100kHz.

I don't understand where I did wrong, and I was wondering what's the easiest
way to change the sampling frequency to an arbitrary number I want.


Programatically check when cDAQ is ready after reserve

$
0
0

Hey,

 

I am trying to connect and disconnect a NI9188 cDAQ programmatically, I start by adding the device with "DAQmx Add Network Device.vi" followed by reserving it with "DAQmx Reserve Network Device.vi"

After the reservation I would like to spawn a few tasks on the chassis modules but this give me an error since the chassis has not yet descovered all its modules. 

Adding a 10-15 second delay before creating the tasks removes this problem, but since this delay can very base on network I would like to find a better way to identify if the chassis is ready for use. 

 

How do I veryfy programatically that all my modules have been added to the chassis and are ready for useage ? 

 

I search on google and in this forum for a few hours without any luck and also tried several workaround like checking module types in a loop until all have been registered and running selftest on every module. Yet nothing seems stable so far and I am wondering what the correct way of doing it is. 

setting priority for reading inputs

$
0
0

Hi NI Community,

Not sure if this is the right place to start.  But, someone must have had a similar issue.

 

We are using C# to talk to our NI 6323 board.  

We have two analog inputs that need to be read.  (No problem setting that up.)

Here  are the inputs:

static private Task SensorInput;   //needs to be read 10,000 per second

static private Task InputVoltage;    //needs input every 2 seconds

 

reader = new AnalogMultiChannelReader(SensorInput.Stream);
data = reader.ReadWaveform(10,000);

 

Trouble is we need the "InputVoltage" to be read every two seconds and it sometimes gets "locked out" by the 10,000 samples per second stream going on for the "SensorInput" (on a separate thread)

 

Is there a way to raise the "priority" of the InputVoltage task so that it always reads a value.  Often we only get the exception NationalInstruments.DAQmx.DaqException: The specified resource is reserved. The operation could not be completed as specified.

 

Brian

NI cDAQ-9191 connection issue

$
0
0

Hello all,

 

I am having a problem with getting my NI cDAQ-9191 to show up in MAX. I am eventually trying to get it to connect to my workstation wirelessly, however I cannot even get it to show up in MAX when I first connect it with an ethernet cable. I am following the wireless quick start guide, however I get stuck on step 4 when the DAQ doesnt appear under "network devices". Have not found any troubleshooting guides that have been able to fix this. Does anyone have any ideas?

 

 

DAQ and CAN

$
0
0

Hi I am working on a project that involves LabVIEW communicating with a CAN bus. I was wondering if the NI PCMCIA-CAN/DS Series 2 needs to be hooked up to the DAQ to allow for communication between LabVIEW and CAN?

DAQ and CAN

$
0
0

Hi I am working on a project that involves LabVIEW communicating with a CAN bus. I was wonderingwhat hardware I would need to connect CAN with LabVIEW?

DAQ and CAN

$
0
0

Hi I am working on a project that involves LabVIEW communicating with a CAN bus. I was wondering what hardware I would need to connect CAN with LabVIEW?

Best practice for logging measurements (fastest logging)

$
0
0

What is the fastest or best way to log data? I want to capture multiple signals with 100 samples / second. To be able to plot the various waveforms I want to log the measurements to file. But this means than 6 channels with 100 samples -> 600 samples per second.  What would be the best approach? I could for instance use the 'Write to delimited spreadsheet function'  in a seperate loop with a notifier for communication.So the measurement loop is not influenced.

 

Another option would be to use the ' write to measurement file ' on the data aquistion loop and write to excel (or tdms for instance).  But when taking 100 samples per iteration it puts the measurements after each other but the time is iterated in seconds. So my measurement time stamps then don't match. I would then stop the measurment at 11.40 but according to the timestamps I have data until 11.45...

 

screenshot.png

 


NI 9216 sampling rate incorrect

$
0
0

I have a NI 9216 which is specified as 400S/s (50S/s/ch), but I am not able to get this sampling rate. 

For example in Signal Express I set it up for 10 samples per second and noticed that the samples repeat every 10 samples, see data below. 

Has anyone else seen this problem, and more important is there a fix? 

 

channel names:
11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai0 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai1 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai2 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai3 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai4 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai5 11/03/2016 09:09:01 AM - RTD - cDAQ1Mod2_ai6
start times:
11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003 11/3/2016 09:09:11.824003
dt:
0.100000
data:
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150683E+1 2.165910E+1 2.161315E+1 2.134899E+1 2.157813E+1 2.164925E+1 2.153104E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150668E+1 2.165864E+1 2.161024E+1 2.134700E+1 2.157921E+1 2.164971E+1 2.153135E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150576E+1 2.165787E+1 2.161039E+1 2.134761E+1 2.157721E+1 2.165033E+1 2.153165E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1
2.150729E+1 2.165864E+1 2.161054E+1 2.134685E+1 2.157752E+1 2.164987E+1 2.153104E+1

measure the voltage and current draw

$
0
0

Hello,

I have compact daq (NI CDAQ 9274) and CDAQ modules to measure current and voltage like NI 9215 and NI 9227 respectively.

1) I need wiring cables to connect current sources to my NI modules. I did not receive any cables when I bought the modules a week ago. So, which ones should I buy/borrow?

2) I have an NVIDIA Tegra TX1 development board and I would like to measure the voltage and current draw for that platform. It comes with a power brick which is rated at 19V (90W max) but the platform can take anywhere from 5.5-19.6VDC. I would like to measure the voltage and current draw. How should one go about it?

Thanks a lot for your time.

Change Physical Channel Name of Global Channel

$
0
0

My current project is a test equipment with five indentical fixtures. Each of them uses a NI PCIe-6341.

 

With MAX, I have just defined the scales and global channels for the first of them. Instead of repeating the task for the other fixtures by hand, I'm now trying to copy/edit them programmatically with LV.

 

No problem for the scales.

Almost the same for the global channels but with a exception. It is easy to copy the channels and also to change the names of the scales they use. Unfortunately, I wasn't able to change the Physical Channel (eg from Dev1/ai0 to Dev2/aio).

 

This property generates the error -200452 (Specified property is not supported by the device or is not applicable to the task). The DAQ cards are currently simulated. Could this be the reason ? Or is this not the right property ?

 

Many thanks in advance for any advice.

Measure voltage with NI 9215

$
0
0

Hello,

 

I have a power adapter as shown in the attached image which powers my embedded system. I would like to measure the voltage on the DC power plug at the end of this power adaptor (DC power plug connects to the DC power jack of the embedded system). Can I use NI 9215 (screw terminal) for this. I am afraid, the voltage range is only +/- 10V. The power adapter outputs around 19.5 V. Please let me know.

 

Thanks a lot.

Sync up Analog Inputs and Outputs from Several Cards

$
0
0

Hi all,

 

I am very new to the DAQmx drivers, so please let me know if I'm leaving out any important information. Right now we have a setup that uses a PCI-6733 to provide 6 AOs to the DUT and a PCIe-6259 to read 2 differential AIs from the DUT. I want to expand this to work with many DUTs (16), where each will now require 12 AOs and still 2 differential AIs.

 

For this station I've purchased 3 of the PXIe-6739 cards (64 AOs each, 192 AOs total), and 2 of the PXIe-6363 cards (16 diff AIs ea, 32 diff AIs total) along with a PXIe-1073 chassis. 

 

I have some example code I got working with 1 AO card and 1 AI card, but I'm not sure how to expand it to 3 AO cards and 2 AI cards. The research I've done tells me I cannot have multiple AO cards on a single task, is that correct?

 

Here is my code for creating the tasks:

Create DAQ Tasks.png

 

Will I need a different task for each card?

 

Here is my code for applying my stimulus on the AO channels, and reading the response on the AI channels:

Apply Stimulus.png

Will I need to break my stimulus array into 3 parts, and send each one to a different task, corresponding to a different card?

 

Thank you for any help and comments!

 

Synchronize DAQ analog output with the digital output of my camera

$
0
0

Hello,

I am new with the utilisation of a DAQ instrumentin Labview.

Right now I am trying to synchronize an analog output with a digital input. I have a camera that will send a digital output of 5V during acquisition and I would like to use that output as a trigger for my analog output of my DAQ.

From the example I found, I was able to make a VI that send an analog output on the trigger of the digital input. However, I have a hard time figure out:

  • How to synchronise the end of the analog output with the end of the digital input. With this VI the analog output only stay “on” for one period. I would like if the analog could stay “on” until the digital input goes down to 0. I have tried to add a second trigger function with as reference the same digital input as the first trigger function, but I get an error.
  • The VI right now only trigger once. I would like if it could trigger continuously. The camera will capture continuously some image and I would like the analog to go on and off on the digital output of the camera.

I would appreciate any advice or example that could help me.

I use Labview 2014 with a DAQ model NI-USB-6351

Thank you for your help

DAQ connections for an analog TTL sample clock

$
0
0

Hi,

I wasn't sure whether to post this here or in the software boards so apologies if this is not relevant.

 

I am doing laser experienments where I am trying to detect laser pulses with photodiodes. I am trying to set up a TTL pulse firing at 400Hz as the sample clock of our DAQ card [DAQ card model is the one on the left in this link: http://www.ni.com/datasheet/pdf/en/ds-25, we are connecting to this DAQ card using an SCB-68 connector (http://sine.ni.com/nips/cds/view/p/lang/en/nid/1180) with BNC cables wired into the analog inputs].

 

I want this sample clock to be in sync with a 200Hz trigger signal. 

 

I.e. I want the 400Hz sample clock to start in sync with a 200Hz trigger, so that every first peak of the 400Hz TTL signal simultaneously corresponds to a peak of the 200Hz trigger signal.

 

 

 

I am having a problem with the following two tasks:

1) figuring out where to connect the inputs that I want acting as the sample clock and trigger

2) figuring out how to select these inputs (within the daq assistant software) to act as a sample clock and a trigger

 

When I open up the daq assistant menu, I can select the 4 channels I have connected to BNC inputs: ai0, ai1, ai2, ai3. (refer to daq inputs.png).

I want one of these to act as a sample clock and another one to act as a trigger to set the phase of the sample clock. However, when I open up the DAQ assistant and try to select ai1 to serve as the sample clock, it does not show up in the available inputs (see sample clock inputs.png). Also, the only channel that the daq assistant lets me use as a trigger is ai0, nothing else (see available trigger inputs .png)

 

How can I select ai1 to be my sample clock and use ai0 to be my trigger? Is this possible to do? If not, where should I connect my sample clock signal into the daq card?

 

Thanks a lot in advance!

 


PCI 5153 always busy (cannot fetch data)

$
0
0

History: We've been running a data acquisition system using a PCI 5153 card continously for about 16 months now. Of course, there were some interruptions from software updates etc. The card and the VI performed perfectly normal over these 16 months. We trigger on an external signal and store both channels.

 

Issue: Yet after our last restart of the PC the VI we've been using all the time won't fetch any triggers as it always times out with the following error:

niScope Multi Fetch Cluster.vi:1540001<ERR>Data transfer timed out because the device was busy. Try fetching again.

Status Code: -228858

 

What we've tried so far without fixing the issue:

1) Restart the PC again

2) Reset the device in NI MAX (reset successful)

3) Self-tested the device in NI MAX (self test completed successful)

4) Updating the NI Scope drivers

5) Writing a simple program using the NI Scope Express VI

6) Run the test-panel

 

 

We've had some minor success when we only fetch data from channel 0. Then the card is working flawlessly in all setups (i.e. our VI, the test panel and the simple NI Scope Express VI). But as soon as we try to fetch data from channel 1 we get the error that the device is busy.

 

I would greatly appreciate any help on this.

Bjorn

 

Anti aliasing filtering

$
0
0

I want to buy a digital anti-aliasing filter (preferably from NI) with following specifications:
1) Digitally controlled cutoff frequency from 10kHz to 100kHz.
2) Real-time response.
3) 100dB reduction in gain in a span of 2.5 times cutoff frequency.

I want to use it for the following application:
I am using data acquisition board (USB 6356) at 500K Samples per seconds and I want to analyze frequencies in between 100Hz to 50KHz. I want to remove all higher frequency very efficiently using anti-aliasing filter before data acquisition step. This is important because I want to profile underwater noise. Therefore, I want to remove signals above 100Khz completely. I also have USB 6281 board with 40KHz filter but this filter is not sufficient as it is allowing signals upto 300KHz. 
If you can suggest better external anti-aliasing filter specifications (and product name) than it would be of great help for me.

 

I am sorry as I asked something not related to NI product. 

Thank you.

Does NI 9222 Support Analog Triggering?

$
0
0

Can I perform an aquisition using analog triggering with the NI 9222 module on the CompactDAQ chassis. I am using an NI 9237 and NI 9361 module paired with the cDAQ 9188.

Data acquisition Oscilloscope FFT MEMS SCB68A

$
0
0

Hey Guys,

i have a Mems Sensor Adxl335 and a Ni SCB68A to get my signals digitalized. I wanna messure the frequency through a tipicaly oscilloscope with a fft.

So far i made this with the DAQ-assistent and i can see the voltage/signal on the waveform but

Problem 1: after using the trigger, my signal gets lost and also the fft doesn´t look like it should(no idea which kind fft i have there :/ ).

Problem 2: i cant get/see a zig-zag line from the vibration from my sensor in the graph like it is created in the diagram (maybe increase by a multiplicator the peak-to-peak voltage?)

Problem 3: best case would be, when i can see or select in this real time graph the period of the movement from the Mems-Sensor but this can maybe created by a trigger...

 

Thanks for you help.

Getting the “raw voltage” or unscaled voltage from Pressure Bridge Measurement

$
0
0

My customer wants to be able to calculate mV/Pascal at various pressures to make sure the response is linear over the range.  The problem is I have not been able to find a VI or property node that will give me access to the raw voltage of the input signal when using the DAQMx Pressure Bridge VI, which I would then calculate the actual voltage measured vs Pascals measured.  I find it amazing that I can't easily get this raw voltage.  I do NOT want to use the Analog measurement and then do all the translation to pressure because that would aliminate all the great stuff the Pressure Bridge Measurement VI takes into account.

Viewing all 6882 articles
Browse latest View live


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