NI USB 6008 AI acquisition and DO pulse genereation

Dear LabVIEW users,
Greetings for everyone. I am a beginner of LabVIEW and I have a problem, which I have solved partially. I would really appreciate your help and suggestions as I searched for days without any luck. The problem is as following:
I am acquiring AI voltage (continous) from 4-8 accelerometers. At the same time, I am sending a digital output signal each time when the sample rate is clicked (i.e. 1000, 2000, 3000, .... if sampling rate is 1000). In other words, trying to send a digital output signal (at some frequency 'n' Hz) at regular 1 second interval (according to hardware level). So that the digital output signal will blink an LED at every one second. Further, I need to write the AI (voltage) signals, and LED blink PC (software) timestamps separately. All the above said steps are followed in my .vi program but the real hardware/software level operations are killing my timestamps. In other words each LED blink timestamps are not accurate when I use LabVIEW measurement file express VI (difference is not atleast to the third decimal place). In addition, the timestamping is somewhat OK when I disable the LVM file write VI. Onemore thing I noticed is that, physically LED blinks every two second once, I suspect this is due to the shift register and loop delay of second. Is there a way to control the blink speed (i.e. boolean state has to change at every 500ms without delaying the inner while loop).
Results and observations:
LabVIEW 2011 .vi, timestamp files with and without LVM file generator (express VI) are all attached. Please note that there is a considerable amount of drift in consecutive timestamps when LVM file generator is used, on the other hand there is 0.001 ms drift when LVM file generator is not used. The reason for PC timestamps are to roughtly align different measurements or observations or events in global time scale.
Please give me any suggestions or help me to make it atleast accurate for milliseconds within the witten VI. Lastly, is there any relatively inexpensive USB DAQ module which can send a pulse to directly from pulse channel to digital output channels when sample rate of 'n' Hz is achieved by hardware level which could be every accurate, so that software delay is fully minimized. Although there are highly sophistiated hardwares from NI, but our goal of this project is to build and test cost effective system.
Thank you and I really appreciate your inavluable time and effort. Have a great weekend!
With Regards,
Paghalaya
Solved!
Go to Solution.
Attachments:
LabVIEW File Folder.zip ‏113 KB

Paghalaya,
Software timing when using a desktop operating system will never be precise to the millisecond level.  The USB-6008 has hardware timing only for the AI function. The DO is software timed.
To get precise 500 ms intevals for the DO, you will need to use a device with hardware timed digital outputs.
Some things which might improve your VI, although they will not solve all your problems:
1. Consider a parallel loop architecture (suche as Producer/Consumer). Moving the File writes to a separate loop from the data acquisition may reduce the timing jitter on the DO.
2. Acquire 500 samples twice per second rather than 1000 samples once per second.  That will allow you to get the DO timing closer to what you want.  It will not be perfect, but the hardware timing of the AI will help.
3. Dev1/ai0:3 (maybe Dev1/ai0:ai3) should get all four channels at once.  I do not have DAQmx so I am not sure of the syntax.
4. You have the Write to Measurement File Express VI set to overwrite the file.  Is that what you really want?
Lynn

