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

[New Be] ANalyse Signal with USB-6009

$
0
0

Hello everyone,
I am working on a program to analyse signal from a muscle sensor on an analogue input. I did it with an Arduino first but I need something with a higher frequency so I have a NI USB-6009 now.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/201987

My problem is I never used LabView and I really do not now how to create a code to analyse my signal so if someone know a tutorial wich explain how to proceed it would be great. For now I only find tutorial for more complexe schematic, well I just want to code my microntroller with one input and 1 output by USB.
Thank for your help. (I am not sure to be in the right section)


How update output during synchronized input/output?

$
0
0

Hello,

We use an m-series PCI-6289 input/output card to deliver sound to participants while recording their EEG.

Our input and output are synchronized using the diagram that is attached.

 

To date our output sound segments have been relatively short. However, now we would like to output sounds that last a very long time. I have run into memory shortage problems using the current diagram.

 

Could someone suggest how I might update the output sound, regularly with short 1 sec chunks, within the loop in the attached diagram?

 

I tried moving the DAQmx Write.vi (point 4. in the diagram) inside the loop, but the output sound was not correct.

 

Thank you for your advice!

Frenk

 

 

NI USB-6212 BNC analog input impedance matching

$
0
0

I have just ordered a NI USB-6212 BNC DAQ (should be shipped soon). I want to use it to measure HV signals using a 1:1000 high voltage probe that I have.

Now, the probe's datasheet (not much info) says it has an imput impedance of 100MOhm. I suppose that is consits of a simple resisitve divider, and if the ratio is 1:1000, I therefore expect to have a 99.9MOhm resistor in series with a 0.1MOhm resistance. However, the datasheet also state that the probe is designed to be connected to an oscilloscope with a 1MOhm impedance. As this input impedance is quite low compared to the low-value resistance in the resistance divider, I therefore suppose that the real resistance values in the probe are 99.9MOhm and 0.11MOhm (in order to get 0.99 and 0.1MOhm when connected to the 1MOhm oscilloscope.)

 

Therefore, given that according to the datasheet, the analog input impedance of the USB-6212 is >10GOhm, I would therefore expect to measure voltages 10% higher than the true value when connected to the DAQ. Does this assumption make sense?

What would be the best way around this? Do a calibration and correct the acquired values in the LabVIEW code? Or should I add a precision 1MOhm resistor in parallel to the DAQ input to decrease its input resistance to the value expected by the probe?

 

Thanks for your help!

PCI 6320 NOT COMMUNICATED ON RT

$
0
0

Hi  

I have purchsed PCIe 6320 and connected it to my motherboard then I loaded LabVIEW RT 8.6 on that. I am communicating with RT using ethernet.

as I can see my RT target in MAX and can Configure it. As i inserted PCIe 6320 in PCIe slot and referesh the MAX it shows PCIe 6320 in Device list but shows error message " Error 88900 Device not communicating".

 

Please help me with this. Is there any kind of Software or Device driver isssue in labVIEW environment.  

Internally read value of analog output channel

$
0
0

According to this you can read back analog output values without the need to connect wires physically.

 

Using the technique described in the example given (DAQmx_Read_Output_Internal_Channels.vi) I'm trying to read an AO current on my compactDAQ cDAQ-9174 with a analog current output module NI-9265.

 

The output channel is created in MAX and my vi can write values to it without problems

 

But when I try to create an analog input channel for reading the output an error occurs.

 

What am I doing wrong?

Is this not supported by my hardware?

Or is the example given at the link above incorrect?

The example is 10 years old. Maybe it doesn't work in LV2013.

 

 

createAI.png

 

error.png 

 

USB-9215A两通道干扰

$
0
0

我有两个相同类型的传感器,分别接到USB-9215A(BNC)的0通道和1通道上,出现的问题是只有一个通道正常工作,另一通道不能正常工作。如果仅仅只连接一个通道,也就是说只连接0通道或者1通道中的任意一个,并且更换任意一个传感器,都能正常工作。但是就是不能两个传感器、两个通道同时工作,请问谁知道这是为什么?

