USB 6009 and TDMS write

Dear all!
I'm using USB-6009 device to adquire data from a physical channel. In the following vi, the number of samples to be adquired is set to 1000, with a 100Hz rate. Therefore, as I understand, the number of samples that should be read inside the while loop where DAQmx read is placed should be 10 for each iteration. However, I've tried to store this information in a TDMS file and I'm getting less number of samples as expected. I wouldn't like to lose any data.
I've read overthere that the USB-6009 is a software-timed device, so, can this be the reason of this anomaly? Moreover, if I analyze the adquired samples using DIAdem software, I see some samples are being repeated. In this case, am I overwriting some data and reading past values?
If I need to replace my data adquisition device with a hardware-timed one, which one should I get?
Thank you very much in advance,
Miren  
Attachments:
USB6009_TDMS.vi ‏25 KB

When you run the sample clock in  "Continuous Samples" mode, the # of samples only determines the buffer size.  This is outlined in the help for that function.
As a result, you have nothing pacing the internal loop: If there are samples available when it reaches the DAQmx Read, it passes out as many as are available in the buffer.  You might get 1, 2, 100; it depends on how long the other operations in the loop take.
In general, DAQmx loops like this can be paced either by time or by # of samples.  Looks like you want sample pacing: wire the number of samples you want to collect to the "# of samples per channel" input of the DAQmx read.  Then the loop will wait at the daqmx read until that many samples are ready, and then it will proceed.
-Barrett
CLD

