Normal string display to Hex string display

Hi all
i like to convert a normal strijng display which contains alphanumeric strings to hex format
String length will be of 25 characters which will be read through bar code reader
Could someone help me in solving this
Thanks
Bala

Hi smercurio_fc
Thanks for the vi. i tried the method which you have sent me.
So i cant transfer 'S' through serial port?
Is there any other way to transmit this through Serial port.
Also i need another clarification
A sub vi is running inside my main vi and i need to stop/pause the sub vi from the main vi front panel. how could i can stop the sub vi?
Thanks and regards
Bala

Similar Messages

  • Hex String to 'Ascii Hex' String!

    I am having a mental block and wonder if someone can help!!
    I am reading a serial device and getting a hex string back. I need to display this hex string to the operator within a pop-up box (PDA). The Message box will obviously contain normal text with the HEX code appended to the bottom.
    When I run the code the pop-up box displays the legible message to the user but the HEX string returned appears in the appropriatte ascii characters (because the pop-up displays normal string).
    My question is, how to make an hex string appear within a normal display string indicator 'the same' as it appears in its Hex display indicator:
    0x0A1C - Hex display needs to appear as 0A1C in normal display string indicator.
    Thanks in advance
    ssk
    Solved!
    Go to Solution.

    See picture.
    Message Edited by andre.buurman@carya on 04-08-2009 12:41 PM
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
    Attachments:
    Hex string to normal string.png ‏4 KB

  • Question about string constant in Hex display format

    how to get a plus of 2 string constant which is display in Hex display like attahced, for example I have string "28" and "5D" in Labview which has been in Hex format, the plus of this 2 string should be "85" in Hex. pls help on this, thanks
    Attachments:
    1.jpg ‏21 KB

    This'll work, too.  I'm afraid of casting types...
    Jm
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    hex.png ‏2 KB
    hex.vi ‏7 KB

  • Hex string and normal string concatenat​e issue

    Hello,
    what i have is a hex string and a normal string which i want to concatenate into one string.  the problem is that in the output concatenated string you need to select either "normal display" or  "hex display" in the properties.  the problem is if you select hex display then the normal string is converted into hex and if you select normal display then the hex value is not correct.  is there a way to display the hex value in normal display mode?
    attached is a vi showing the problem
    Attachments:
    hex to string.vi ‏7 KB

    lfoitek wrote: ...  i am creating a state machine and then translating it into string representation ... i just can't figure out how to do the conversions to display the correct output.
    If by "correct output", you mean you want something like 4bytes (0xBADDF00D) converted to 8bytes ("BADDF00D" in normal display), then there are several ways ...
    Message Edited by Donald on 08-31-2006 04:17 PM
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."
    Attachments:
    HexHeadaches.jpg ‏24 KB

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 2
         others          = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 4
            others                 = 5
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_LINE
        EXCEPTIONS
          ID                    = 1
          LANGUAGE              = 2
          NAME                  = 3
          OBJECT                = 4
          OTHERS                = 5
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • How can I display on a string the symbol omega (ohms)

    how can I display on a string the symbol omega (ohms)

    Hi,
    See there : http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000032410000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    Hope this helps !
    Julien

  • JTable -showing column headers and displaying multi-line strings

    Hi,
    This is two questions really.
    #1 - Does anyone know why my column headers aren't showing in my jtable using the model below?
    #2 - Does anyone know how I can display, mulitple line strings in a jtable? Currently my newline character ('\n') is just being displayed as a character.
    any help very much appreciated,
    Tom
    private class TaskHistoryTableModel extends AbstractTableModel {
    private List taskHistory = new ArrayList();
    public Object getValueAt(int row, int col) {
    if (col == 0) {
    return ((TaskHistoryItem) taskHistory.get(row)).getText();
    } else {
    return ((TaskHistoryItem) taskHistory.get(row)).getDate().getTime();
    public int getRowCount() {
    return taskHistory == null ? 0 : taskHistory.size();
    public int getColumnCount() {
    return 2;
    /** Getter for property taskHistory.
    * @return Value of property taskHistory.
    public List getTaskHistory() {
    return taskHistory;
    /** Setter for property taskHistory.
    * @param taskHistory New value of property taskHistory.
    public void setTaskHistory(List taskHistory) {
    this.taskHistory = taskHistory;
    public String getColumnName (int col) {
    return col == 0 ? "Text" : "Entered At";
    public boolean isCellEditable(int row, int col) {
    return false;
    }

    fixed my own problem - make your mulit-line string into html format e.g.
    this string will appear on two lines in a jtable
    "<html><p>A much more interesting entry</p> <p>on multiple lines</p></html>"

  • Turn a string that shows hex data in normal format, into a string that shows the same data in hex format

    I have a string of arbitrary length - say, 1AB1C0 - in normal format. I would like to have a function which takes that string in, and outputs the same exact characters, but in hex format. So the input will read 1AB1C0 in normal string format, and the output will read 1AB1C0 in hex string format.
    I am doing this because I have found the end device works better if I send the bytes as a hex string vs. as an array of U8. Furthermore, I manipulate a lot of byte streams in my program, and I find the string parsing tools less cumbersome to use vs. the byte array parsing tools - however, they only work on the strings as they appear in normal mode. So I have reasons in different parts of my program to have the string in normal vs. hex formats; but I cannot figure out any remotely elegant way to cast from one to the other.
    Solved!
    Go to Solution.

    CraigRem wrote:
    So the input will read 1AB1C0 in normal string format, and the output will read 1AB1C0 in hex string format.
    Well, you need to scan the hex formatted string two bytes at a time to an U8 numeric and then cast it back to a string. There are many ways to do that, here are two possibilities. (Mkae sure to use the correct representations as labeled).
    (I still don't quite understand your reasoning why you need this).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    NormalToHex1.png ‏12 KB

  • Display results as String: dosen't work based on the example

    Hello,
    To understand how to display results as string, I tried to reproduce this:
    [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    I have my table emp
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839  KING PRESIDENT -  81-11-17 5000 -  10
    7698 BLAKE MANAGER 7839 81-05-01 2850 -  30
    7782 CLARK MANAGER 7839 81-06-09 2450 -  10
    7566 JONES MANAGER 7839 81-04-02 2975 -  20
    7788 SCOTT ANALYST 7566 82-12-09 3000 -  20
    7902 FORD ANALYST 7566 81-12-03 3000 -  20
    7369 SMITH CLERK 7902 80-12-17 800 -  20
    7499 ALLEN SALESMAN 7698 81-02-20 1600 300 30
    7521 WARD SALESMAN 7698 81-02-22 1250 500 30
    7654 MARTIN SALESMAN 7698 81-09-28 1250 1400 30
    7844 TURNER SALESMAN 7698 81-09-08 1500 0 30
    7876 ADAMS CLERK 7788 83-01-12 1100 -  20
    7900 JAMES CLERK 7698 81-12-03 950 -  30
    7934 MILLER CLERK 7782 82-01-23 1300 -  10 I created with the wizard, on my page, a new REPORT REGION
    - selected SQL RESULT -
    - Name: Test
    - Region Source Type: SQL Query
    - Region Template: Report Region
    IN Enter SQL Query or PL/SQL function returning a SQL Query, I COPY-PASTE the following code from [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
       p_string :=
         HTMLDB_UTIL.table_to_string (p_vc_arr2, ':');
       HTP.p (p_string);
    END;AND I have this error:
    +1 error has occurred+
    Invalid query, no select statement found
    Is not a PL/SQP functiion??
    What do I do wrong?
    thanks,
    Roseline Paquin
    Montreal, Canada

    1 error has occurred
    Invalid query, no select statement foundWhat if you try
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
        return 'select ''' ||  HTMLDB_UTIL.table_to_string (p_vc_arr2, ':') || ''' str from dual';
    END;??

  • GP - How to display a long string value

    I'm trying to display a really long string value and then allow the user a couple of result state choices (to either go back and do another search or finish).
    None of the forms (WD, display, etc.) will display a really long string.
    I tried using a loop type decision dialog, but there doesn't appear to be a way of having it pick up a parameter value as the message (or part of the message) to display.
    I can get it to display in the complex type decision dialog, but I don't need the group/options and I can't seem to get rid of the second set of buttons that show up (the long string parameter value was put into the 'Info Texts' area and does display ok).
    Is there any easy way of displaying the complete contents of a long string value and have buttons for results states?  I'd even be happy if I could just display the whole string and use a separate callable object for the choices.
    Thanks,
    Cindy

    I think you should try calling a JAVA or ABAP Webdynpro as the callable object. As you know, we can display long texts in the webdynpro fields. Other alternative is an Adobe form as well.
    Cheers,
    Mandrake

  • How to display a HTML String in a ActiveX WebBrowser ?

    How to direct display a HTML String in a ActiveX WebBrowser without use a URL ?

    I am sure that it would depend on the browser, but with Internet Explorer from Microsoft, I don't think you can. (I may be wrong on this.) What you could do would be to save your string to file and read the file as a url in the browser. I know that this is a step you are trying to avoid, but it will work.
    Hope that this helps,
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • How to embed a browser displaying an xml string in a tab

    Hi,
    I have an xml string which i need to display it in a browser.
    But the browser should be embedded in one of the tabs of a tabstrip ui control and not as a pop up.
    Thanks in advace,
    ajay

    hi alex,
    I need to display the xml output in one of the tabs of a tab strip control.The output should be displayed in the same format like the way it would be displayed in the browser.
    Since it was mentioned in your previous post that it is not possible to embed the browser in a tab, is there a alternative way to display the same.
    thanks and regards,
    ajay

  • I want to communicate a RS485/2-wire device through COM1. I tried Instrument I/O Assistance to write to COM1(hex string with or without end bye:0D0A), something happened on the bus, but is not defirrential signal, and device didn't recognised them.

    I am new to LabView, so please bear with me...
    I tried to communicate with an RS485/2-wire device through COM1.  I used Instrument I/O Assistant (and Advanced/Basic Serial Write and Read examples) to write command (HEX string) to COM1,  
    tried writing HEX strings with and withour end bye (is 0D0A the correct end signal for HEX string?).  Both didn't get device's responce.  Looks like the device didn't recognize the command.
    I monitored the transmitted signals on the bus, they were not differential as supposed to be.....
    What is the possible reason to cause this? Please help...
    The hardware connection is OK, because I am able to communicate with the device through COM1 (with the same command) using different software application.

    How are you sending the hex? Is your string control set for hex display or normal? If it's set for normal, then if you send something like 'AD', then you aer sending the ASCII characters 'A' and 'D' and that's not the same thing. I don't believe the I/O assistant can send hex but you can modify the basic serial write and read to do so. Just right click on the string control and select 'Hex Display'. You can also enter the data in a numeric control (set for dex display) and use a type cast or an array of U8's and use the Byte Array to String function. Hex data usually doesn't use any kind of termination characters such as CR/LF.
    If communication is working with another app, then as you said, the hardware is okay and it's not a problem with differential signaling.

  • Convers ascii string to hex string

    I need to send a hex string such as 5051525354A5A6A7A8A9 to a DSP across a serial port.  The string is read in from a file.
    When I send this string to the DSP, it does not recognize the correct hex values.
    If I enter the hex value, 5051525354A5A6A7A8A9, in to a string control that is set to hex display and then change the control to normal display, I get PQRST¥¦§¨©.  When I send this string,  PQRST¥¦§¨©, to the DSP, it recognizes the correct hex values. 
    How can I change the hex string read from the text file to this type of ASCII character conversion?  I've used type cast and the other functions available in LabVIEW with no success.
    This is only one of many strings I need to send so I don't want to hard code PQRST¥¦§¨© or some such string for each message.

    Here's a slightly simpler way.
    Message Edited by altenbach on 08-23-2007 12:17 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    HexStringtoBinaryString.png ‏10 KB
    HexStringtoBinaryString.vi ‏11 KB

  • How to convert hex string to time stamp?

    Hello everyone..
    I am currently working on a project in which I have to read the data from a unit and display that data using LabVIEW. I am using serial communication for reading the data. The read data is in hex format. 
    Now, I want to convert this hex string to a time stamp value. I am reading total 16 bytes. How to convert this hex data to a time stamp value. I have developed a VI. But I want to know that the displayed time stamp is correct or not? Or suggest me some other solution. 
    I am using LabVIEW 2011.
    Thanks & Regards,
    Manisha
    Attachments:
    Test.vi ‏7 KB

    Hi mancan,
                      As Iam using LV2009 Iam unable to open your example.Anyway for converting hex to time stamp
    Thanks as kudos only

Maybe you are looking for