DAQ program

I'm trying to write a program that runs in a loop and samples 11 different channels on a NI USB DAQ 6343 device continuously. The first 10 channels are simple DC measurements, the remaining channel is an AC voltage signal, whose frequency I want to record. All of this data I will be writing to a .csv file at the end. I have attached my code and I'm working with the DAQ.mx drivers. 
The question I have is, how do I measure and AC signal with the USB DAQ? I tried to configure analog input channel # 19 for "frequency, voltage" and then do a "read", howeever, it is telling me that the channel does not support that type of measurement. This AC signal is going through a BNC cable, and then to two banana adapters.
Attached is my code, written in LabVIEW 2013.   Here is a screen shot .
Solved!
Go to Solution.
Attachments:
MAIN.vi ‏23 KB

Look for the Signal Processing->Waveform Measure->Extract Single Tone Information.vi.  It performs an FFT and gives you the main frequency of the waveform.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Create a DAQ program and display results on with waveform and spreadsheet

    I need help creating a DAQ program that will read digital and analog channels and display on a continuous waveform, and then display readings on a spreadsheet

    You definitely want to start with the example programs. There are many of them which ship with LabVIEW and even more on NI's Example Programs Library (http://www.ni.com/devzone/libraries/default.htm). Also, if you are wanting to use an Excel spreadsheet, I would suggest getting the Report Generation Toolkit for Microsoft Office. It simplifies your coding immensely and will save you a lot of time.
    J.R. Allen

  • Accelerometer application DAQ programming

    I "inherited" a program and project from some seniors who have since graduated. They were using strain gauges to measure motion. They developed this rather large DAQ program in Labview to acquire the signals, compare them, calculate some things,.... It would take me months to decipher the code.
    I need help in developing a labview program that acquires both the accelerometer and horn data. Then the two are compared and the difference is calculated and sent to a data file as a Response time along with the original data of first movement and horn sounding. Can anyone please help me out?

    Hello,
    Your program will be fairly complex, but each of the individual components are commonly used, and there is a lot of example code out there that I would recommend you start with.
    The first, most important piece is the data acquisition. You must determine whether you are using a data acquisition card, or whether you have an instrument connected to the computer via GPIB or serial connection. After determining that, you can find some example programs within LabVIEW that acquires data (whether it be DAQ data or GPIB/serial data) and saves it. To access example programs in LabVIEW 6.1 and later, go to Help >> Find Examples. (In 6.0, go to Help >> Search Examples). Then navigate around until you find a suitable acquisition program. Great examples
    for DAQ, GPIB and serial can be found in the Hardware Input and Output folder from the Example Finder interface.
    The next part of your program is where you take the difference between the data and send it (and the original data) to file. File I/O examples can help you get started with this. I wrote a simple example VI and attached the screenshot to possibly help get you started, too.
    If you would like more detail about any portion of your program, let me know what type of acquisition you are performing (DAQ, GPIB, etc), what version of LabVIEW you have, and any other details that you think may help us reach a solution as quickly as possible. I would be happy to help further.
    Have a great day!
    Liz F
    National Instruments
    Attachments:
    difference_and_save.bmp ‏1234 KB

  • My DAQ program uses Traditional NI-DAQ in Visual C++ 6.0. I get error-10609 at SCAN_Start when run

    My data acquisition program uses Traditional NI-DAQ in Visual C++ 6.0. When I run the program, I get error -10609 at the SCAN_Start that states
    A transfer is already in progress for the specified resource, or the operation is not allowed because the device is in the process of performing transfers, possibly with different resources.
    Why do I receive this error?

    Hi,
    TThe error -10609 can result from several situations in which the device's resources are already in use.
    A Measurement & Automation (MAX) test panel is already open.
    If you open a test panel window for your device and attempt to run your application, you can get this error. If this is the case, close the MAX test panel.
    An AI Clear function was not used at the end of the previous acquisition.
    If you do not call the AI Clear function after performing your acquisition, the resources remain open. Be sure to call this function, inputting your taskID, at the end of the acquisition.
    Multiple programs are accessing the device.
    If you have multiple VIs accessing the device, or perhaps a LabVIEW VI and another application, the resource will be taken and you will receive the error. You can only run one application accessing the specific resource (for example, analog input on channel 0) at a time
    I hope this helps...and have a Great Day!
    George

  • On-board multifunction DAQ programming ?

    I need to make the following sequence a certain number of times : generate a pair of voltages (from a list, or computed from the loop index), make a pause, and finally measure some input voltage.
    As I cannot rely on the timing of my VB program (either too slow, or erratic)  to make this step by step, I would like to program this directly on some board, buffer the measurements and, once the measurements are all completed, transfer them to the application.
    Which is the best way, and least expensive way to do this, using a (multifunction DAQ) NI card ?
    thanks

    Hi Ornito,
    Would you like to program it with LabVIEW and DAQmx drivers? Or other software?
    You can have a look on the Getting Started of DAQmx, you will find out some basic programmation tips and other helpful informations : http://www.ni.com/white-paper/5434/en
    Indeed, multifunction DAQ card will fit your application and you need to know what is the expected range from your measurements.
    Do you have any precise limits (price etc)?
    You should contact the sales service of National Instruments in your area, they will be able to suggest some products according to your needs.
    Best regards,
    Celine
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Journées Techniques LabVIEW
    Du 15 octobre au 7 novembre : Strasbourg - Lyon - Lille - Toulouse - Mar...

  • On/off daq program

    Hello,
    I am trying to build a program that will do input and output through a daq.  I am reading data from three sensors and sending out voltage to three pistons.  I would like to create a program in which I can have the program run and be able to turn the pistons on and off without stopping the program.  I already have a setup that works for reading the data pretty well, I just can't figure out how to make an on/off and have the program continue to run.  Any help would be appreciated.  I tried using a waveform generator with different square wave duty cycles, but that doesn't work well.  Thanks in advance!
    -stefenmcloven

    I don't know how much my vi will help, there's not much there, but I'll go ahead and attach it.  I understand the case structure, but I don't know where to put it or what function I would use to change the voltage.  Thanks for your help!
    -stefenmcloven
    Attachments:
    Hs sensor static.vi ‏74 KB

  • After compile, run DAQ program just hang

    The exe program(LV2010) can running well. After I copied it to another laptop with only 2010 runtime installed, it cannot run just hang there after I click the 'start' button in my program. Even difficult to kill it.
    I also installed ni-scope and DAQ max on the new machine.
    Any suggestion, thanks.  

    Try calling the function from a different C program (exe or dll) and see if you see the same behavior as a you saw when calling the function from LabVIEW. I would also suggest compiling a debug version of the dll, call it from LabVIEW, and step through the code. Lastly, make sure you trap any error codes in the DLL to see if you are timing out, etc.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • DAQ program compiled under Win2k won't run under Win 95.

    When I compile a LabView 5.1.1 vi program that uses lvdaq.dll on my Windows 2000 workstation, that same program will not run on a Windows 95 notebook computer. Error code 21 (external subroutine could not be found) is reported for all standard DAQ vi's calling functions within lvdaq.dll even though the dll can be found in the program directory, the system directory, the vi.lib\daq directory, and via the system path. The same program compiled on a Windows 95 workstation runs on the Windows 95 notebook computer just fine. Why is lvdaq.dll not found when the program is compiled under Windows 2000? Do I need the same version of NI-DAQ on both computers?

    Larry;
    If you are doing NI-DAQ function calls on your VI you need to match the NI-DAQ version on both machines, otherwise, depending on what functions you are calling and what are the NI-DAQ versions, you might get some errors. Just for future reference, this procedure is good for NI-VISA (if you are using VISA VIs) and NI-488.2 (if you are using GPIB boards) as well.
    Regards
    Filipe Altoe
    Application Engineer
    National Instruments

  • DAQ programming

    Hi, I am a newbie for DAQ. (I have done some other LabView programming before) My target now is to do automated measurements on a couple of signals concurrently. I have managed to use the examples (eg. Cont Acq&Graph Voltage-To File(Binary).vi) in the LabView DAQ folder and made some modifications to measure two signals and store to a file. However, I wasn't able to get them to display in two different graph.
    At first I tried to copy and paste the whole sequence, but it didn't work because it seems like the DAQmx Start Task, DAQmx Read, etc. cannot be run at the same time (giving me some errors about it's busy). So I have to link up the different DAQmx Create Channel blocks in series. However, the problem of the result is they are displaying on the same graph.
    I suspect the "data" output of the DAQmx Read is some kind of array that we can extract the data out from? But I am not sure how the structure inside the "data" output looks like. Any advice about how to separate the graphs will be a great help! Thanks in advance!

    Thanks everyone for the tips. I managed to get the two graphs data out now. However, I am now stuck in another problem. Basically what I need to do is to capture a couple analog signals and save them in a file that's readable. So I used that "Write to Spreadsheet File" VI. Also, I would like to put the data in a graph while acquiring data.
    So now, I'm just modifying the "Cont Acq&Graph Voltage-To File(Binary)" VI and the "Graph Acquired Binary Data" VI. The problem is that
    1)if I picked **Analog 2D I32 NChan NSamp** for the DAQmx Read block, I will get an unscaled data readout to the spreadsheet, as well as the graph in the VI. However, the graph output from "Graph Acquired Binary Data" VI will be scaled to the correct voltage.
    2)I then picked the **Analog 2D DBL NChan NSamp** because it will give me scaled output to the spreadsheet file. However, the problem now is that the graph output from "Graph Acquired Binary Data" VI is not scaled correctly anymore...in fact it's quite messed up.
    So I went into the "Graph Acquired Binary Data" Block Diagram and see. I found this constant "0" with an arrow saying:
    The representation of this constant needs to match representation used
    in the Cont Acq & Graph Voltage-To File(Binary) example.
    In this case we use an i32. To change the representation right click on the
    constant and select Representation.
    So I changed that representation to a DBL. But then when I run the problem, the error "LabVIEW: End of file encountered". Any idea what I did wrong? Thanks in advance!

  • How do I use traditional NI-DAQ to find a temperature using a thermocouple?

    I have seen examples using scxi modules and NI-DAQmx programming to find temperature using a thermocouple. For my application, I do not have a scxi module and my programming is in traditional NI-DAQ. I tried copy and pasting a NI-DAQmx application into my program and it did not work due to the traditional and mx conflict. My question now is how can I measure temperature using a thermocouple with Traditional NI-DAQ programming on a PCI6025E? Thank you.

    I believe I posted a response for the same question here:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=8836
    Thanks,
    LA

  • How to the get the count even after we exit the program and start again.

    Hi,
    I have a DAQ program which takes scans every 3 sec, scan number is incremented is been tagged with the filename of each scan. What my requirement is to save that scan number somewhere and get that number the next time I start the program, hence there is no repeatation of the scan numbers ever and I always end up having sequential scan files.
    One solution which came to my mind is to save that number in the computer as excel or txt file and read back again the next time I start the program. I am just wondering if there is any better way of doing it.Please let me know.
    Thanks,
    Ankit

    well ,
    you can get an array of the files in the directory and scan for the highest number....
    or use the the ini-file vis to write that number before exit (or after each file written)
    here I first wrote the key  ... however I hope you got the key
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Which traditional daq example will be best for thermocouple temp measurements?

    Hi,
    i have a PCI 4351 card connected to a TBX 68T connector block which is used to measure the temp using thermocouples. it uses an analogue input from the thermocouples, but the card is only compatible with traditional daq programming.
    i have looked at the example finder, and under the folder 'Hardware and software' click the sub folders 'traditional daq', then click 'analogue input' and finally click the 'general' sub folder and you will see a list of example vi's, if you have the traditional daq installed. but i do not know which will be of great benefit to my work. please help.
    does anyone know of a good example that i can use and relate to my work and devices? it would be of great help as i am new to daq.
    thanks!
    Notay

    Hi Notay!
    Sorry about that, thos sub Vi's are part of the analog in library of daq. Most likely you will only need the traditional daq driver and the correct configuration of your hardware. Im attaching the VI's, keep me updated of your results and if you need something else let me know.
    Best of luck!
    Oswald Branford
    Attachments:
    (Sub) 4350 Parse Settings.vi ‏16 KB
    (Sub) 4350 Remove offset and get CJC voltage.vi ‏24 KB

  • How can I cancel a runing program by software?

    Hi,
    i have to stop a LabView-DAQ-program from running on a w2k PC by software.
    I'm looking for a program, which can stop the DAQ-program from execution
    if the UPS signals a system shutdown (power failure).
    The UPS software can execute any program or .cmd-file before it shuts
    off system power.
    Any ideas?
    Thanks in advance
    Jörg

    Also see this thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5
    0650000000800000040EA0000&USEARCHCONTEXT_CATEGORY_0=_49_%24_6_&USEARCHCONTEX
    T_CATEGORY_S=0&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&UPostedFromTimeSearchArg
    _0=3&UPostedFromTimeSearchArg_1=3&UPostedFromTimeSearchArg_2=2004&UPostedFro
    mTimeSearchArg_S=4&UPostedToTimeSearchArg_0=30&UPostedToTimeSearchArg_1=8&UP
    ostedToTimeSearchArg_2=2004&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_0
    =2&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=power&USEARCHCONTEXT_QU
    ESTION_S=0
    "joemm" wrote in message news:cgvkkj$nt2$[email protected]..
    > Hi,
    >
    > i have to stop a LabView-DAQ-program from running on a w2k PC by software.
    >
    > I'm looking for a program, which can stop the DA
    Q-program from execution
    > if the UPS signals a system shutdown (power failure).
    > The UPS software can execute any program or .cmd-file before it shuts
    > off system power.
    >
    > Any ideas?
    >
    > Thanks in advance
    >
    > Jörg

  • Why have Pulse disturb when we use DAQ Card6024 in PDA to collect waveform

    NI Tech-Support Department:
    I am your client who bought DAQ Card 6024E , we use them to develop instrument for collecting vibration waveform . we have developed driver for WINCE 3.0 (PDA ), it run very well ,but sometimes it display error waveform which is very strange , after 80 ms there is a pulse to 8.99V ,9.99V and then the value is 2.499V and –2.499V,-4.99V etc . and the value would keep for 40ms or 90ms.
    But we test the card on notebook–Computer, the condition would not be found .
    We want to know what cause the condition , Is it hardware error or software error ? Do you have some examples wrote in C language . Please mail the examples to [email protected] if you have .
    Please help me ! Thank you very much!
    Shenzhen CHF Hi-tech Co,Ltd
    86-755-26547365, 13602549257

    It sounds like what you are running into is problems related to higher continuous acquisition rates. This would explain why what you are doing appears to work on the Laptop, but not on the PDA.
    What are the rates that you are trying to run the DAQCard at in the PDA? If you are trying to run the acquisition continuously, then you will not be able to run at rates above about 4kS/s. However, if you are just trying to acquire N Samples, then you should be able to acquire at or near the max rate specified by the board.
    The reason for the difference in speed for continuous acquisition is due to the PCMCIA protocol being interrupt driven and due to slower processor speeds in the PDA.
    A possible solution that would allow you to continuously sample at higher rates in a PDA would be to use a Compact Flash Acquisition device such as the NI CF-6004 CompactFlash Data Acquisition for PDAs. This device will allow you to sample at much faster rates than a PCMCIA device.
    All of the examples that we have for the PDA are written in LabVIEW. However, if you wanted to make C calls to the DAQmx Base driver and then had a C-code compiler for your PDA device, then it would be completely possible to have a DAQ program written in C.Message Edited by Otis on 05-11-2005 11:22 AM
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • DAQ application help

    Hi there,
    Just wondering if someone can help or advise me on how to approach some DAQ programming.
    I want to use an M series card to output an analog output sine wave to a UUT. I need to measure the phase difference between the signal before and after the UUT, i.e feed sine wave through UUT and see what phase shift is caused by the UUT.
    I'm using an M series and wonder how I can structure this code. I realise that this should ideally be done with an S series card but i'm stuck with m series for various reasons. Will the multiplexing get in the way and can it been compensated?
    My initial idea is to generate the sine wave in software, and use an AO in regen mode in order to feed the sine wave to the UUT. I then plan to connect an AI to the output of the UUT. Now, should I also feed the output that i'm supplying back into an input so that I can compare the two? How would I need to sychronise/trigger these?
    Any example code would be greatly appreciated or any other ideas!
    thanks a million

    JS2000,
    Are you using LabVIEW?? Another language??
    Ideally, yes, you would want to use an S Series Board, or another form of simultaneous sampling when you are trying to determine phase relationships. However, with your M Series board, you can control the rate at which the ADC switches from channel to channel. So you can make the delay as small as possible. In DAQmx, this is referred to as the convert clock rate, which can usually be as fast as the maximum sample rate of the device. You can find out what the maximum convert clock rate is as well as set the convert clock rate with a DAQmx Timing Property Node (in LabVIEW). In the property node, select More>>Convert Clock, then Rate or Max Rate. In text based languages, the functions are DAQmxGetAIConvMaxRate and DAQmxSetAIConvRate.
    As far as your program, you can have the AO and AI occurring in the same LabVIEW program. I would suggest taking a look at the Example Finder in LabVIEW, by going to Help>>Find Examples. Then, for the AO, navigate to Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage, then maybe "Cont Gen Voltage Wfm-Int Clk.vi". For the AI: Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage, then maybe "Cont Acq&Graph Voltage-Int Clk.vi". Lots and lots of great examples in there. You can even copy and paste an AO example to an AI one or vise versa, to have both parts in the same VI.
    And yes, I would wire your AO to your AI before and after your UUT. Then you could compare the two AI channels. Also, I would make sure to use differential for your terminal configuration if you can spare the channels (which of course you can if you only have two analog inputs).
    Hope some of this info helps!
    -Alan A.

Maybe you are looking for

  • How can I change the default (main) user?

    I have inherited this computer from my sister in law. When I start Skype it thinks I am she. I have created another account for myself, but can't see how to make this the default account. I even tried unistalling and reinstalling Skype, but that didn

  • Printing alert message in a jsp form a common file.

    Hi all, I have a file in which i have to print an alert message. Now the contents of the alert msg are in a common file with the extension" .properties ". in this .properties file the msg that has to be printed is kept in the following manner errors.

  • Tax Rate for CENVAT definition

    Hi,                       I am creating a taxcode for CENVAT+CST.  I have the combination like this:                                             BED=10% on Total                                             Cess 2% on BED                              

  • ON GOING PROBLEM

    every time i plug my ipod up to the computer itunes comes up and it says "The software required for comminicating with the iPod is not installed correctly. Please reinstall iTunes to install the iPod's software". when i go to preferences and go under

  • Itunes jumps to 1.7 gig of ram

    Hi, My problem is that Itune uses something like 200 mg of Ram, but after a while, Itune jumps to 1.7 gig and all my computer freeze since I only have 4 gig and I'm using other softwares that takes a lot of ram. This problem happen everytime I use It