How to read out current power source of cDAQ-9136 in LabvIEW?

$
0
0

I want to know current power source is either V1 or V2 of cDAQ-9136.

Is it possible to get this info in LabVIEW?

I want to acquire data from port which connected with USB port

$
0
0

I want to acquire data from port which connected with USB port


increasing amplitude of one affects the other signal

$
0
0

Hi,

I am using NI PXI 6070E. I was trying to acquire signals from 2 photodetectors using photodiode amplifier but saw one signal affecting the other. So to test what's going on I tried to use 2 function generators instead of the signal from my experiment : 1) triangular wave (+-1Volt)  2) Sinusoidal wave (+-4volts). Sampling rate=50kHz. When I increased the amplitude of the sinusoidal signal triangular got distorted as in the image. But when I decreased the sampling rate to 1kHz there was no such problem. Can someone please explain why increasing the amplitude affects the other signal? Thanks.. 

I did  find an article on ghosting effect but I couldn't get why it would be this hard to acquire two signals of different amplitudes.

type or namespace name 'AnalogWaveform' could not be found

$
0
0

Hello,

During programming my NI USB-6001 in Visual Studio C# I got error CS0246 The type or namespace name 'AnalogWaveform<double>' could not be found.

I have no error with "AnalogMultiChannelReader" and "Task". I have all NationalInstruments references added and set using directives for NationalInstruments.DAQmx. And when I have "private AnalogWaveform<double> data;" I have mentioned error but when I have "private NationalInstruments.AnalogWaveform<double> data;" I don't have problem. I explain it in my example in attached file.

Can you help me to explain why I have to use "NationalInstruments.AnalogWaveform<double>" when for instance "private AnalogMultiChannelReader analogInReader;" is ok ?

 

Best regards

Maciej Zemlo

 

Software for cDAQ-9171 + 9219 module + TJE Pressure Sensor

$
0
0

I am buying a NI cDAQ-9171 CompactDAQ 1-Slot USB Chassis and a NI 9219 module to read a Honeywell TJE pressure sensor. I plan to write Excel VBA code to have a PC periodically read the pressure values over USB from the CompactDAQ. This is all I need to do, so do I need any software package beyond what comes with the cDAQ-9171?  (I want to be sure I don’t need to buy a LabView package which can be quite expensive.)

USB 6001 Analog Input problem

$
0
0

Hello,

 

I started to work with USB 6001. That device has both differential mode and RSE mode. USB 6000 which I used before has only RSE mode. So now, when I start the same program which was working perfectly with 6000 (reading analog input from sensors), does not work on 6001. I manually setup RSE mode in DAQmx, but it has no effect.

The problem is that when I have, for example, 2 channels of analog input (simple voltage reading), and I supply voltage to only one pin, the second pin also shows input, although there is nothing on it. It happens on both differential and RSE modes. However, when I check the device in Test panels in MAX, and try test output, it shows perfect output for one pin, and totally nothing on the second pin, which does not have anything - so as it must be.
 I am a little bit confused what might be the problem. Is it mulfunctioning of the device, or software problem (although it is totally same as was working on 6000)? Waiting for your feedback. Thanks!

.NET DAQmx: Task runs first time, but throws "already running" when called again.

