Reading AI on a usb-6008

Hello
I'm making a thread in my program which is listening on the AI ports on my usb-6008.
The point of this thread is that if the voltage on the port rises or falls it will trigger an event in the mainThread.
Now for the question:
When I initialize the thread I make 4 tasks, and apoint the DAQmxBaseCreateAOVoltageChan on them.
Now if I start 1 task, read AI and stop the task, it works.
But I don't want to start and stop the tasks all the time, it take to much time. I want to start all 4 tasks at the beginning and keep them open while I'm listening.
Then, when I try to call the DAQmxBaseWriteAnalogF64, the dll locks up.
So is there a way to fix this, or is there some way to read all 4 ports at once?
regards Martin Groh

Hey!
Thanks, but the program is design so that ONLY the "NIDAQusb-6008" thread uses the dll. Now I no thread expert so i won't say that calling an dll procedure from a thread that isn't the main thread won't be a bad thing, but I think I works fine as long that I stick to that thread.(execution of code in main thread is synchronized properly).
The code works just the same way when I ran whit just one thread.(the mainThread).
But to clarify my question.
Is it possible to start another task, whiteout stopping the first one first (same type of tasks)?
Is there a way to ALL 4 AI channels on the usb-6008 in one dll procedure call(using just one task)?
regards  Martin Groh