Similar Messages

  • Two Simultaneous USB Camera Image Acquisition and Saving

    Hello everyone,
    Recently my friends and I have begun a project which requires the simultaneous acquisition of images from two independent USB cameras. Throughout our project research we have encountered many difficulties. The major problem appears to be how to successfully interface two USB cameras and properly save the image to a median for further processing down the road.
    Our first attempted at this was with the USB IMAQ drivers. Unfortunately, to our surprise, it does not support two independent and simultaneous camera acquisitions. To combat this problem we implemented a crude loop of closing a camera reference, then opening the other, acquiring an image, then closing, etc... This did provide us with functionality but was very inefficient, resulting insufficient acquisition speeds.
    Afterwards we began looking at other ways of capturing and writing the image, which are listed below.
    Various Acquisition Interfaces / Strategies
    USB IMAQ Driver - USB interfacing kit available for public download, (not officially supported by NI) zone.ni.com/devzone/cda/epd/p/id/5030
    Status - Abandoned because of the lack of dual web camera support
    Avicap32.dll - Windows 32 DLL responsible for all web camera communication, and other media devices.
    Status - Currently acquired two streams of video on the front panel but with no way of saving the images
    Directx - The core Windows technology that drives high-speed multimedia on a PC.
    Status - Currently researching.
    .NET - Microsoft .NET framework, possibly a valid interface to a video stream.
    Status - No development until further progress.
    We are still currently developing the Avicap32.dll code but the major bottleneck is the learning curve on the property nodes, library calling nodes, .NET and other references. So far it’s been a tedious effort of trying to understand example code and piece them together. As a former programmer of C I know this is not the proper way of writing code web I can’t seem to grasp how these functions work. (Property nodes, library calling nodes, .NET and other references). Learning this may allow us the knowledge to code a proper system. Does anyone know any good tutorials or learning material for such functions? So far my research has come up empty handed.
    We are currently working with these interfaces and other reference examples on the NI site. Unfortunately we cannot seem to properly integrate the code for our system. Does anyone know if this setup is even possible? Also, if anyone has any experience with similar systems and can offer advice, code snippets, or any other assistance it would be greatly appreciated.
    Our current projects will be posted below if you have any suggestions. (More will be added when I get to my desktop tomorrow)
    Two Camera Avicap32.dll - Currently stuck on how to save the image, various tweaks have gotten us stuck at this point ( will have another Avicap32.dll implementation posted tomorrow)
    USB Capture Example - This USB capture VI was an example that immediate had problems. We used it as a baseline for crude open-close camera image grabbing system. (Will also be posted tomorrow)
    Thanks for any help, it's much appreciated.
    Taylor S. Amarel
    Thanks,
    Taylor S. Amarel
    Learning is living.
    Co-Founder and CEO of http://3dprintingmodel.com/
    "If we did all the things we are capable of, we would literally astound ourselves."
    -Thomas Edison
    Attachments:
    Two Camera Avicap32.dll.zip ‏84 KB
    USB Capture Example.zip ‏17 KB

    Thanks for the information but that's not exactly what I'm looking for. I've been to that URL and read the information before. I don't mean to disparage you help but I'm looking for ways that I can successfully implement a functional system, not information on an unfunctional method. Maybe I was unclear before, I'm looking for any advice, knowledge or help on how to make this system properly work.
    Thanks, have a great day.
    Taylor S. Amarel 
    Learning is living.
    Co-Founder and CEO of http://3dprintingmodel.com/
    "If we did all the things we are capable of, we would literally astound ourselves."
    -Thomas Edison

  • Labview 6.0 Vs USB 6008

    I have labview 6.0 software and I was wondering if it is compatible with the new USB 6008 data acquisition boards.
    Thanks.

    No. The minimum version that you can use is 7.0.

  • Thermocoup​le DAQ USB 6008

    Hello
    I am novice of LABVIEW and DAQ system. If now i am going to use thermocouple, will it be suitable for me to use USB 6008 to acquire and analyze signal. USB 6008 has no filters inside. Using labview, will the noise be filtered out by LABVIEW itself using FILTER vi?
    if signals are going to be analyzed continuously( it will measure ambient temperature with sudden hot air is blown against thermocouple intermittently), how would u recommend me? how can i take only signals with hot air and disregard the ambient temperature( as differentiate the hot air from ambient air).

    Hi to all,
    I don't understand very well whats mean this that says johnsold:
    "The USB-6008 has 12 bit resolution (differential) and the most sensitive range is +/-1 V. This means that the resolution is about 0.5 mV."
    could someone explain to me please?
    I am trying to read sensor Lm 35, through the USB6008 and get a signal with noise near .005 V. In fact when I read any signal I have this noise level, can you advise me?
    Thanks, greetings.

  • USB 6008 power up inconsistent

    Hi,
    Now that I have read enough about the DAQ 6008 and know that the DIOs power up to 5V when it is connected to the USB. And, knowing that , I have worked around it. But, here is my problem. very random behavior occurs in that few channels dont power up and I disconnect the DAQ and connect it back; they do. This random behavior is affecting my system. Should I trust the internal pull up or should I myself pull the voltage up to 5V using an external 4.7k resistor?
    Thanks!
    V
    I may not be perfect, but I'm all I got!

    Hi VeeJay,
    I just looked through the USB-6008 user manual and specifications (found here) on page 23 it states:
    At system startup and reset, the hardware sets all DIO lines to
    high-impedance inputs. The DAQ device does not drive the signal high
    or low. Each line has a weak pull-up resistor connected to it. 
    This means that the default power up start would have each of the digital lines set for input and pulled up to 5V internally.  You shouldn't need an external pull up, though you can see on page 22 you can definitely add one.
    My question is what ports are not at 5V when you plug the 6008 in the first time? Also, is it possible that some of the lines you have connected to the digital ports are driving the lines low?  Do you notice this behavior when you don't have anything connected to the 6008?
    Eric S.
    AE Specialist | Global Support
    National Instruments

  • Will USB-6008 DAQ be able to power and record voltage for UMS T5 tensiometer at the same time?

    I would like to use my NI USB-6008 to provide power to my UMS T5 tensiometer  (http://www.ums-muc.de/en/products/tensiometer/t5.html) as well as take readings from it, but I don't know if this is possible to do properly. The supply voltage for the instrument can be as low as 5V, which I can easily get from the dedicated +5V channel. I am able to power the instrument and connect it to an analog input on the 6008 and measure a voltage in differential mode. However, while reading the support literature for the instrument, I find the following:
    "Potential data acquisition pitfalls: Because the pressure transducer is configured in a Wheatstone full bridge, the input voltage and signal mV output cannot be connected to the same reference (ground). Hence, the signal mV output can only be measured using a differential voltage measurement. Therefore, do not attempt to make a single-ended measurement of the pressure transducer mV output."  (http://www.decagon.com/assets/Uploads/MeasuringUMSTensiometerswithnon-UMSControlandDataAcquisitionSystems.pdf)
    My understanding is that the 6008 can take a differential measurement if I attach the signal "+" and signal "-" to the positive and negative analog input terminals. However, it seems that all of the Ground ports on the 6008 are grounded to the same reference, which would make my voltage measurement invalid according to the paragraph above. So my real questions is: if I attempt to record the voltage using one of the analog inputs on the 6008 in this way, is the measurement valid? Or do I need to find a separate power supply with a different reference ground to ensure that the measurement is accurate?

    The specification sheet for that device is very poor. The manual is not much better. Companies which want to sell scientific equipment should publish decent data sheets or get out of business.
    In section 3.4.3 General requirements the device is described as a "non-amplified bridge circuit."  This information along with the bridge impedance should be in the specifications because it is essential to applying the device under any circumstances other than the nominal behavior at 10.6 V.
    The answer to your question is this:
    You can use it with the USB-6008.  The 5 V power supply will result in output voltages slightly less than half (5/10.6) the voltages specified under nominal conditions. You can use the differential input mode on the USB-6008.  The absolute input voltages will be about 2.5 V with the 5 V supply. That voltage is within the working range of the device. The differences will probably be less than 100 mV. The resolution of the USB-6008 on the +/-1 V range is about 0.5 mV so your pressure resolution will be around 1 % of full scale. The input impedance and termination voltage of the USB-6008 will introduce some errors.  These may be on the order of 5-10%. I cannot predict much better without the missing bridge impedance specification.  Those errors should be systematic and relatively constant. A calibration of the whole system - sensor and DAQ device together should allow you to compensate for much of that error.
    Lynn

  • How to connect lvdt and loadcell to usb 6008

    please help me iam dont know  how to choose a daq card. searched a lt but iam lost.
    i want to measure force and displacement simultaneously of a suspension test rig and i wanted to use ni usb6008 because of my project budget.
    can i use this daq card to measure these parameters ??
    please reply.. thanks in advance.
    Solved!
    Go to Solution.

    Hi touheed,
    To be able to determine whether or not using a NI USB-6008 would be suitable for your application it would be useful to get a little more information about the measurements you want to take. If possible would you be able to provide the voltage range you intend to measure with your instruments, and the sampling rate you require? 
    Also I noticed in the subject line that you're going to be using an LVDT, will you also be generating the voltage for this with the 6008, or will this be done seperately?
    To give you some context, the NI USB-6008 does not take truly simultaneous readings at each instant, but will rapdily alternate between channels, giving effectively simultaneous samples. As this device has a sampling rate of 10 Ks/s, and you will be using 2 channels, the effective sampling rate for each input would be 5 Ks/s.
    Matt H
    Applications Engineer
    National Instruments UK

  • Has anyone any experience with a USB-6008 and reading a thermistor value

    Labview 8.0 connected to a USB-6008
    I am using 'BC Components' NTC Thermistor. I used the express VI to create a Vex input and entered the A,B,& C values from the datasheet. The thermistor is the 10K version and I placed a 10K resistor in series with it. I wired it as is shown in the connection diagram, and applied 2.5 volts to it.
    I get completly the wrong temperature readings out of it! I called the NI help line in the UK and the engineer confirmed that I had done everything correctly but couldn't understand why it didn't work.
    Any thoughts?
    Steve Lawson

    I had a similar problem, had it working at one point then screwed it up.
    try this:
    Attachments:
    Temp Pressure EXpress.vi ‏92 KB

  • VI Logger and NI USB-6008

    I haven't got much experíence in LabView and neither has anybody here in our team. We've got an NI USB6008 which is working perfectly with the basic VI logger application (version 2.0.0 lite) under windowsXP. All channels - except ai0 diff and single ended - work perfectly. As this basic application is too limited, now we're trying to develop something more advanced but when I start a new task at the VI logger and get the Assistent to configure the devices, it doesn't find the physical channels, although everything is properly connected and that basic application does find it.
    As this is the first step, I'm stuck!
    Thanks in advance...

    Thank you Kenny for your help...
    I haven't got yet a  VI that I culd send to u for debbuging. I've gone through all the "getting started" (NI USB 6008, LabView, VI's, VI logger, etc) kind of stuff and, as far as I understood, in order to start to develop an application (a VI, or a VI logger) you have, first, to specify the physical channels that are going to be used by the software. That's what the MAX Assistent asks for, and as it cannot find it, I can't progress into acctualy designing a VI.
    Maybe the software doesn't support the device (NI USB 6008), although the documentation available isn't very clear and even conflicting on the subject. On top of that,  the "sample applications" shipped with the software, do find it and work perfectly.
    I'd appreciate if you could help me out of this "stale mate"!
    Thank you very much again...
    Roberto 

  • Gamry potentiost​at and USB 6008 communicat​ion

    I dont really ever do any labview programming from scratch so my understanding of it is very basic. However I need to do the following and I was wondering what would be the best way to go about it.
    1. Run Gamry potentiostat (ref600) which at the end will send a digital signal out.
    2. USB-6008 used to read the digital signal
    3. Put a delay of around 10seconds.
    4. Run "motor control" VI.
    5. Put a delay of around 10seconds.
    6. Send a digital signal out.
    7. Gamry reads the digital signal and goes back to step 1.
    run this N number of times.

    rudresh wrote:
    Hi Wes,
    Thanks for the reply. It looks like I need something very similar to Simple state machine. However, I am using labview8.6 and was wondering if a similar example is available for the older version.
    Thanks again,
    Rudy
    Downgraded to LV8.6 for you.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    State Machine Example Project.zip ‏23 KB

  • Controling heating/cooling element with labview and usb 6008 DAQ card

    Greetings All
    I'm looking for a heating/cooling type of element that I can control with labview and my usb-6008 card. Heating/Cooling will just be for clean water and the temperture range will be from 0 C to 100 degree C.
    Thanks
    The heating and cooling elements can be seperate products. Any recommendations

    A simple kettle element will of course be sufficient for upto 100°C
    To get the temperature down you need a cooling system, what springs readily to mind of course is a refrigerator.
    Just a note of warning, water and electricity are dangerous bed fellows.
    On that note perhaps one of those vortex air units would be safer - they blow hot in one direction and cold in the other, nominally to 100°C
    see: -
    http://www.airtxinternational.com/how_vortex_tubes_work.php

  • Are there any drivers for Pocket PC and NI USB-6008 available?

    Hello everybody,
    I alraedy read that there are no drivers for Pocket PC available to communicate with NI USB-6008 or other USB devices using LabView PDA Module. The reason is that most Pocket PCs have no USB host functionality. It's a pity, because I'm using a e800 Toshiba PDA that provides USB host functionality.
    Furthermore I'm already using several NI USB-6008/6009 within applications developed with LabWindows and I would rather reuse these devices than byuing new ones like NI CF-6004. Perhaps NI offers a driver for Pocket PC - that would be nice.
    Does anybody share my opinion or have some suitable solutions?
    Thanks in advance.
    Sincerely
    Mario

    Hello Mario,
    we are aware that the usage of the USB port on PDA devices is a feature that becomes more and more important. But at the moment we do not support it. Unfortunately we do not have an NI-VISA driver for PDA which is used for the USB devices on the PC side.
    regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • How to generate a waveform (with changeable update rate and sample) with USB 6008

    Apologize about my awful English.
    In Tradition DAQ I can set different update rate with "AO Start" vi.
    Transform into USB-6008 device things turn into quite different.
    I don't know which vi I can setup update rate.
    Is there any example for this.
    THX a lot!

    Hello D.
    To use the USB-6008, you need to download DAQmx Base driver from the web at http://digital.ni.com/softlib.nsf/websearch/CE3686A8D5B0CEDC86256FFD007C9C4A?opendocument&node=132070_US .
    The driver will install with example programs that you can access by going to Start->Pograms->National Instruments->DAQmxBase->Examples. You new to have LabVIEW 7.x to use this driver.
    SergesL

  • Rpm sensor diagram using usb-6008

    Hi All,
    Attached is my block diagram for the RPM sensor that I wan to create. What I'm trying to do is to get the analog input and do a pulse calculation within 60 seconds, and my RPM would be how many pulse * 60. I don't know whether I'm doing it right or not, but I have a feeling that I need to use the digital input rather than analog input. Any comment?
    Thanks
    Attachments:
    rpm sensor design.vi ‏70 KB

    Hello Dadsf,
    Welcome to the NI Discussion Forums!  From your post, you would like to be able to count the number of pulses from your sensor that occur during a period of time and convert this to RPM.  Let me know if I have interpreted this incorrectly.  Your USB-6008 manual indicates that the device has a built in counter that can be used to count falling edge signals.  If your sensor outputs digital signal this would be a good way to go.  You can take the number of pulses that occur over a certain period of time (perhaps between two loop iterations) to find the number of pulses per second.  The longer the period of time you acquire pulses for, the more accurate your average RPM will be.  This will be at an expense of how often the user is updated with a new RPM value.  Check out the links in my signature for some great information on how to get started with DAQmx and what all of the different terms in the DAQ Assistant mean. 
    I noticed that your DAQ Assistant was set to 1 sample on demand.  What this does is causes the USB-6008 to read a single sample from the analog input during each iteration of the loop.  I am not sure if that is the behavior you are looking for.  Another option would be to setup the task as continuous hardware timed analog input (change the Acquisition mode to Continuous Samples with you desired sample rate and the desired number of samples you would like to read at a time).  This will give you a waveform of data that should show the pulses over a period of time.  You could then count the number of pulses that occur over the length of the waveform.  This would be the equivalent of the number of pulses per second that could be converted to RPM.  This method requires a little more processing than the first method, but could give you a little better accuracy.  Post back if you need more info. 
    Regards,
    Browning G
    FlexRIO R&D

  • Reading an encoder with a USB 6008

    Hello DAQmx users,
    I have a USB 6008 and it doesn't work the way I want it to.  I have done no troubleshooting or research and I refuse to give you any more information.  You have 30 seconds to answer my question.   i kid, i kid...
    So here is my real question:
    I have a USB 6008 that we use to do simple analog output.  I'm looking for a way to use the USB 6008 to also get encoder information.  I know that the USB 6008 cannot read an encoder directly, but I was wondering if anyone knew of or had any ideas of external hardware that could be used inbetween the 6008 and the encoder.  I think it would be something like 1) the encoder generates pulses 2) external hardware takes encoder pulses, translates them into a digital value representing the angle and outputs this digital value 3) use the digital lines on the 6008 to read in the digital angle value from the external hardware 4) I don't lose my job.
    I realize that this isn't an easy, optimal, or preferred solution, but I want to look into it before being forced to replace the USB 6008 with another piece of hardware.
    Eric
    DE For Life!

    Oops..  Just realized that this got posted in the Motion Control Forums... Meant for it to go in the MIO forums.  Sorry!
    New thread is here, feel free to respond!
    Message Edited by e-Cash-Money on 03-17-2006 04:30 PM
    Eric
    DE For Life!

Maybe you are looking for

  • How can I print with ColorSync Utility

    When I receive an attachment via entourage,it automatically opens in ColorSync utility. I want to print so I go to the 'File' menu and I cannot print because the print option is "greyed out". Can anyone tell me how I can resolve this so that I can pr

  • ALE Data Transfer Issue--Needs Immediate Attention

    Hello Gurus I am hoping somebody can guide me here-- We are on E-Rec 603 with seperated standlone e-rec system. we have set up ALE Data transfer for object type P from ECC QA to E-Rec QA system but unfortunately the I-Doc is always gettign posted wit

  • Real time issue and need a solution

    Hi Bi experts, Currently one standard cube is already running in production. Now i need to make a multiprovider with this standard cube and another one new DSO. But i wish to add a new infoobject to the standard cube, without affecting the production

  • Trouble with consolidating library

    I recently got a new 500 gb hard drive and I wanted to consolidate my iTunes library from my three other hard drives onto that one. My library is currently 51 gb and consists of about 9400 songs and about 6 gb of video. The hard drive is formatted as

  • The Connect from Intel Pro/1000 T to 1000base-t Port on Catalyst 4000 (WS-X4412-2GB-T= module) Not Working Properly

    The connect from Intel Pro/1000 T to 1000base-t port on Catalyst 4000 (WS-X4412-2GB-T= module) is not working properly. The Intel Pro/1000 T NIC connects to a 10/100 OK. Auto-negotiation is set at both ends. We can successfully ping across the link.