$
0
0
    public List<byte> ReadData(int bytesToRead)
    {
      int digitalSampleCount = CalculateNumberOfSamplesNeededFromByteCount(bytesToRead) + 1;
      List<DigitalState> clockStates = GenerateClock(digitalSampleCount);
      DigitalWaveform clockWaveform = CopyStatesIntoWaveform(clockStates);

      using (NationalInstruments.DAQmx.Task writeClockTask= new NationalInstruments.DAQmx.Task("Clock Writer"))
      {
        writeClockTask.DOChannels.CreateChannel(clockLine, "Clock Line", ChannelLineGrouping.OneChannelForEachLine);
        writeClockTask.Timing.ConfigureSampleClock("", 20000,
          SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, digitalSampleCount);
        DigitalSingleChannelWriter clockWriter = new DigitalSingleChannelWriter(writeClockTask.Stream);

        using (NationalInstruments.DAQmx.Task readDataTask = new NationalInstruments.DAQmx.Task("Data Reader"))
        {
          readDataTask.DIChannels.CreateChannel(dataLine, "Data Line", ChannelLineGrouping.OneChannelForEachLine);
          readDataTask.Timing.ConfigureSampleClock("/PXI1Slot6/PFI5", 20000,
            SampleClockActiveEdge.Falling, SampleQuantityMode.FiniteSamples, 16);
          var dataReader = new DigitalSingleChannelReader(readDataTask.Stream);
          var result = dataReader.BeginReadWaveform(16, new AsyncCallback(ReadTaskCallback), readDataTask);
          readDataTask.Start(); // ***** This line throws exception the second time ReadData(int) is called ****
          
          clockWriter.BeginWriteWaveform(true, clockWaveform, new AsyncCallback(WriteClockCallback), writeClockTask);
          writeClockTask.WaitUntilDone();
          readDataTask.WaitUntilDone();

          DigitalWaveform readData = dataReader.EndReadWaveform(result);
          Console.WriteLine("Number of samples read: {0}", readData.Signals[0].States.Count);
          for (int i = 0; i < readData.Signals[0].States.Count; i++)
          {
            Console.WriteLine("State at {0}: {1}", i, readData.Signals[0].States[i].ToString());
          }
        }
      }

      return new List<byte>();
    }

I have the above method, which creates 2 tasks.  One to write a clock signal out, one to read data back in.  Everything works great the first time the function is called.

 

HOWEVER, the "readDataTask.Start()" throws a DaqException, claiming "Specified operation cannot be performed while the task is running".  Maybe I don't have a firm grasp on C# and "using", but shouldn't "readDataTask" get cleaned up when the using block falls out of scope?  And shouldn't new-ing up a new task actually create a new task?  

NI 9469 RJ45 pinout

$
0
0

Is there documentation on the pin assignements for the RJ45 connector on the NI 9469 module. I'm lookinig to optimize the number of copper conductors required to implement synchronization between multiple cDAQ chassis.

 

Thank You,

Peter

NI 9174 power input wiring

$
0
0

Hello All,

 

I am using NI 9174 chassis and NI PS15 power supply which provide 24Vdc. connection are pin V wired to +24Vdc, pin C wired to -24Vdc. 

But Seems like this connects pin C to ground too. Is there internal connection in the chassis that makes pin C connects to ground (enclosure)? 

Now I have all my COM are connect to Gound which I don't have in my drawing.

 

Can any one explain this?

 

Thank you very much


Analog Input baseline changes when digital output done in parallel

$
0
0

Hi all,

 

We are using a USB 6008 DAQ to run a simple system. AI6 is connected to a motion sensor; digital outputs control a pump. We noticed that if we read from AI6 without performiong additional tasks, the baseline is ~0.17V and when motion is detected it goes down to 0.13V. However, if we read from AI6 while performing digital output at the same time, the baseline goes down to ~0.14V and when activated it goes down to ~0.1V, i.e. the baseline changed by 0.03V. Are we doing something wrong or is this expected behavior?

 

Thanks,

Danielle

daq driver locater touble

$
0
0

I have re-installed LabVIEW, VISA, and the DAQ drivers (NI-DAQmx) but I still continue to get this message:

 

NI-DAQmx Driver support from LabVIEW 2015 is missing

 

I cannot run any of my programs that need to utilize my DAQ which essentially is my main priority right now.

 

Thank you!

Every N Samples Callback with AO channels (PCIe-6321)

$
0
0

