From a beginner of DAQ.

Dear,
I obtained PCMCIA DAQ card recently.
I would like to use it under Labview control.
Please give me your comments some preparation document for labview programming and example code?
Thank you in advance.

Hello Labmaster:
Using DAQ in LabVIEW is actually quite simple.  First there are some steps that you should take to ensure your instruments work prior to using them in LabVIEW.  Second you can use our "Example Finder" to find data acquisition examples for all DAQ functions. 
In "Measurement and Automation Explorer"(MAX) you can view and test the various inputs/outputs of your DAQ card.  If you are using a PC you can go to Start->Programs->National Instruments->Measurement and Automation Explorer.  If you click the tab "Devices and Interfaces" you should see your card under NI-DAQmx Devices.  Click on your device and to the upper middle of your screen you will see a "Test Panels" button, click on that.  Here you will be able to monitor the various I/O of your card, the screen is easy to navigate and control is reasonably simple. 
Next, in LabVIEW there are many examples for data acquisition.  First you should open a new project in LabVIEW.  Navigate to help on the toolbar and select "Find Examples".  Within the "Browse" tab in the middle window you will see various folders that contain specific user examples.  Go to Hardware Input and Output->DAQmx... here you will find many examples based on the type of data acquisition you might need.
If you have any further questions you can feel free to ask...
Regards
Matt Sweetland
NI Applications Engineer

