Concatenate the strings from VISA

Hello people,

I'm still fairly new to LabView, please bear with me.

I'm interested in doing a Subvi, which will receive bytes on a VISA from serial port and write each line to a greater (concatenated) string, so it can later be stored in a file. In simple terms, I want to save all the data on the serial port for 8 tests to be completed. There will be 6 cases of this in the parent VI, so he needs be modular.

I expect a series of 8 channels of the source serial communication, each line begins with "Success" or "Failed" then the test. for example:

Past test1

Failure of test2

Past of test3

Past of test4

.

.

.

The current method I use must react when there are present bytes in the buffer in series, and then identify a match (currently it only identifies a match of 'Success').

Is it possible to get a match for the substring to 'Success' OR 'failure '?

How can I place all these strings on a chain? Concatenation of strings do not work because I'm having the same input string of the VI...

Any help/input would be welcome, thank you.

Advertisement

Here is a basic example of using to concatenate strings. Since it is always very difficult to know if you call your Subvi several times or if you call once and want to to read all the results I won't comment much more on it. This example would read all the results and the output format string you want to write to a file later or do whatever you want with it. The basic constructs of what you will need are illustrated here. How to encorporate in your application will be difficult to say without any code beyond the wick you have posted.

Tags: NI Software

Similar Questions

  • concatenate the strings from a column into a single row?

    How to concatenate strings from a column into a single line?

    Color
    ------
    Red
    Orange
    Blue
    Green

    And return a set of results as follows:

    Colors
    -------------------------
    Red, orange, blue, green

    Various ways can be found here:
    http://www.Oracle-base.com/articles/10G/StringAggregationTechniques.php

  • How to concatenate the string with a digital command?

    Hello

    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • concatenate the strings comand...

    sHello,

    I must repeat that channels below a large part of the time (ON SQL MORE);

    Now I do with comand of copying and pasting each string, but it is very unconfortable.

    How to concatenate the string in a string only, or max 2 strings?

    .. .so I need that I copy/past comand to do all operations of this...

    COMNAD STRING:

    create user Patrick identified by loan;

    Grant connect, create session, imp_full_database to Patrick;

    GRANT to CREATE ANY WORK to Patrick;

    modify user quota unlimited Patrick on the SYSTEM;

    grant unlimited tablespace to mx;

    THANKS FOR HELP

    sqlplus command line allows you to paste together multiple orders (lines) and it then executes sequentially.

    Hemant K Collette

  • Search and replace the string from a result

    Hi all
    I want to search a "("or ")" of the chain and all want the string before replacing "(" with a blank space...


    for example
    If the result comes like this
    name
    12 #122 (on the opening balance)
    I want the result as

    name
    on the opening balance)

    means
    12 #122 is replaced by "" how


    thanking you
    Gaurav Sontakke

    Like this?

    WITH t AS
         (SELECT '10 #10 (moving standard to msp1004)' str
            FROM DUAL
          UNION ALL
          SELECT '13208 #0' str
            FROM DUAL
          UNION ALL
          SELECT '2002-02-22 #10' str
            FROM DUAL)
    SELECT SUBSTR (str, 1, INSTR (str, '#') - 1)
      FROM t
    
  • concatenate the strings in a dimension

    Hi, experts, if the data is stored as below in db.


    Time (DateTime) event (varchar2)
    2010-01-13 13:00 lunch
    2010-01-13 15:00 session
    2010-01-14 12:00 lunch
    2010-01-14 16:00 meeting
    2010-01-18 11:00 meeting
    2010-01-18 14:00 meeting


    How to display the data in the PivotTable view calendar

    (see http://img46.imageshack.us/img46/6994/questioni.jpg)



    S M T W T F S
    2010-01-13-14-01-2010
    lunch lunch
    Meeting meeting
    2010-01-18
    meeting
    meeting


    Thank you very much!

    Hi, try this...

    Date1 select column (which has timestamp), date2 column (which has no timestamp), the week number of the date in the year (which displays the data from 1 to 52 weeks), event, the name of the day.

    Now go to Pivot, keep the week number and date1 partly lines, part, Date2 and day probation measures are partly lables measure...
    You must define an aggregation max or min for the event rule. Here, I guess I got the timestamp column, during the hours mentioned (examples of data provided by you) that one event will be there...

    Hide column Date1 pivot.

    Instead of the Date 1 column, you can take a column that got values such as: 12 AM, 01:00, 02:00,... 23:00 (must be in the same order how day begins and ends)

    I have not check cela, but assume it will work...

  • How to concatenate the string of normal worksheet to srting

    Hello

    I try to concatenate string worksheet to sring normal, but she cannot concatenate... here, I have attached my program for your firm .the support cannot be CONCATENATE.

    Hello

    Your channel is get concatenated but is getting added to the new line. If you exapnd your channel indicator, you can see ")" in the new line.

    Remove the \n character and you will get the desired output.

  • How do to concatenate the strings having single quote and ampersand

    Hi all

    I have a task to concatenate two columns under SID - SNAME.

    Input parameter is: sid. We can pass multiple parameters: sid

    CREATE TABLE TABLE1 (NUMBER SID, SNAME VARCHAR2 (100));

    Insert into TABLE1 (SID, SNAME) values (1, 'SURF UP');

    Insert into TABLE1 (SID, SNAME) values (2, 'GNLV STYLE & KEY');

    Insert into TABLE1 (SID, SNAME) values (3, 'ESSENTIALS NORTH & SOUTH');

    Insert into TABLE1 (SID, SNAME) values (4, "Of Ora");

    Select * from TABLE1;

    SID SNAME
    1Of THE SURF's UP
    2KEY & GNLV STYLE
    3ESSENTIALS NORTH & SOUTH
    4ORA

    Expected results

    1. with the setting entry: sid in (1,2)

    Output: 1 - SURF to the TOP, 2 - GNLV STYLE & KEY

    2. with the setting entry: sid in (1,2,3,4)

    Output: 1 - SURF to the TOP, 2 - GNLV STYLE & KEY, 3 - ESSENTIALS NORTH & SOUTH, 4 - ora

    I tried to use the below query,

    Select (select RTRIM (xmlagg (xmlelement (c, sid |')))) -' || SNAME | (",")) .extract ('/ / text()'), ',')

    AS concatenated FROM table1 where «,» | : para. ',' like '%', | SID | %') as double concat;

    What I get for output is as below:

    1 SURF & apos; S upwards, 2 - GNLV STYLE & amp; TREND

    I'm not handling apstrophe and ampersand correctly.

    Can you please help me.

    Thank you

    What I get for output is as below:

    1 - SURF to the TOP, 2 - GNLV STYLE & TREND

    I'm not handling apstrophe and ampersand correctly.

    Yes. This is what happens when you use a method that is not understood.

    The answer to your question is dependent on the version and already well covered in the FAQ.

    See 'Channel aggregation' in Re: 4. How can I convert rows to columns?

    If you are on 11.2 and beyond, use LISTAGG function.

    Regarding your present attempt, since you are extracting text() nodes on an aggregate of XMLType, the result is still a valid XMLType and therefore shows the XML characters reserved in their forms with escape sequence.

    If you want to stick with the XML approach, from 11.1, is the right way to handle this situation:

    SQL> select rtrim(
      2           xmlcast(
      3             xmlagg(
      4               xmlelement(e, sid ||' - '||sname||',')
      5             )
      6             as varchar2(4000)
      7           )
      8         , ','
      9         ) as concatenated
    10  from table1
    11  where ',' || '1,2,3' || ',' like '%,'|| sid || ',%' ;
    
    CONCATENATED
    --------------------------------------------------------------------------------
    1 - SURF'S UP,2 - GNLV STYLE & KEY,3 - ESSENTIALS NORTH & SOUTH
    

    In earlier versions, use either:

    select rtrim(
             dbms_xmlgen.convert(
               extract(
                 xmlagg(
                   xmlelement(e, sid ||' - '||sname||',')
                 )
               , '//text()'
               ).getstringval()
             , 1
             )
           , ','
           ) as concatenated
    from table1
    where ',' || :para || ',' like '%,'|| sid || ',%' ;
    

    Mun

    select rtrim(
             utl_i18n.unescape_reference(
               extract(
                 xmlagg(
                   xmlelement(e, sid ||' - '||sname||',')
                 )
               , '//text()'
               ).getstringval()
             )
           , ','
           ) as concatenated
    from table1
    where ',' || :para || ',' like '%,'|| sid || ',%' ;
    
  • Extract the string from the string

    Hello guys,.

    I have a small question. I would like to extract a string to another string. Imagine the following string:

    param1 = value1 param2 = value2, param3 = value3, param4 = value4

    I would like to be able to extract value2 and value3 to this string. I know that the design of the db is not perfect and should be like this. but it is historical and I have to use this way. Any suggestion?

    Thank you

    to retrieve param2

    Select

    substr (s

    , instr (s, '=', 1, 2) + 1

    , instr (s, ',', 1, 2) - instr (s, '=', 1, 2) - 1

    ) r

    from (select "param1 = value1 param2 = value2, param3 = value3, param4 = value4's double)

    or

    Select regexp_substr (your_string, "[^,] +' 1, 4") from your_table

    for example

    Select regexp_substr ("param1 = value1 param2 = value2, param3 = value3, param4 = value4 ',' [^,] +' 1, 4") param2 double

    PARAM2

    'value2 '.

    Post edited by: chris227
    Corrected solution substr (sorry was before the first coffee ;-))

  • Concatenate the strings of several lines into one line.

    Hello

    What is the name of this analytical function (or log in) which
    would return more line as a concatenated line strings. that is to say:
    (I know that it is possible using the regular functions of pipeline).
    ROW1:   STR1
    ROW2:   STR2
    ROW3:   STR3
    
    select tadah().... from ...
    
    result:
    
    ROW1: STR1 STR2 STR3
    Thank you.

    Hello

    DanielD wrote:
    Hello

    What is the name of this analytical function (or log in) which
    would return more line as a concatenated line strings. that is to say:
    (I know that it is possible using the regular functions of pipeline).

    ROW1:   STR1
    ROW2:   STR2
    ROW3:   STR3
    
    select tadah().... from ...
    
    result:
    
    ROW1: STR1 STR2 STR3
    

    The function is SYS_CONNECT_BY_PATH

  • concatenate the strings in cumulative mode

    Dear Experts,

    I have a table that stores orders information placed by customers. It stores Customer Id, order Id, order Date, and Date sent. I need to write a sql query that gives me the previous history / order date and ship date in the format shown below. Is there more than 10 orders per customer then I need only the previous order of 10 and the shipping date.

    Customer_idOrder_IDORDER_DATEShipped_Date
    C1O101/01/201301/07/2013
    C1O228/01/201330/01/2013
    C1O318/04/201322/04/2013
    C1O414/07/201316/07/2013
    C1O508/02/201308/04/2013

    Output:

    Customer_idOrder_IDH_OrderDateH_ShippedDate
    C1O1NULL VALUENULL VALUE
    C1O20101201307012013
    C1O328012013; 0101201330012013; 07012013
    C1O418042013; 28012013; 0101201322042013; 30012013; 07012013
    C1O514072013; 18042013; 28012013; 0101201316072013; 22042013; 30012013; 07012013

    Before posting my question here, I tried using lead, lag and listagg functions but I am unable to frame the query that produces the result I'm looking for. Any help would be greatly appreciated.

    I'm using oracle 11g.

    Thank you.

    You can also...

    Select Customer_ID

    order_id

    , trim (both ';' of sys_connect_by_path (to_char (order_date, 'ddmmyyyy'),' ;')) h_order_date))

    , trim (both ';' of sys_connect_by_path (to_char (Shipped_Date, 'ddmmyyyy'),' ;')) h_Shipped_Date))

    Of

    (select Customer_ID

    order_id

    lag(order_date,1,null) on order_date (order by order_id)

    , lag(Shipped_Date,1,null) over (order by customer_id) Shipped_Date

    row_number() over (order by order_id) rn

    from your_table t

    )

    Start by rn = 1

    connect by prior rn = rn - 1

    Using the MODEL clause:

    Select customer_id

    order_id

    rtrim (h_order_date, ';') h_order_date

    rtrim (h_shipped_date, ';') h_shipped_date

    t

    model

    partition (customer_id)

    dimension (row_number() over (order by order_id) rn)

    measures (order_id, order_date, shipped_date, h_order_date cast (null as varchar2 (256)), climb (null as varchar2 (256)) h_shipped_date)

    rules)

    h_order_date [rn > 1] order by rn = to_char (order_date [cv () - 1], 'ddmmyyyy') | « ; » || h_order_date [cv () - 1]

    , h_shipped_date [rn > 1] order by rn = to_char (shipped_date [cv () - 1], 'ddmmyyyy') | « ; » || h_shipped_date [cv () - 1]

    )

  • Concatenate the strings!

    Hi all

    I do this select statement and the result is as follows:

    SQL > select 'create table ' | nom_partition | ' in select * from '. table_name | ';' from dba_tab_partitions where table_name = 'MONEY ';

    "CREATE TABLE". NOM_PARTITION | "ASSELECT * FROM ' | TABLE_NAME | « ; »
    --------------------------------------------------------------------------------
    create the table P_TAB_MONEY_200908 select * money;
    create the table P_TAB_MONEY_200909 select * money;

    But I would like the return of result without P_TAB_

    Thank you!
    Dan.
    select 'create table ' || substr(partition_name,7) || ' as select * from ' || table_name ||';' from dba_tab_partitions where table_name='MONEY';
    

    SY.

  • Remove the string from the text block

    I need to remove the following string "price: $5.80 -" block of text below... I have a bunch of text blocks similar to the one below, but they all have this kind of string to them ("price: $5.80 -")... Each text block has a 'price' and the end a '-' mark... Y at - it anyway to strip this line of each of my listings...

    M635
    Small ring Pull smooth w/back black patina
    Height: 1 3/16 "
    Width: 1 3/16 "
    "Projection: 1 3/16" 3/4 ".
    Base material: steel
    Screws: Screw Pack
    Price: $5,80-

    Thanks for the help!

    Discover the concept below code.

  • Extract the string from the chain - separator = ' | '?

    Hi people!

    I want to know how to extract the a string with delimiter = XE field ' |'.

    For example:
    String = "field1 |" Field2 |... | fieldX |... | filedn | »

    I want to extract fieldX.

    Thanks for your help, regards.

    Use the functions like this substr and instr

    substr(string, instr( string,'|', 1, xth_occurrence)+1, instr( string,'|', 1,xth_occurrence+1) - instr(string,'|', 1, xth_occurrence))
    

    Luca

    Please, mark the reply as useful/correct if it is

    Published by: Luka on January 26, 2010 10:42

    Published by: Luka on January 26, 2010 10:42

  • Remove the string from txt file

    I have a .txt file (see table) I use the spreadsheet for the array function to retrieve the data I need. I am trying to extract over time of Inspection and the number doubles alongside that separately, but I have a problem with the delimiter. The .txt file will still not of this size, but the 1st and the last line will be the same