I am unable to get the EveryNSamples callback working with analog outputs (i.e., DAQmx_Val_Transferred_From_Buffer). I can get it working using analog inputs (i.e., DAQmx_Val_Acquired_Into_Buffer). I have successfully used this code on M-series hardware; however, I'm trying to get it to work on newer X-series harware (specifically, the PCIe-6321).  This code is in Python (using PyDAQmx as the wrapper). the first segment of code (which sets up an every N samples callback for analog inputs) works fine. The second segment of code (which sets up an every N samples callback for analog outputs) fails with error code -88700. I need to get this callback working with analog output, so I'd appreciate any pointers:

 

def nsamples_callback(task, event_type, n_samples, data):
   print 'called'
   return 0

mx.DAQmxResetDevice('Dev2')
ai_task = mx.TaskHandle()
mx.DAQmxCreateTask('', ctypes.byref(ai_task))

mx.DAQmxCreateAIVoltageChan(ai_task, '/Dev2/ai0', '', mx.DAQmx_Val_RSE, -10, 10, mx.DAQmx_Val_Volts, '')
mx.DAQmxCfgSampClkTiming(ai_task, '', 20e3, mx.DAQmx_Val_Rising, mx.DAQmx_Val_FiniteSamps, int(100e3))

cb_ptr = mx.DAQmxEveryNSamplesEventCallbackPtr(nsamples_callback)
mx.DAQmxRegisterEveryNSamplesEvent(ai_task, mx.DAQmx_Val_Acquired_Into_Buffer, 10000, 0, cb_ptr, None)

mx.DAQmxTaskControl(ai_task, mx.DAQmx_Val_Task_Commit)

 

The following code generates an error:

 

def nsamples_callback(task, event_type, n_samples, data):
    print 'called', task, event_type, n_samples, data
    return 0

 

mx.DAQmxResetDevice('Dev2')
ao_task = mx.TaskHandle()
mx.DAQmxCreateTask('', ctypes.byref(ao_task))

mx.DAQmxCreateAOVoltageChan(ao_task, '/Dev2/ao0', '', -10, 10,  mx.DAQmx_Val_Volts, '')
mx.DAQmxCfgSampClkTiming(ao_task, '', 20e3, mx.DAQmx_Val_Rising, mx.DAQmx_Val_ContSamps, int(1e3))

cb_ptr = mx.DAQmxEveryNSamplesEventCallbackPtr(nsamples_callback)
mx.DAQmxRegisterEveryNSamplesEvent(ao_task, mx.DAQmx_Val_Transferred_From_Buffer, 1000, 0, cb_ptr, None)
mx.DAQmxTaskControl(ao_task, mx.DAQmx_Val_Task_Commit)

 

The error is:

 

DAQError: An internal error occurred.
Task Name: _unnamedTask<1>

Status Code: -88700
in function DAQmxTaskControl

USB DAQ cards with Windows remote desktop..?

$
0
0

Hi,

 

Is it possible to connect an USB DAC card like USB-6003 to a local PC and then transfer the USB port to a remote computer by using Windows Remote Desktop connection?

 

Our local PC has Windows 10 and the remote computer runs on Windows Server 2012 R2.

 

BR,

Ilkka

Two hardware-timed self-defined analog outputs

$
0
0

Hi,

 

I am trying to generate two different hardware-timed votage ramps with LabVIEW 2014 14.0f1 and DAQ Card 6323. At the moment, everything seems fine if I just do single analog outputs as attached. However, it doesnt work properly if I put them together. It is said one should use only one Write function and set it as N chan N Sample. I tried to operate this way but here comes a problem. When doing seperately, signal generation rate is controlled with rate of DAQmx Timing function. As there is only one Timing funcion if doing in single task, how can I generate the singla at different rates ? 

 

I am quite new to LabVIEW and enclosed my current codes here, including two sperate ones and a single-task one (not working properly). Also, I dont know how to split signals from DAQmx Write and then give them to two Waveform Graph respectively. 

 

Any help or suggestions will be highly appreaciated.

 

Best regards

 

Liang

Viewing all 6880 articles
Browse latest View live


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