Read a txt file, display a table of values, select a value to set min value for DAQMX

Hello everyone, I am having trouble with the following data importing. I want to do the following:
Open a txt file, have it be imported as a table. Allow the user in the GUI to select a value on the 2nd column, set that value as either min or max for a daqmx analog output. I'll attach the .txt file being used. I can add the code but I was basically using the read from text.vi example with no luck.
Attachments:
090414-200-800-16x.txt ‏1 KB

Thank you all, I have set up this input but I have a couple more questions. First now that I have the ability to have a mouse click to set a value, is it possible to have two events, such that the first sets a certain value and the second retains a different one?
In addition (im not sure if this would be ok to post here but for the sake of clarity and decluttering the forum I shall post it here) is it possible to switch from a constant voltage mode (in DAQMX analog output) to a waveform mode ( attacthed the binary waveform) all while maintaining a constant min value (untill updated from the table by user, which is also attached).
I have attachted a vi (Labview version 8.2) that I threw together today.
Thank you all,
DB
Attachments:
calib.csv ‏3 KB
Example.vi ‏157 KB

Similar Messages

  • Interesting ? @ servlet reading a txt file

    hi friends,
    i need ur help for one interesting problem i m facing.
    I want to read a txt file and wanna display the text from that file into an html, using a servlet.A txt file contains sentences( words with spaces in between ).When servlet reads the file, it is reading the whole sentence ,but while displaying that sentence, it is just showing the first word of the sentence.
    html is not able to read the space between the words.
    so what do i suppose to do now.
    waiting for ur replies.......
    thanx
    amit

    hi friends ,
    i m giving the code , just give it a try//
    This is a servlet ---------------------------------------
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class AdminGraphServlet extends HttpServlet
    Properties ht;
    FileInputStream fin;
    FileOutputStream fout;
    String s15,st;
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException,ServletException
    ht = new Properties();
    try
    fin = new FileInputStream("Data.txt");
    catch(FileNotFoundException e)
    System.out.println("FileNotFound");
    try
    if(fin != null)
    ht.load(fin);
    s15 = (String)ht.get("title");
    fin.close();
    catch(IOException e)
    System.out.println("Error Reading File");
    PrintWriter out = res.getWriter();
    res.setContentType("text/html");
    out.println("<html><body>");
    out.println("<form method=post action=http://localhost:8080/servlet/MyServlet>");
    out.println("<table><tr>");
    out.println("<tr><td>Title</td>");
    out.println("<td><Input Type=Text name=title value="+ s15 +"> </td></tr>");
    out.println("</table>");
    out.println("<input type=submit name=submit value=submit>");
    out.println("<input type=hidden name=check value=save>");
    out.println("</form>");
    out.println("</body></html>");
    public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    String Scheck = req.getParameter("check");
    PrintWriter out1 = res.getWriter();
    String ttl = req.getParameter("title");
    if(Scheck.equals("save"))
    ht.put("title",ttl);
    fout = new FileOutputStream("Data.txt");
    ht.store(fout,"Data");
    fout.close();
    out1.println("<html><body>");
    out1.println("<h1>Stored This Data Successfully</h1>");
    out1.println("</html></body>");
    txt file is having a line
    title=Are you smart enough?
    The servlet should display this sentence in a text box.
    But it is displaying only "Are".
    still waiting...
    have nice time..
    amit

  • Uploading .txt file to z table

    Hai Friends,
    I want to upload a .txt file to Z table which contains around 27 fields. but .txt file contains data in two lines by as follows.
    4.5  2.36  21.56 25  36.14  47.00  145.3  1247.6
    10.2  4.6  23.5 589.1  20.1  45.6
    Is it possible to upload the .txt file.

    Hi,
      It is possible to upload txt file to ztable. You need to write small program for that.
       Please see the example code below. Here from excel they are converting to internal table, use 'GUI_UPLOAD' to convert text file data to internal table and use this internal table to upload data into ztable. use MODIFY ZTABLE FROM TABLE ITAB.
    Also maintain the internal table structure and structure of the ZTABLE should match.
    **& Report  Z_DEMO_FILL_TABLE
    report  z_demo_fill_table no standard page heading line-size 255.
    selection-screen begin of block b1 with frame title text-003.
    selection-screen skip.
    *File Name
    selection-screen begin of line.
    selection-screen comment 5(28) text-001 for field p_file.
    parameters: p_file type  rlgrap-filename.
    selection-screen end of line.
    selection-screen skip.
    selection-screen end of block b1.
    data declarations.
    *data: get_po_header type standard table of BAPIEKKOC,
         get_PO_HEADER_ADD_DATA type standard table of BAPIEKKOA,
         get_PO_ITEMS type standard table of BAPIEKPOC,
         get_PO_ITEM_ADD_DATA type standard table of BAPIEKPOA,
    data:   get_poheader type standard table of bapimepoheader,
            get_poitem type standard table of bapimepoitem,
            it_data type table of alsmex_tabline initial size 0.
    data: wa_poheader like line of get_poheader,
          wa_poitem like line of get_poitem,
          wa_data like line of it_data,
    *tables used for catching messages returned by bapi
          gt_return   type standard table of bapiret2,
          gt_return1   type standard table of bapiret2.
    types: begin of x_po_tab,
      doc_date type bapimepoheader-doc_date,
      comp_code type bapimepoheader-comp_code,
      purch_org type bapimepoheader-purch_org,
      pur_group type bapimepoheader-pur_group,
      vendor type bapimepoheader-vendor,
      po_number type bapimepoheader-po_number,
      pmnttrms type bapimepoheader-pmnttrms,
      po_item type bapimepoitem-po_item,
      material type bapimepoitem-material,
      plant type bapimepoitem-plant,
      stge_loc type bapimepoitem-stge_loc,
      tax_code type bapimepoitem-tax_code,
    end of x_po_tab.
                    Search help for file                                 *
    at selection-screen on value-request for p_file.
      call function 'F4_FILENAME'
       exporting
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
         field_name          = 'P_FILE'
       importing
         file_name           = p_file.
                    START-OF-SELECTION                                   *
    start-of-selection.
    perform for uploading Excel file
      perform upload_file_path.
    perform for transfering Excel data to Internal table
      perform excel_to_itab.
      perform int_process.
    *&      Form  upload_file_path
          text
    -->  p1        text
    <--  p2        text
    form upload_file_path .
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        exporting
          filename                = p_file
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 12
          i_end_row               = 5000
        tables
          intern                  = it_data
        exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.
      if sy-subrc <> 0.
        message e000(zdbm) with 'Error in getting filename'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " upload_file_path
    *&      Form  excel_to_itab
          text
    -->  p1        text
    <--  p2        text
    form excel_to_itab .
      loop at it_data into wa_data.
        at new row.
          clear: wa_poheader, wa_poitem.
        endat.
        case wa_data-col.
          when '001'.
            move wa_data-value to wa_poheader-doc_date.
          when '002'.
            move wa_data-value to wa_poheader-comp_code.
          when '003'.
            move wa_data-value to wa_poheader-purch_org.
          when '004'.
            move wa_data-value to wa_poheader-pur_group.
          when '005'.
            move wa_data-value to wa_poheader-vendor.
          when '006'.
            move wa_data-value to wa_poheader-po_number.
          when '007'.
            move wa_data-value to wa_poheader-pmnttrms.
          when '008'.
            move wa_data-value to wa_poitem-po_item.
          when '009'.
            move wa_data-value to wa_poitem-material.
          when '010'.
            move wa_data-value to wa_poitem-plant.
          when '011'.
            move wa_data-value to wa_poitem-stge_loc.
          when '012'.
            move wa_data-value to wa_poitem-tax_code.
        endcase.
        at end of row.
          append wa_poheader to get_poheader.
          append wa_poitem to get_poitem.
        endat.
        clear: wa_data.
      endloop.
    endform.                    " excel_to_itab
    *&      Form  Int_process
          text
    -->  p1        text
    <--  p2        text
    form int_process .
      loop at get_poheader into wa_poheader.
        read table get_poitem into wa_poitem index 1.
    call function 'BAPI_PO_CREATE1'
      exporting
        poheader                     = wa_poheader
      POHEADERX                    =
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
      POEXPIMPHEADER               =
      POEXPIMPHEADERX              =
      VERSIONS                     =
      NO_MESSAGING                 =
      NO_MESSAGE_REQ               =
      NO_AUTHORITY                 =
      NO_PRICE_FROM_PO             =
    IMPORTING
      EXPPURCHASEORDER             =
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
    tables
      RETURN                       =
       poitem                       = get_poitem
      POITEMX                      =
      POADDRDELIVERY               =
      POSCHEDULE                   =
      POSCHEDULEX                  =
      POACCOUNT                    =
      POACCOUNTPROFITSEGMENT       =
      POACCOUNTX                   =
      POCONDHEADER                 =
      POCONDHEADERX                =
      POCOND                       =
      POCONDX                      =
      POLIMITS                     =
      POCONTRACTLIMITS             =
      POSERVICES                   =
      POSRVACCESSVALUES            =
      POSERVICESTEXT               =
      EXTENSIONIN                  =
      EXTENSIONOUT                 =
      POEXPIMPITEM                 =
      POEXPIMPITEMX                =
      POTEXTHEADER                 =
      POTEXTITEM                   =
      ALLVERSIONS                  =
      POPARTNER                    =
      POCOMPONENTS                 =
      POCOMPONENTSX                =
      POSHIPPING                   =
      POSHIPPINGX                  =
      POSHIPPINGEXP                =
      endloop.
    endform.                    " Int_process

  • Help reading a .txt file from the hard drive....

    Hi guys,
    Ok... I need to know how to read a .txt file from the hard drive... I have an example on how to read from a disk, but I don't have a disk drive. I could be confusing terminology, but I don't think I am. Here is the code I have for reading from a disk.. please let me know how I should change it to read from a hard drive.
    Also, when the error pops up, it says that it can't read another .txt file that is not specified in the code... any ideas how that is occuring? Please advise.
    import java.io.*;
    public class TEST {
    public static void main(String args[]) throws Exception{
    FileReader fr = new FileReader("customer.txt");
    BufferedReader bfr = new BufferedReader (fr);
    String s;
    while ((s=bfr.readLine())!= null){
    System.out.println (s);
    fr.close();
    }

    Ok... I need to know how to read a .txt file from the
    hard drive... I have an example on how to read from a
    disk, but I don't have a disk drive. I could be
    confusing terminology, but I don't think I am. Here
    is the code I have for reading from a disk.. please
    let me know how I should change it to read from a
    hard drive.The code will be the same, regardless of where the file is located. It's just the filename that will be different.
    Also, when the error pops up, it says that it can't
    read another .txt file that is not specified in the
    code... any ideas how that is occuring? Please
    advise.Probably becuase the class file (compiled version of the source code) is a different version to the source code, i.e. the source code hasn't been recompiled since the source code was changed.
    How does this relate to EJBs?

  • Assistance in Reading a .txt file

    I'm newbie on Java and I have a problem
    I'm doing a homework on Systems and I need to read a .txt file [It would be on the same folder as the Java file].
    The catch is that I have to read by Lines, Each Line could have as much as 3 words[tokens] as little as one.
    I also have to read the characters on the words/tokens to identify if they are valid.
    I have thought of 2 ways of doing this.
    Reading ALL the line and dividing the words by the Spaces.
    Or read the words by tokens and then having a flag to know when the line jumps.
    Example of the text file:
    ORG %011010
    Et1 equ $ffFF
    ;Comentary # 1
    dos LDAA @456
    END
    I hope I'm being clear.
    Now, I'm not looking to have my homework done for me, but I am looking for some pointers.
    I've tried the Scanner class but I just don't know the right methods I guess... I've also heard the Token StringTokenizer class works. But I have no clue.
    Someone could give me pointers? which Class would be the right one and which methods?
    I've been Struggling with this all week.
    Help will be really appreciated.

    I would use the Scanner class to read an entire line. If you don't know what methods to use then read the Java API and the explanation for each method of the Scanner class. Write some code to experiment and see what those methods do. Then when you have an entire line I would use String.split as StringTokenizer is/has been deprecated.

  • SQL Loader problem while loading records from txt file to database table.

    I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
    SQL*Loader-951: Error calling once/load initialization
    ORA-24329: invalid character set identifier
    F1 Please.

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • Read a Txt file that it is in a PC in a LAN

    Hello:
    Can you tell me how to read a txt file that it's in a LAN
    trouh IP with
    Lingo?
    Do I need any Xtras or can I do it only with Lingo?
    Have you some examples?
    Many thanks in advance.

    Hi,
    look at the help file about "getNetText" and
    "downloadNetThing"
    hth

  • Read a .txt file

    I'm trying to find out how to read a .txt file and simply assign its contents to a variable. Is this possible?
    [Edit] Right after posting I found this page which seems like it might be in the direction I want to go but I haven't checked it out completely yet: http://extendscript.blogspot.com/2009/06/read-tab-delimited-text-file.html
    Just posting the link for future searchers or if anyone will tell me 'Hey! That's not what you're looking for!'

    For anyone interested, the simplified answer for me was:
    var fileToParse = File ('path');
    fileToParse.open('r');
    var dataToGet = fileToParse.readln();
    fileToParse.close();
    I only needed the one line, so thats why my example above is so simple.

  • How XI will read the .txt file

    Experts,
    i AM WORKING ON A FILE BAPI synchrounous scenario.
    Sender will drop the required file on XI directory and XI will pull the file and map it with the BAPI u2013 and crate services  entries in SAP SCM. If errors are encountered during the process they are returned to the client in a report or as erroneous file.
       *I have a .txt file( tab delimitted file)  in the folowing structure
    H                       NAME                        date            ***                 data_txt                         676869*
      C             a                           b             c
      C             d                           e             f
    H                      name                           Account            brat                     abcc                             12333
      C             a                             b               c
      C             d                             e               f                          hjhdkf
    like this  multiple entries, ll be getting .
    Based on H ( indicator), Have to get the data. How will I do in XI file  adapter?  Please help me how should I design the file adapter so that It can read the .txt file.
    I have created the sender data type similarly to the structure of BAPI.
    Note; H indicates teh Header and D indicates teh sublines. Together it is called one service entry. Aagain Next 'H' indicates the strat of next service entry.
    Thanks
    Veeru

    Nutan,
      I want the flat file  data in teh following xml format
    <Records>
        <Header>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header>
    <Header1>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header1>
    </Records>
    Records-- o to unbounded
    Header--- 0 to 1
    header1-- 0 to 1
    Item--- 0 to unbounded
    My input .txt file ,  fields are separated by a tab. I mean its a tab delimitted file.
    The main tag Records is 0 to unbounded.
    How to do the content conversion for the  same.
    Thanks
    Veeru
    Edited by: viru srivastava on Dec 20, 2009 2:56 AM

  • Continiously read a txt file

    Hello fellows,
    is there a way to read a *.txt file continiously without doing the simple while loop wich burns all the CPU ??
    This txt file is generated by another application that pick up messages from a pipe and register messages in the txt file.
    As a final goal the messages read in the txt file will control other executions in the vi.
    Attached files: vi in LabVIEW 8.0 and the txt file.
    Attachments:
    Zip.zip ‏6 KB

    Thanks for your interest ! !
    The process will be as follows:
    1-an application reads text in a serveur pipe and write it into the txt file.
    2-The LabVIEW vi reads in loop the txt file and sort out the txt value each time that's updated by the application running in parralel.
    The goal is to synchronize the labview execution with the new messages arriving in the txt file.
    Thanks for your suggestions on how can I continiously read the txt file and take an action in the vi each time the txt file is updated with new text.
    See you...

  • How to read a txt file then insert them into db tables

    Hi,
    Please help me to solve this problem. This is what I need to do:
    1. read a text file which holds the values to be inserted into some database tables. For example it holds ename, deptno, sal, dname for emp and dept tables. These are in a text file now.
    2. Then I need to insert these data into db tables like emp and dept, and check if there are dups or voilate any constraints. The records to be inserted are usually > 100,000, so I am also looking for a fast way to do this.
    3. This operation happens regularly, so I need to schedule the job. I know this can be done by using procedures and dbms_jobs.
    Any help will be greately appreciated.

    Generally, in 8i, folks would use sql loader to accomplish this. Sql loader does exactly what you want, but is an external application, so it would probably be easiest to schedule it to run using your operating system's scheduler (i.e. cron on Unix, Task Scheduler on Windows). You could certainly write a PL/SQL procedure that called the external sql loader application, and use the Oracle scheduler to schedule it, but that strikes me as more effort than it's worth.
    If you're using 9i, you could look into external tables, which would simplify the process greatly.
    Justin

  • SAP GRC - Exporting rules from GRC - how to read the .txt file generated ?

    Hi there,
    I am using GRC Compliance Calibrator and have downloaded the default Global rules defined in Compliance Calibrator using the Rule Architect -> Utilities->Export rules.
    This gave me a massive txt file with a lot of tables and data. Reading through this forum, I did figure out that lines starting with M are the header rows for the tables and D rows are the data rows.
    My question is, how do i figure out what each of the Virsa tables stand for (e.g. VIRSA_CC_FUNCACT, VIRSA_CC_FUNCPRM) ?
    I tried SE11 and looking up these tables in the SAP environment associated with this CC install, however it says that the table was not found.
    Could someone please point me to :
    A) A list of the common Virsa CC tables and their descriptions ?
    OR
    B) How can i find what these tables stand for online or in the SAP environment?
    Many thanks !

    Hi Santosh,
    There is no option available to export only the customized rule sets to another system. The export rules option will give all the rules that are available in that system.
    You can do in the below manner
    a) Extract the data from Export rules
    b) Open that text file in a spreadsheet and edit the spreadsheet [Remove the rule sets & the rules not required in production system]
    c) Save the spreadsheet in UTF-8 text file
    d) Upload them in the production.
    The above procedure is bit complex and cumbersome -as changing the text file is risky. Even a space will not generate any rules in the RAR. I would suggest rename the new rule set in different naming convention and upload in your test environment before uploading the text files  in Production.
    But, using the Export and Import option you cannot upload only the customized rule set as the extract happens for the entire rules sets available in the system.
    Thanks and Best Regards,
    Srihari.K

  • Upload .txt file into Database Table

    Hi,
    I was wondering if someone could please point me in the right direction. I've been looking around the forum but can't find anything to help me achieve the following.
    I would like to be able to upload a .txt file using a webpage. Then store the information inside this file into database tables.
    eg. contents of mytextfile.txt:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    joe
    9 somestreet, elsewhere
    999 888 777 666
    peter
    214 nearby lane, overhere
    555 555 555 555
    I would like to insert this data into a table.
    eg. table name = CONTACTS
    userid = primary key (using sequence)
    username = (line 1 - richard, joe, peter)
    address = (line 2)
    phone_no = (line 3)
    As you can see the records will appear 1 at a time and will have a blank line between records. Is there anyway for me to upload a file like this and have it placed into tables?
    I have seen http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html but this seems to be for uploading a whole file and downloading the same file, rather than extracting data from the file.
    I hope I have managed to explain my problem.
    Many thanks,
    Richard.

    Richard,
    HTML DB allows you to upload CSV files via the Data Workshop. That data would then be parsed and inserted into a specific table. Alternatively, if you have your data in an Excel spreadsheet, and it is less than 32k, you can copy & paste the data directly into HTML DB's Data Workshop, which will then parse and import it into the Oracle database.
    The one obstacle you may have to overcome is converting your data from the format you outlined to CSV format. Specifically, you would have to make this:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    Look something like this:
    "richard","10 anywhere street, anytown, somewhere","111 222 333 444"
    Hope this helps,
    - Scott -

  • How to read LARGE .TXT FILES from server

    i m unable to read large .txt (>100kb) files from server.
    also is there any way to store the content in mobile phone.
    PLEASE HELP as iam in dire need and only few days are left.
    thanks

    Hi
    > i m unable to read large .txt (>100kb) files from server.
    What do you mean by that? Are you trying to display that amount of text and you get an error. Are you trying to read from the server and you get there an error?
    > also is there any way to store the content in mobile phone.
    Using RMS. But be aware of the size limit specific to every phone.
    Mihai

Maybe you are looking for

  • Chatserver not working like it should

    Hi I have created a chatserver and a chatclient where the chatserver is running as a multithreaded server where is can receive multiple requests at a time instead of only being able to handle one request at a time. When i start up the server, it work

  • How to get windows 7 pc to access a printer connected to airport express

    Hi, I have connected an airport express to my BT home hub and created a new Wi-Fi network. I have also connected a Canon MP550 series printer to the express which I can access to print from my macboon pro. However I am unable to print from my Windows

  • Using "boolean status" to prohibit a function from being performed!?

    Hey guys, Hope you can help me with this, shouldn't be so hard but I just can't find a way to do it. Obviously, I'm doing something wrong but what? (Bear in mind that I pretty much just started JAVA) What I'm trying to do is the following: 1.The end-

  • Value of a read only check box is always null

    Hi, I have a read-only check box in my form which fetches its values using Y or N value from table. If the value fetched from the table is 'Y' then check box is checked. But when I tried to assign the value of this check box to some other item it is

  • Assets not downloading

    HI! I have the full student version of Creative cloud, however, when I go to "aassets to download an image, it tells me that I need to upgrade, however I already should have the upgrade. I even was at an adobe workshop and the representative could no