Maybe you are looking for

  • Call VI with statechart

    Hi all I have an application that controls a 3D helicopter. I want to develop an application of state transitions that engine test, then test the encoder and finnaly lauch the VI that control the helicopter. How can I call a VI with a State of the st

  • HP Envy 4500 all Rhapsody: digitization of evil

    When I hit the button of scan on the printer, I get a message: not found computer.  Make sure that the printer software is installed on your computer and that the computer Scan is enabled. The software is installed on my computer.  When I run a Scan

  • HP Color LaserJet CP4025 - just not online

    Exactly what happens to our printer, but not even a year and now the printer will not come online. I have unplugged and restarted. Start-up screen LCD/LED lights do not blink or turn it on, but looks like its going through the boot process. The netwo

  • Select the missing cdr_repository CDR files after execution of a car to execute sql * statement?

    Hi all Hoping someone can provide some tips.  I need to export all the records 'date' with dateb cdr'. To do this, I started by ssh'ing in the pub and make a ' execute sql select auto * from tbl_billing_data where date (datetimestamporigination) betw

  • PowerEdge R320 cable for SATA?

    Hi all I recently bought a new (ok, almost new 'store') R320 server, that happened and seems to be wired to the SATA drives (non - hot). No hard drives have been included in the system - I was aware of this ;-) I also have two Dell 2 TB NearLine SAS