Usb 6009 output changes

Hi, I'm using a NI USB 6009 device.  I am using the analog output to drive very small currents (less than 1 micro Amp) through a 1 MOhm resistor.  I find that the output often changes significantly when I begin to acquire data, or if the computer is doing something, such as fitting data, or even if I am simply opening other files or programs.  Any advice?
Thanks!
Micah

Hi, thanks for the responses.
I'm outputing a DC voltage with values typically ranging from 0.1 V to 1 V.  The signal goes through a 1 MOhm resistor in series with a coil for producing very small magnetic fields applied to an atomic magnetometer.   It appears that the output changes by tens of millivolts, as recorded by a yokogawa oscilloscope with input impedance of 1 MOhm.  The coil and scope are both grounded.  I am using only a single input channel on the USB6009, coming from an SRS voltage preamp with output impedance of 50 Ohms
I can also infer that there are changes in the current when the computer "does something" by looking at the signal in the atomic magnetometer.   
Perhaps it would help if I shunted the output with some smaller resistor, say 10kOhm?
I will look at the document you mentioned.
Thanks again.

Similar Messages

  • Usb 6009 continuous analog output

    Hi
    I'm pretty new to Labview, so you may have to bear with me. I have a USB-6009 and I want to generate a continuos analog output voltage. I've got the example you have posted 'Gen Mult Volt Updates-SW Timed_LV7.1 (0 to 4).vi' working and it outputs a continuous sine wave.
    In a similar manner I need to generate:
    1. Ramp up voltage (and ramp down voltage): starting with a continuos constant voltage, which after a period of time linearly increases to another constant voltage, and which allows me to specify the 3 time intervals and the rate of increase.
    2. Pulsations: whereby I can specify the amplitude and time interval of each pulsation
    This is so that I can control voltage to a valve which regulates my pipe flow. In the example I have (one stated above), I do not understand specifically:
    i. Why I need both a 'Software Loop Time (ms)' as well as 'Timeout'
    ii. The 'Sinusoidal Pattern' input which seems to generate data for a sine wave- I can't get a description of that and there are no similar VIs for other waveforms; and what is the function of the two numbers it has?
    iv. How do I change amplitude and time period for the wave?
    iii. What does 'Index Array' do?
    thank you

    Hi there,
    I'm guessing the VI you are using is the one from this KB:
    http://digital.ni.com/public.nsf/allkb/6F2C2B49A89D685C8625711D007BDD64
    i. The software timed loop control is to control the rate at which you change the voltage output.  The timeout on the DAQmx Write VI is the maximum time in seconds the VI will wait to output a sample (eg. if the write buffer is full, the Write VI will wait for it to become available for 'timeout' seconds before outputting an error).
    ii. The sine pattern is just an array constant of doubles that make up the sine wave voltage values, and the for loop adds an offset (of two volts) to every single one of those values. You might want to replace that entire array constant and for loop with a Simulate Signal Express VI (just search for Simulate Sig or look in the Functions >> Input palette) and convert the dynamic data output to an array of doubles.  You can configure the type of waveform, amplitude, and time period from that express VI as well.
    iii.  Refer to previous answer.
    iv.  Index array returns an element of an array based on the index input.  You can turn on the context help and move your mouse over functions to get more help on them.
    I hope that helps!
    Way S.
    NI UK Applications Engineer

  • USB-6009 digital input change detection

    Hi,
      I am trying to acquire digital signals from an ni usb-6009 device using daqmx on labview 8.0. I need to write the signals from a port of the device to an output file only when there is a change in the signals and I am not able to do this successfully. I created a digital task in MAX and was able to select acquisition mode as '1 sample (On Demand) ' only. Any other selection for acquisition mode would result in error 200077 with the following message -
    Measurements: Requested value is not a supported value for this property.
    Property: SampTimingType
    You Have Requested: Sample Clock
    You Can Select: On Demand
    I selected '1 Sample (On Demand)' acquisition mode and was able to see the channel values on running it in MAX as I rotated a device connected to the usb-6009 device. As expected the hex values on MAX were showing up as FF,7F,3F,BF and this pattern was repeated everytime I provided the input by rotating the device.
    Next, I created a simple vi to use the digital task I setup on MAX. I want to be able to record the signals only when there is a change in the digital pattern from the channels.That is when there is atransition from FF to 7F to 3F and so on, the vi should write to an output file and if no change happens, it should not write to file. To do this, I explored the Timing vi and tried using the 'Change detection' mode, but that produced the same error as above. 
    Can anyone please suggest a way to accomplish what I am trying to do ? Any guidance will be a hugely appreciated.
    Thanks
    ~Sej

    All of that effort with sample rates, timing, change detection, etc ciuld have been avoided if you had read the specs. As you finally found out, the device only supports sftware timed i/o and no change detection. You wll have to do your change detection in software this is done with a shift register/feedback loop.

  • USB-6009 Analog Waveform Output

    I'm trying to create an analog waveform from a USB-6009 device through one of the analog output channels. However, through the DAQ Assistant, I can only select the 1 Sample (On Demand) setting. When I test the device, I can only push a constant voltage out. If anyone has any advice on how to create an analog voltage waveform using this device, I would like to know.

    >I am only a novice at LabVIEW and data acquisition in general.
    I don't use Labview (I write in C++) so I can't help you with that. I try to answer questions about C/C++ and general hardware questions.
    >What did you mean by software-timed waveform generation?
    That's where the software driving the device sends a sample to the DAQ device, waits for the prescribed time interval, then sends the next sample. So the timing of the waveform is driven by the software, using the computer's clock, instead of by the DAQ hardware. Software-timed is less reliable and has (often) lots more jitter because of competition for CPU resources.
    >Does this mean that I cannot generate a waveform that is more than 150 Hz?
    It's worse than that. It means you can't generate a waveform faster than 150/N Hz, where N is the number of samples (data points) that define the waveform.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • USB-6009 Digital Output Current

    You need to have all those grounds connected together - USB-6009 Digital Ground, ULN2003 GND, and the power supply ground. In this case it will not matter how they are connected.  If they are not connected, then one of the devices could be damaged.
    Lynn

    Hi, I'm trying to increase the voltage of the digital outputs of USB-6009 device. I read a couple topics about using a relay but I could not manage it.
    I was thinking to use 5V supply on the card since it has 200mA current on it, but when I use it with open-collector output, it can not switch the relay. When I measure the current between
    5V and ground: 200mA,
    5V and output, I read a value around 30-40 mA.
    Why can't I use that 200mA with an output? This is the relay I'm using.
    If this is not possible, can I use an external 5V supply (with more current) and a digital output to switch the relay without damage the 6009?

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

  • Usb-6009 analog output voltage

    Hi,
    The usb-6009 has two 0-5 volts analog ouputs. Is it possible to connect
    them in series, in order to get a single 0-10 volts analog output
    channel ?
    Thanks,
    Nicolas

    Those are ground-referenced signals. To connect them in series, you would have to connect one of the outputs to ground. You would be shorting out (at least) one of your analog outputs, and probably damage the unit.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • How do I set up a triggered analog output on a USB 6009?

    Hi! I am very new to LabView and am working on the control portion of my senior ME design project. It is an anti-tip brake system for a bicycle. The goal is: When critical time to tip is reached (by reading values from a rear wheel normal force sensor, taking the derivative and calculating this critical time), my cheap DAQ USB-6009 device will put out an analog signal to a transistor, which will spin a DC motor (attached to a worm gear setup) for a certain length of time (...This will change a pivot location in the mechanical assembly which will decrease brake mechanical advantage).
    I have been trying to work with LabView 8.5. I get bogged down in confusion when I try to use G-code and get unexplained errors in using Express VI's (they're rather black box-ish to me).
    I think that all I need to do is set up an analog input channel, take derivatives and values and put them into a formula for critical time. Then if the result is a "True", I want to begin an analog out sequence for a certain period of time (to get the motor to the right position).
    I would appreciate any help that I can get with this one.
    Attachments:
    ABScontrol1.JPG ‏43 KB

    chowph,
    You are
    correct with your last statement about performing a comparison on your data.
    1.  Are there any error codes or messages in the
    errors you are getting? Or if you have screenshots of the errors you could post
    then that would work too.  Knowing the
    errors would help in understanding where to start. 
    2.  In your previous
    post did you have a chance to try the examples or Kent’s example code he
    posted?
    3.  What were the results of those examples and
    your experiment?  Again screenshots would
    work fine here.
    Since you
    new to LabVIEW make sure to take advantage of the online training material and
    tutorials we have on ni.com.  I have posted
    a few that I think may be helpful.
    Learn 10 Functions in
    NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
    Complete Data Acquisition
    Tutorial
    How Can I Learn
    LabVIEW?
    I hope this helps!!
    Message Edited by Ryan N. on 03-31-2008 11:52 AM
    Ryan N
    National Instruments
    Application Engineer
    ni.com/support

  • How to toggle LED at analog output from my VI Using NI USB 6009

    Greetings,
    I bought this NI USB 6009 Multifunction I/O and found various uses for it. In my VI, I am acquiring some signals using the DAQ assistant. After doing a couple manipulation I would like to toggle a LED at one of the two Analog outputs available. I tried configure it in Max and was able to toggle it there, but now I would like to have the VI do it once a certain value is attained. Can anyone  tell me how this is done as I think I might be doing something incorrect.
    Thanks
    Edward

    Greetings,
    Attached you will find just a simple code to turn on the LED if the indicator on the VI's front panel illuminates. In my original code it is something similar. I have also check the wiring and I don't think that's the problem since I was able to toggle it through Max. I am using LV 2009. When  the output channel was configured in Max, the output voltage was set to range from 0-5V. I am not sure if the DAQ  Assistant  analog output is being triggered properly.
    OK, Lets say that I wanted to turn on the LED if a number was greater than the one stored in memory. How would I pass that to the NI USB 6009 to turn on a External LED. Please assume that the output is wired properly.  
    Thanks
    Edward
    Attachments:
    LED Application.vi ‏43 KB

  • USB-6009 Sine Wave

    Hi,
    I am new to LabView and am having some trouble. I need to input two sine waves into a USB-6009. I have a voltmeter that should read the output. Two of the problems that I have had thus far: I can only use "On Demand" in DAQ Assistant and even when I throw the DAQ Assistant into a while loop I still do not get a readout on my voltmeter. Any suggestions? Thanks for the help.

    That is confusing. You say you need to input 2 sine waves into a 6009 and that to me implies that you are doing a DAQmx Read. Then you say you have a voltmeter to read the output. That implies you are doing a DAQmx Write. If you are really doing a write from the 6009, then on demand is, of course your only choice. As the specs clearly indicate, the output of the 6009 is strictly software timed so you would need to pass a sine wave point by point and then you would have very little control over the frequency. And, again as the specs clearly state, the fastest output rate you could expect is 150Samples/sec.

  • Usb 6009 multiple analog inputs

    I am currently attempting to sample two different analog inputs at different sampling rates using a USB 6009.  I keep getting the 'resource reserved' error and am wondering if this is not possible using this DAQ.  Questions:
    1.  Does creating two analog input channels on the device cause this error?
    2.  Is it possible to sample at different rates on channels created in the same task?  (i am trying to 'slow down' the second analog input to display switch points to a customer)
    3.  Running multiple analog inputs using independent timing would be better achieved by switching to a higher end DAQ?  If so which would you recommend?
    I have attached my vi.  Thank you in advance for your help. 
    I surf therefore I am....
    Attachments:
    demo_nolvl.vi ‏27 KB

    The DAQ boards only have 1 timing clock for the analog inputs/outputs.  So you can only have 1 sample rate on a given card.  I would recommend just sampling at the highest of the desired rates in a single task.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • USB 6009 Python Control

     Hello, 
    I am attempting to use python (with ctypes) to control my USB-6009.  The goal is to write out an analog voltage and then read in the voltage through an analog input with ability to change the number of points averaged and the number of times this is repeated(sweeps) averaging the analog input array.  The issue is that as we increase the number of times the voltage ramp is repeated (sweeps) we get a time out error (nidaq call failed with error -200284: 'Some or all of the samples requested have not yet been acquired).  This has us confused because the sweeps are in a larger loop and the Daq function should be the same if there are 10 sweeps (works) or 1000 sweeps (crashes).  Any insight would be greatly appreciated.  I have included the code below for reference.  
    import ctypes
    import numpy
    from time import *
    from operator import add
    nidaq = ctypes.windll.nicaiu # load the DLL
    # Setup some typedefs and constants
    # to correspond with values in
    # C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
    # Scan Settings
    aoDevice = "Dev2/ao0"
    aiDevice = "Dev2/ai0"
    NumAvgPts = 10
    NumSweeps = 50
    NumSpecPts = 100
    filename = '12Feb15_CO2 Test_12.txt'
    Readrate = 40000.0
    Samplerate = 1000
    StartVolt = 0.01
    FinalVolt = 1.01
    voltInc = (FinalVolt - StartVolt)/NumSpecPts
    # the typedefs
    int32 = ctypes.c_long
    uInt32 = ctypes.c_ulong
    uInt64 = ctypes.c_ulonglong
    float64 = ctypes.c_double
    TaskHandle = uInt32
    # the constants
    DAQmx_Val_Cfg_Default = int32(-1)
    DAQmx_Val_Volts = 10348
    DAQmx_Val_Rising = 10280
    DAQmx_Val_FiniteSamps = 10178
    DAQmx_Val_GroupByChannel = 0
    def CHK_ao( err ):
    """a simple error checking routine"""
    if err < 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    if err > 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq generated warning %d: %s'%(err,repr(buf.value)))
    def CHK_ai(err):
    """a simple error checking routine"""
    if err < 0:
    buf_size = NumAvgPts*10
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    def Analog_Output():
    taskHandle = TaskHandle(0)
    (nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle )))
    (nidaq.DAQmxCreateAOVoltageChan(taskHandle,
    aoDevice,
    float64(0),
    float64(5),
    DAQmx_Val_Volts,
    None))
    (nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Samplerate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts))); # means we could turn in this to continuously ramping and reading
    (nidaq.DAQmxStartTask(taskHandle))
    (nidaq.DAQmxWriteAnalogScalarF64(taskHandle, True, float64(10.0), float64(CurrentVolt), None))
    nidaq.DAQmxStopTask( taskHandle )
    nidaq.DAQmxClearTask( taskHandle )
    def Analog_Input():
    global average
    # initialize variables
    taskHandle = TaskHandle(0)
    data = numpy.zeros((NumAvgPts,),dtype=numpy.float64)
    # now, on with the program
    CHK_ai(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
    CHK_ai(nidaq.DAQmxCreateAIVoltageChan(taskHandle,aiDevice,"",
    DAQmx_Val_Cfg_Default,
    float64(-10.0),float64(10.0),
    DAQmx_Val_Volts,None))
    CHK_ai(nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Readrate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts)));
    CHK_ai(nidaq.DAQmxStartTask(taskHandle))
    read = int32()
    CHK_ai(nidaq.DAQmxReadAnalogF64(taskHandle,NumAvgPts,float64(10.0),
    DAQmx_Val_GroupByChannel,data.ctypes.data,
    NumAvgPts,ctypes.byref(read),None))
    #print "Acquired %d points"%(read.value)
    if taskHandle.value != 0:
    nidaq.DAQmxStopTask(taskHandle)
    nidaq.DAQmxClearTask(taskHandle)
    average = sum(data)/data.size
    Thanks, 
    Erin
    Solved!
    Go to Solution.

    This forum is for LabVIEW questions.

  • USB 6009 thermocouple noise

    I'm using NI-DAQmx 7.5, Labview 7.0, and a USB-6009.
    I'm trying to get a more accurate reading from my j-type thermocouple.  It is now distorted with noise and jumps rapidly +/- 20 degrees around room temp without any heat being applied.  When heat is applied, it climbs as it should but with the same variation.  I haven't moved to the labview side of it yet, I'm still trying to get a usable reading in MAX.  I have it wired as a differential input with a floating signal source.  I've installed 10k ohm resistors for bias current return as instructed.  Installing the resistors helped but still leaves me with the readings shown in the attached pic.  I've also tried grounding my USB 6009 with no results.  Please help. john
    Attachments:
    thermocouple reading.jpg ‏41 KB

    Hi John,
    What you are running into is a problem with the actual voltage resolution of your USB-6009.  This device has 14-bits of resolution over a minimum range of +/- 1V.  That means that the voltage resolution is (1 - (-1))V / (2^14) = 2V / (16384) = 122uV.  While this is an excellent resolution for such a low cost USB device, you will still notice problems when trying to make a thermocouple measurement.  The reason for that is that Thermocouples make a very small output voltage (see image below).
    Common thermocouple types have the following response:
    K type: 41 microVolts per degree Celsius
    J type: 56 microVolts per degree Celsius
    T type: 52 microVolts per degree Celsius
    There are a few options for ways to get around this limitation.
    Good: You could read the signal in as a voltage and then manually convert that voltage into a temperature.  This would be the least accurate method, but it should allow you to average out your signal and then use the Convert Thermocouple Reading.vi to show the voltage as a temperature.
    Better: If you want to keep using the USB-6009 to measure thermocouple, what you really need to do is first amplify your signal before you connect it with your device.  This should increase your resolution of the thermocouple allowing you to get more accurate temperature specs.  This will require some more complex programming to properly scale your measurements, but it will give you more accurate readings for relatively little cost.
    Best: Opt for getting a USB device that is designed for taking temperature measurements such as the USB-9211A.  This device would give you a voltage resolution of 160mV/2^24 = 9.54 nV!  That's over 12500x the resolution of the USB-6009 that you currently have.
    Hopefully the above information helps you better understand what is going on and why.  If you have any other questions feel free to post them here.
    Message Edited by Otis [DE] on 01-13-2006 11:37 AM
    Message Edited by Otis [DE] on 01-13-2006 11:38 AM
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments
    Attachments:
    761029-Thermocouple_Voltages.GIF ‏10 KB

  • Usb 6009:connecting the sensor and motor

    Hi there,
    I am new to the labview also the usb-6009. I want to know if I can connect my sensor to the device. The output of the sensor is either analog voltage, pulse width or serial.If I want to use the AN pin, can I just connect the wire to the ADC from the usb or I need to add some circuit before connect it to the usb?also, if I want to control the brushless dc motor with the driver, can I just connect the wire from the motor driver direct to the device? How to connect it?
    Thanks

    You can connect analog voltages directly to the USB-6009 to be measured as long as they do not exceed the input limits (-10V to +10V).
    Connecting the motor directly to the outputs is a bad idea.
    Digital output is 0-5V, 8.5mA
    Analog output is 0-5V, 5mA
    So unless your motor draws less than 5mA (extremely unlikely) you'll blow up your DAQ!
    You will need to buffer the outputs somehow unless you are just driving logic gates.
    It's all on the datasheet... http://www.ni.com/pdf/products/us/20043762301101dlr.pdf
    Message Edited by Troy K on 06-06-2008 02:36 PM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • USB 6009 - Calibration of Analog Input (Mac)

    Hi,
    I have recently acquired a NI USB 6009. I'm using it under labview 7.1 on Mac OS X 10.4 (Tiger).
    I can run the software examples and the datalogger without problems. However, the device seems
    not to be properly calibrated, and I can't figure out how to do it from the manual. When I connect
    pin 1&2 (analog in 0) to pin 32 and 31 (GND and 5V ref voltage) the software claims that the
    measured voltage it ~3.7V (a multimeter confirms that it is in fact 5.0V). Can anyone help
    trouble shooting this ?
    Thank you in advance,
    Niels

    A little update : After thinking some more I realized that it's because
    the USB 6009 is in differential mode, and I hadn't connected one pin. Now
    however, I have trouble figuring out where to change/set this. None of
    the programs (e.q. Acquire One Voltage.vi) seems to define this, so where
    is this defined ?
    Thanks,
    Niels

Maybe you are looking for