Similar Messages

  • Can I get four inputs voltage reading from four sources at a time from NI USB 6009 DAQ

    I had a photoquadrant detector with four quadrants . each quadrant have a positive lead.  If i connect each lead to the DAQ's a0, a1, a2, a3 terminals and common ground to one of the ground of DAQ. Is it able to read four voltages from four quadrants at a time . And how to take the data through labview. In the manuals it's not shown can you provide me an example program.when i configure daq i'am selecting acquire signals--->analog input--> selecting a0,a1,a2,a3---> then configuring each channel with voltage limits all. then ok. Afetr that on the DAQ VI how can I read these four values. Is it by giving add inputs and put number indicator to each data like that or any other way is there. If you help me it's a kind job

    Use the DAQmx Read.  Choose a polymorphic case of N channels.  It is up to you whether you want multiple samples as a array, multiple samples as waveforms, or single samples.  The multiple samples as an array will give you a 2D array, the rows being the channel.  The other options will give you an array, an index for each channel.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to achieve data from more than 1 DAQ-assistant?

    When running my LabVIEW program using the data coming from 2 simulation sources, no problem occurs and data is correct.
    When using the data coming from 2 DAQ-assistants (real data), an error occurs, telling the following:
    "ERROR 50103 occured at DAQmx Read (Analog 1D Wfm NChan NSamp).vi, reason: The specified resource is reserved. The operation could not be completed as specified"
    Does anyone know what exactly is wrong and how to solve this problem?
    Nowhere I found a solution for this problem and I have been trying numerous things to change in the program, but the same problem keeps occuring.
    Could anyone please help me?
    I need to solve this to be able to perform tests for my graduation project.
    Tha
    nk you very much in advance,
    Yours Sincerely,
    Karel Rycek

    The problem is you are trying to access the AI channels at the same time. When you setup the first DAQ assistant it reserves the AI section of the board. When you then try and use the second DAQ Assistant you get the error because it is trying to access a reserved section. If you had 2 different boards this wouldn't be a problem. That is probably overkill though. What you can do is read multiple channels in the 1st DAQ assistant and then in your program split the data off if you need to do different calculations.

  • Trouble reading from serial instrument and DAq simultaneously.

    Greetings,
    I am having some trouble getting my VI to read from my DAq and a serial instrument at the same time.  If I run the subVI's simultaneously (i.e. subANG is running in one window and subVEL is running in a second window) both return the proper values and behave as I would expect.  However, if I call the subVI's into a parent VI and try to run them both in the same loop structure subANG gets stuck and will not resond with a change in signal.
    I have also tried to use a stacked or flat sequence to separate out the execution of subVEL and subANG, but I still get the no response from subANG.
    The most confusing thing is that if I run Parent.VI in one window and then create a copy of subANG (call it '....-copy' or whatever) and run it in a second window, Parent.VI behaves properly and will refresh the readings as they appear in '...-copy'.
    I have attached 3 files.
    (1) subANG.VI     -This reads an RS232 signal from an inclinometer.  The signal is refreshed every 10ms or so.
    (2) subVEL.VI      -This reads raw voltage from one channel on the DAq, calculates the mean then converts that into a pressure differential and finally a velocity based on the pressure and temperature inputs. 
    (3) ParentVI.VI     -This simply calls and displays the subVI's
    My guess is that it is a buffer issue, but I am stumped.  Does anybody out there in Labview land know why this might be happening?  All suggestions welcom.
    Solved!
    Go to Solution.

    I am noticing it is not an NI DAQ card.  How are you communicating with the DAQ? If it is using a serial port, that could be your problem.
    I also highly recommend using the VISA drivers for serial communications instead of the serial.llb VIs.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Basic Perl questions from Perl beginner now using Leopard

    Question: I used to dabble in Perl programming (beginner!!) and want to continue my dabbling with my new iMac running Leopard.
    Which Perl do I need to install?
    Where do I get it from?
    What tricks / concerns are there in the installation?
    What's the best source of information (books?, internet?) for learning about using/programming Perl on Leopard?
    Any other advice that you believe would be helpful would be appreciated.
    Many thanks!! D

    I used to use MacPerl as well, it's even better now that Perl is pre-installed and native.
    The two thing that took me the most time to figure out are:
    Line endings. All my old scripts had carriage return - line feed as end of line delimiters.
    On linux they have to be line feed '\x0A'. You do that by setting it in your text editor. I use BBEdit or Text Mate to write perl, although I'm pretty sure that using TextEdit will work, and will have line feed line endings.
    Setting the script's executable bit. A script file needs to have a bit set in the linux filesystem to tell linux it's executable. You do that by opening the terminal and typing chmod +x then drag your script file into the terminal and pressing return.
    That's detailed here:
    http://www.oreilly.com/pub/a/mac/2003/11/07/scripting_osx.html
    Also there are 2 main ways to run your script.
    One is by opening Terminal and +typing perl+ then dragging your script into the terminal window and hitting return. if you want to do it this way the very first line in your perl script needs to look like this:
    #!/usr/bin/perl
    The other way (which is only slightly easier) is by dragging your script into the terminal window and hitting enter, no typing perl every time. To do this the very first line of your perl script needs to be:
    #!/usr/bin/env perl
    Another huge tip is if you are in the Terminal window hitting command-up arrow will show you the last command you typed in, so you can hit enter and re-run it.
    Other than that stuff I can't remember any differences between regular linux perl and Leopard perl. I still refer to the Camel book I bought 15 or so years ago.
    So type into a text editor:
    #!/usr/bin/perl
    use strict;
    use warnings;
    print "Hello World\n";
    Then save the file as Hello.pl
    open terminal and type *chmod +x*
    drag Hello.pl into the terminal and press return
    Type perl into the Terminal
    drag Hello.pl into the terminal and press return.
    and it should print.

  • How to synchronize the data acquisition from both GPIB and DAQ card

    I want to begin/stop acquiring the data from GPIB and PCI6024E card into Labview at the same time. Since the acquisition from GPIB is quite slow comparing to the one from DAQ card, I can not put both of them in the same loop structure. Is it possible to synchronize them?
    Thank you!

    Hi,
    I wanted to save data acquired from NI-DAQ (for example, NI 9234) in a file using the DAQ-mx ANSI C Code. The response I got was as follows:-
    One way to do it is with TDMS logging. DAQmx comes with functions designed to log to a TDMS file. This is a special file type that is used for collecting data in a logical format. It can be displayed in a TDMS viewer where data is separated into groups and channels. NI-DAQmx provides examples for how to log to TDMS. Look at the TDMS examples in the C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage directory.
    However, now I want to know is there a way that using that same C code, can we save the data in a .txt file format (Text File) instead of a TDMS file? We actually want to access that file through MATLAB (that's why we want to save it in text format).
    Also on an other note, is there a way we can access & open TDMS files by MATLAB?
    Thanks,
    Sauvik Das Gupta

  • When I send a 5v from the DAQ, the voltmeter shows 5V, but when i connect a "normally open valve" from parker to the DAQ, the voltage automatically decreases to .14 V. It seems like it is being grounded. Why is this happening?

    We are sending 5v to the DAQ using a voltage generator. We hook this up to a voltmeter and we see 5V. When we connect the voltage generator to a "normally open valve" from parker, the voltmeter shows .14V. It seems that when we connect both wires from the valve to the voltage generator, the wires are acting as a ground. We wish to control the voltage that flows to the valve through Labview. We checked the wires of the valve and they are working fine becuase if we send a constant 5V from the DAQ and grounded it, the voltmeter shows 5V. Does anyone know why the wires are acting as a ground and dropping the voltage to .14V?

    nsatpute wrote:
    Our DAQ is NI USB 6259. The valve only requires  a max of 5V and our DAQ does provide up to 5V. However, after connecting the valve to the DAQ, the voltage drops to almost 0. We are assuming that the wires somehow act as a ground, but we are not sure if this is the case. 
    The issue here is not how much voltage the valve wants, it is the current the valve needs.  The 6259 can only put out 5mA through an analog output.  Your valve very likely needs a lot more than that.  So you need to add in an amplifier circuit that can supply more current to operate your valve.

  • Lock In from scratch Using 6120 DAQ

    Hi,
    Sorry if this is the wrong section.
    I currently have a 6120 DAQ card in my lab computer and I would like to develop a software based lock in system (single or dual channel). Im aware that the NI Lock In kit exists but I do not think it works with this DAQ card. Regardless for my own personal education I would like to make it from scratch. 
    Basically I would like to know if its possible with this hardware and where to start or if anybody has any examples they'd be willing to share. I've used LabView quite a lot but mainly for GPIB control of lab equipment.
    Thanks,

    Hi Gordyh,
    I don't see any reason why you should have any issues with the 6120, but it may be useful to take a look at this KnowledgeBase article.
    With regards to examples, the Developer Zone may include some which may be useful.
    It may also be worth taking a look at the VIs from the NI Lock-In Amplifier Start-Up Kit.
    Regards,
    Chris (CLED, CLD, CTD)
    NIUK Applications Engineering Specialist

  • Several questions on Fireworks from absolute beginner

    Hello!
    At the moment I'm in the very beginning of web-designing process and I've been using Fireworks trial for several days only. Before that I've created only one website in Joomla! and that's all. I've got several questions and I would be glad if masters of Fireworks will post full answers on them.
    I've read the official manual, but didn't check any additional materials, because I feel better when learning myself with help in form of answers to concrete questions.
    Here is how I see process of making simple website in Fireworks: draw website and then make it to work. I did first part and I've prepared my website. It of course looks ugly, but I want to start from it, as I'm learning. Here it is:
    Okay, what is the next thing I should do? Right, I should slice it. And here goes the question: how should I slice my menu? I want it to be simple menu, so when you move mouse over "About me" it lightens in some other color and some content should appear in right part of this structure. How would I implement it using Fireworks? Then in what format should I export my webpage? HTML and CSS? How do I write styles in CSS through Fireworks? And final question is how can I make my website be in center of page (I've tried to add <center></center> inside "index.htm" file, but no luck)? I would also like to know what do I need to do with all images so you can't select them with mouse and move all around in your browser? How do I stick them:
    Thanks and sorry for too many questions at one time,
    Aleks.

    Looking at your mockup, that navbar could probably be created 
    completely using CSS and HTML, rather than slice up the "button areas" 
    but if you want to go that route, I'd recommend creating button 
    symbols. The slicing is done for you and you can create up to four 
    states for the button.
    If you want to export the graphics only, choose File > Export.
    Browse to your site folder
    Set the Export option to Images only
    Make sure you are exporting slices
    Deselect the option to export areas without slices
    Click Save (Windows) or Export (Mac)
    Use DW to create your page, insert your images and add your rollover 
    behaviors.
    HTH
    Jim Babbage
    NewMedia Services
    http://www.newmediaservices.ca
    Community MX Partner -
    http://www.communitymx.com/author.cfm?cid=1036
    Adobe Community Expert
    http://www.adobe.com/communities/experts/members/206.html
    Author - Lynda.com
    http://movielibrary.lynda.com/authors/author/?aid=188
    Author: Peachpit Press
    http://www.peachpit.com/store/product.aspx?isbn=0321562879

  • Word 2007 VBA - Can't Move around in a Recordset - From a Beginner

    [reposted from the VB.net forum where I mistakenly posted it]
    Hi,
    This is a simple program.  The issue is that Recordset.MoveNext and .MovePrevious aren't working, though .MoveFirst and MoveLast are.  If I exchange MoveLast for MoveNext and MovePrevious to MoveNext, the output will be 8 repetitions of the last record
    as compared to the first.  Counter will be 0 for each output starting with MoveFirst and 7 starting with MoveLast (which is interesting since I read that the AbsolutePosition property is supposed to be 1-based).  Any help will be appreciated!  The
    recordset is default (table-based) but this issue remained when I changed it to a dynaset recordset.
    Following is the code:
    Private Sub CmbOffices_Click()
        Call WordEx 'opens a Word doc and sets database objects
        Dim Counter As Long
        Dim intComboItem As Integer
        Set objSelection = objWord.Selection
        objSelection.TypeText ("STUFF") & vbCrLf
        For intComboItem = 0 To CmbOffices.ListCount - 1
            recordset.MoveFirst
            Counter = recordset.AbsolutePosition
                objSelection.TypeText field.Value & field2.Value & field3.Value & Counter &
    vbCrLf
                  'Else
            recordset.MoveNext
            'End If
        Next
        recordset.Close
        db.Close
    End Sub
    Chiroacuman

    Hi Gill,
    Thanks for helping me with this.  I forgot to mention that I have spent a lot of time on the net and here trying to find a solution.  Here is the code where I defined variables:
    [General Declarations in a classic Module]
    Public db As DAO.Database
        Public recordset As DAO.recordset
        Public field As DAO.field
        Public field2 As DAO.field
        Public field3 As DAO.field
    Public Sub WordEx()
        Set objWord = CreateObject("Word.Application")
        Set objDoc = objWord.Documents.Add
        Set db = CurrentDb
        Set recordset = db.OpenRecordset("Headers", dbOpenDynaset)
        Set field = recordset.Fields(0)
        Set field2 = recordset.Fields(1)
        Set field3 = recordset.Fields(2)
        objWord.Visible = True
    End Sub
    Chiroacuman

  • How to write data from 24 bit card DAQ card unscaled

    Hello
    I have a PXI 4462 Data acquistion card to record data. It is 24 bit card. I have two questions about writing data from this card.
    1) When acquiring the analog signal the card changes the analog to digital and when writing it scales back to analog signal. I want to write the analog signal in the digital form. How can i do that.
    2) PXI 4462 is a 24 bit card, but there is either 16 bit or 32 bit when writing it. So if i write it in 32 bit a byte is not used. only 3 bytes will be used to write the data and one byte wont have any data in it. It takes space on the hard disk. Is there any way to save this one byte so that I will be able to write just 24 bit data without loosing that one byte which would save me plenty of space.
    The sampling rate is usually 96Ks/sec.
    Thanks in advance
    Regards
    Nitin

    If you want to write 24 bits instead of 32, then you have to change the hi(x) to 8 bits instead of 16. The lo(x) will stay at 16 so the 8 plus 16 equals 24 bits. Simple arithmetic. You asked how to get rid of the upper 8 bits and if you leave it at 16, then you haven't gotten rid of anything.
    Why do you think you have to write to separate files? I said do a write of the 16 bit and then a write of of the 8 bit component. It's just two Write File functions to the same file. You could also bundle them together and do a single write but I think there would be a little additional overhead with that.
    Message Edited by Dennis Knutson on 04-06-2006 07:15 AM
    Attachments:
    write binary.JPG ‏5 KB

  • How to synchronize analog input and output from two different USB daq boards

    Hi all,
    I have two very differnt USB boards the NI USB 6008, which I am using to acquire the data (Analog Input) and a NI USB 9263, it is an Analog Output only board that I am using to deliver a signal (in this case a square pulse). The reason why I am not using the 6008 Analog Ouputs is because I need to deliver negative voltages and need the full +/-10V range.
    Looking at similar posts I am pretty sure that I can't use an external trigger or a shared clock, I also tried to use the synchronization of timed structures but no cigar.
    I am including a quick vi that I whipped out showing how the signal jitters due to the lack of synchronization. The AO from the 9263 connects to the AI in the 6008 in this example.
    Solved!
    Go to Solution.
    Attachments:
    Test Pulse.vi ‏117 KB

    I talked to a specialist in the phone and tols me that it is not possible.

  • * * * From a beginner in EJB * * *

    I'm not a newbie programmer but all this stuff regarding EJB sometimes cause me a headache, you know.
    I'm following "Enterprise JavaBeans Fundamentals" tutorial from developerWorks. You can reach this at IBM site. I've been reading a lot
    of materials and until now this tutorial is the best I've ever found and
    the examples work as expected.
    Let's say I have an app with some EJBs (session (stateless and stateful) and entity beans), it doesn't matter what they do, I just have them. My question is about ejb-jar.xml file(s):
    Do I need a deployment descriptor for each bean or I can have just only one in which I have all information about the beans ???
    My best regards,
    Romualdo Rubens de Freitas.

    Greetings,
    Hi Tony,
    Based on what you said "...a composite of objects...",
    if I have a Customer bean and an Order bean, both of
    them can be a single EJB with a single ejb-jar.xml
    file, right ??? If so, suppose a customer can haveThey can be "singly composed" within their own jar files or "multiply composed" within the same jar file. The thing to keep in mind here is that 'ejb-jar' file is what is actually the "EJB" - it is what is ultimately "distributed" and used to assemble larger applications...
    zero or more orders, how can I specify (in
    ejb-jar.xml) that a customer is "linked" with an order
    or an order is "linked" with a customer ???Depends on what exactly you are refering to... "bean linkage" or "data linkage". The latter most appropriately regards CMP/EJB-QL and, therefore, is specific to EJB 2.0 Entity Beans. The former, however, regards bean-to-bean (actually, any J2EE application component-to-bean ;), references and are common to all bean types in EJB 1.1 and later. Also called "EJB references", these would seem most relevant to the issue at hand... Regardless of how they are packaged (above), one bean(/component) must reference another through the same mechanism as other components and clients: by looking it (it's "Home object" ;) up in the naming service and calling a lifecycle method.
    Note: The argument for "Local interface types" should be recognized here but with the following caveats: 1) local interfaces are available as of EJB 2.0 only; 2) local interfaces are NOT specific to "multiply composed" EJBs but have, in fact, as their only requirement that the inter-referencing components are co-located within the same VM instance; and, consequently, 3) local interfaces do not need to be "narrowed" (since they are not being tunneled through the server's communication protocol ;).
    As with other components making co-located references, the real burden here is on the Deployer (as in the "role of" ;) who must make sure that all 'coded references' are linked to actual 'JNDI bindings' at deployment time. This, naturally, is done according to the server vendor's method of doing so ("RTFM").
    Greetings to you, my friend,
    Romualdo Rubens de Freitas.Regards,
    Tony "Vee Schade" Cook

  • Very simple question from a beginner

    I am currently doing a little exercise, but I ran into a problem. I have written a class that supports operations on rational number. The fields are two long variables, one each that stores the numerator and denominator.
    I have made add, subtract, multiply, and divide methods...
    1. what I need help in is: beingh able to store the rational number in reduced for, with the denominator always positive
    2. constructing a toString method, equals method, and compareTo method.
    3. it also says "make sure the toString method correctly handles the case in which the denominator is zero by throwing an exception.
    I have been working on this for a long time now, an I am stuck at this point.
    I know this will be very simple for you guys and gals, but I am a beginner. Please offer some input, advice, and/or some code to help me get past this problem.
    Thanks so much,
    Jason

    ok, here is what I have so far
    public class Rational {
         public long num, den;
         public Rational(long n,long d) {
              this.num = n;
              this.den = d;
         public static void main(String args[]) {
              Rational r = new Rational(1,2);
              Rational s = new Rational(3,4);
              Rational rmuls = r.multiply(s);
              Rational rdivs = r.divide(s);
              Rational radds = r.add(s);
              Rational rsubs = r.subtract(s);
              r.print();
              s.print();
              rmuls.print();
              rdivs.print();
              radds.print();
              rsubs.print();
         public void print(){
              System.out.println(this.num+ "/" +this.den);
         public Rational multiply(Rational t){
              long n;
              long d;
              n = this.num*t.num;
              d = this.den*t.den;
              Rational answer = new Rational(n,d);
              return answer;
         public Rational divide(Rational t){
              long n;
              long d;
              n = this.num*t.den;
              d = this.den*t.num;
              Rational answer = new Rational(n,d);
              return answer;
         public Rational add(Rational t){
              long n;
              long d;
              n = (t.den*this.num)+(t.num*this.den);
              d = t.den*this.den;
              Rational answer = new Rational(n,d);
              return answer;
         public Rational subtract(Rational t){
              long n;
              long d;
              n = (t.den*this.num)-(t.num*this.den);
              d = t.den*this.den;          
              Rational answer = new Rational(n,d);
              return answer;
         //public int compareTo (Rational t)??????

  • DISAPPOINTMENT from a beginner user - BRAZIL

    Just a register.
    Recently I decided to migrate from traditionals pc's with windows platform to the so famous mac's and their MacOS. Sad illusion. Approximately 4 months after purchase my brand new and first MacBook (Intel Core 2 Duo 2.16GHz 1GB 120GB) it came to a problem. At first it was the HD (Hitachi) that simply stopped working and I lost all my files. After almost 1 month at the assistance, the new HD (Fujtsu) that came from Apple Brazil surprise was broken as well!!! There was me again at the assistance (29/02/08). For my surprise, the technician found another problem with my Macbook beyond the hard drive issue... now the video card has shown some problems and it is necessary to change the motherboard! Is that right??
    Well, I will stop from here because I do not believe I had so much "luck" as with my Macbook! Where in the world you by a notebook that carries on a brand like Apple and have so much problems in a very short space of time!?!?! Neither my washing machine presents many problems.
    Result, after being badly served by the 0800 Apple Brazil (perhaps because I'm new mac user) and continue without my instrument of work for more than a month, I am thinking how can I ask for the refund of my money?
    Message was edited by: tiagoval

    tiagoval wrote:
    Just a register.
    Recently I decided to migrate from traditionals pc's with windows platform to the so famous mac's and their MacOS. Sad illusion. Approximately 4 months after purchase my brand new and first MacBook (Intel Core 2 Duo 2.16GHz 1GB 120GB) it came to a problem. At first it was the HD (Hitachi) that simply stopped working and I lost all my files. After almost 1 month at the assistance, the new HD (Fujtsu) that came from Apple Brazil surprise was broken as well!!! There was me again at the assistance (29/02/08). For my surprise, the technician found another problem with my Macbook beyond the hard drive issue... now the video card has shown some problems and it is necessary to change the motherboard! Is that right??
    Well, I will stop from here because I do not believe I had so much "luck" as with my Macbook! Where in the world you by a notebook that carries on a brand like Apple and have so much problems in a very short space of time!?!?! Neither my washing machine presents many problems.
    Result, after being badly served by the 0800 Apple Brazil (perhaps because I'm new mac user) and continue without my instrument of work for more than a month, I am thinking how can I ask for the refund of my money?
    Message was edited by: tiagoval
    Sounds like a lemon, but sorry, you can't refund any new computers after the 14 days (it's standard across most computer manufacturers)
    Bring it to your local Apple Store for more support.

Maybe you are looking for