Similar Messages

  • USB 6009 and DAQmx Base Concerns

    Hello,
    I just received a USB-6009 multifunction DAQ device along with DAQmx Base for use on Windows XP with LabWindows/CVI ver 7.1.  Both the 6009 and DAQmxBase are successfully installed however I have several questions, I hope I am missing something obvious:
    1. The Task Configuration Utility is not needed for use with LabWindows/CVI?  I believe I read this in the Getting Started Guide.
    2. There is no function panel for the DAQmxBase functions?  I even searched the installation CD and found no .fp files.  So the only way to know what functions are available with DAQmxBase is to open the NIDAQmxBase.h file and search through the function prototypes?  Then, to know what a function does it is necessary to open the C Function Reference Manual via the Windows Start button and search for the function name of interest?
    3. When creating a digital input or output channel with DAQmxBaseCreateDIChan or DOChan is it only possible to setup a "channel" as an entire port?  Is it not possible to setup a channel as a single input or output line?  Similarly, once the channel is configured is it only possible to read or write an entire port with DAQmxBaseReadDigitalU8 or WriteDigitalU8?  I was expecting something similar to the DIG_out_line function used in Traditional NI-DAQ where a board number, port number, line number and state are passed so that a signal output line can be set on or off.
    Thanks in advance for the assistance,
    - Aaron

    Aaron T. wrote:
    Hello,   I just received a USB-6009 multifunction DAQ device along with DAQmx Base for use on Windows XP with LabWindows/CVI ver 7.1.  Both the 6009 and DAQmxBase are successfully installed however I have several questions, I hope I am missing something obvious:   1. The Task Configuration Utility is not needed for use with LabWindows/CVI?  I believe I read this in the Getting Started Guide.  
    **The Task Configuration Utility is not necessary, except that there is significant functionality missing from DAQmx Base but present in the utility. That includes a lot of what DAQmx calls "proerties", and includes things like the convert rate for AI scanning.
    2. There is no function panel for the DAQmxBase functions?  I even searched the installation CD and found no .fp files.  So the only way to know what functions are available with DAQmxBase is to open the NIDAQmxBase.h file and search through the function prototypes?  Then, to know what a function does it is necessary to open the C Function Reference Manual via the Windows Start button and search for the function name of interest?  
    **I don't use CVI so I don't know anything about this. It strikes me that even if you have such a panel reading the documentation is a good idea
    3. When creating a digital input or output channel with DAQmxBaseCreateDIChan or DOChan is it only possible to setup a "channel" as an entire port?  Is it not possible to setup a channel as a single input or output line?  Similarly, once the channel is configured is it only possible to read or write an entire port with DAQmxBaseReadDigitalU8 or WriteDigitalU8?  I was expecting something similar to the DIG_out_line function used in Traditional NI-DAQ where a board number, port number, line number and state are passed so that a signal output line can be set on or off.  
    **Well, the ReadMe file says that USB-6008/9 is supported with both Line I/O and Port I/O. On the other hand, the documentation for DAQmxBaseCreateDOChan and DAQmxBaseCreateDIChan say for the lineGrouping parameter, "Always pass DAQmx_Val_ChanForAllLines." So your question is a good one! Perhaps one of the NI engineers can comment on this.
    - Aaron
    Thanks in advance for the assistance,
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • 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 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.

  • Separate sampling rate for two different channels for a USB-6009 daq

    Hi, 
    I am using a USB-6009 and incorporating the 'daq assistant' to change the sample rate.  I am trying to find a way to set the sampling rate to two unique values for two separate channels.  I've tried setting up two daq assistants and adjusting the sample rate different for each channel, though this does not work.  Is there any way to set the sample rate high for all channels then reduce the rate for a different channel - or an alternative?  I would appreciate any input on this, thank you!
    - Anthony
    Solved!
    Go to Solution.

    All tasks on a DAQ board that use a sampling clock must use the same clock.  Therefore, you cannot have two tasks on the same DAQ board sample at different rates.
    Alternatives would be:
    1. to combine all of the channels into a single task and just accept the extra data
    2. get an extra DAQ board to use in parallel
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to install drivers for Ni USb 6009

    Hi
    I am trying to use an NI-USB 6009 and was wondering if its possible to install just the drivers for this hardware. I know that I can install the NI-Daq base but I would really like to install the minimum amount of software onto my computer that has linux. However, I did try to install the NI daq base and the installation is failing because of an input/output error, (I am not really sure why).
    I would really like to be able to just install the drivers for the USB-6009. I was just wondering if that was possible and where I could find them.
    Thanks

    Hi Cannonball,
    You'll know pretty quickly after installing DAQmx Base and running the lsdaq utility as to if you need different firmware. The 6008 and 6009 must have a different firmware loaded to be able to run DAQmx Base 3.x. This is not a problem though as there is a firmware updating utility that comes with DAQmx Base and it's fairly straigh forward. For more information, see the link below.
    KB 491FPHB9: Firmware Incompatibility With Different Versions of DAQmx Base.
    http://digital.ni.com/public.nsf/allkb/91CBCFE9E171C845862572CF0077D8F9?OpenDocument
    PBear
    NI RF

  • Help setting up USB 6009 for experiment

    Hi,
    I am a new LabVIEW user. I have purchased a USB 6009 and I need it to acquire data from a pair of electrodes and a differential pressure sensor. Below is a schematic of how I think everything should be hooked up. I just have some questions regarding the setup before I run my experiment.
    I will be using the electrodes to measure voltage drop. However, I am wondering whether I need a ground reference connected to the bottom GND pin. This is because I will be operating the electrodes in the +/- 20 V range and according to the user guide, each pin has a maximum voltage of +/- 10 V with respect to GND. I assume this means that if the +ve electrode measures +15 V wrt to GND and the -ve electrode measures -5 V wrt to GND, the DAQ will provide a reading of 15 V instead of 20 V. So if I need a ground reference, what do I connect to the bottom GND pin?
    During this experiment, I will also be collecting data from an Omega PX26-030DV differential pressure sensor, which has a maximum voltage output of 100 mV. It will be powered by a Circuit Specialists CSI3005T power supply at 10 VDC. I believe I have made the right connections, but do I also need to connect the terminal 4 GND on the DAQ to the power supply GND?

    You definitely need grounds!  The internal circuitry of the DAQ device is referenced to the DAQ Ground. Since the device is USB connected, the DAQ ground is also the computer ground.  All grounds should be connected together, ideally on only one place to avoid ground loops.
    1. On the 10 VDC power supply shown in your diagram what is the relationship of + and - to ground? The ideal situation for a strain gauge pressure transducer is +5 V and - 5 V because that reduces the nominal common mode voltage to zero. Regardless, there needs to be a reference connection between the power supply and AI GND.
    2. What is the circuit (or equivalent circuit) to which the electrodes are connected? That also needs a reference connection to AI GND.
    3. What is the source impedance of the electrode circuit? The USB-6009 has a relatively low input impedance (144000 ohms) and it is terminated to a non-zero voltage. I do not have the manual readily available but I think I recall the equivalent voltage is about 1.4 V.  Both of these can cause significant problems for some measurements with "floating" electrodes.
    4. The +/-10 V limit with respect to ground is absolute. You cannot have +15 V to ground on one electrode and - 5 V to ground on the other electrode and expect it to work. The only way a 20 V differential rangs is possible is with one signal at +10 V and the other at -10 V. A 15 V signal will not be measured accurately and could result in damage to the DAQ device.
    Give us all the information about your system so we can provide appropriate answers.  You may need some external signal conditioning for parts of your system.
    Lynn

  • Usb 6009....mx base....and other musings

    I've recently received a few usb-6009 devices, and, like most of the other people here on the boards, have had my share of problems getting the things up and going.
    If I understand correctly....
    I can create an empty task in LabView with a VI.  This VI however doesn't give me the option of choosing differential or single ended analog in measurements.  To do this, I need to use the config utility to create a task, and then import it into my program. 
    What isn't clear is HOW I get the task I create in the config utility into my program.  Thoughts?
    I will admit that I'm a bit disappointed that the devices, while convienient in size and price, have so many idiosyncrasies in the software.  Not having the full arsenal of VI's or compatability with MAX makes getting these up and going a bit painful.
    Brandon

    Hi
    I've been trying to get a USB-6009 to work for a few days now. I was using DAQmx 7.4 and DAQmx Base v 1.4. Max Explorer would show the device  under USB Devices but I couldn't get any of the Tasks from the DAQmx Task Configuration Utility to show up in Labview. If I used the intermediate vi's to create a task and a physical channel name I did get to take measurements with the device.
    Since I realy needed to use global channels and tasks set up in Max Explorer I was hoping that the new upgrade to DAQmx 7.5 would solve the problem. I removed DAQmx Base and DAQmx 7.4 and loaded 7.5. Unfortunately I'm still unable to use the 6009 device. Again the device shows up in the USB devices and I'm now able to give it an alias but when I try to set up a global channel it says I have 'No supported devices found'. If I look at 'NI-DAQmx for USB Devices Getting Started' which I think was included with the 7.5 update that suggests that it should be seen in the DAQmx devices, but in my case it doesn't.
    I guess I've missed out some crutial stage but as yet I can't figure out what that might be. Has anyone been able to use the USB-6009 with DAQmx 7.5 (or v7.4 for that matter)?
    Ian S

  • USB-6009 AI and AO

    Hello,
    I have an USB-6009 DAQmx device. I would like to measure analogue input with the possible highest sampling rate (48kHz) . At the same time, I need to ramp a voltage analogue output from 0 to 5 Volts, lets say during 2 minutes. These two tasks do not require close syncing. Regarding to the spec, the highest rate of the AO is 150 Hz. It is ok for my application.
    So the AI measurement will use device internal clock, and the AO can only work with software timing. Is it possible to independently ramping the voltage output and at the same time, reading the analogue input? If not, is there a workaround for this device?
    Thanks for advice!
    Regards,
    Solved!
    Go to Solution.

    I have made a test version (the final solution will do measurement for 2 minutes, so I will need to ramp up the analogue signal from 0 to 5 Volts in 2 minutes, and I think 10 msec will give a sufficiently smooth ramp curve --> 24000 steps over the 5V range).
    In this test VI I do measurement on two analogue inputs using internal timing, and in parallel, I do the ramp signal with software timing (I guess it is not advised to go below 10 msec because Windows can slow down too much?).
    Additional question: when I use DAQ on the two input channels, I understand that, the available highest rate is half of the maximum. But when I plot the two channels, the points are at the same time on the XY graph. How does  LabView interleave data from the two channels during measurement?
    Thanks for help and advice,
    Regards,
    Attachments:
    Test1.vi ‏213 KB

  • USB-6009, mac OS 10.6.8 and python

    Hello!
    I am using USB-6009 under mac OS 10.6.8 and python.
    I am trying to run the following commmand:
    analogOutputTask = nidaqmx.AnalogOutputTask(name='MyAOTask')
    I get the following message
    File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/nidaqmx/libnidaqmx.py", line 180, in CALL
    AttributeError: 'NoneType' object has no attribute 'DAQmxCreateTask'
    Any help would be very mch appreciated,
    Thanks 
    j.

    Hello Jamyamdy, 
    Honestly, I am not too sure about this, but were you able to acquire data before or is this your first trial? 
    From the usb-6009 product page, it says the following. 
    For Mac OS X and Linux users, download the NI-DAQmx Base driver software and program the USB-6009 with NI LabVIEW or C.
     http://sine.ni.com/nips/cds/view/p/lang/en/nid/201987
    Regards,

  • I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    Drive Partition and Format
    1.Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.

  • In tdms write, duplicates the value after every run and works fine only if the probe tool is on

    Hello Everyone!,
                           I am facing very weird problem with my vi. The TDMS write in my "Processing" case/state records the processed data for each channel of every run. However, instead have different set of data for every run, I get same set of data in for all rows. It basically just duplicating first set of data in every row for each run. And the weird thing is that, if I use the probe tool on the wires going in to the tdms write in same case, it records the actual data in respective rows. so with probe tool, it looks like right data doing in and records the correct data, without it, it just duplicates the first row. can anyone please figure out what it going on with it?
      I have attached the VI. While at it, please feel free to provide feedback/suggestions on me design of vi, so that I can work on making it better.
    I appreciate all the help in advance!
    -Nilesh
    Kudos are (always) welcome for the good post. :-)
    Solved!
    Go to Solution.
    Attachments:
    Glucose Sensor Developmental VI.zip ‏77 KB

    I figured it out. In processing case, I was reading from the same group eaverytime. so the all the processign data was same. All I had to do was to get the current group value from the property node and wire it to tdms read function.
    Kudos are (always) welcome for the good post. :-)

  • Measuring temperature Via Thermocouple and USB-6009?

    Hi,
    I am trying to perform temperature measurements using a k type thermocouple and the USB-6009 DAQ. I tried to use the Cont Acq Thermocouple Sample.vi from LabVIEW's example list, but unfortunately I don't know how to fit my DAQ and thermocouple in the vi code. I don't know how to create a thermocouple temperature measurement channel or how to get all the channels in the task, etc.
    Any help is appreciated.
    Thanks.

    bilbeigg,
    It should be noted that the USB-6009 is not well suited for thermocouple measurements.  It has 14 bits of precision with a minimum input range of +/-1V, which means it can only detect a voltage change as small as about 122 microvolts.  This is much too large a change to get a good temperature reading with most types of thermocouples.  Here is a discussion thread on the same topic (Note that the USB-6008 and 6009 are very similar):
    http://forums.ni.com/ni/board/message?board.id=170&message.id=294080#M294080
    Here is a knowledgebase that explains what you are seeing:
    http://digital.ni.com/public.nsf/allkb/8166630BD6965EEA86256FDD0052E89C?OpenDocument
    Chris M
    Message Edited by CMal on 03-12-2008 12:17 PM

  • 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 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.

Maybe you are looking for

  • Recursive and loadable webdynpro tree

    Hi I was trying the "Constructing a Recursive and loadable webdynpro tree" example...I completed all the steps.But when I deployed it it trew an error 500   Internal Server Error Failed to process request. Please contact your system administrator. Co

  • Problem after downloading mountain lion

    Ihave just downloaded mountain lion from the app store to my iMac which was running macOSX Lion. When I restarted the computer the Lion symbol comes up and after putting in my password the toolbar appears but then I am asked wheter I want to install

  • IE exclude one site from a domain

    Our organization is currently running a whole domain in compatibility view but there is 1 site within this domain we would like to exclude from compatibility view. We are running IE 10 and would like to be able to set this via GPO if possible but wil

  • Call a Java API using Unix Script

    Hi SDNers, I want to call a Java API using Unix Script. Please suggest what will be the commands in Unix. Please help!! Thanks, Priti Edited by: Priti Rani Patnaik on Jul 7, 2010 4:17 PM

  • Can't install Security Update 2012-003 for Leopard

    I can't install neither Security Update 2012-003 nor Flashback Removal Update. The installer says the software cannot be installed on my machine. I am on a G5 (PPC) iMac running OSX 10.5.8. What's going wrong? By the way, automatic software update di