DAQ Input Signal into Array

Hi,
I have an input (voltage) signal comming into my DAQ assistant (6008). This information displays well into a chart, but I also want to covert the same data into array format so that I can do further calculations. So, basically I would like to put a DAQ signal into an array. I'm having a lot of trouble doing so, please help,
thank you
Nick

Hello Nick,
I can use the function "From DDT" in the Function palette Express -> Signal Manipulation.
When you place it on the block diagram, a windows opens and you can configure: 1D Array of Scalar - Automatic.
Best regard
Nick_CH

Similar Messages

  • How to convert a waveform signal into array of complex numbers

    How to convert a waveform signal into array of complex numbers.

    Hi Chaks,
    try this:
    (Get Waveform components, convert to complex DBL)
    Message Edited by GerdW on 01-28-2008 09:23 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    ToCDB.png ‏1 KB

  • How to use voltage signals as input signals into USB-6211

    Hello everyone,
    I have a USB-6211 and a PDQ80A -quadrant photo detectot from thorlabs, i am trying to take three voltage signals from the PDQ80A into my PC using USB-6211 from NI. THese voltage signals are X,Y and sum (X+Y).  
    Looking forward to your reply.
    Thanks in advance,
    _Perseus 

    Technically, the question was in the title.  But of course, the answer to that is... Connect them using WIRES.   It's designed for voltage signals, just wire your cell outputs to whatever DAQ input channels you're going to read.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Why am I not getting any input signal into logic X or GarageBand from my audio interface?

    Hello all,
    I'm completely new to all this so I will try my best here to give all the details needed.
    So, I am using a Mac mini (2013 model: i7 overclocked at 2.6, 16 gbram) and a focusrite saffire pro 24DSP. Overall both are in perfect working order.
    My problem, however, is that I am seemingly unable to get any form of signal from my saffire into either Logic X or GarageBand. I am trying to record guitar lined in and I have set all the settings in logic to what I think is right (software monitoring checked, output channels selected, saffire selected for both input and output) and I have set up my saffire mix control - I spent days reading the manual and watching online tutorials.
    The saffire mix control is set up thus:
    Input 1 - instrument
    Daw 1+2 = GarageBand
    Daw 3+4 = Logic X
    Sample rate 41Khz
    Master Output = stereo monitor mix (line outs 1 &2 to my monitor speakers)
    Output 3+4 headphones
    Is there anything missing here?
    As far as this all goes, when I plug in my guitar I can get a very clear "raw" signal from the saffire mix control, but when I then go to set up a track in either DAW and assign the necessary line ins and outs, no matter what I do I cannot get an input signal, not even a partial one (I have the monitoring and record armed options checked btw). I am close to giving tearing my hair out.
    I'm sure I am just missing something out?
    Thanks in advance :-)

    I've plugged into the interface a mic and an electric guitar.
    I'm not sure what I did but the guitar is coming through (though it shows no signal on the interface). Mic input level on line, mic registers a tiny bit of sound when I hit the mic (on only one channel) but doesn't register any vocals when mic input is turned up to the max.
    Odd thing: stereo/mono button reversed that is when the button is pushed in it equals stereo on the head phones when it says it should be mono and when the button is left unpushed it equals mono when it says it should be stereo.
    Monitor is on and volume is at max.
    GB system preferences don't list Input 1 or/and 2. Where do I find them?
    I've tried everything I can think of. It feels as if I just need to find the right switch but I don't know where to look...

  • DAQ Input Signal kept rising and stop at Max Voltage when run with nothing attached

    I just installed PCI 6229 card and a BNC 2110 (Labview 8.6v). When I started the DAQ Input, the signal kept rising and stop at max Voltage  (10V) when run with nothing attached (instead of fluctuating at around 0). Just wondering what's wrong with it and how to solve it. Terminal configuration was "Differential"
    I just created an input DAQ with a scope and while loop to look at it. Please let me know if I do anything wrong
    Thanks
    Solved!
    Go to Solution.

    I just re-read your original post.  Why do you have the terminal setting to differential?  This sounds like a single ended setup to me.  Change the terminal setting to RSE.  With a differential setting. you need to connect one source to AI1 and another source to AI9.  The difference between the two will be reported.  With RSE, only AI1 will matter and the voltage with respect to ground will be reported.  Make sure you have your AO ground tied to your AI ground.
    Message Edited by tbob on 06-15-2010 05:44 PM
    - tbob
    Inventor of the WORM Global

  • Prompt input into Array

    Before I begin, I'm saying sorry again to everyone I have offended. But I need your help for this one.
    I just need to understand this:
    Prompting user to input integers into a set of array; let's say
    int number[] = new num[5];I'm going to do something like this But stuck.
    String num[] = JOptionPane.showInputDialog( "Please enter the number:");I'm stuck however we input numbers into array. i've read the textbook but all the examples were just numbers already in the array. Not the inputting part.
    Can you say something?

    Here's my update. I am missing the String?
    import javax.swing.JOptionPane;
    public class GetArray {
    public static void main (String[] args) {
    int[] number = new int[5];
    for(int i=0;i<number.length;i++)
    number=Integer.parseInt(JOptionPane.showInputDialog( "Please enter the number:"));
    JOptionPane.showMessageDialog(null, " The numbers are: " + number[i], " Answer ", JOptionPane.PLAIN_MESSAGE );
    Error I'm getting from this is:cannot find symbol variable i
    for line
    JOptionPane.showMessageDialog(null, " The numbers are: " + number[i], " Answer ", JOptionPane.PLAIN_MESSAGE );
    Please can anyone solve this?
    Thank you,
    C.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Insert element into array problem

    Hi,
    I have problem about how to insert value into an array. here is one section, could anyone help me to insert input value into array and delete the first value in the array. Gap means to fill in code
    void Ins(String name)
    // Insert name or increment its multiplicity.
    // If the bag is full remove the oldest entry.
    int i; // Running index on BagName
    int target; // if target < n then name.equals(BagName[target]);
    // else target == n
    Date EntryDate; // Current date and time
    // Get current date and time
    EntryDate = new Date();
    BagDate[n] = EntryDate.toString();
    Mult[n] = n+1;
    BagName[n] = name;
    n++;
    // Search bag for name
    // Gap 2
    // Assertion: target < n => name.equals(BagName[target])
    // else target == n
    // Update Mult if target < n
    // Gap 3
    // Make room for and insert name if target not found
    } // Ins(String name)
    Message was edited by:
    sibojava
    Message was edited by:
    sibojava

    Do you have several accounts?
    See this thread, it's the same question:
    http://forum.java.sun.com/thread.jspa?threadID=5143232
    Kaj

  • I am trying to log data from 4 voltage input signal using labview, but when i use DAQ assistant i am able to log data from one signal at a time only.

    I am trying to log data from 4 voltage input signal using labview, but when i use DAQ assiatant i am able to log data from one signal at a time only.I am trying to get all 4 input data to logged in a single file againt time. I am new to Labview, I need to sample this data within a couple of days can someone help please.

    Naveen
    Check out the info in the Analog Input section of the document linked below.  (Ignore the part about Global Channels.)  In Figure 5, notice that you can select multiple channels while holding <Ctrl> or <Shift>.
    Developer Zone Tutorial: NI-DAQmx Express VI Tutorial
    Kyle B  |  Product Support Engineer  |  ni.com/support

  • How to record sound into array using DAQ ?

    Hi to everyone
    Im last year student , im using LABVIEW for the first time.
    i have an myDAQ , i need to record audio go through the analog ports/AUDIO INPUT of the myDAQ, into array, for later singal proccesing.
    its for my final project.

    First, Learn to use LabVIEW with myDAQ is a series of videos.  To quote the Introduction,
    The Learn to LabVIEW with MyDAQ provides fundamental LabVIEW knowledge for a great out of the box experience with your MyDAQ. Each unit provides a set of videos to allow you to learn at your own pace and review material an unlimited number of times. As well, most videos are accompanied by minor exercises which will help drive home important topics and challenge you along the way.
    View the videos, do the exercises, and I suspect many of your questions will be answered.  If you write some LabVIEW code and have a problem, come back, show us your code, and explain the problem.
    Bob Schor

  • Why is it that when I saved the waveform of my acquired signal into a wav file, the output waveform of my saved file turn out to be different from my input signal?

    Hi all,
    I am currently doing a heart sound analyzer project. I acquired signal using NI USB 6008 continuosly. My program is able to saved the acquired signal into a wave file. But when I browse open the saved file, the output waveform did not look the same as the acquired input signal and also the sound of the heartbeat captured cannot be heard from the loud speaker though I have saved the file as a wav file. I am not sure if the method i use to save the acquired data as a wav file is correct.  I have attach the print screen of the differences of the output I have notice and the program I have created. I would be glad if anyone here is able to troubleshoot my program.
    Thanks. 
    Attachments:
    heart sound analyzer.zip ‏257 KB

    Hi Brett Burger,
    Thanks for your reply. For your information, I have set the sampling rate as 10000 as for the sound format, I have set the bits per sample as 16 bit, the rate as 11025 and the sound quality as mono. I tried using your method by changing the sampling rate as 8K but still my program encounter the same problem.
    I wish to also create a button that is able to generate a preformatted report that contains VI documentation, data the VI returns, and report properties, such as the author, company, and number of pages only when I click on the button.  I have created this in my program, but I am not sure why is it not working. Can you help troubleshoot my program. Or do you have any samples to provide me. Hope to hear from you soon.
    Many thanks.
    Regards,
    min
    Attachments:
    Heart Sounds1.vi ‏971 KB

  • Acquiring two input signals simultaneously

    Hi,
    I have an LVDT and a force sensor (both attached to a motor) plugged into my SC board and I am trying to read out & save the output data from both sensors simultaneously while the motor is in motion. The SC-2350 board is connected to the laptop via DAQCard 6036E . Two questions:
              1) in my block diagram, the DAQ assistant blocks for both sensors are wired to their respective waveform graphs (one for the LVDT signal and one for the force signal), the whole being included in a while loop (which remains true until the motor stops moving). When running the program, only one signal is read out at a time and I have no control on which signal is transmitted (this seems to occur in a random fashion). Do I need to "link"/synchronize the two DAQ assistants in some ways so that both signals will appear simultaneously? If so, how would it be possible?
              2) ideally, I'd like to read out both input signals on the same graph (with 2 different y-scales but the same time scale) to observe the phase shift. I tried to "bundle" the two data output coming from the two DAQ assistants but it resulted in an error saying that the two outputs were of different types. Is there a way to plot these two physical quantities on the same graph even though they're different and come from different sensors?
    Thanks for your help!
    Thibault.

    Hello Dani,
    I assume, based on your position sensors and the image you posted, that you are using counters to acquire your data. Is this correct? If so, it is important to note that you cannot add multiple counter operations to a single task because they have different timing requirements and all channels in a single task must share the same timing and triggering. In fact, if you attempt to add a second counter channel to a DAQ Assistant for a counter operation, you will receive the following error when you try to close the configuration window:
    So, you will have to use two different tasks to acquire your counter data. You can do this either by using two separate DAQ Assistants or by using two different tasks in the NI-DAQmx sub-VIs in LabVIEW. Since you are trying to compare the phase difference between the two measurements, you will also need to synchronize the operations so that you are reading from both counters simultaneously. There are several resources online which discuss synchronizing counters, and I have linked some that I thought might be useful below:
    KnowledgeBase 1JPES6LL: How Do I Synchronize a Buffered Quadrature Encoder Measurement to a Signal
    KnowledgeBase 3GGATSCC: Hardware Counter Start Trigger for Counter Synchronization
    It would probably be easier to use the NI-DAQmx Sub-VIs to implement this synchronization because they give you more control over specific parameters of your task. You can use the NI Example Finder to browse some examples which use the NI-DAQmx sub-VIs for counters. You can open the NI Example Finder by going to Help>>Find Examples... in LabVIEW. Once in the NI Example Finder, you can find the counter examples by selecting the Browse tab and navigating to Hardware Input and Output>>DAQmx>>Counter Measurements; then you can select the Position category (shown below) to find the Position measurement examples.
    Let us know if you have any other questions about taking position measurements.
    Message Edited by Matt A on 04-09-2008 03:55 PM
    Matt Anderson
    Hardware Services Marketing Manager
    National Instruments
    Attachments:
    Error -200147.jpg ‏32 KB
    Example Finder Position.jpg ‏124 KB

  • Boolean into array

    Hi,
    I am using entire port 11 and partially port 10 (10.7, 10.6) for 10 lines from NI PCI-6509 card. Since all these 10 lines can either be high or low, at the output of my DAQ Assistant, my data is represented in boolean, where I want to have all 10 boolean put together into array (orange) or double (orange as well). I don't know what do I need for the input of "Index Array", which is the place where those 10 lines will be connected.
    So my question is what should I use to convert boolean into something that is input of Index Array.
    Thanks

    It should look this. With this technique, the array of products have to match the index. For example, if the digital read returns numeric 14, then item 14 in the array should be that product name. For your combo box, the numbers do not have to be in order and they do not have to be sequential. For example, if 14 is the value returned by the Top Cap CCA, then select the combo box>Edit items and make the Value 14. The array constant you have, make item 14 in the array equal to Top Cap CCA.
    Attachments:
    Boolean Array to Number.PNG ‏11 KB

  • Can I plug a TTL signal into the mic on my sound card?

    Basically I want to trigger some LV code using an incoming 0-5 volt TTL signal.
    And I was wondering if I could plug that TTL signal into my mic input and read the signal with the LabVIEW sound VIs.
    But I'm unsure if I'll just end up frying my sound card.
    I know I could buy a cheap NI USB DAQ board for $99 ... but I just want to get this done asap, and thought the sound card idea might work.
    Any ideas?

    A sound card is AC coupled. And has limited  bandwidth. So I will say this is a far from optimal solution. What are you trying to do?
    Sound cards are most often made for line-in signals levels. That is +/-1 volt. But this may vary from vendor to vendor.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to input data into an arraylist from a text file?

    I am trying to take data from a text file and put that data into an arraylist. First here is the text file:
    [item1, 10, 125.0, item2, 10, 12.0, item3, 20, 158.0]
    3
    4530.0
    [item5, 65, 555.5, item4, 29, 689.0]
    2
    56088.5
    [item7, 84, 34.5, item6, 103, 0.5, item8, 85, 1.36]
    3
    3065.1The text between the [ ] is the output from my arraylists. I have three arraylists. The first [ ] belongs to arraylist A, the second to arraylist B, and the third to arraylist C. The format of the arraylists is this:
    <item name>,<# in stock>,<value of one item>
    The first number below the arraylists in the text file represents the number of items in the list. The second number below the arraylists represents the total value of the items in the arraylists.
    Here is the class file I have (yes, it does everything):
    import java.io.*;
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Inventory extends Object
         public int toAdd = 0;
         private boolean done = false;               //Are we done yet?
         public String strItemName;                    //The name of the item type.
         public int intNumInStock;                    //The number in stock of that type.      
         public double dblValueOfOneItem;          //The value of one item.
        public String strNumberInStock;               
        public double dblTotalValueA;               //The total value of warehouse A.
        public double dblTotalValueB;               //The total value of warehouse B.
        public double dblTotalValueC;               //The total value of warehouse C.
        public int intWarehouseAItemCount;          //Counter for items in warehouse A.
        public int intWarehouseBItemCount;          //Counter for items in warehouse B.
        public int intWarehouseCItemCount;          //Counter for items in warehouse C.
         ArrayList warehouseAList = new ArrayList();     //Create the Warehouse A ArrayList.                                   
         ArrayList warehouseBList = new ArrayList(); //Create the Warehouse B arrayList.
         ArrayList warehouseCList = new ArrayList(); //Create the Warehouse C arrayList.
         /** Construct a new Inventory object. */
         public Inventory()
              super();
         /**Add items to the Warehouse A ArrayList.*/
         private void createWareHouseA()
              System.out.println("!" + toAdd + " item types will be added to warehouse A.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseAList :  " +
                                                                warehouseAList.size());
              //Add items to the array List
              warehouseAList.add(this.strItemName);
              warehouseAList.add(this.strNumberInStock);
              warehouseAList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseAList.size());
         /**Add items to the Warehouse B ArrayList.*/
         private void createWareHouseB()
              System.out.println("!" + toAdd + " item types will be added to warehouse B.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseBList :  " +
                                                                warehouseBList.size());
              //Add items to the array List
              warehouseBList.add(this.strItemName);
              warehouseBList.add(this.strNumberInStock);
              warehouseBList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseBList.size());
         /**Add items to the Warehouse C ArrayList.*/
         private void createWareHouseC()
              System.out.println("!" + toAdd + " item types will be added to warehouse C.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseCList :  " +
                                                                warehouseCList.size());
              //Add items to the array List
              warehouseCList.add(this.strItemName);
              warehouseCList.add(this.strNumberInStock);
              warehouseCList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseCList.size());
         /**Interpret the commands entered by the user.*/
         public void cmdInterpreter()
              this.displayHelp();
              Scanner cin = new Scanner(System.in);
              while (!this.done)
                   System.out.print(">");
                   //"line" equals the next line of input.
                   String line = cin.nextLine();
                   this.executeCmd(line);
         /**Execute one line entered by the user.
          * @param cmdLN; The command entered by the user to execute. */
          private void executeCmd(String cmdLN)
               Scanner line = new Scanner(cmdLN);
               if (line.hasNext())
                    String cmd = line.next();
                    //What to do when users enter the various commands below.
                    if (cmd.equals("help"))
                         this.displayHelp();
                    else if (cmd.equals("Q!"))
                         this.done = true;
                    else if (cmd.equals("F") && line.hasNext())
                         this.inputFromFile(line.next());
                    else if (cmd.equals("K") && line.hasNext())
                         int numItemsToAdd = Integer.valueOf( line.next() ).intValue();
                         this.toAdd = numItemsToAdd;
                         this.inputFromKeyboard(numItemsToAdd);
          /**What to do if input comes from a file.
           *     @param inputFile; The name of the input file to process.*/
          private void inputFromFile(String inputFile)
               Scanner cin = new Scanner(System.in);
               System.out.println("!Using input file " + inputFile + ".");
               System.out.print("!Enter the name of the output file: ");
               String outputFile = cin.next();
               System.out.println("!Using output file " + outputFile + ".");
              try
                   BufferedReader in = new BufferedReader(new FileReader(inputFile));
                   //Scanner in = new Scanner(new File(inputFile));
                   //Initialize the String variables.
                   String line1 = null;
                   String line2 = null;
                   String line3 = null;
                   String line4 = null;
                   String line5 = null;
                   String line6 = null;
                   String line7 = null;
                   String line8 = null;
                   String line9 = null;
                   System.out.println(in.equals(",") + " see?");
                   //System.out.println((char)(char)in.read() + " experiment");
                   /**This loop assigns values to the string variables based on the
                    * values on each line in the input file. */
                   while(in.readLine() != null)
                        line1 = in.readLine();
                        line2 = in.readLine();
                        line3 = in.readLine();
                        line4 = in.readLine();
                        line5 = in.readLine();
                        line6 = in.readLine();
                        line7 = in.readLine();
                        line8 = in.readLine();
                        line9 = in.readLine();
                   //Print the contents of each line in the input file.
                   System.out.println("!value of line 1: " + line1);
                   System.out.println("!value of line 2: " + line2);
                   System.out.println("!value of line 3: " + line3);
                   System.out.println("!value of line 4: " + line4);
                   System.out.println("!value of line 5: " + line5);
                   System.out.println("!value of line 6: " + line6);
                   System.out.println("!value of line 7: " + line7);
                   System.out.println("!value of line 8: " + line8);
                   System.out.println("!value of line 9: " + line9);
                /**Add items to the warehouses.*/
                   warehouseAList.add(line1);
                   warehouseBList.add(line4);
                   warehouseCList.add(line7);
                /**Add the item count and total value for warehouse A.*/
                   int intLine2 = Integer.valueOf(line2).intValue();
                   this.intWarehouseAItemCount = intLine2;
                   double dblLine3 = Double.valueOf(line3).doubleValue();
                   this.dblTotalValueA = dblLine3;
                /**Add the item count and total value for warehouse B.*/
                   int intLine5 = Integer.valueOf(line5).intValue();
                   this.intWarehouseBItemCount = intLine5;
                   double dblLine6 = Double.valueOf(line6).doubleValue();
                   this.dblTotalValueB = dblLine6;
                /**Add the item count and total value for warehouse C.*/
                  int intLine8 = Integer.valueOf(line8).intValue();
                  this.intWarehouseCItemCount = intLine8;
                  double dblLine9 = Double.valueOf(line9).doubleValue();
                  this.dblTotalValueC = dblLine9;
                /**Ask the user how many items to add or delete from inventory.*/
                  System.out.print("Enter the number to add to inventory for " +
                                                               warehouseAList.get(0) + ":");
                  String toAddOrDel = cin.next();
                /**Print the contents of all the warehouses. */
                   System.out.println(" ");
                   //Print the contents of warehouse A.
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse A:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse A.
                   System.out.println(warehouseAList);
                   //Print the total amount of items in warehouse A.
                   System.out.println("Total items: " + this.intWarehouseAItemCount);
                   //Print the total value of the items in warehouse A.
                   System.out.println("Total value: " + this.dblTotalValueA);
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse B:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse B.
                   System.out.println("!warehouseB: " + warehouseBList);
                   //Print the total amount of items in warehouse B.
                   System.out.println("Total items: " + this.intWarehouseBItemCount);
                   //Print the total value of the items in warehouse B.
                   System.out.println("Total value: " + this.dblTotalValueB);
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse C:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse C.
                   System.out.println("!warehouseC: " + warehouseCList);
                   //Print the total amount of items in warehouse C.
                   System.out.println("Total items: " + this.intWarehouseCItemCount);
                   //Print the total value of the items in warehouse C.
                   System.out.println("Total value: " + this.dblTotalValueC);
                   in.close();
              catch (FileNotFoundException e)
                   System.out.println("!Error: Unable to open file for reading.");
              catch (EOFException e)
                   System.out.println("!Error: EOF encountered, file may be corrupted.");
              catch (IOException e)
                   System.out.println("!Error: Cannot read from file.");
          /**What to do if input comes from the keyboard.
           *     @param numItems; The total number of items that will be added to the
           *                      Warehouse(s). */
          public void inputFromKeyboard(int numItems)
               System.out.println("!You will be adding " + numItems + " items to " +
                                             "inventory from the keyboard. ");
               this.toAdd = numItems;
               Scanner cin = new Scanner(System.in);
               //Prompt user for name of output file.
               System.out.print("!Enter the name of the output file: ");
               String outputFile = cin.next();
               /**This loop asks the user for information about the item(s) and inputs
                 *them into the appropriate array.*/
               int count = 0;
               while (numItems > count)
                    //Item name.
                    System.out.print("!Item name: ");
                    String addItemName = cin.next();
                    //Number in stock.
                    System.out.print("!Number in stock: ");
                    String addNumInStock = cin.next();
                    //Initial warehouse.
                    System.out.print("!Initial warehouse(A,B,C): ");
                    String addInitWarehouse = cin.next();
                    //Value of one item.
                    System.out.print("!Value of one item: ");
                    String addValueOfOneItem = cin.next();
                    //Add or delete from inventory
                    System.out.print("!Enter amount to add or delete from inventory: ");
                    String strAddOrDelete = cin.next();
                    System.out.println("!Amount to add or delete: " + strAddOrDelete);
                    //Cast
                    int intAddNumInStock = Integer.valueOf(addNumInStock).intValue();
                    double doubleAddValueOfOneItem = Double.valueOf(addValueOfOneItem).doubleValue();
                    int intAddOrDelete = Integer.valueOf(strAddOrDelete).intValue();
                    /**Add intAddNumInStock with intAddOrDelete to determine the amount
                     * to add or delete from inventory (If a user wishes to remove items
                     * from inventory simply add negative values). */
                    intAddNumInStock = intAddNumInStock + intAddOrDelete;
                    System.out.println("!Inventory after modifications: " + strAddOrDelete);
                    this.strItemName = addItemName;
                    this.intNumInStock = intAddNumInStock;
                    this.dblValueOfOneItem = doubleAddValueOfOneItem;
                    //Put items into warehouse A if appropriate.
                    if (intAddNumInStock < 25)
                        //Increment the warehouse A item count.
                        this.intWarehouseAItemCount = this.intWarehouseAItemCount + 1;
                        //Calculate the total value of warehouse A.
                        this.dblTotalValueA = this.dblTotalValueA + intAddNumInStock * doubleAddValueOfOneItem;
                        //Create the warehouse A array list.
                        this.createWareHouseA();
                    //Put items into warehouse B if appropriate.
                    if (intAddNumInStock >= 25)
                        if (intAddNumInStock < 75)
                             //Increment the warehouse B item count.
                             this.intWarehouseBItemCount = this.intWarehouseBItemCount + 1;
                             //Calculate the total value of warehouse B.
                             this.dblTotalValueB = this.dblTotalValueB + intAddNumInStock * doubleAddValueOfOneItem;
                             //Create the warehouse B array list.
                             this.createWareHouseB();
                    //Put items into warehouse C if appropriate.
                    if (intAddNumInStock >= 75)
                        //Increment the warehouse C item count.
                        this.intWarehouseCItemCount = this.intWarehouseCItemCount + 1;
                        //Calculate the total value of warehouse C.
                        this.dblTotalValueC = this.dblTotalValueC + intAddNumInStock * doubleAddValueOfOneItem;
                        //Create the warehouse C array list.
                        this.createWareHouseC();
                     //display helpful information.      
                    System.out.println("!--------------------------------");
                    System.out.println("!" + addItemName + " is the item name.");
                    System.out.println("!" + addNumInStock + " is the number in stock.");
                    System.out.println("!" + addInitWarehouse + " is the initial warehouse.");
                    System.out.println("!" + addValueOfOneItem + " is the value of one item.");
                    System.out.println("!--------------------------------------------------");
                   //Increment the counters.
                    count++;
               /**Create and write to the output file. */
               try
                     //Use the output file specified by the user.
                    PrintWriter out = new PrintWriter(outputFile);
                 /**Write warehouse A details.*/
                      //Blank the first line.
                      out.println(" ");
                    //Write the array list for warehouse A.
                    out.println(warehouseAList);
                    //Write the amount of items in warehouse A.
                    out.println(intWarehouseAItemCount);
                    //Write the total value for warehouse A.
                    out.println(dblTotalValueA);
                 /**Write warehosue B details.*/
                   //Write the array list for warehouse B.
                    out.println(warehouseBList);
                    //Write the amount of items in warehouse B.
                    out.println(intWarehouseBItemCount);
                    //Write the total value for warehouse B.
                    out.println(dblTotalValueB);
                 /**Write warehouse C details.*/
                      //Write the array list for warehouse C.
                    out.println(warehouseCList);
                    //Write the amount of items in warehouse C.
                    out.println(intWarehouseCItemCount);
                    //Write the total value for warehouse C.
                    out.println(dblTotalValueC);
                    //Close the output file.
                    out.close();     
                catch (FileNotFoundException e)
                   System.out.println("Error: Unable to open file for reading.");
               catch (IOException e)
                   System.out.println("Error: Cannot read from file.");
               /**View the contents and the value of each warehouse.*/
               System.out.println("!---------------Inventory Summary------------------");
               System.out.println("!--------------------------------------------------");
               System.out.println("!--------------------LEGEND:-----------------------");
               System.out.println("!<item type>, <amount in stock>,<value of one item>");
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse A:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse A.
               System.out.println(warehouseAList);
               //Total items in warehouse A.
               System.out.println("Total items: " + intWarehouseAItemCount);
               //Display total value of warehouse A.
               System.out.println("Total value: " + "$" + dblTotalValueA);
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse B:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse B.
               System.out.println(warehouseBList);
               //Total items in warehouse B.
               System.out.println("Total items: " + intWarehouseBItemCount);
               //Display total value of warehouse B.
               System.out.println("Total value: " + "$" + dblTotalValueB);
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse C:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse C.
               System.out.println(warehouseCList);
               //Total items in warehouse C.
               System.out.println("Total items: " + intWarehouseCItemCount);
               //Display total value of warehouse C.
               System.out.println("Total value: " + "$" + dblTotalValueC);
         /**Display a help message.*/
         private void displayHelp()
              System.out.println("!--------------------------------");
              System.out.println("! General Help:");
              System.out.println("!--------------------------------");
              System.out.println("! ");
              System.out.println("!'help' display this help message.");
              System.out.println("!'Q!' quit this program.");
              System.out.println("!--------------------------------");
              System.out.println("! Input File Specific Commands:");
              System.out.println("!--------------------------------");
              System.out.println("! ");
              System.out.println("!'F' <name> type F followed by the name of the " +
                                       "file to be used for input.");
              System.out.println("!---------------------------------------");
              System.out.println("! Input From Keyboard Specific Commands:");
              System.out.println("!---------------------------------------");
              System.out.println("! ");
              System.out.println("!'K' <number> type K followed by the number of " +
                                        "items that will be added. ");
              System.out.println("! ");
    }Program file:
    public class InventoryProg
         public static void main(String[] args)
              //Create a new Inventory object.
              Inventory test = new Inventory();
              //Execute the command interpreter.
              test.cmdInterpreter();
    }Right now I am stuck on this and I cannot progress any further until I figure out how to input the data in the text file back into a arraylist.
    Thanks in advance.

    Thanks but I figured it out. Heres a sample of the code i used to solve my problem:
    try
                           //Warehouse A BufferedReader.
                   BufferedReader inA = new BufferedReader(new FileReader(inputFileWarehouseA));
                   //Warehouse B BufferedReader.
                   BufferedReader inB = new BufferedReader(new FileReader(inputFileWarehouseB));
                   //Warehouse C BufferedReader.
                   BufferedReader inC = new BufferedReader(new FileReader(inputFileWarehouseC));
                   //Warehouse details BufferedReader.
                   BufferedReader inDetails = new BufferedReader(new FileReader(inputFileDetails));
                   //Will hold values in warehouse arraylists.
                   String lineA = null;
                   String lineB = null;
                   String lineC = null;
                   //Will hold the details of each warehouse.
                   String line1 = null;
                   String line2 = null;
                   String line3 = null;
                   String line4 = null;
                   String line5 = null;
                   String line6 = null;
                   //Get the item count and total value for each warehouse.
                   while(inDetails.readLine() != null)
                        line1 = inDetails.readLine();
                        line2 = inDetails.readLine();
                        line3 = inDetails.readLine();
                        line4 = inDetails.readLine();
                        line5 = inDetails.readLine();
                        line6 = inDetails.readLine();
               /**Assign the item count and total value to warehouse A.*/
                  //Cast.
                   int intLine1 = Integer.valueOf(line1).intValue();
                   double dblLine2 = Double.valueOf(line2).doubleValue();
                   //Assign the values.
                   this.intWarehouseAItemCount = intLine1;
                   this.dblTotalValueA = dblLine2;
                /**Assign the item count and total value to warehouse B.*/
                     //Cast.
                   int intLine3 = Integer.valueOf(line3).intValue();
                   double dblLine4 = Double.valueOf(line4).doubleValue();
                     //Assign the values.
                   this.intWarehouseBItemCount = intLine3;
                   this.dblTotalValueB = dblLine4;
                /**Assign the item count and total value to warehouse C.*/
                     //Cast.
                     int intLine5 = Integer.valueOf(line5).intValue();
                   double dblLine6 = Double.valueOf(line6).doubleValue();
                   //Assign the values.
                   this.intWarehouseCItemCount = intLine5;
                   this.dblTotalValueC = dblLine6;
                /**Put the items back into the warehouses arraylists. */
                   //Add items to warehouse A.
                   while((lineA = inA.readLine()) != null)
                        warehouseAList.add(lineA);
                   //Add items to warehouse B.
                   while((lineB = inB.readLine()) != null)
                        warehouseBList.add(lineB);
                   //Add items to warehouse C.
                   while((lineC = inC.readLine()) != null)
                        warehouseCList.add(lineC);
                   }(this isn't the whole try statement its pretty long)

  • How to input data into a table with columns?

    I am trying to input data into a table.  My table have 5 columns and an unlimited amount of rows.  I created a program in LabView that enters the data into the table but it enters all of the data in one row.  I would like to enter the first set of information into the first column, the second set of info into the second  column and so on.  I am including a copy of the program that I am working with.  I would like the number of runs to be put into the first column (it should count down like number 5 in first row, number 4 in second row, number 3 in third row, and so on).  I would like the applied voltage to be placed in the second column, and so on.  Any help or information will be greatly appreciated.  I am working with LabView Version 6.1 and 8.0.  I am submitting the vi from 6.1. 
    Attachments:
    FJ-PROGRAM.vi ‏68 KB

    Pondered,
    I looked at your code and I think you might be making things too complicated. I've included a very simple example that demonstrates how to write a 2D array of integers to a table. Hope you find this helpful. It is in LV 7.1.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect
    Attachments:
    rows - columns.vi ‏17 KB

Maybe you are looking for

  • ICloud has deleted some 400 notes when syncing with my new iPhone 5. I have a backup on a time capsule.

    Hi, When synching my notes from laptop to new Iphone most of my notes weren't synched. It seems that the notes on 'my computer' were the ones not synching, so I draged a few to iCloud and my gmail account to test. These individual notes went across t

  • Why the message " ... not a valid PDF document ..."?

    Am using PSE 9 on a Mac OS 10.7 when suddenly an error message started appearing 3 (and more) times in a row every time I tried to edit a photo.  (I had been editing 100's of photos with no problem.)  Now, even if I just open up Elements with no phot

  • Error during Inbound Delivery creation by Idoc DELVRY05

    Hi, We are trying to consolidate ASNs and creating an inbound delivery for the same. Thus we have more than one PO information in the idoc. It processes fine and creates an inbound delivery if all the line item nos are different. But the issue is, wh

  • Can i recover lost notes from an old time machine back up?

    I found this doom and gloom advice, but isn't there a way to go to an old back up on my time machine and find the file? modular747 Central Florida Re: lost notes     Oct 1, 2009 8:59 PM    (in response to Sybil Clanton)  Where did you synch them to?

  • Excise Duty rate problem

    Hi all here is problem in excise duty rate miantanance in JIID. our are purchasing material from the same vendor with different excise duty rates (for Ex: one is 16% and other 12%) in the same plant. can any body suggest how to maintain different rat