Read file txt and research numbers

I have a text file that looks like this:

Ref #1 2.1 3.0-10

Ref #2 3.3-2.3 - 1.5

I would like the user to be able to:

A. enter a line number in the digital control of VI and VI on-screen digital displays the numbers on the line.

for example if the user '1' key, the three digital displays show "2.1", "3.0" and "-10"»

B. key in a string in the control of chain of VI and digital displays in the view of the VI numbers on the line that contains the string

for example if the user in "ref #2" key, the three digital displays show "3.3", "2.3" and "-" 1.5 ".

An example of code?

We can't really say what looks like your text file. What are delimiters? (tabs? space?).

Here's what I'd do (if the file is clean (a single column separator, etc)):

  • Read the file using spreadsheet file playback using the polymorphic string instance. This gives you a 2D channels table.
  • Remove the first column and make it a table 1 d of channels.
  • Go to digital 2D table remaining channels and to convert an array of DBL.
  • Wire now two tables for a while in a loop so that the user can interact (use a small wait or structure of the event).
  • For scenario A, use the table of indexes on the digital Board to display the appropriate line.
  • For scénarion B, table search for use on the string, the index table and proceed as above to obtain the line.

See how far you get...

Tags: NI Software

Similar Questions

  • Reading data from a file txt and inserting into table

    I have a text file and have uploaded data in this text file in an internal table,

    the data is normally placed online and I managed to recover most of the data, but I have problems by inserting a few conditions

    OK, well it goes like this.

    I got the right reailer id,

    Well, I have a table with all the columns in the file. Now it I'll try to throw it out as simple as I can


    Reseller 1

    column 1 column 1 column 1 column 1 column 1 column 1 column 1 column 1
    ===============
    Total 0 0 0 0 0 0 0
    -------------------------------------

    Distributor 2

    column 1 column 1 column 1 column 1 column 1 column 1 column 1 column 1
    ===============
    X 1123... .. .. .. .. ..
    234 Y... .. .. .. .. ..

    Total 23... .. .. .. .. ..

    see the problem is I have to associate the retailer number to their corresponding x and y and also not all retailers have values X and Y

    The remains of standard file format but only the values of the columns may change, but they must be inserted in the table according to the number of retailers.

    U understand what I mean...

    How about you, including both terminal number (just for the fun of it... hehe!):

    SQL> ed
    Wrote file afiedt.buf
    
      1  select retailer_no, terminal_no, retailer_name, val1, val2, val3, val4, val5, val6, val7, val8, val9, val10
      2  from (
      3        select case when retailer_no is null then lag(retailer_no, decode(val1, 'Loto', 1, 'Inst Tk', 2, 3)) over (order by line_no) else null end as retailer_no
      4              ,case when terminal_no is null then lag(terminal_no, decode(val1, 'Loto', 1, 'Inst Tk', 2, 3)) over (order by line_no) else null end as terminal_no
      5              ,case when retailer_name is null then lag(retailer_name, decode(val1, 'Loto', 1, 'Inst Tk', 2, 3)) over (order by line_no) else null end as retailer_name
      6              ,val1, val2, val3, val4, val5, val6, val7, val8, val9, val10
      7        from (
      8              select rownum as line_no
      9                    ,case when regexp_like(line, '^Retailer Number:') then regexp_replace(line, '^Retailer Number: +([0-9]+).*$', '\1') else null end as retailer_no
     10                    ,case when regexp_like(line, '^Retailer Number:') then regexp_replace(line, '^.* Terminal Number: +([0-9]+).*$', '\1') else null end as terminal_no
     11                    ,case when regexp_like(line, '^Retailer Number:') then regexp_replace(line, '^.* Retailer Name: +(.*)$', '\1') else null end as retailer_name
     12                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then trim(substr(line, 1, 15)) else null end as val1
     13                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 1) else null end  as val2
     14                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 2) else null end  as val3
     15                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 3) else null end  as val4
     16                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 4) else null end  as val5
     17                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 5) else null end  as val6
     18                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 6) else null end  as val7
     19                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 7) else null end  as val8
     20                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 8) else null end  as val9
     21                    ,case when regexp_like(line, '^( +Loto | +Inst Tk|Totals)') then regexp_substr(line, '[^ ]+', 16, 9) else null end  as val10
     22              from cdc_file
     23              where regexp_like(line, '^( +Loto | +Inst Tk |Totals|Retailer Number:)')
     24             )
     25        )
     26  where retailer_no is not null
     27* order by 1, decode(val1, 'Loto', 1, 'Inst Tk', 2, 3)
    SQL> /
    
    RETAILER_N TERMINAL_N RETAILER_NAME                  VAL1       VAL2       VAL3       VAL4       VAL5       VAL6       VAL7       VAL8       VAL9       VAL10
    ---------- ---------- ------------------------------ ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
    10000      1000006    XXXX XXXX XX Default Location  Totals     0.00       0.00       0          0.00       0          0.00       0          0.00       0
    10000      1000008    XXXX XXXX XX Default Location  Totals     0.00       0.00       0          0.00       0          0.00       0          0.00       0
    200101     20010100   XXXXXXX Popular Store          Loto       36,100.00  0.00       0          0.00       36         -5,646.00  0          0.00       0
    200101     20010100   XXXXXXX Popular Store          Inst Tk    22,000.00  0.00       0          0.00       166        -9,360.00  0          0.00       0.00
    200101     20010100   XXXXXXX Popular Store          Totals     58,100.00  0.00       0          0.00       202        -15,006.00 0          0.00       0
    200103     20010300   XX XXXXXXXX Snack              Loto       35,980.00  0.00       0          0.00       20         -3,426.00  0          0.00       0
    200103     20010300   XX XXXXXXXX Snack              Inst Tk    14,000.00  0.00       0          0.00       157        -9,180.00  0          0.00       0.00
    200103     20010300   XX XXXXXXXX Snack              Totals     49,980.00  0.00       0          0.00       177        -12,606.00 0          0.00       0
    
    8 rows selected.
    
    SQL>
    

    Published by: BluShadow on January 22, 2010 13:37
    added the retailer's name as well, but out anonymous that we dislike the actual data on the forums... ;)

  • file txt and questions about conspiring field

    Hello everyone, I'm trying to plot a graph xy of a txt file and I am having some problems. I enclose the program and and the txt file, I'm getting, don't forget it's prety base, can someone tell me what is the problem? Also more information on trace would be useful as well, for example I can plot from a machine in time real (I enclose also a file to use for communication with the machine) also is there a way to delete a line that is not in the top of the file? Thanks in advance

    Reading data from the field

    1. your file uses two spaces as the delimited.  Change that to be a tab.

    2. you need to index on COLUM, not the line.

    DAS

    1 write the file inside the loop.  Be sure to open/create the file before the loop and close the file after the loop.  This will allow you to eliminate the shift register and you save a lot of memory.

    2. If you want to plot the data, I recommend using a graph.  In this way, you have just to the wire in the last value once you converted to digital.

  • How to read the txt file that has words in between?

    Hi all

    I'm using Labview 8.2.

    I would like to read a text file.  I have given (after whenever he was on average more than 100 waveforms) several times recorded on the file.  The idea is to further improve the SNR in post processing by averaging once again the data (which was on average about 100 wave forms).

    I can get LabView to save the data in the file several times, then it keeps joins.

    The problem is to read data from labview, so I can on average now again.  The problem is the labview separates data sets with the following:

    "Channel 1".
    9925 samples
    Date 28/10/2008
    Time 17:16:11.638363
    X_Dimension time
    X 0 - 3.0125000000000013E - 3
    Delta_X 2.500000E - 6
    "End_of_Header."

    Then when I read it, he sees only the first set of data.

    Can someone tell me please how to read all the datasets under labview?

    I am attaching the file I want to read 'acquiredwaveform.txt' and the VI base (really basic btw) to play the file.

    Thank you

    This seems to be a standard LVM-file.  You can read segments of different data using the VI Express LVM loop (make sure that the file retains its extension .lvm).  I modified your example to show this.

    Note that my example is quite inefficient. Table of primitive construction causes a massive memory copy whenever it is used, and you would be probably better on average that you read in.  I made this way to make it more obvious how read segments of a file LVM.  In the process, I noticed that you have a good amount of phase jitter (zoom in on the graph of all the three waveforms).  With an average simple will make you smear on your waveforms.  You can either fix the problem in hardware (recommended) or phase shift your data so it lines up before on average.  If you need help with it, let us know.

  • Firefox should display files .swf and .flv without Adobe. You can do it can't you?

    If the "Media Player Classic" program can read files .swf and .flv, programmers probably Firefox can do for those that did for .pdf files. PLEASE, I BEG YOU!

    Hello, mozilla is indeed working on it, but it is not an easy task...

    https://blog.Mozilla.org/research/2012/11/12/introducing-the-Shumway-open-SWF-runtime-project/

  • worksheet to no array string not read any .txt file

    I am very new to Labview.

    I'm reading a .txt (positions.txt) with reading In.vi file.

    However, the result is not what I wish it to be. The first 3 rows are omitted from the result table, but I don't know why.

    I followed the tutorials and can't see why the resulting table starts 4th.

    Hi marvin,.

    is there a reason why you want to create a table of dimension 4?

    If your reading the LabVIEW has helped, how LabVIEW formats (or hope) spreadsheets for table dimensions > 2?

    Solution:

    Change the constant matrix and indicator in a 2D table!

  • Change .txt and write to the file system

    Hello!

    I created composite simple soa with BPEL process that read the .txt file and write to the file system.

    txt file have this structure:

    < ns1:Record - 1 >

    < ns1:Field - > 123 ABC < / ns1:Field - Somename>

    < / ns1:Record - 1 >

    < ns1:Record - 1 >

    < ns1:Field - unnom > 34 < / ns1:Field - Somename>

    < / ns1:Record - 1 >

    . . .

    < ns1:Record - n >

    < ns1:Field - unnom > 432 < / ns1:Field - Somename>

    < / ns1:Record - n >


    For example the input file are < ns1:Record - 1 > appears twice and < ns1:Record - 2 > appears three times in the file.

    In the output file, I want that < ns1:Record - 1 > occurs three times and < ns1:Record - 2 > occurs four times - more initial registration amount 1

    How is it possible to do? Thank you.

    Hello

    Good to know that your problem is solved.

    Your solution to the problem (copy methods and insertAfter bpel) seems to be very well and works as planned including the edge cases. Rather than use the counters, you could use the "count" in clause () method in .

    (Ex: $Invoke1_Write_InputVariable.body / ns3:Record - 1 [count($InputVariable.body/ns3:Record-1)])

    The snippet of Java code that you plan to use works very well when the records are sorted (ascending). You could do the same thing in bpel code too, but I prefer to implement the same using the method described above.

    Hope that my updates have been useful for you.

    See you soon.

  • File txt else reading machine

    Hi guys,.

    I am facing a problem that you are trying to read a .txt using ODI (11.1.1.7).

    My architecture has 3 servers. First with ODI installed with FDMEE agent, second with Essbase server and third Oracle database

    I have an interface that loads of .txt file which is on another machine (Essbase). When I run the package that contains the interface using the local agent, it runs successfully, but when I run it using my FDMEE agent it omits this file could not be found.

    I use a network path to load the file (such as \\ADDRESS_ESSBASE_MACHINE\... \File.txt).

    What can happen so he can run correctly with the agent local and failure with the FDMEE agent?

    Thank you

    Kind regards.

    Hello

    If you read files from another machine, autonomous agent configuration is recommended.

    If the FDMEE agent is not configured on the computer where the file exists, it cannot read the file.

    you have other ways to do this activity, using ftp or sftp if you have network configurations in place.

    hope that answers your question

    Kind regards

    Vinay

  • Read a .txt file

    I try to know how to read a .txt file and simply set its contents to a variable. Is this possible?

    [Edit] right after the announcement that I found this page which seems like it could be in the sense that I want to go but I have not checked completely yet: http://ExtendScript.blogspot.com/2009/06/read-tab-delimited-text-file.html

    Just post the link for future researchers or if someone will say ' Hey! This isn't what you're looking for! "

    For anyone interested, was the answer to me:

    var fileToParse = file ('path');

    fileToParse.open ('r');

    var dataToGet = fileToParse.readln ();

    fileToParse.close ();

    I need only the line, that's why my example above is so simple.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • I want to open/read/convert files .opf and .opef, (professional vista in the new Dell Vostro 1520)

    I copied dozens of files from the old notebook in a USB key, copied in my new Dell (running Vista Business) and the file types are displayed as .opf and .opef. Vista does not recognize these types (I thought that I initially had saced them in format JPEG, MPEG, etc.). The web provides no answers, nor made of Microsoft Web sites, so this page. Why is all this so desperately complicated / I just want to USE my computer, no need to learn a lot of things that need to be automated, grrrr!

    . OPf files are associated with six programs that I know (and probably more) http://www.fileinfo.com/extension/opf and http://filext.com/file-extension/OPF. I can't anything on .opef files - I don't think that there is.  I don't have either of these types of files in the associations for file on my system Vista Business SP2 32 bit (with a lot of the image). You can check your by going to start / Control Panel / Default programs / associate program, a file or process and analysis of the list for .opf and .opef.  If you have, see what kind of program he uses to open files.  If you do not, then you have no program capable of opening files (as they are named).

    Are the files on your USB stick with their original file extensions?   They are still on the old computer?  You can try to do the process again to see if this strange event occurs again (if everything goes well, it will not and everything will be OK).  Simply copy files does not change their extenstions (even if the new machine is not the software to read the extensions, and especially not if it's the case) - but already, you know that and are looking for a solution.  I could try to change the extension of one of the files has been changed to revert to the original extension and see if you can open it with the appropriate software.  If this workd and you cannot transfer files without changing extensions the (and I don't quite understand why it is happening0 then your only choice is perhaps rename each file to give it the appropriate extension.)  Either that or try to download one of the programs in the first link of this post and see if you can open the files with .opf.  If so, you need to learn how to use this program for working with these files transferred.

    You can be infected by the malware. To resolve this problem (if it is a problem) download, install, and run the following two programs: http://www.malwarebytes.org/mbam.php and http://www.safer-networking.org/en/index.html.  You can also try a free trial of Pandasoft (www.pandasoft.com).  Before you download pandasoft, uninstall all anti-virus program you currently use (because the installation and execution of two simultaneously can cause conflicts, freezes and all sorts of problems).  Once you have uninstalled your current AV program, download, install, update and scan using Pandasoft.  I think you might be amazed at how much she notes that other software missed.  Once complete, uninstall pandasoft and re - install your current AV program (unless you decide to spend that I did when I tried about 4 years ago).  You can also try the new, free Microsoft Security Essentials to: http://www.microsoft.com/security_essentials/default.aspx (with the same bet cautioned that you can have only ONE program AntiVirus installed and running on your system at any time).  They say that MSE has the most impact on the performance of the PC while I found Pandasoft found most of the malware.  You can decide if you want to keep your current AV program or switch to one of these other.  If you want to transfer the files, then try again.

    If this does not work (and don't try to do the scans with each of them), then we will check some of your system files:

    Go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well it will finish without error, it could not resolve (if she has no such errors, post here or you can try to analyze them using http://support.microsoft.com/kb/928228).

    Which; s on this subject for now (it is certainly enough to keep you busy with you would rather not do things I realize - but if we want to retrieve these files must be eliminated some potential problems that can cause the problem * unless you want to change all the files one by one if dealing even works).

    Good luck and let us know how things go.  We will be there to offer more help if these solutions do not do the trick.  One way or another, we will answer your files somehow.

    Lorien - a - MCSE/MCSA/network + / A +.

  • Whenever Adobe reader tries to update it is said that the documents is not a valid file name and he ceases to make the update

    Original title: update problems, installation, uninstall, even adobe reader...

    Whenever trying to update my adobe reader it says that documents is not a valid file name and he continues to do the update and says update failed. I can not uninstall. What is happening and how to fix it?

    Hi SMHaney,

    1. What is the full error message you get?

    You can read the following article and try the steps and check:

    How to troubleshoot issues that may occur when you install, uninstall, or upgrade one program on a Windows computer

    You can also check out the following link and check if it helps:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_programs/error-1325-documents-is-not-a-valid-short-file/2d9db4a9-25F3-4563-BDDA-ef71e31f7573

    Important: The above article contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs.

    For more information about how to back up and restore the registry, follow the steps from the link below:

    Back up the registry

    You can also try to create a new user account and check.

    Create a user account

    Hope this information is useful.

  • error code after you download security ca roadrunner (application error reads cannot read memory) and some numbers...

    error code after you download security ca roadrunner (application error reads cannot read memory) and some numbers...

    Try a system restore to a Date before the problem began:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • I don't know my product key. I don't have a disk it came with the pc and below when I try to read I can not, some numbers are scratched and I just format my pc what can do?

    I don't know my product key. I don't have a disk it came with the pc and below when I try to read I can not, some numbers are scratched and I just format my pc what can do?

    Just installed windows 7 but I can't read my product key?

    Help me please thx!

    Option 1:

    If the COA sticker is damaged, you must use the recovery partition to reinstall Windows 7, it will be exempt from the need to use the product key to activate your installation of Windows 7.

    Option 2:

    If your recovery partition is not available or damaged, you must contact the manufacturer of your computer, and request that a defined recovery disk you can use to reinstall Windows 7. They could practice a small shipping and handling. This will exempt the need to also use the product key.

    Option 3:

    If neither options 1 or 2 is possible, then you will need to invest in a new license of full version of detail.

    Brand

    Online order

    Phone

    Acer

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=Acer

    1-866-539-3901

    ASUS

    http://eStore.ASUS.com/shop

    1-888-678-3688 or

    1-510-739-3777

    Reference Dell

    http://support.Dell.com/support/topics/global.aspx/support/DellCare/en/backupcd_form?c=us&l=en&s=Gen

    1-800-624-9896

    eMachines

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=eMachines

    1-866-539-3901

    Entry door

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=gateway 1-866-539-3901

    HP/Compaq

    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c00810334&LC=en&DLC=en&cc=us&OS=4063&product=4057208

    1-800-474-6836

    Lenovo/IBM

    http://www-307.IBM.com/PC/support/site.WSS/MIGR-4M7HWZ.html

    1-800-426-7378

    Sony

    https://servicesales.sel.Sony.com/Ecom/accessories/Web/welcome.jsp

    1-800-488-7669

    Toshiba

    https://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/serviceUnitVerification.jsp?orderType=SFF

    1-800-457-7777

  • I'm reading a file mpeg and Windows Media Player C00D1199 error. How to get good download of the missing codec?

    I'm reading a file mpeg and Windows Media Player C00D1199 error.  How to get good download of the missing codec?  I have windows 7 x 64 os.

    All is not lost.

    Download and install a pack of codecs, such as K-Lite (Google for it). You can find THAT WMP can then read the file.

    Or
    Download and install a small program called Gspot (Google it)! Drag and drop in its window one of the files, you can't plzy. It will tell you which codecs are used. You can then download and install the only after doing a search on the web for it.
    See you soon,.
    Jerry

Maybe you are looking for

  • This update of the software will improve your HP Slate Android Kitted 4.4.2 7 G

    This update of the software will improve your HP Slate 7 G to Android Kitted 4.4.2 How to upgrade

  • Need to access the user accounts from previous installations

    I am running Windows XP Pro, and I have installed new software. When I have it ran for the first time my PC crashed. Now, whenever I try to load it up it just keeps restarting before you get to the login screen. Safe mode does not help you, or doesn'

  • EPrint 11 x 17

    How can I print 11 x 17 on my newly purchased 7612 thanks to ePrint printer. If it isn't that a way will there be an update soon?

  • Problem installing Blackberry components in eclipse

    Hi, I created a new thread to avoid confusion. I am facing this problem when I try to update Blackberry via eclipse. Tried both BlackBerry_JDE_PluginFull_1.0.0.67 & BlackBerry_JDE_PluginFull_1.1.1.200911111641 - 15. Also, I also tried using a new wor

  • Global event listener

    Hi all I have a question about the GlobalEventListener that may seem a little silly. First of all let me enumerate what I have: JDE 4.7.0.41 BlackBerry Storm. The event capture works perfectly fine in my code. So my question is how the content of "ob