Convert binary string into binary array

Dear I am looking for a way to convert my ten bit string array into 10 bit array.
Any idea?

Yes, but you need to tell us in more details what you have and what you want.
There is no "10bit string", they come in integer multiples of 8 bits. Some possible interpretations:
Maybe you have a 2 character string (16bits). Do you want the 10 low order bits?
Maybe you have a 10 character formatted string of zeroes and ones, one character for each bit.
Do you have a long string and every 10 consecutive bits are one 10bit number that you want as integer?
Please clarify!
There is no "10bit array". Do you want:
a boolean array with 10 elements, one element per bit?
An integer array if ones and zeroes?
An array of U16, each element corresponding to 10bits of the original string?
something else?
It might help if you could attach a small example containing typical data. (make current values default before saving and attaching here).
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • I want to convert a String into an array of bytes

    I am working with telnet programming with java, where I want to convert login name and password of an online user in 'String' format to 'Bytes', plz help me. Which Input or Output Stream I can use

    Assuming you've got the username / password into a String object, you can convert it to a byte[] array using this method.
    String.getBytes();
    Look at the String API
    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
    Hope that helps.

  • Convert HEX String into HEX Array

    Hi!
    Probably a silly question, but I am looking for a way to convert a ROM ID number such as "5E03C21000BA" into an short hexadecimal array.
    The way to do this in C would probably be
    char[17] str_romID = "5E03C21000BA";
    uchar[8] romID;
    sscanf(str_romID, "%02X%02X%02X%02X%02X%02X%02X%02X",
    &romID[0], &romID[1], &romID[2], &romID[3],
    &romID[4], &romID[5], &romID[6], &romID[7]);
    but I can't seem to find a way to do this in LabVIEW. I would be very grateful if you could help me out with a sample program. Thanks ever so much!
    Stefan

    Hello Blondchen,
    I have attached a picture to my last explanation. This example doesn't take care of strings with an uneven number of chars!
    My array has only 6 numbers as you only gave a string with 12 chars... That's what I asked before: how should we know where to split your string to the single numbers? Normally I would take 2 chars to form a byte (as I did in the example). If you give me 16 chars I give you 8 bytes...
    I also think your C byte array will be an U8 array in LabView. If you REALLY need I8 numbers you can change the default type of the "hex to string" or cast to I8 (advanced->data manipulation->type cast) after the conversion.
    Best regards,
    GerdW
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    ConvertHexHex.png ‏13 KB

  • Converting XML String to MessageElement array

    Hi,
    I am trying to call a .NET web service from my Java client. I used WSDL2Java to generate the java classes for calling the .NET web service. The generated classes to call the service expects an array of org.apache.axis.message.MessageElement objects. I have a string representing an XML document which looks like this:
    String xmlString = "<Results><Adjustments><Adjustment><RebuildAdjustmentID>16</RebuildAdjustmentID><IsBasicAdjustment>true</IsBasicAdjustment><AdjustmentType>stone/AdjustmentType><Title>External walls</Title></Adjustment></Adjustments></Results>"
    I have tried converting the string into an array of MessageElement objects by the following way:
    MessageElement[] m = new MessageElement[1];
    Document XMLDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(result2.toString())));
    m[0] = XMLDoc.getDocumentElement();
    However I keep getting the following message returned from the service:
    "Object reference not set to an instance of an object"
    I have tried a handful of ways but keep getting this same error. I have searched the web for hours looking for a solution to this problem without success so any help/ideas much appreciated,
    Thanks.
    Paul

    Any updates on this?
    I am facing a similar problem.

  • Converting a binary string into a JPEG image in Crystal Reports 2008

    Hi Gang
    Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
    I have JPEG images stored in ECC.  ECC stores the data in binary format.
    Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data.  This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data.  Each line contains a maximum of 1,024 characters.
    When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table.  (in my case, 19 lines are displayed.)
    I created a formula to collect all the data into a single string.
    whileprintingrecords;
    stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
    I added the formula to the detail section and itu2019s doing a great job collecting the data.
    I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
    whileprintingrecords;
    stringvar data:=data;
    data
    My clever idea turned out to be a disappointment . . . . my picture object is blank.
    Does anyone have a solution for converting a binary string into a JPEG image?

    Save the JPEG in a format CR supports. Refer to the help file for the file types.

  • Conversion of binary string into headecimal

    Ho will i convert binary string into hexadecimal fromat

    HI,
    Thanks but the above module is not present my system.
    I have number which needs to be converted into binary first and then into Hex.
    I have written it code for conversion of decimal number into Binary.But i am not able to convert it into Hex.
    My rough code is ....
    types : begin of t_temp,
            r1 type i,
            end of t_temp.
    data : ty_temp type standard table of t_temp ,
           wa_temp type t_temp.
    DATA : num TYPE i,
           temp1 TYPE string,
           temp2 TYPE string,
           temp3 TYPE string,
           temp4 TYPE x.
    temp1 = 0.
    temp2 = ''.
    num = 64.
    while num ne 1.
      temp1 = num MOD 2.
      num = num / 2.
      If temp1 = 1.
        num = num - 1.
      endif.
      concatenate temp1 temp2 into temp2 .
    endwhile.
      temp1 = 1.
      concatenate temp1 temp2 into temp2 .
      condense temp2 no-gaps .
      WRITE : temp2 .

  • How to convert PDF file into binary using APIs of Adobe Workflow server?

    I m using the Adobe Workflow Server 6.2. I want to write a web services to convert PDF file into binary and embed this binary data with XML.
    I want to use the APIs (or libraries) of Adobe Workflow server but dont know abt the APIs or Libraries that can convert the PDF file into binary format.
    I will be very thankful to u,if u can help me as i m n this prblm frm the last one week.I tried alot but could nt find the solution.
    waiting for a better response.

    check objectlibrary.pdf
    Dim o As New EPSDK.BinaryData
    o.LoadFromFile(sfilename)
    write o.Value to xml

  • How do I convert a string into a decimal

    I've been tryin to convert a string into decimal but I can't get it to work at all. I keep getting an exception.
    I've tried all of these:
    double myDouble = Double.valueOf(string).doubleValue();
    int myint = Interger.parseInt(string);
    float myfloat = Float.parseFloat(string);
    I can't get anything to work.
    That string i'm reading in is an array containing values with decimals. ex: -45.09348
    All the above work fine if there is no decimal, but fails when it comes to one.
    How do I go about doing this?
    Thanks!

    This works for me:String s = "-45.6789";
    double d = Double.parseDouble(s);
    System.out.println(d);Mark

  • XML: How to convert xml string into Node/Document

    I have a string in xml form.
    <name>
    <first/>
    <second/>
    </name>
    I want to convert this string into DOM Node or Document.
    How can I do this?
    Any help or pointer?
    TIA
    Sachin

    Try this :
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(new org.xml.sax.InputSource(new StringReader(strXml)));Hope this helps.

  • Convert XML string into XML

    Hi All,
    Can you please let me know for any sample code in xslt/java mapping for converting XML string into XML. We use SAP Pi 7.0
    My XML string starts like this
    <?xml version="1.0" encoding="UTF-8" ?> 
    - <ns0:MT_ReceiverFileStructure <namespace>"><Output><?xml version="1.0" encoding="ISO-8859-9"?><?xml-stylesheet type="text/xsl" href="<xsl>"?><Tarih_Date Tarih="11.09.2014" Date="09/11/2014>
       Thanks,
       Pavithra

    Thanks Praveen. It worked.
    However, the xml i have is an extract from a exchange rate URL and it has the reference to a xsl in it as below
    <?xml version="1.0" encoding="ISO-8859-9"?><?xml-stylesheet type="text/xsl" href="<ABC.xsl>"?>.
    So there is an error in sxmb_moni. Is it possible to remove this.

  • Convert XML string into DOM

    Hi all,
    I have a question here regarding converting XML string into a DOM document.
    How can I do this in Java?
    The Document.Parse() methods do not have one that takes in String as its parameter.
    I'm not sure what is the best way to do this in Java.
    Any help is greatly appreciated.
    Thank you in advance.
    regards,
    Sean

    Convert XML String to Document with StringReader.
    String xmlString;
    DocumentBuilderFactory factory =
                DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = factory.newDocumentBuilder();
       Document         document = builder.parse(new InputSource(new StringReader(xmlString)));

  • How do you convert this String into a double?

    Hi, in this code I want to convert String arg into a double. I'm trying to do this so that I can convert some string into a double in this calculator that I'm making. Here is the code:
    public class par {
    public static void main(String[] args) {
    String str = "351";
    double arg = new double(str); // should convert the string into a double
         System.out.println(arg);
         System.out.println(str);
    I keep getting errors in line 4, if any of you could help me out here I'll be thankful, i'm kinda new to java and my search for java's equivalent of alof() (its a function in C libraries that converts char[] into a double)lead me to this.
    Tony L.

    Use the Following:
    String num = "123.2";
    double d = Double.parseDouble(num);

  • Convert XML string into an abap format date and time

    Hi,
    Does anyone know of a method or a function module in ABAP which converts XML string into an abap format date and time.
    Here is a part of the xml that I want to convert.
    <ns2:EventDateTime>2009-07-02T10:13:45+10:00</ns2:EventDateTime>
    <ns2:EventMessageTransmissionDateTime>2009-07-02T10:13:45.987+10:00</ns2:EventMessageTransmissionDateTime>
    Currently EventDateTime and EventMessageTransmissionDateTime are type XSDDATETIME_Z and these are converted to proper dates and times. We will be changing these fields to a STRING instead of XSDDATETIME_Z. The reason for this is to make the field more versatile. The customer would be receiving dates with Zulu (2009-09-23T12:00:00Z), with offsets (2009-09-23T12:00:00+10:00/-10:00) and just local timestamp (2009-09-23T12:00:00). With this, we need to make the date fields as string
    to be able to accept the various date formats (esp. the local timestamp).
    I am looking for a standard function module or method that will convert the xml string to a proper date and time abap format.
    Would appreciate anyone's help!
    Thanks.
    Edited by: eunice ocson on Jul 13, 2009 1:49 AM
    Edited by: eunice ocson on Jul 13, 2009 1:50 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM

    Hi Eunice
    Use the FM 'SMUM_XML_PARSE'
    for more info
    [Convert XML string to ABAP|XML String to ABAP or GUI]
    hope it helps you.
    Thanks!!

  • Converting a String to an array list

    Anyone know how i turn a string into an array list of characters?

    check out the java.lang.String API for the method toCharArray() for your answer.

  • How do I split a comma delimited string into an array.

    I have a string that I am passing into a function that is Comma delimited. I want to split the string into an array. Is there a way to do this.
    Thanks in advance.

    trouble confirmed on 10gR1 and 10gR2
    works with 'a,b,c'  and also with  '  "1"  , "2"  ,  "3"  '
    does not work with '1,2,3' 
    throwing ORA-6512                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • List of PM Orders by Equipment Object Type

    Hi SAP Gururs. Is there any way to obtain a list of PM Orders by Tecnical Object Type? When I use transaction IW38, It's impossible to fill Tecnical Object Type... Thanks in advance...

  • Problem in Hierarchy assignment to FM area

    my client is creating FM hierarchy variant "skt1". but when want to assigne FM area to hierarchy system generate message "hierarchy variant "skt1" is incomplete with regard to fiscal year "2009" please help in this regard

  • Lightroom mobile sync issues

    lightroom mobile says I gave one collection with 442 photos, however it shows one collection with 0 photos.. Help!

  • Do I need to start a new account?

    Have used one account for years so two teenagers could buy iTunes songs and videos. Now they are older and I just got an iPad. Looks like I am picking up my daughters contacts and calendar on my iPad. We're all using one account. Time for separate ac

  • Adding Message Interfaces to Business System

    Hi All, Can anyone tell me how and why we dont add message interfaces to a business system??.. The business system corresponds to Tech system which has software component...right?... so how do we get interfaces from diff components into the same busi