read part of an array element

Hi all.

As indicated in the title, I'm reading part of an array element.

What I'm doing is reading a LeCroy scope values using a 'write' 'read' I returned the values in a table, but the question is the scope returns a value of "1, 52.33E - 3".

I just want the element to be 52,33 so I can use it for other calculations.

For example, my table.

' 1, 34.334E - 3.

' 1, 53.343E - 3.

' 1, 143.232E-

And I want it to be

34.334

53.343

143.232

Thank you!

Use string functions (match pattern) to find the comma. Then convert the part after the comma to a number using the string appropriate to the Number function.

Are throwing you what looks like an exhibitor intentionally?

The last string seems to miss the exhibitor. This suggests you may have problems with your communications with the instrument.

Lynn

Tags: NI Software

Similar Questions

  • array element references confused me

    Then... I'm playing with references to arrays, specifically references to items in a table.

    It seems that I should be able to read the value of the table, but because of how I am tying TestStand and LabVIEW, I am trying to create a utility that automatically obtain data back between the LV and TS, where the types of data passed back are completely unknown and, possibly, paintings of beams that have tables nested clusters.

    I try to walk the LV data structure and reference TestStand and get the right data.  However, I can't seem to be able to use references to point to specific elements of a table - see example I expect the high and the low code works the same, but they do not.

    Any suggestions on what I do wrong to get the top and bottom to work the same?

    LV2011 attached code

    Ravens fan wrote:

    Property of the array element node gives you a reference to the element that makes up the table.  So if you set the properties of a digital control maybe to change the color or display format.

    Is not a way to get or set the value of a specific array element.  To set a particular array element, you must use replace table subset.  To get the value of a particular array element, you use table to index.

    Indexvalues property node is used to determine which is the first item that appears.  It changes the value of the indexer the upper left corner of the table.

    One thing I noticed that I don't know if I knew before, it was this setting the property value on the reference of array element, node will have an impact on the first element of visible table.  If you turn the highlight performance and play with array index, while it is running, you will see that the resulting table will be different.

    Although it IS possible, you can not do after seeing what it takes.

    We can get the value of an array element that is in a control or indicator provided it it the upper left display element.

    This nugget exploits that factand see how it can be done. Note: I have not tested this code lately so I don't know if NEITHER broke this behavior since the writing of this nugget.

    Ben

  • How to change the items in a drop-down list box that is part of an array of clusters

    Hello

    In the attached vi, I have an array of clusters and each cluster contains two drop-down list boxes. How can I edit the items in the drop-down list box 1 for all elements in the array? (All elements of list box 1 has the same elements.)

    By way of illustration, I have also included the case of trivila, for example, edit the items in a separate drop-down list box that is is not part of an array of clusters (combo box 3). Please notify. Thank you.

    Peter

    Right click on the drop-down list box and select Create-> Node-> String() property. Place it on the block diagram. Change to write (right click) and then feed him an array of strings.

  • A fundamental question/problem with the like undefined array element

    Hello everyone,

    Thanks for looking at my problem. I am very new script and javaScript, and I encountered a strange problem. I always try to solve all my problem myself, with documentation (it helps to learn) or as a last resort with the help of google. But in this case, I'm stuck. I'm sure its something very simple and elementary.

    Here I have a code that simply loads a text file (txt), load the contents of the file in a "var glad." This summary text file a font family name, every name on a new line, as:

    Albertus

    Antenna

    Antique

    Arial

    Arimo

    Front

    Barber1

    Barber2

    Barber3

    Barber4

    Birch

    Blackoak... .etc

    Now I hollow the variable content of loop, extract each letter and add it to the list '[i]' table. If the character is a line break the list [i] table adds another element (i = i + 1); That's how I separate each name in its own element of array.

    The problem I encounter is, when I have hollow loop table fontList and $.writeln (fontList [i]) is the result in the console :

    undefinedAlbertus

    undefinedAntenna

    undefinedAntique

    undefinedArial... etc.

    I don't get serious, where the undefined comes? As far as I tested each digit to be added to the array element, I see nothing extraordinary.

    ----------------------------

    ----------------------------

    Here is my code:

    #target illustrator

    var doc = app.documents.add ();

    Open the file

    var myFile = new File ("c:/ScriptFiles/installedFonts-Families.txt");

    openFile var = myFile.open ("r");

    check if it is open

    if(OpenFile == true) {}

    {$.writeln ("the file has loaded")}

    else {$.writeln ("the file does not load, check the name or the path") ;}}

    load the contents of the file into a variable

    var content = myFile.read ();

    myFile.close ();

    var ch;

    var x = 0;

    var fontList = [];

    for (var i = 0; i < content.length; i ++) {}

    ch = content.charAt (i);

    If ((ch)! == (string.fromCharCode(0)) (10))) {}

    fontList [x] += ch;

    }

    else {}

    x ++;

    }

    }

    for (i = 0; i < fontList.length; i ++) {}

    $.writeln (fontList [i]);

    }

    doc. Close (SaveOptions.DONOTSAVECHANGES);

    -----------------

    -----------------

    Thanks for any help or an explanation. If you have any tips on how to improve my practices or any suspicion, please do not hesitate to say. Thank you

    Hi vladac54380629,

    better, you try something like this:

    #target illustrator
    
    //var doc = app.documents.add(); 
    
    //open file
    var myFile = new File ("c:/ScriptFiles/installedFonts-Families.txt");
    var openFile = myFile.open("r"); 
    
    //check if open
    if(openFile == true){
        $.writeln("The file has loaded")}
    else {$.writeln("The file did not load, check the name or the path");} 
    
    //load the file content into a variable
    var fontList = []; 
    
    var content = myFile.read();
    fontList = content.split ("\n")
    myFile.close(); 
    
    for ( i = 0; i < fontList.length; i++) {
       $.writeln(fontList[i]);
      }
    
    //doc.close (SaveOptions.DONOTSAVECHANGES);
    

    Have fun

    A note:

    The real font names may be different from your own list for example:

    Arial! = ArialMT

    Birch! = BirchStd

    Blackoak! = BlackoakStd

    Concerning

  • Reference to the array of Clusters with an array element

    Hello

    I have an array of clusters of CONTROL (qualifying as "upper-tier cluster table") with one of the items is an array of cluster cluster (see attached).

    I intend to "reference" of this cluster of high level at different screws (as add item VI, insert item VI, delete the item VI etc.) and access (add/edit delete) the elements of this array.

    In my code, how I cataloged the array element (cluster) on the cluster internal (as shown on the figure)?

    I use LV RT on PXI.

    Hello smercurio_fc,

    Thank you for your example! Just a question: actually, with shift registers, is an example of creating a local copy of the full range? Even if the value of the lowest level cluster is changed, is the complete table is updated at the end (registry value to offset the full picture at the right end is updated using the reference node and property)? This VI will be slow when the size of the array becomes great?

    Comment of nicely.

  • Get all the different values in a table - 'or array elements' does not work with I32

    Hello

    I just found out that "array elements or" does not work with a table 1 d of integer values. I didn't expect that.

    I did a semi quick forum search and did not find a pointer to an effective solution. Can someone give me a hint?

    Do not back my initial intention is to list all the values that appear in an array of integers.

    I thought that if I converted the figures for powers of 2 and or I had solved the problem at hand - only to discover that the elements of array does not.

    If someone could propose a different approach, I'd be happy too.

    I should mention that the execution time is a factor here - I need a fast code, but any suggestions are welcome because they could help me get started.

    Best regards Florian

    Hi Florian.

    try this:

    "Function, it seems, the table of GOLD ' is polymorphic (as written in the context-sensitive help), but does not support arrays of I32. At least the error message means just that...

  • How can you specify the default value for the undefined array elements

    According to aid LV, the tables have two default values, the normal default value and the default value for the undefined array elements.

    I assume that there must be a way to specify the default value for later, but I can't find it anywhere.  Any ideas?

    I know that you can drag the item out of the table container.  Change the default value on this scalar element.  Then drag the item in table tank.

  • error message indicates that "part archive of photoshop elements 11 file is missing.

    I made a purchase that included a set of free software with Photoshop elements 11 yesterday and have now two files downloaded 5 times, followed all the information I could find on the discussion forum, but still have the error message

    error message indicates that "part archive of photoshop elements 11 file is missing.

    I'm at my wits end, I really want to get this downloaded. Have been using elements 8 years and love it but I wanted to update to 11 and this was going to be perfect, but has turned into a nightmare of 15 hours trying to get somewhere with him.

    Can someone please help me before I put my pc?

    Any advice would be appreciated.

    Hi summer,

    You get the error message is indicative of the missing files for the installer to start the installation.

    Navigate to the location where you saved your download. If you see all the files ending with ".part" then the download has not finished. ". Part' files are temporary files, replaced by .7z, .exe or .dmg when the download is complete.

    For Windows the Photoshop Installer has 2 files - with the extension of .7z and the other with the .exe

    Make sure that you have downloaded the two files in the same folder. Run the .exe file to start the installation.

    Otherwise you can try to download the files from the direct download links available at: http://prodesigntools.com/photoshop-elements-11-direct-download-links-pse-premiere-pre.htm l

    Please make sure that you follow the steps mentioned on the page before you start the download.

    Kind regards

    Ravi

  • How to access an array element?

    I'm trying to access a table on a click of a button element.  Complete creation, I have this: var = students ["Theo Arguna", "Leif Arneson", 'John Egan', "Sakura Nakahara", 'Rebecca Pilkington', "Debra Sutter"];

    the passage of the mouse button I put this:

    var myVariable = sym.getVariable("students.eq[0]");

    sym.getSymbol("message").$("Text4").html ("Click now to see" + sym.getVariable ("myVariable") + "working.");

    When I test I get "undefined" say where "$myvariable" is in the line above the code.

    Any suggestions on how to get the array element in this?

    Hello

    «"«You are almost there...»»»

    Put this in your creationComplete event:

    sets the variables table students

    sym.setVariable ("students", ["Theo Arguna", "Leif Arneson", "John Egan", "Sakura Nakahara", "Rebecca Pilkington", "Debra Sutter"]);

    And put it in your button mouseover event:

    get the array element you want

    var myVariable = sym.getVariable ("students") [0];

    sym.getSymbol("message").$("Text4").html ("Click now to see" myVariable + "working.");

    HTH,

    Joe

  • Tween an array element

    I created a script that will movieclips to fill the stadium. In this case, a ranking.

    each created movieclip is positioned and placed in a table.

    The problem becomes an array element and the power of tween it

    * I would like to experiment with tween different combinations to get them out of the scene. Here's what I got

    I am able to get the clips on the stage... [Can't get them off =]

    Import mx.transitions.Tween;

    Import mx.transitions.easing. *;

    Block = new Array();

    var Xposition:Number = 0;

    var Yposition:Number = 0;

    var stack:Number=Math.ceil(Stage.height/30);

    var Numofstacks:Number=Math.ceil(Stage.width/30);

    var fadeit:Tween;

    var n: Number = 0;

    for (r = 0; r < (Numofstacks); r ++) / / 25

    {

    PositionY = 0;

    for (c = 0; c < (stack); c ++) / / 3

    {

    var particle = this.attachMovie ("block", "gabarit@sur" + r + c, this.getNextHighestDepth ());

    Particle._y = PositionY

    Particle._x = which

    Block [n] = particle._name;

    trace (Particle._name)

    PositionY = PositionY + 30;

    n ++

    }

    Which = which + 30

    }

    runit var = setInterval (effects, 3000)

    effects function (): Void

    {

    trace ("Go")

    for (a = 0; c <(Block.length-1); a ++) / / 3

    //{

    Yvan = new Tween (block [0], "_alpha", Strong.easeOut, 100, 0, 1.5, true);

    //}

    clearInterval (runit);

    }

    Do not store the _name in table property, store the particle itself.

    Block [n] = particles;

  • The search in a table a value then delete this array element

    Hello.

    I have an array of VO (id, link, title, url...) I want to get an ID of this array element and remove the element with the corresponding id. Any thoughts on how I would go to this topic?

    Thanks in advance!

    Ryan

    I don't know much on your and this probably isn't the most elegant solution, but you can do something like:

    for (var i: Number = 0; i<>

    {

    If (myVOArray [i] ["id"] is "someId")

    {

    myVOArray.splice (i, 1);

    }

    }

  • read the values of an array element and by sending a digital output to a designated channel according to the value read from the table

    Hello world

    could someone help me before I get out of my hair. Here's my problem.

    I read 3 values of an array of 3 elements i.e. 1,2,3. These values are then compared to a constant value, example if the first element of the array is 1 and it meets the comparison condition can send a digital camera of output for that channel on data acquisition

    I want to be able to send a value from a table to its corresponding comparison and then on its designated channel on the acquisition of data, the whole point of this is due to the fact the table element will not always read the value 1,2,3 for example could be 2,3,1

    Here's one the vi I have so far

    If someone could help it would be much appreciated

    all the best

    brand

    Take time to explore the many examples included with LabVIEW that cover the basics.

    -Indexing table

    -reading a spreadsheet file

  • Extract the supplied index value of array element

    Hello

    A similar question might have been asked before, but I couldn't find one that exactly matches what I want. Also, I'm using labview 8.5 so could not read most of the views that you guys tied with other solutions.

    The files that I use are attached. Test_FIFO_TimeTagging-Nov16 - try1.vi is the main vi.

    The absolute time in milliseconds in the table of resorption. As can be seen, it is derived from the berries Micro2 and Macro2. I want the user can specify the duration, that is, whether the current item in the table of absorption has a value greater than the value of the user entered, so I want the index of this item in the resorption so that I can use this index to create Micro2 and Macro2 subtables that contain only items from index 0 to index I get resorption.

    I do not know how to retrieve the index of an array given the value of the element, so can't go forward.

    Thank you

    Kaiser

    Hey Kaiser,

    the function that you need is 'threshold 1 d table '. (I guess that your time values are sorted, otherwise using subdashboards makes no sense...)

  • Delete Array element

    I'm unable to a Board problem. I am able to do the types of features such as see how many items in the table, insert (I hope I did it correctly) and ordered random numbers growing as well as sorting.

    Now, I'm hoping to find a way on how to remove the 4th and 5th element in the array and then the display of the part which has been removed and showing the final result of the table.

    I'm tinkering with the structure of the table "remove table" and tried to use it, I even looked at the documentation and trying to hook up the wires, but I can't seem to get this to work?

    Attached, that's what I have now

    Hello LabVIEW321,

    The adapted examples.

  • How to: compare 2 associative arrays element-by-element

    After playing, I decided to go with the approach of the two sets of data of their own associative array.  The code and the results of this are below.  My question is the comparison.  For each element within the matrix of order, check all the items in the details table to see if there's a football game.  If there is a match > > > move to the next item in the control panel and check all the items in the details table to see if there is a football game.  Go until the whole is considered to be a match (in number of rows and values).  If no match, take the exit.

    Below, you'll see my logic to get both sets of data into their respective tables.  The results with a note attached to one of the elements is also pasted here (hereinafter the code).

    DECLARE

    TYPE details_t () IS RENDERING

    SIDE AUTO_RECIPE_DETAILS. SIDE % TYPE.

    REF_DES AUTO_RECIPE_DETAILS. REF_DES % TYPE,

    PART_NUM AUTO_RECIPE_DETAILS. PART_NUM % TYPE

    );

    TYPE details_type IS TABLE OF details_t INDEX OF AUTO_RECIPE_DETAILS. PART_NUM % TYPE;

    details_recipe details_type;

    pid_recipe details_type;

    compare_result details_type;

    CURSOR details_cur

    IS

    SELECT A FACE, REF_DES, PART_NUM

    OF AUTO_RECIPE_DETAILS

    WHERE RECIPE_NAME =' 40617-000001;

    CURSOR pid_cur

    IS

    SELECT cl. SIDE, lacpa. REF_DES, NVL(oecl.COMPONENT_ID, 'NOT APPLIED') AS PART_NUM

    OF ORDER_ERP_COMPS_LIST lacpa

    RIGHT OUTER JOIN CAD_LOCS cl

    ON cl. REF_DES = LACPA. REF_DES

    WHERE lacpa. ORDER_NUM = "PSY142420."

    AND CL. FAB = '38112';

    counter_d number (10): = 0;

    counter_p number (10): = 0;

    comp_counter number (10): = 0;

    BEGIN

    FOR rec IN details_cur

    LOOP

    counter_d: = counter_d + 1;

    details_recipe (counter_d). SIDE: = rec. SIDE;

    details_recipe (counter_d). REF_DES: = rec. REF_DES;

    details_recipe (counter_d). PART_NUM: = rec. PART_NUM;

    END LOOP;

    FOR rec IN pid_cur

    LOOP

    counter_p: = counter_p + 1;

    pid_recipe (counter_p). SIDE: = rec. SIDE;

    pid_recipe (counter_p). REF_DES: = rec. REF_DES;

    pid_recipe (counter_p). PART_NUM: = rec. PART_NUM;

    END LOOP;

    -for each pid_recipe element, double-check each record in details_recipe to see if there is an item matching (record)...

    FOR indx_d IN details_recipe. FIRST... details_recipe. LAST

    LOOP

    DBMS_OUTPUT. Put_line (details_recipe (indx_d). SIDE | ', ' || details_recipe (indx_d). REF_DES | ', ' || details_recipe (indx_d). PART_NUM);

    END LOOP;

    DBMS_OUTPUT. PUT_LINE ('IN THE SECOND PART OF IT!');

    FOR indx_p IN pid_recipe. FIRST... pid_recipe. LAST

    LOOP

    DBMS_OUTPUT. Put_line (pid_recipe (indx_p). SIDE | ', ' || pid_recipe (indx_p). REF_DES | ', ' || pid_recipe (indx_p). PART_NUM);

    END LOOP;

    END;

    /



    RESULT:


    DETAILS TABLE

    RECIPE FOR THE DETAILS TABLE:

    B, R28, 34315-26R7

    B, R38, 34315-4990

    B, R40, 34152-1R60

    B, R45, 34315-1002

    B, R46, 34315-3011

    B, R48, 34152-1004

    B, R55, 34315-5901

    B, R64, NOT APPLIED

    B, R77, 34315-4992



    CONTROL PANEL

    THE RECIPE IS CALCULATED IN THE ORDER ITSELF:

    B, C01, 39412-334 / / for that one single item-> check all the items from the table (above) details Table and see if an element matches.  Move to the next item if there is a match...

    B, C02, 39412-334

    B, C03, NOT APPLIED

    T, C11, 27249-105

    T, C13, 35404-104

    T, C14, 27531-224

    T, C15, 35404-104

    T, C18, 27249-105

    T, C19, 27531-224

    CHANGED:

    THIS... is the solution to my original question.  I had a little mistake that I set between this and my last post with this code.  Just in case a person who could use an example like that falls on this thread.

    FOR index_p IN pid_recipe. FIRST... pid_recipe. LAST

    LOOP

    Result WHEN the OUTPUT = 1;

    FOR index_d IN details_recipe. FIRST... details_recipe. LAST

    LOOP

    IF (pid_recipe (index_p). SIDE = details_recipe (index_d). SIDE)

    AND (pid_recipe (index_p). REF_DES = details_recipe (index_d). REF_DES)

    AND (pid_recipe (index_p). PART_NUM = details_recipe (index_d). PART_NUM)

    THEN

    EXIT;

    ON THE OTHER

    DBMS_OUTPUT. Put_line("IT WAS NOT a MATCH");

    result: = 1;

    EXIT;

    END IF;

    END LOOP;

    END LOOP;

    DBMS_OUTPUT. Put_line('LOOP OUT');

Maybe you are looking for

  • iMac display problem

    Hello community, This is what my screen looks like... Currently set on 16.5 ' (1920 x 1200). 2 days ago my computer was very hot to the touch. Shortly after, it beeps a couple of times and then went away. I turned back on it and that's what happened.

  • Table 3D of LabVIEW to MatLab

    Hi all I started a collaboration with another Department who would use my data table 3D (collected and created in LabVIEW) within their code for MatLab. I searched the forum, but so far, nobody seems to have a clue about how to get the data in table

  • BlackBerry Smartphones can not enter an application within the menu

    Hello first of all I must tell you that I'm French so sorry if I make mistakes! I have Blackberry Curve 8520. When I'm inside the menu with all the icons, I can't get into any of them. If I push the touch pad, nothing happens. I don't know what to do

  • Is there a way to RESET IOM?

    I work with other developers with an instance of the IOM to development purposes.I noticed that after a few months to play with him, several popup error in UI, lack of structures for most.I would like to know if there is a way to simply reset IOM or

  • is it possible to shoot a movie clip animation

    out of the actual clip and convert it so that it is based on the main timeline, so that you can see/display and change the contents of this animation on your main timeline as well as all your other content? Impossible? I know it sounds like a strange