Similar Messages

  • USB 6008 doubt on channel inputs

    Hi,
            I would like to control a switch on AC to AC converter circuit i.e.. I want to blank signal in circuit until user interested time. I am just worried about DAQ at channels that can I directly connect 240v AC to DAQ or in case if not possible, I would like convert this 240V to 20V because, I read the datasheet of USB 6008 says that allow only +or- 1 to +or- 20v. I strucked here and could not conclude my self. Is there any best converters out there in market for this application?

    Definitely do not connect 240 VAC to your DAQ card!!!!!!
    You could look at a relay that has contacts rated for your current and voltage of interest.  You could also look at a solid state relay that can take a low voltage digital signal to turn on and off the high voltage AC signal.  But you will have to see the requirements for the input coil of the relay, or the input of the solid state relay and see whether the USB-6008 can source that voltage and current.  If not, you may need to look at another circuit such as a transistor driver to turn on and off the relay.

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

  • Amplifying Type K Thermocouple for high temp reading with USB 6008

    I am attempting to amplify a type K thermocouple so that the signal can be read somewhat accurately by a USB-6008. I have looked at the AD595 chip but it states a maximum useful temperature of 100 C and I am going to need to be reading up to 700 C. 
    Is there another amplifier chip that would work up to this temperature, or should I resign myself to using the signal unamplified and getting a very inaccurate (~30 C/division) reading for temperature?
    Solved!
    Go to Solution.

    A heads up- some people have ran into issues using the chip with the USB-600x devices, various solutions. You may want to browse of these posts ahead of time:
    http://forums.ni.com/ni/search?board_id=170&submitted=true&q=AD595
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • 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

  • Error -10401 occurred at AI Group Config - in relation to USB-6008

    I'm attempting to run a simple vi that uses AI Aquire Waveforms.vi to input voltage data that I have coming in from the USB-6008 DAQ.  However, when I try running the program, I receive the error:
    Error -10401 occurred at AI Group Config
    Possible reason(s):
    NI-DAQ LV:  The specified device is not a National Instruments product, the driver does not support the device (for example, the driver was released before the device was supported), or the device has not been configured using the Measurement & Automation Explorer.
    And I'm not sure how to fix it.  In MAX, the device seems to be working properly and everyhting seems to work fine in the test panel, so I'm slightly at a loss.  I'm running Labview 7.1, and installed NI-DAQmx 7.5 which came with the USB-6008.

    Never mind.  I'm new to Labview, and didn't realize that I could not use the traditonal Data Aquisition components with the USB-5008 (I didn't even realize that NI-Daqmx was different).

  • 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

  • NI-DAQmx 8.3.0f0 installed but Found New Hardware Wizard shows up when plugging in a USB-6008

    I have NI-DAQmx Device Driver 8.3.0f0 installed with LabVIEW 8.2 but when I plug in a NI USB-6008 I see the "Found New Hardware Wizard" in Windows XP.  Since the DAQmx driver is installed shouldn't Windows recognize the device immediately?
    I cancel the driver and I get the taskbar message "A problem occurred during hardware installation.  Your device may not work properly."
    The USB-6008 does not appear under Devices and Interfaces in MAX. 
    Help would be appreciated.
    Thanks,
    Dave

    Ahh, I thought Windows performed an automatic search after cancel is clicked. 
    I clicked next and allowed Windows to search and it says:
    "Cannot Start this Hardware"
    There was a problem installing this hardware: USB-6008
    The device cannot start.  (Code 10)
    I tried uninstalling and reinstalling the device but the results were the same.
    Any ideas?

  • NI USB 6008: expected constant expression

    I am using NI USB 6008 device. Looking at NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk\
    So I want to modify the line that has
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,1000,10.0,DAQmx_Val_GroupByChannel,data,1000,&read,NULL));
    as
        DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,numsamps,TimeouT,DAQmx_Val_GroupByChannel,data,numsamps,&read,NULL));
    where the corresponding variables have been defined before like:
      Int_t xx=2;
      const Int_t numsamps = const_cast<Int_t&>(xx);
        int32       error=0;
        TaskHandle  taskHandle=0;
        int32       read;
        float64     data[numsamps];
        float64 RatE = float64(raTE);
        float64 TimeouT = float64(numsamps)/RatE;
    But when I try to compile I get this error message:
    $ nmake -f makefile.mak
    Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
    Copyright (C) Microsoft Corporation.  All rights reserved.
            cl  -D_MT -D_DLL -MDd -EHsc  -nologo -G5 -GR -MD -DWIN32  -DVISUAL_CPLUS
    PLUS -D_WINDOWS -IC:\ROOT/include -O2 -c SNatInDAQ.cpp
    cl : Command line warning D9025 : overriding '/MDd' with '/MD'
    cl : Command line warning D9002 : ignoring unknown option '-G5'
    SNatInDAQ.cpp
    SNatInDAQ.cpp(261) : error C2057: expected constant expression
    SNatInDAQ.cpp(261) : error C2466: cannot allocate an array of constant size 0
    SNatInDAQ.cpp(261) : error C2133: 'data' : unknown size
    NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
    l.EXE"' : return code '0x2'
    Stop.
    What does it mean 'expected constant expression'? How can I get around this?
    What I want to do is pass the size of that data array from another function.

    Hi novaiscool,
    I think the issue is that you are declaring numsamps as a constant and the DAQmxReadAnalogF64 function wnats a non constant parameter.  Have you tried calling the function with a regular int or a value?  Give that a try and see if you get the same error. 
    You will also need to initialize numsamps to something since you are allocating an array using that variable. 
    Give those things a try and let me know how it works.
    Thank You,
    Nick F.
    Applications Engineer

  • Does the voltage to temperature conversation require in usb 6008 using daqmx 8.5??

    Another question need u all guy help.I currently using K-type thermocoupler for my project using usb 6008.Does the voltage to temperature conversation require in usb 6008 using daqmx 8.5? what is DAQ TEDS function use ? is it help us to convert?

    You will need to factor the voltage per degrees C to get to reading in degrees, this is 10mv per degree V for the device mentioned in the post you previously made
    http://forums.ni.com/ni/board/message?board.id=170&message.id=246200#M246200
    TEDS - Transducer Electronic Data Sheet
    A video about TEDS
    http://digital.ni.com/demo.nsf/websearch/8e55de8fe6b5702686256e7c007a47b4?opendocument

  • 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 

  • Usb 6008 daq spi lcd server client

    Hi.
    I'm new to the labview.ich have a project and comes to data acquisition and remote monitoring
    detaille:
    2 computer are labview installed on both and connected to wifi / internet.
    the server computer connected with ni usb 6008 and it pt100 temperature sensor
    it should also include the measurement data display on an LCD
    it should be the client computer also read out the measured values
    has anyone an idea how could you start?., I will be very grateful

    This sounds like a pretty big task for someone new to LabVIEW.
    First get the DAQ working on the server PC.  There are tons of examples that ship with LabVIEW for taking DAQ, go to Help >> Find Examples.
    Getting the information to your other PC can be done many different ways, but maybe the easiest is to just use a Web Server to control the front panel.
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/viewing_fp_remote/
    Also you could remote into this PC using remote contol software and remote desktop.
    As for displaying data on an LCD.  A relativly simple solution is to use an Arduino UNO, the LIFA toolkit and an LCD connected to it.  It is a little bit if a round about solution but the LIFA toolkit comes with code to output to LCDs connected and it is relatively easy to use.
    EDIT:  LIFA https://decibel.ni.com/content/groups/labview-interface-for-arduino
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Acer pda n30 ni usb-6008

    Hi! I want to connect Pocket PC Acer PDA n30 with NI USB-6008 card and with accelerometer ADXL311. Did anyone do somything symilar to this? Could anyone send me a link to a paper that has something to do with my question? I am looking for someone who has already measured movements of some parts of a human body with the hardware I mantioned. I need links to some papers. I'll be greatfull if anyone can help me.

    PDAberlin:
    I hope all is well. With the LabVIEW PDA Module, you can most definitely develop applications that run on your Pocket PC. There are some examples that you can use to get an idea on how to develop data acquisition applications for your Pocket PC device. They are located at:
    C:\Program Files\National Instruments\"LabVIEW version"\examples\daqmxbase
    C:\Program Files\National Instruments\NI-DAQmx Base\Examples
    I hope this helps and feel free to post again if you need additional information.
    Best Regards,
    Rudi N.

  • PWM control through USB 6008/09

    Hello all
    I have already read a thread regarding the topic but i am not satisfied with the replies.
    I have discovered few programs that can run PWM in LabView, but they all are for DAQmx. So, will those programs run through USB 6008? and i also read that the output will be a sort of slow response output?
    I am aiming to power a micro-pump rated at 12VDC. So, i want to run the program in LabView, use the USB 6008 to connect to a the DC motor. I know that some amplification will be required because the output of the USB 6008 is rated as 0-5V.
    But, my question is can i successfully control the speed of the DC micro-pump ( motor) using the USB 6008??
    Regards
    Nikhil
    Many more kudos to give  
    Many more Kudos to give

    Thanks for the reply.
    If you just need to output voltages(not PWM) then you can use the Analog outputs of the 6008,
    Analog Output
    Analog outputs........................................2
    Output resolution ....................................12 bits
    Maximum update rate .............................150 Hz, software-timed
    Output range ...........................................0 to +5 V
    Output impedance...................................50 Ω
    Output current drive................................5 mA
    Power-on state ........................................0 V
    Slew rate .................................................1 V/μs
    Short circuit current ................................50 mA
    Absolute accuracy (no load) ...................7 mV typical,
    36.4 mV maximum at full scale
    So yes you could output a voltage between 0 and 5 Volts. You could only change the voltage level every 10ms or so. 
    In answer to what your device (pump) requires I don't know. 
    "So, this got me thinking, do i really need PWM control for the micro-pump (DC motor)?"
    Have you got a specification datasheet (website) of the pump? - I dont mind taking a look. 
    Have you looked in the NI Example Finder to VIs that generate PWM and AnalogOutput (AO?). In the example finder (help>>Find Example) it gives you information on what devices can use the examples - simply look for the ones which say usb6008. 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • How can I make LabView 6.1to detect DAQ NI-USB 6008

    I have a LabView version 6.1, recently I bought a new DAQ model NI-USB 6008, I could not use it with my Labview version. Please, how can I adapt my DAQ for version 6.1 or update my LabView to detect my DAQ? Please advise me to a free applicable solutions. Thanks very much

    The USB 6008 requires DAQmx which requires LabVIEW 7.0 or greater. The upgrade to 7.x (or the just released 8.0) is not free. The only other solution I've heard of is to use the Call Library Function Node to make your own calls to the DAQmx dll. This would not be for the faint of heart or anyone wishing to come up with a quick solution.

Maybe you are looking for