Synchronize 2 USB-DAQ devices, Analog IN, Frequency IN, Digitally triggered

Hello,
I want to perform the following measurement on two USB-6211 devices, LV 2012:
I need to
1) read (cont.) all 16 analog input channels of Dev1
2)  read( cont.) 2 analog input channels of Dev2
3)  perform a frequency measurement with Dev2
4) synchronize 1-3
5) start the Measurements with a trigger (light barrier)
1) and 2) are not the problem. Also synchronizing them is fine. But I am not sure if my attempt to synchronize all this with the freq measurement, as this is done over a certain period of time. So, as I understand, when I select the method "high frequency with 2 counters" I can specify the measuring time. So I think I need to tell labview somehow which point of time of this span shall be synchronized with the analog input.
I attached a first try and am thankful for any hints.
Thanks, Jack
Attachments:
test.vi ‏42 KB

The basic problem here is conceptual. What does it mean to "synchronize" a time domain measurement with a frequency domain measurement? You can certainly can (and should) identify the set of time domain measurements that went into the calculation of the frequency measurement, but that's about the thinnest you will be able to slice this bologna.
Having said that, I can't look at your code right now but I assume you are reading data in blocks from the DAQ. You could perform the measurement for each block you read. That would naturally associate the measurement with the data it was based on.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Which usb DAQ device to buy ?

    I am a total Noob when it comes to DAQ so please bear with me and help me with suggestiions on which NI USB DAQ to buy. I am biochemist and I have an old HPLC machine (basically a chemical purifying/seperation machine) I need to control by writing a labview program. I have labview 2013 and have some basic familiarity with it, and have used very easy VIs like blinking LEDs using arduino interface.
    My current project needs me to:
    1) control the flow rates on two pumps using their remote controller and vary their flow rates by varying voltages (0-10V) at not higher than 3 mA input current. basically, I need to be able to vary voltages on two analog pins. I am attaching the manual for the pump for more info. The pinout on the remote controller is on page 16/17 of the manual.
    2) I need to read analog voltage outputs from these two pumps (which measures the hydrostatic pressure) and save it to something like in .csv file.
    3) lastly, I need to read a analog output from a UV detector which will be in mV range and plot it and/or save that to .csv file .
    There are a bunch of NI DAQ USB devices which seems like they can do this job, my problem is that dont know enough to reliably make a judgement on which one to buy for this project. My budget is limited and I would definately like to do it with as cheap a DAQ as possible since we have multiple instruments like this, and we are planning to get rid of ancient 1990s computers running the original software and replace it with a USB DAQ device coupled with a labview program on a modern PC. The HPLC machines are far apart hence we run them on individual PCs instead of running a bunch on one computer through a DAQ device.
    I know its a whole bunch of questions, but I'll be glad for any guidance on this. also, to do the things I just described, how difficult do you guys think the VI would be if I use a NI DAQ and hopefully dont have any driver/communication  issues.
    Attachments:
    shimadzu-lc-6a-hplc-pump-service-manual-eng.pdf ‏985 KB

    I highly recommend you look up your local NI representative and have a nice sit down with them.  They can go over your requirements and give you really good advice on which device to get.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Why is my USB DAQ device not detected by Windows?

    Hello,
    I had my USB-6229 connected to my PC (Windows 7 64bit) this morning and everything was fine: Windows detected the device, the device showed up on on NI MAX, and testing through NI MAX was successful. I then installed the NI DAQmx 9.8 driver to replace the NI DAQmx 9.6 driver that I was using (the DAQ Assistant icon in my functions menu in LabVIEW 2013 was not present, and this upgrade fixed that issue). Unfortunately, Windows now no longer recognizes the same DAQ device that worked earlier this morning.
    Here's what I've tried so far:
    Uninstalling the 9.8 driver and re-installing the 9.6
    Tested another USB DAQ device; Windows could not detect it either
    None of the DAQ devices register on WIndows's device manager (usb ports not broken, as the flash drives I inserted showed up on device manager)
    As expected, none of the devices show up on NI MAX
    Does anyone have any suggestions on what may have happened when I upgraded from the 9.6 driver to the 9.8?

    Thanks for your reply, Philip. Yes, I did reboot my computer after installing the driver.
    I contacted NI support, and we were unable to reach a solution, so, as a last effort, re-installed the driver for the third time, which finally worked. I'm not sure what the problem was, but here are some extra steps I took before re-installing the driver that may benefit those who encounter a similar problem:
    1. As Philip mentioned, start the NI Device Loader if it has not been started or stop/start it if it has. The startup status ought to be set to "automatic." You can find the NI Device Loader by starting Task Manager, selecting the "Services" tab, then selecting the "Services" button. Scroll down the list until you find it.
    2. Open up Device Manager and search for your device (mine was labeled as "unidentifiable"). Right click and select "Properties." Select the "Driver" tab. You may need to manually select the driver folder, which should be located in C:\Windows\system32\DRIVERS.
    Hope that helps.

  • System crash when DAQmx call to USB DAQ device is powered off

    My PC crashes when I attempt communication with a NI DAQPad 6015 USB device which is in the powered off state. I am attempting to add error handling to my LabView application to cover the above condition, however, instead of receiving a error message, my PC crashes. When the device is powered on, my LabView routine works properly. I created the vi using the DAQmx DAQ assistant for a simple analog read from the device. I want to add the potential error handling condition to cover the case in which a user may attempt to run the software without turning on the device. When I attempted to run my vi twice with the device powered off, my PC crashed both times. The 2nd time, during reboot, I discovered that MAX was corrupted and had to repair using the installation CD.
    I am using LabView 7.1 with DAQ 7.4 on Windows 2000.
    Is there a known fix or workaround to this issue? Or is there a way to detect the presence of the device first before trying a DAQ read?
    Thanks,
    Joel

    Thanks very much for both your responses. I tried it again, but as you suggested, I used one of the example vi's. I chose the following:
    Acq&GraphVoltage-IntClk.vi found within: Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage
    I first tested the example vi with my DAQPad-6015 powered on. The vi successfully ran without error. I then turned the DAQPAd power off and ran the vi again. My system immediately crashed leaving me with a blank screen (with streaky lines) and forcing me to reboot. After reboot, I discovered that I can no longer open any of the DAQmx examples that are compatible with the DAQPad-6015. All are corrupted. Curiously, MAX was not corrupted again. I will have to re-install all examples and possibly LabView itself.
    Based on your feedback, I am guessing you will tell me that repeating the above on your system will simply produce an error message, as expected. It appears that I may have a fundamental incompatibility between my specific system hardware and DAQmx/LabView.
    Regards,
    Joel

  • LabVIEW exe. with 2 USB Daq devices

    Hello All,
    I am trying to build a LabVIEW exe. with two USB 6210 data aquistion modules plugged into a USB hub installed inside a 19" rack. I used the DAQ Assistant to generate the LabVIEW code for the aquisition and it works fine. However, when I disconnect the USB cable from the development machine and reconnect later, my I/O are mapped to the wrong modules. Is there a way to map my channel names to the actual module, maybe in MAX, and just include the Max configuration file in my exe? Can I use the DAQ assistant,  or do I configure the physical channel names and create my own tasks in MAX and not use the DAQ Assistant?
    Any help would be appreciated.
    Thanks

    Hi Botman,
    Unfortunately you are in a unique situation in that you have 2 of the same type device that are removed from the system and reconnected to the system at the same time.  However, it is probably not guaranteed that one device will be detected before another consistently.  Given your situation I would recommend that you set up your application to programmatically discover the devices in your system.  There is an example program here that demonstrates how to do this.  In your case I think detecting by serial number would be ideal.  All you would need to do is include the LLB file in your project to ensure that all of the necessary VIs are included.
    Keep in mind that this will require some modification of your code.  You will need to use the lower-level DAQmx functions rather than the DAQ Assistant (which basically serves as a wrapper around the lower-level functions).  In the end, adding the VI from the example program above and using lower-level DAQmx functions will make your code more robust because distributing the executable to another system (or even using it on the development system) will not require the user to interface with MAX at all.  Let me know if you have any other questions.
    Regards,
    Andrew W
    National Instruments

  • Programmatically identify and select DAQ device

    Hi all,
    I'm using Labview 8.0 to control a system which contains a USB DAQ device (9215A BNC for info). I can control everthing fine and use the DAQ card, but the software I'm writing will ultimately be supplied (as an executable or the like) with the system for use on end user computers. Its possible that some of the end users may already have NI DAQ cards installed in their systems. How can I make sure my software addresses only the DAQ card inside my system? Is there a simple way of programmatically listing all of the devices attached to the computer and then identifying the one that I want?
    If I name the device in NI MAX, for example, if I then plug it into a different computer, does it maintain that name? Or is that a local thing only?
    Any help would be greatly appreciated.
    Regards
    Paul

    Hi,
    thanks for the second reply. What I basically wanted was some way of finding the "device name" of the DAQ device in my system when its connected to a computer with multiple other DAQ devices attached. Ultimately, I did something similar to what you sent in that second example (see attached) which scans through the serial numbers of the DAQ devices attached to the computer and compares them with the serial number (entered manually) of my device. It then returns the device name that matches, so I can pass that to whatever future daq commands need it!
    Thanks again for the help
    Regards
    Paul
    Attachments:
    DAQ_ID_example.vi ‏20 KB

  • Using USB 6341 device for frequency generation but level is droped when conect

    i am using USB-6341 Daq Device for frequency generation. The desired frequency is generated correctly but when i connect to other device the voltage level i means the Peak to Peak voltage of the frequency dropped to 0.6, 1 Volt and also the frequency fluctuated. As I disconnect it from the load or the device the frequency becomes constant and peak to peak voltage becomes 5.
    Please some help me to resolve my problem.
    Thanks
    Best Regards
    Naseeb
    Solved!
    Go to Solution.

    Hi Nasib,
    I just wanted to clarify a few more things. Can you answer the following questions?
    What frequency are you trying to generate?
    When there is no load connected do you see the desired frequency?
    When the load is connected, does the frequency always change to the same value or does it fluctuate within a certain range? If it fluctuates, what is the range?
    Also, what microcontroller are you using?
    Can you provide any images?
    Regards,
    Travis Ann
    Applications Engineer
    National Instruments
    Applications Engineer
    National Instruments

  • Can Multiple Applications Access same DAQ ni usB-6289 device?

    I have to Run Multiple Instances of a LabVIEW Executable Simultaneously. Is it possible to access the same DAQ ni usB-6289 device for all of the LabVIEW instance?
    Thanks.

    dianageorge a écrit :
    I have to Run Multiple Instances of a LabVIEW Executable Simultaneously. Is it possible to access the same DAQ ni usB-6289 device for all of the LabVIEW instance?
    Thanks.
    Never tried it but I doubt you will be able to acces the DAQ simultaneously, To verify it try accesing the DAQ in LabVIEW and in MAX at the same time.
    Ben64

  • Analog measurement WITHOUT DAQ device

    Hello everyone,
    I have an analog voltage which is varying between -10volts to +10volts. Is it possible to measure this analog voltage using LabVIEW software without DAQ ? If not kindly suggest the options available for DAQ device.
    In the traditional interfacing techniques which uses parallel port and/or serial port. We can acquire signal using C language and inport and outport commands.And no DAQ is required.... I was hoping if LabVIEW can be used without a DAQ device.
    I know that RS232 and parallel port can be used but how will the space and mark levels be used for acquiring an analog signals.

    Hello Miaa,from your description I can think about two things,that remind me the days when there where no sound cards
    at all computers,but people found the ways to produce sound from PC:
        1)   
                 Output:  you can get from your LPT 8 bit analog output if you connect all 8 data pins to one.
                 Input:  it probably possible to get 8 bit input,but you need to use some resistors,and have some knoledge in electronics,
                             in order not to burn your LPT with 10 volt input.
               Again,it's possible but not trivial way.
       2)    In general (very): one can get "analog output" even from 1 bit connection,
               in order to do it, the connection speed should be fast enought,and the illusion of "anlog output" reached by changing
              the ON/OFF state of the connection,in right way (playing with delays between ON/OFF,according to signal).
              About "anlog input" using serial port I can say nothing.
    In any case,this is very intersting but time cossuming issue,but if you know how to do it,the LabView part is not a problem,
    you have there access to parallel and serial ports.
    LV 8.2 at Windows & Linux

  • Separate Analog Input/Output Tasks for Multiple USB-Daq 6008

    Hello, In my application I'm using two separate USB-6008 DAQ devices, they are to be used simultaneously,
    i.e both tasks will start in a same loop, there are both writing to some channels and sampling some data from
    some channels, the problem is, when I'm trying to define a task, via Daqmx base Configuration Utility, I
    sucseed at defining the task, for the first Device, but unable to define nearly same task but for the
    different Device, since the OK button is grayed out (Disable).
    I'm using Labview 7.1 and a NI-Daqmx base ver. 2.0
    Following attachment shows what I'm talking about.
    Attachments:
    daqmxbase.JPG ‏59 KB

    Actually it is not the easiest to use the full version of daqmx is easier, It is also very easy to set this up in MAX (measurement and automation explorer) What version of labview are you using. have you made sure that the device is recognised in MAX and that the device number is correct. i have a couple of 6008 and have run them alot without any trouble so it must be the way you have things setup. Could you post a section of the code that gives  you the error. also try running each device in max with the test panels for each one and see if it works there.
    Joe.
    "NOTHING IS EVER EASY"

  • How do I update a program written for a Legacy DAQ into one for a USB DAQ?

        I am trying to rewrite a program, replacing all of the AI Waveform Scan and AO Update Channel VIs in it with DAQmx VIs. This seems to be the only way for the USB DAQ to respond to the program and not get any errors. I was just hoping for some help in how to replace those VIs with updated DAQmx ones. Attached is the part of the program that I am working on. There is a slight error because of some changes I have made, but the gist of the program is still there.
    Thanks!!
    Attachments:
    DAQdriver.vi ‏52 KB

    What I would suggest is that in either your init state or outside the loop, create two separate tasks for the analog in and the analog out. This means using separate DAQmx Create Channel, DAQmx Timing, DAQmx Start Task, etc. Then, you would have the tasks in your shift registers and pass just the appropriate task to either a DAQmx Write or DAQmx Read. No need to pass channel or device. In the End state, you would add a DAQmx Clear Task for each.

  • How can I generate tones with usb 6008 using analog out?... tia sal2

    Greetings All
    I've been looking at the example Sim Phone.vi that comes with labview and would like to generate similar tones out of our usb 6008 device. I can get a very faint sound out of our usb 6008 using the example Gen Multi Volt Updates-SW Timed.vi Does anyone know the best way to alter Sim Phone.vi to have the sound come out of the Analog output of our usb 6008 device. ( I have a small speaker connected to the Analog out on our USB 6008)
    PS: we are using labview 7.1
    Does anyone know the Analog output frequency range of the usb-6008? Is this possible?
    TIA
    Attachments:
    Gen Mult Volt Updates-SW Timed.vi ‏78 KB

    Hi sal2,
    As stated earlier you could most certainly use the USB device to generate sound, but that would be at a max update rate of 150 Hz. While according to Nyquist theorem you could get frequency information for signals below 75 Hz, you may notice that the quality of the data in that spectrum to be very low due to having so few samples.
    While technically possible to produce you really should look for a device with a faster Analog Output update rate. I would look for a device that supports Analog Output at least 10x the maximum frequency that you want the user to hear. Some great, yet lower cost products, would be the M-Series line of products. They would give you the performance that is really needed in the type of application that you are talking about.
    If you still want to use the USB Device, then you would need to use code similar to that found in the example Gen Mult Volt Updates-SW Timed (Found here: C:\Program Files\National Instruments\LabVIEW 7.1\examples\daqmxbase\Dynamic\ao).
    Best of luck getting your system together,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How to set the sampling interval using DAQ device?

    Now I have a capacity sensor and a 24 bit DAQ device (http://www.mccdaq.com/usb-data-acquisition/USB-2404-10.aspx).
    The DAQ device has the maximum sampling rate of 50kS/s . My question is how to set the interval of data collection. For example, if I set the sampling rate to 2000, in continuous sampling mode, I use DAQmx read.vi in a while loop and set the 'number of samples per channel' to 100. I want to plot these data as a function of time by using a XY graph and also save these data. So I add a 'Mean' function to get the average of the 100 samples per each loop (than means, there are 20 data output per second). But when I set the 'number of samples per channel' much smaller (to get more data per second), there are some problems. It seems that the program cannot read so many data and get the average at a higher frequency. I don't know where the problem is. All in all, how to collect data more frequently?Maybe I didn't express my question clearly. I'll upload a simple program later if necessary. Thanks.
    Solved!
    Go to Solution.

    Another question is in continuous mode, NI DAQmx uses Samples per channel to determine the buffer size. But according to the website you specified, it says if the acquisition is continuous (sample mode on the DAQmx Timing.vi is set to Continuous Samples), NI-DAQmx will allocate a buffer according to the following table. And for sample rate between 100 - 10,000 S/s, the buffer size is 10 kS. So if I set the sample rate to be 5000 S/s, and set the Samples per channel to be 20000, then what exactly the buffer size is? 20 kS or 10 kS?
    Thanks.

  • Need to generate a TTL pulse of 3 ms using USB Daq 6361

    Hi all,
    I need to generate a TTL pulse of 3 ~ 5 ms to trigger my external device. I am using USB daq 6361 with BNC connectors. I tried to use this examples(attached) but was not succesfull , can any one help me out in this, I just want a TTL pulse out to trigger my device. I tried to modify the example to see the wave form out but all it shows is a straight line. I want to generate a TTL pulse as soon as my program starts.
    Am I using wrong example? should I use somethis else to generate the pulse. please let me know.
    Thanks,
    Attachments:
    Capture.PNG ‏76 KB
    Digital - Continuous Output_ttl.vi ‏65 KB

    AnkitG wrote:
    Jeff·Þ·Bohrer wrote:
    Why would you create an Task with an analog output?  its a Digital line you want to drive! and, just create it in the project.
    Hi Jeff,
    thanks but I couldnt understand , what you meant by create in project? Can you please explain. should I create digital line but I am still getting the same error.
    Creating DAQmx items in Project Explorer saves the DAQmx object properties as part of the *.lvproj file.  This can be very useful when the Task configuration does not change in the built application and you seldom want to use the task elsewhere.  If you want to make minor tweaks to configuration of the run-time app there is even a human readable text file in the build output where properties like scale offsets, timing rates or ranges can be modified without redeploying a new app.  
    Jeff

  • Not receiving any signal input with LabVIEW SE, USB DAQ board

    Hello all, good afternoon.
    I am having a little trouble with my DAQ device, I hope that someone will be able to help me.
    I'm plugging a BNC pH sensor to a NI USB 6251 M-series board, to try and obtain the electrical response of that particular sensor, measuring the voltage output for each buffer solution (pH 4 and 7). Have 9.2.3 mx (lastest) drivers.
    The pH sensor (floating) is plugged through a female BNC plug to the circuit board, signal is going through a signal conditioning  circuit (composed by a voltage follower on each of the wires to lower the output impedance of the sensor, and 2 bias resistors from AI+ and AI- connected to AI GND with the board case wired to the power supply ground, as seen in http://zone.ni.com/devzone/cda/tut/p/id/4494)
    I'm measuring in differential mode, as I said both wires of the sensor are going through a voltage follower each, and into the DAQ board. The Op-amps are being powered by +-15v as seen, again, in http://zone.ni.com/devzone/cda/tut/p/id/4494
    I did take the time to read the manuals and tutorials I found, did quite a bit of investigation over the last few days, and wired the system carefully.
    In labview signal express, I choose to take an analog voltage read, and select input range from -500mv to 500mv, because the sensor should output at most -400mv to 400 mv
    Now, much to my dismay labview registers in that channel absolutely nothing, only a little noise (~1 mV). I unplug the sensor and realise that whether the sensor is connected or not, it doesn't make a difference in the presented output - it's as if it the sensor wasn't there at all. And yes, I am measuring the correct channel. I tried connecting the wires to different AI channel pairs as well, could be a faulty one, but no success either.
    If I plug a voltimeter to the wires that are going into the analog inputs (after conditioning), it measures about 50 mV, which is a lot more than the 1 mV the board is measuring, but a lot less than the ~180 mV I should be measuring with a pH 4 buffer solution.
    I know for a fact the problem is not the sensor, and the DAQ board seems to be fully operational.
    I think it might have to do with the signal conditioning I'm doing, or some sort of configuration with the hardware of the DAQ board.
    So, any idea what I might be missing?
    I'm a week behind schedule because of this, hopefully I will find my answer here.
    Thank you very much in advance!

    Good afternoon.
    Yes I have tried all of that. The board responds very well when a flat 5V DC voltage is fed into a channel.
    However after much investigation I believe to have found the problem yesterday, it probably has to do with the operational amplifiers I was using. The input bias current was in the magnitude of nanoAmps, while for pH measurements an IBC of picoAmps or less is necessary due to the high impedance of the sensor. This was causing a drift of over 100 mV on my output which is about 2 pH and thus unnacceptable (even though I had the Bias resistors at the input to ground, like suggested in the NI tutorials, but apparently they were not enough to compensate for the high IBC).
    In the lab all available op-amps suffer from this, even Instrumentation op-amps like AMP04 from Analog Devices. I still haven't had a chance to acquire new op-amps with the necessary IBC but hopefully it will do the trick. Makes sense since I checked the datasheets for every op-amp in the lab, and they all had IBC around 400 nanoAmps (and none of them worked), while every single op-amp for every pH meter circuit I found have IBC's of pico/femtoAmps.
    The sensor I'm using is from AquaMedic, I'm not sure what the model is, but it's a cheap plastic sensor that comes bundled with their pH Computers.
    Thank you very much for your input.

Maybe you are looking for

  • Missing Name for TemplateBeginEditable

    Whenever I try to create a new page from a template, I get an error message saying: There is an error at line 115, column 33 (absolute position 3710) of "Macintosh HD:Users:mkeenanb:Desktop:Website:Goddard Portfolio:Templates:Goddard Portfolio.dwt":

  • Error in 29 step of SAP Netweaver 4.0 Portal for java on windown7 ultimate.

    Dear All, Im facing problem while installing "SAP Netweaver Portal Server 4.0" for java on my OS "windows7 ultimate" laptop. Im getting error in 29th step while configuring J2EE engine. Can someone help, i will be highly obliged. INFO 2010-01-27 18:5

  • Help!!! Sound isn't working!

    When I plug my earbuds into my Ipod touch there is no sound but when I remove the headphones there is sound. I know this must be a problem with my ipod because I have tried other earbuds and it still won't work. How can I fix this without having to b

  • Connect iPod to a new Vista PC

    I have got a 5th gen video iPod with over 4'000 songs on, i have had to change my PC due to a lightening storm which blew up my PC, i have tried to follow the on-line instructions to transfer my songs onto my new Vista PC but it keeps telling me the

  • Mavericks killed my MacBook Air

    Over night I downloaded Mavericks, having waited some weeks with the hope of avoiding any glitches. This morning I proceeded to install and suddenly got a fatal hard drive failure. As a solid-state drive, I innocently assumed this could not happen, e