Convertion of the string

I'm new user of Labview.
The attached picture shown the string that i get from the PIC. So how can i convert the input string to the expected format?Between, it is any problem of
the write to measurement file?
Thanks.
Attachments:
temp-1.vi ‏95 KB
string.PNG ‏14 KB

use scan from string with format AN%2d%4d => this will split the string up in 2 parts => sensor and value.
Kind regards,
- Bjorn -
Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
LabVIEW 5.1 - LabVIEW 2012

Similar Messages

  • Null reference converted to a String

    I read somewhere that when a null reference is converted to a string, the result is the String "null", hence a null reference can be used freely within any string concatenation expression.
    for example:
    String str1 = null;
    String str2 = null;
    System.out.println(str1+=str2);//outputs "nullnull"
    Before I read about this, I would have thought that a NullPointerException would have been thrown.
    Can anyone explain the rationale behind this?

    This is not a property of String, its the property of
    the println method in the PrintStream class.No, that's not correct.
    Whenever Strings are concatenated, non-Strings are converted to Strings and null Strings are converted to the String "null". This is a property of the Java language itself.
    The expression a + b, where either a or b is a String, is converted into the expression:
    new StringBuffer().append(a).append(b).toString();
    It is the append method of StringBuffer that calls the toString method of non-String objects, calls String.valueOf on primitives, and converts null String references into the String "null". Even though it's an API call that technically produces this behavior, it is actually a feature of the Java language itself as is therefore explained in the JLS. See http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39990 for details.

  • Converting part of the string to a date and subtract with sysdate.

    HINT! In order solve this you must know how the pnr is assembled. Study this:
    650323-5510, we only need the first six characters. They inform us about when the person (car owner) was born. In this case it is 23 Mars 1965. You have to use several oracle built-in-functions to solve this. Hint! Begin by converting part of the string to a date and subtract with sysdate.
    select to_char(to_date(cast(pnr,'YYMMDDMM'))) from car_owner;
    please what am i doing wrong. i need the result to be something like this
    Hans, Rosenboll, 59,6 years.

    Hi.
    The main problem here is you have only last two digits of year. That could be the problem in a couple of years from now, when somebody born after 2k would get in to your database. For now if we ignore this problem the right solution would be :
    <code>
    SELECT months_between(trunc(SYSDATE),
    to_date('19' || substr('650323-5510',
    1,
    6),
    'YYYYMMDD')) / 12 years_old
    FROM dual
    </code>
    Suppose you are expecting the age of the car owner as a result above code will give you that. One again notice the '19' I appended.
    Best regards.

  • Problem in converting the String to Date with time zone GMT

    Hi,
    When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
    String dateString = "12/05/2009";
    System.out.println(myDate.toString());

    I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
    So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
    The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for.

  • Numbers application on Ipad, the 'VALUE' function doesn't seem to work correctly on the string/text I want to convert to a value.

    Hi, I would appreciate if someone could assist with the following.  On the Numbers application on my Ipad, the 'VALUE' function doesn't seem to work correctly on the string/text which I want to convert to a value.  It gives me an error (in my example: 'VALUE requires a string specifying a number, but found "-14308.65" instead.'
    The exact same document (if converted from Numbers to excel), displays the converted string/text correctly in MS Excel as a value though.

    click on the cell then in the formula bar and use the arrow keys to move the cursor to see if there are any other characters in the cell that could confuse the function.  Also make sure the localization for your country is correct in System Prefs.
    Maybe copy the EXACT contents of the cell and post here.

  • Converting the String

    HI all,
    I have one problem..
    that is ..
    String str = ",check,the,values"; ( String length may change)
    String may be like this also
    str = "check,the,values";
    str = "check,the,values,";
    I want the string like: ".check.the.values"
    means just replacing the , to .
    I tryed with stringTokenizer but I get the result like
    "check.the.values" (missing first '.')
    so if anyone knows please send the solution

    HI all,
    I have one problem..
    that is ..
    String str = ",check,the,values"; ( String length may
    change)
    String may be like this also
    str = "check,the,values";
    str = "check,the,values,";
    I want the string like: ".check.the.values"
    means just replacing the , to .
    I tryed with stringTokenizer but I get the result
    like
    "check.the.values" (missing first '.')
    so if anyone knows please send the solution You need to have some code that adds the period (".") at the beginning of your new string. Merely replacing existing characters will not work for this. If you let us see what you have done so far then perhaps we can help more.

  • Converting a file to string and then, the string to a file

    I need to send a File (a JPG file) as String (inside a XML document).
    After this, i want to write the String representing the file (reading the XML document) as a File on my disk (making a JPG).
    Can anybody help me ???
    Thanks in advance !!

    I found this in the forum, the author was brianlmartino1
    and it works perfectly.
    Thank you !!
    import java.io.*;
    import org.apache.soap.encoding.soapenc.Base64;
    public class FileUtils {
    static public void main(String args[]) throws Exception {
    System.out.println("-- go !!!!");
    // get input binary source
    File file = new File("c:\\temp\\file.JPG");
    BufferedInputStream bis = new BufferedInputStream(new
    FileInputStream(file));
    int bytes = (int) file.length();
    byte[] buffer = new byte[bytes];
    int readBytes = bis.read(buffer);
    bis.close();
    // encode binary source
    String encodedString = Base64.encode(buffer);
    // decode String source and save the file to the disk
    byte[] buffer2=Base64.decode(encodedString);
    File file2 = new File("c:\\temp\\fileNew.jpg");
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file2));
    bos.write(buffer2);
    bos.close();
    System.out.println("-- ready !!!!");
    }

  • Convert the string-encoded uid into its original object form

    I have written the uid string into a database and when I need it again in my code I need to rebuild the UID from the string in the db, as it was before.
    Does somebody know how this can be done with java?
    Thx in advance

    I have written the uid string into a database and when I need it again in my code I need to rebuild the UID from the string in the db, as it was before.
    Does somebody know how this can be done with java?
    Thx in advance

  • Problem with JTree converting Node to string

    I have a problem that I cannot slove with JTree. I have a DefaultMutalbeTreeNode and I need its parent and convert to string. I can get its parent OK but cannot convert it to string.
    thisnode.getParent().toString() won't work and gives an exception
    thisnode.getParent() works but how do I convert this to string to be used by a database.
    Thanks
    Peter Loo

    You are using the wrong method to convert it to a String array.
    Try replacing this line:
    String[] tabStr = (String[])strList.toArray();
    With this line:
    String[] tabStr = (String[])strList.toArray( new String[ 0 ] );
    That should work for you.

  • How can I convert output data (string?) from GPIB-read to an 1D array?

    Hello all,
    I am reading a displayed waveform from my Tektronix Oscilloscope (TDS3032) via the GPIB Read VI. The format of the waveform data is: positive integer data-point representation with the most significant byte transferred first (2 bytes per data point).
    The output data of GPIB-Read looks like a string(?) where the integer numbers and a sign like the euro-currency sign are seperated by spaces e.g. #5200004C3 4 4 4 4 3C3C3........ (C represents the euro-currency sign).
    How can I convert this waveform data into a 1D/2D array of real double floatingpoint numbers (DBL) so I can handle the waveform data for data-analysis?
    It would be very nice if someone know the solution for this.
    t
    hanks

    Hi,
    First of all, I'm assuming you are using LabVIEW.
    The first you need to do is parse the string returned by the instrument. In this case you need to search for the known symbols in the string (like the euro sign) and chop the string to get the numeric strings. Here are some examples on parsing from www.ni.com:
    Keyword Search: parsing
    Once you parse the numeric strings you can use the "String/number conversion VIs" in the String pallette.
    Hope this helps.
    DiegoF.Message Edited by Molly K on 02-18-2005 11:01 PM

  • Is there an easy way to convert a long string into an array?

    I can convert a long string into a 1-d array by parsing and using build array, but I would like to know if there is a function to make this easier.
    For example:
    from/   aaaaaaaabbbbbbbbccccccccdddddddd         (string of ascii)
    to/       an array that is 1-d with each element having eight characters
              aaaaaaaa
              bbbbbbbb
              cccccccc
              dddddddd
    Thank you.
    Solved!
    Go to Solution.

    Try something like this:
    (If you can guarantee that the string length is an integer multiple of 8, you an drop the two triangular modes in the upper left. )
    Message Edited by altenbach on 03-14-2010 06:40 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChopString.png ‏9 KB

  • Convert XString to String and String to IWDResource

    Hi everybody,
    we want to open a PDF-Document from Backend in Web Dynpro. For the communication we use a Web Service.
    In Backend we have a PDF-Document with data type XSTRING.
    1. In Backend we convert the PDF-Document from XSTRING to STRING in order to send it via Web Service
    2. Then we call the Web Service and pass by the STRING param
    3. In Web Dynpro we convert the value from STRING to Bytes, like below:
    IWDResource resource = WDResourceFactory.createResource( myPDFStringFromWS.getBytes(), "Doc1", WDWebResourceType.PDF);
    4. We bind the Resource to a FileDownload-UI.
    Unfortunately we get the error message: Document is not a valid PDF
    How can we convert a String to IWDResource? Could the problem be in our first step, where we convert the XSTRING into STRING?
    regards,
    Sid

    Hello Sid,
    IWDResource resource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(wdContext.currentFileElement().getString()),"PDF",WDWebResourceType.PDF,true);
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.toString(),"PDF");
    window.show();
    Can you try this and let us know.
    Regards
    Nizamudeen SM

  • Convert xstring to string

    Hi All,
    I need to convert the XSTRING to STRING and i need a FM or method which converts all the special characters like Å, ö, ä, å, ü as it is.
    Im getting the xstring value from excel sheet using file upload in WEB UI.
    The class used is CL_HTMLB_FILEUPLOAD and the attribute is FILE_CONTENT which is of type XSTRING.
    I have few special characters in the excel sheet which i need as string.
    I have modified this FM CRM_IC_XML_XSTRING2STRING to convert the Xstrin gto string... but stilll the replacement is not working.
    Can anyone suggest me...Any different solution i can use to get the file upload in string. Or get the characters from Xstring
    Useful answers are much apprieciated.
    Thanx in advance
    Siva.

    Hey,
    Why dont you check this method
    ECATT_CONV_STRING_TO_XSTRING. Not sure whether it supports special characters or not
    Regards,
    Vinay

  • Need a function module to convert xstring to string in web dynpro applicati

    hi,
       need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
    Moderator message: please (re)search yourself first.
    Edited by: Thomas Zloch on Nov 17, 2010 5:31 PM

    Hi,
    Check the following link:
    FM to convert XString to String
    Regards,
    Bhaskar

  • Converting Datetime in String in map

    Hello all,
    I am reciving a message from a system A, in which I am receiving field DOB as datetime and I am sending same message to system B , problem is that system B not able to handle DOB at there end as datetime - I have checked at BizTalk side that DOB
    is going correct so issue is at system B side. now system B wants BizTalk system to send them DOB field as string.
    What could be the possible way's to do this ?
    1) We can change both schema System A schema and System B schema and map them is one way .
    2) Can we take datetime and convert it to string using some funtoid ? and send that string to system B ? How ?
    Is there other way for this ?
    Thanks,
    Nitin
    Thanks and Regards, Nitin.

    Hi Nitin,
    First find out how the destination system consumes the datatime value. Some system would consume the value in the datetime field as string. It could be the problem in the format of the datetime. Ask them about their expected datetime format. For example
    "2004-09-23T10:20:00.000-05:00" is the standard datetime format produced when you set a field as xssd:datetime. May be the destination system not able to handle this format.
    If the issue is in the datatype i.e. in the way client consume, the datatype of the destination schema matter:
    Then update the destination schema's to have string datetype. And simply map the value from the soruce's datetime field to destination schema's update string field. You don't need any scripting fuctiond to convert the data type. BizTalk's mapper would handle
    it.
    If the issue is in the date format  i.e. in the way client consume, the datatype of the destination schema doesn't matter, and if the actual problem is in the format:
    Then update the destination schema's to have string datetype. Use a scripting fuctiond as suggested by others and do the conversion in the script.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Maybe you are looking for

  • Update button issue in updating supplier bank details R12

    Hi, My current Prod setup is Release 12.0.6 and 10.2.0.4 database OEL 4 64 bit We currently facing issue of when we navigate thru AP superuser-->supplier-->entry--> update any exisitng supplier banking details we get following error: Error Page Excep

  • HT6114 how to free space on mac

    Please help

  • BEx Analyzer in different language

    Hi Experts, i got my Bex analyzer menus in a different language. How can i change it  ? regards Abhi

  • Kodak Photo CD

    'sI have several copies of Kodak's Photo CD but unfortunately have just discovered that my copy of Photoshop CS5 cannot read the Kodak PDC file format.  Does anyone know if it possible to open these images?  My present system is a Mac OSX 10.6.7.  An

  • Hi! I Need Windows 7 drivers for HP ENVY m6-1162la (Please)

    IDowngrade from the aweful Win8 to Win7 64 bit, need drivers, website only lists Win 8 drivers Product NumberC6Z27LA    HP ENVY m6-1162la searching on the pages of Hp i found these: Audio: http://h10025.www1.hp.com/ewfrf/wc/softwareDownloa​dIndex?sof