Tutorial > Data Collection > Data from a textfile
Entering data from a text file

This tutorial will demonstrate how data can be converted from a single textfile to a data base using W-Import. Note that this example doesn't utilize W-Imports multi file or multi directory automatic features.

We will be using an actual data file produced by a gage. The file, e1.txt, looks like this:


13 ,01/11/94 ,7:57:19,qbet7029 ,1 ,ta6588 ,1,A,17,19,0.001930
13 ,01/11/94 ,8:2:37 ,qbet7029 ,1 ,ta6588 ,1,A,17,18,0.002059
13 ,01/11/94 ,8:2:46 ,qbet7029 ,1 ,ta6588 ,1,A,17,17,0.002318 
13 ,01/11/94 ,8:2:49 ,qbet7029 ,1 ,ta6588 ,1,A,17,16,0.002553

As you can see, the file is comma delimited and has eleven fields, but only the last one contains the actual measurements we will focus on in this example.

Now, we are going to:

  1. Create a database and SPC file
  2. Import the data to the data base using W-Import
  3. Create an SPC file using Sigma SPC
  4. View the SPC file in Sigma SPC

  1. Create corresponding database and SPC file.
    (If you don't want to go through these steps in the first part, you can just jump to step 8, below.)
    1. Run Sigma SPC.
    2. Select File > Setup Wizard
    3. Go to directory: sigwin\samples\textfile. Press Next >
    4. Table name: Mye1
    5. Add following fields:
      (N under type means numeric type. A means alpha (text) type and needs to have length speecified)
      field name type length
      13 N 0
      Date N 0
      time N 0
      Text1 A 10
      Num1 N 0
      Text2 A 10
      Num2 N 0
      A A 1
      Num3 N 0
      Num4 N 0
      Num5 N 0
    6. Press Next > to save the data base.
    7. Accept defaults by pressing Finish >
    8. Select SPC Edit from the Setup menu
    9. Open samples\textfile\e2.spc
    10. In the Setup SPC window: Click on Options...
    11. Click on Auto Collect tab.
    12. Check W-Import auto importing
    13. Click on button called W-Import. A setup box will be displayed.
    14. Set Mode to Manual
    15. Select Browse by the ACSII File Name input box and select sigwin\samples\textfile\e1.txt. Press OK.
    16. Select Browse by the DB table name (default) input box and select sigwin\samples\textfile\e2.db. Press OK. Make sure the settings look like this:
    17. Click on the Text tab
    18. Set Date Stamp to None.
    19. Set Strip Double Quotes to None
    20. Make sure Strip first line is NOT checked. The Setup Options window should now look like this:
    21. Press the Events tab
    22. Checkmark Log Errors. This will help debug if importing fails.
    23. Press OK in all windows until you are back in Sigma SPC main window.
  2. Import the data to the data base
    1. Open samples\textfile\e2.spc if not already opened.
    2. Select File > Utils > W-Import
    3. Press Go Import.
      Now the contents of the textfile is imported into the data base.
  3. View SPC File in Sigma SPC for analysis.
    1. In Sigma SPC main window click on the Status Grid button () to view charts.
    2. Check only Num5 and press OK.
    3. The control chart of vairable num5 will be displayed. Let's take a look at it:

      Five points are displayed, since we set the sample size to two and the number of rows in the text file was 10.
    4. You can press Go Import in the W-Import window again to see how the control chart updates. If you can't see the W-Import window then select File > Utils > Wimport in the menu to make it visible.
Top < Prev > Next