Conversion from ascii to 16 bit inteeger number

Hi, I recieve data from message based measurement device via a serial port. I have used VISA functions write, read and so on. So I have read a string of charaters (8 bits). My problem is, that in this output message are text messages in char and 16 bit inteeger data numbers too. I can split these two parts from the string, but I don't know how can I convert data read like 8 bit char to 16 bit inteeger number. So my problem is how can I convert ascii character to a 16 bit inteeger. Thank you for your help. 

You will find the all the functions you need in this palette(attached picture). The typecast function should work. Type cast the part of the string containing data in U16 to a U16 array. The byte swap function may also be needed.
Message Edited by t06afre on 03-23-2009 11:59 AM
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Attachments:
sample.PNG ‏21 KB

Similar Messages

  • Loss of quality in conversion from 16 to 8 bit

    Hi, I have a raw image taken with a Canon G12 and converted to 16 bit psd file.  When converting to 8 bit I notice a significant loss of oomph to the image - iI don't know how to describe it but it seems a little washed out, a lack of saturation, contrast or vibrance or something.  Still not bad but not as good.  With 16M colors available in 8 bit images, is this normal or have I got a setting wrong somewhere eg color space etc ?  TIA

    Hi. Progress!  I paid more attention to the conversion process and converted a 16 bit image (with Photoshop CS5 Extended 64bit),
    to 8 bit using the menu Image/Mode/8 bit, and the appearance of the images is identical in Photoshop CS5.  This would seem to rule out monitor issues.
    However when viewed in PSE8,  a significant amount of vibrance/brightness/saturation (for want of a better term) is absent from the 8 bit image.  Alternatively, or perhaps in addition to that, the 16 bit seemed to have MORE vibrance/brightness/saturation than the PSCS5 version. I checked the color settings in PSE8 and I had "Optimize for printing" checked so I changed it to "optimize for screen" and updated thumbnails, and there was no change to the discrepancy between the two copies of the photo in question. Could there be a difference in the way PSE8 displays 16 bit and 8 bit images or the way PSE8 uses information recorded by CS5/ACR 6.3 during the conversion from Canon raw .cr2 to .psd 16bit?  i.e. does PSCS5/ACR 6.3 record in the psd file, the tweaks made during the conversion from cr2 to psd, and this information be used during display in PSE8 somehow?  TIA again.

  • Conversion from ascii codes to alphabets

    Can any one explain me how to get back alphabets from ascii codes
    Attachments:
    conversion.vi ‏5 KB

    Your question is not clear. What do you mean getting alphabets from ASCII codes? Do you have an array of bytes coming in? If so, the Byte Array to String function (in the String >> Conversion palette) can give you the characters.
    I also don't understand your follow-up post. What is that VI supposed to show? It's just a VI with a front panel indicator.
    Attachments:
    ASCII.PNG ‏6 KB

  • Conversion from dynamic to double bit data

    This might be very simple but I've got confused. I have current data and average data as in code. I want to build array using this data, save it on my hard-disk and open in word with headers(current and average)
    Problems:
    I input data from both sources into build array as shown, and wire output of build array to write to spreadsheet vi. I get error source is dynamic and sink is double bit. This is the hardest part of my life to figure out which conversion pallete to use.
    When I run the vi (lets assume correct conversion pallete is wired and there's no conversion error,) dialog box pops up for file path which keeps coming on 
     Ideally I would like it to pop up on screen when I press run so that I may browse location to save file and once path is specified vi runs continuously and data is written on spreadsheet while vi is running.
    Many thanks for reading and help
    Cheers 
    Solved!
    Go to Solution.
    Attachments:
    creating 2d array and saving data in spreadsheet.vi ‏109 KB

    Last time I didn't even try to think about what you were doing.  Now that I look at it I am once again reminded why I don't use express VIs and dynamic data types, but I digress.  I am now guessing that you would like to average a signal and have two curves, the current set and a weighted average.
    There may or may not be a way to do this with Express VIs and Dynamic Data types.  To be honest, if there is I wouldn't use it.  What I would do as a start is immediately following each Express VI insert a Dynamic Data to DBL conversion and then Index Array to get the first row.  Now you are working with 1D arrays.
    Attachments:
    creating 2d array and saving data in spreadsheet_MOD2.vi ‏149 KB

  • "Conversion from ASCII to Hexdecimal"

    Hi there,
    Is there anyone can help me on how to convert the hexdecimal to ASCII? Or any references that I can look into it? This is ASAP. Thanks.
    regards,
    Wooi Meng

         * Get hexadecimal string representation of a byte.
         * Note: to get a hex string from a character, use <code>Integer.toHexString((int) c.charValue())</code>.
         * To get the ASCII value of a character, use <code>(int) c.charValue()</code>.
         * @param b Byte.
         * @return String with hex value.
        static public String toHex(final byte b) {
            final char hexDigit[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
            final char[] array = { hexDigit[(b >> 4) & 0x0f], hexDigit[b & 0x0f] };
            return new String(array);
         }//toHex()
         * Get hexadecimal string representation of a char.
         * @param c Char.
         * @return String with hex value.
        static public String toHex(final char c) {
            final byte hi = (byte) (c >>> 8);
            final byte lo = (byte) (c & 0xff);
            return toHex(hi) + toHex(lo);
        }//toHex()

  • HELP: CONVERSION FROM ASCII TO LABVIEW

    I am degitiging 4 chanels biomedical data by POWERLAB. I can save that
    file into ASCII format or POWERLAB format. Recently I am using a
    software to analyzed those data that need a file like labview format or
    HP Vee FORMAT. I DO NOT KNOW THE TYPE OF THOSE FILE. How do I convert
    that TEXT file into LABVIEW FILE? If any body is interested to help me,
    I can send sample data file.
    Thanks in advance.
    Shamsuzzaman
    Mayo Clinic
    Rochester, MN
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    [email protected] wrote:
    >
    > I am degitiging 4 chanels biomedical data by POWERLAB. I can save that
    > file into ASCII format or POWERLAB format. Recently I am using a
    > software to analyzed those data that need a file like labview format or
    > HP Vee FORMAT. I DO NOT KNOW THE TYPE OF THOSE FILE. How do I convert
    > that TEXT file into LABVIEW FILE? If any body is interested to help me,
    > I can send sample data file.
    >
    > Thanks in advance.
    >
    > Shamsuzzaman
    > Mayo Clinic
    > Rochester, MN
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.
    Shamsuzzaman,
    There is no standard LabVIEW format for your file. LabVIEW can read any
    kind of file of known structure. Please explain more about your problem.
    Basically you can read your text file into LabVIEW direct
    ly. Most likely
    POWERLAB stores data into tab-delimited format and you can read it
    without any problems and hope there is no special format in it.
    Send to me your file.
    Sergey Krasnishov,
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]

  • IMessage randomly starts new conversation from email address

    My wife's phone has been having this problem for a while - both on her iPhone 5, and on her new iPhone 6.
    In the settings for iMessage, it says she can be reached by iMessage at ___, and then lists her Verizon cellular number, and her iCloud email address. Under "start new conversations from" it lists her Verizon cellular number, and her iCloud email address, with the phone numbering having a check mark.
    The issue: some iMessages she sends me will be from her phone number, and some from her email address. There appears to be no rhyme or reason to where the  iMessage originates. The only clue I can decipher is it appears that when she sends photos, it might be coming through her email address, but I can say that's for certain.
    Any idea what the cause is?

    My wife's phone has been having this problem for a while - both on her iPhone 5, and on her new iPhone 6.
    In the settings for iMessage, it says she can be reached by iMessage at ___, and then lists her Verizon cellular number, and her iCloud email address. Under "start new conversations from" it lists her Verizon cellular number, and her iCloud email address, with the phone numbering having a check mark.
    The issue: some iMessages she sends me will be from her phone number, and some from her email address. There appears to be no rhyme or reason to where the  iMessage originates. The only clue I can decipher is it appears that when she sends photos, it might be coming through her email address, but I can say that's for certain.
    Any idea what the cause is?

  • FM for Material number conversion from R/3 to APO in R/3

    Hi,
       Can anybody tell me conversion exit (function module) for Material number conversion from R/3 to APO in R/3 system. I mean i have 18 digit R/3 material number which i have to convert to 40 digit APO material number in R/3 system.
    Please suggest to win full points.
    Thaniks in Advance,
    Chandan Dubey

    Dear Chandan,
    Conversion Exits:
    CONVERSION_EXIT_MATN1_INPUT ....... If you are storing Material With Zeros
    Then concatenate it with 22 zeros. i.e. '0000000000000000000000000000'.
    For example:
    data : v_matnr type matnr,            "R/3 Material
           v_apo_matnr(40) type c,        "APO Material with 40 length
           v_zeros(22) type c. value '0000000000000000000000000000'.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
           EXPORTING  INPUT          = v_matnr
           IMPORTING  OUTPUT         = v_matnr.
    concatenate e_mantr v_zeros into
                v_apo_matnr.
    Regards,
    Naveen.

  • Can I use my email and phone number to start a new conversation from iMessage?

    Can I use my email and phone number to start a new conversation from iMessage?

    Can I use my email and phone number to start a new conversation from iMessage?

  • Imessage sends messages from email despite selecting phone number for "start new conversations from"

    On both my phone and my computer I have selected to start new conversations from my phone number, but just now I continued a conversation from my macbook and it sent it from my email address instead of my phone number! All the other answers I found for this question were outdated, I couldn't find "Caller ID" in settings for iOS 8 or Yosemite.

    If this is a continuing conversation, I don't believe the device looks at it as a new conversation, which is what that setting is for, from what I understand. If there is a checkmark by the phone number on all devices, then it should start there, but if the conversation was originally started from the email, I believe it will continue until you start a new conversation.

  • IMessage, Start new conversations from number missing?

    I sign in with my Apple-ID. But then apperienlty you can choose which you will start new conversations from, hotmail or number, but that does not appear for me? Settings ---> Messages ---> Send and recieve.       PLEASE HELP ME

    This worked for me.  Turn off iMessage in Settings---> Messages. Then turn off iPhone. Restart iPhone then turn iMessage back on.   The phone number should reappear.

  • TS4268 Missing Phone Number at "Start new conversations from"

    How come there is missing of the phone number at the "Start new conversations from:" inside Settings -> Messages -> Send & Receive" and only have the e-mail address but both of the phone number and e-mail address under "You can be reached by iMessage at:", please advise how to add it back ?

    Yes, I have solved it.  You could try to go from Settings -> Messages, turn the iMessage from ON to OFF, then you switch off your iphone and turn it on; go back to Settings -> Messages, change the iMessage from OFF to ON, then switch off your iphone and turn it back on, go to check whether you could see or add back the phone number assoicated with the iMessage.   Good Luck !

  • Sync old iMessage conversations from iPhone to new iPad & Mac?

    I have had my iPhone for a couple years now, and have accumulated a fairly large amount of iMessage conversations from various people. A few days ago, I purchased my first iPad and also updated my Mac to Mountain Lion. By doing so, I now have access to iMessage on three devices in total, whereas before I only had one.
    I have managed to setup my devices so that all new iMessages I send and receive are being synced between them. However, is it possible to sync my old iMessage conversations from my iPhone back onto my iPad and Mac?
    I would like to do so in order to keep a full record of the past conversations I have had with my contacts.
    I have done a bit of research before posting, but the only related topics I found werehttps://discussions.apple.com/message/19095937 andhttps://discussions.apple.com/message/17818920. The former was left unresolved, whereas the latter describes a solution which I am unable to reproduce.
    Could anyone shed some light on this for me?

    Hi,
    For me this was very early on in my Mountain Lion days.
    I would now say that you cannot sync iMessages from an iOS device that were sent before your linked any Apple ID with the iPhone Number or added the Mac to the use of the Apple ID.
    At the point at which and Apple ID is used on both an iPad and the Mac version of Messages becomes it's "Start date"
    The same can be said for adding an Apple ID to an iPhone and the Mac.
    On the Mac all messages can be saved if you wish.
    This are in the .ichat format which you can send to Mac  Buddies and then can open them and read them as if they were the chat (i.e they display as "chats').
    There appears to be no way in iTunes to access the iMessages (or SMS ones) on the iPhone.
    Someone who knows more about the iOS may be able to tell you if they are accessible another way.
    8:52 PM      Friday; May 24, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Page numbers incorrect after conversion from Excel to pdf

    Page numbers incorrect after conversion from Excel to pdf
    ""This above link (thread:834599) is from a case back in 2011 that claims to solve this problem, but it does not solve this problem. I think that customer only cared about having continuous page numbering, not discrete page numbering per sheet.
    ========================
    I still have this issue in Acrobat XI and MS Office Professional Plus 2010. I keep upgrading to no avail. This regression has resulted in a huge time drain for me. If you fixed it, please explain how I can get my hands on the resolution.
    Previous versions of Excel and Adobe Acrobat enabled flexibility around the "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) token, depending on context and usage. The "# of pages" token could represent EITHER the number of pages in the workbook OR the number of pages in the tab/sheet, depending on how you generated the PDF:
    You could select "Selected Sheets" and then select all or some of the individual sheets in the workbook, and the PDF would honor the discrete numbering of each of the sheets, so the first page of each sheet was p1 and the "# of pages" was the number of pages in the sheet; not the number of pages in the workbook; or
    You could select "Entire Workbook" and the PDF would honor continuous page numbers across all sheets, as a single document.
    Now, it only honors the total number of pages in the workbook, regardless of the method you use to publish to PDF: saving as PDF, printing to PDF, using "createPDF" from Acrobat plugin to Excel's menu ribbon; selecting all sheets, some sheets, or Entire Workbook; automatic First page number or "1" under Page Setup > Page> First page number. (This last option, btw, does restart every sheet at p1, but it hardly makes sense if the total number of pages is still the total number in the workbook instead of the number in the sheet.)
    I spent a lot of time trying each which way that the blog posts recommended and have tried this on multiple versions of Excel and Acrobat now.
    NONE of these time-consuming experiments gave me what I wanted.They all insist that "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) is the total number of pages in the workbook or the total number of pages in the selected sheets combined.
    The numbering are correct in Excel Page Layout.
    The same issue happens when using LibreOffice calc. (Although, I never tested with Libre Office before, so I don't know that it ever worked).
    The workaround now is to create PDF for each spreadsheet one at a time, and then compile them using the Acrobat combine/binder feature. All alternatives are extremely time consuming and tedious. It used to be automatic. This is a major regression that has gone untreated for over a year now, maybe two years.
    My task takes infinitely more time to complete than it did with previous versions of Acrobat. That means that days are added to my project, when the functionality used to enable a quick pdf generation that was ready for review, now I have to do this very manual time-consuming set of steps to generate a draft. As the project has grown and more tabs are added, my pdf-generation task takes that much longer. We require lots of drafts. It used to be easy and fast. Now it is hard and time-consuming.
    In my opinion, the problem is not Excel; it is Acrobat because it was introduced with an upgrade in Acrobat, not an upgrade in Excel. The problem was introduced in Acrobat 9 or 10. Please provide a patch or add-on or something.

    If you are setting up the page numbers in Excel, the resulting PDF would display the the page numbers created in Excel. On Excel 2010 support page, (http://office.microsoft.com/en-us/excel-help/insert-and-remove-page-numbers-on-worksheets- HA010342619.aspx#BM2) is stated the following "tip" which indicates by default Excel 2010 starts numbering each tab with 1. Exel's workaround tip is below - 
    Set a different number for the starting page
    Tip   To number all of the worksheet pages in a workbook sequentially, first add page numbers to all worksheets in a workbook, and then use the following procedure to begin the page number for each worksheet with the appropriate number. For example, if your workbook contains two worksheets that with both be printed as two pages, you would use this procedure to begin the page numbering for the second worksheet with the number 3.
    On the Page Layout tab, in the Page Setup group, click the Dialog Box Launcher next to Page Setup.
    On the Page tab, in the First page number box, type the number that you want to use for the first page.
    Tip   To use the default numbering system, type Auto in the First page number box.
    Also helpful in the same section is the note on viewing page numbers. To see if the page numbering dilemma originates in Excel make sure you are using the Page Layout View see below:
    Hide All
    If you want numbers shown on pages when you print a worksheet  you can insert page numbers in the headers or footers of the worksheet pages. Page numbers that you insert are not displayed on the worksheet in Normal view — they are shown only in Page Layout view and on the printed pages.
    Overall it may be easier not to create the page numbers in Excel but instead create then in Acrobat using the Headers and Footers option in Acrobat.  I hope this helps - it sounds like a frustrating issue you are experiencing.

  • Conversion from milliseconds to Date in 1.5

    A java.util.Date object can be constructed by passing the number of milliseconds since 1 January 1970 as a constructor argument. This Date can then be formatted to a human-readable format with SimpleDateFormat.
    I have tested this conversion from milliseconds to a date both in Java SDK 1.4.1 and Java 1.5.0 to see if there are differences in the way dates are calculated from milliseconds. It seems that there are differences when the system timezone is set to Europe/Berlin. The dates from 1.5.0 are one hour ahead of those from 1.4.1 in a certain week in May 1945 and a day in September 1945.
    This means that milliseconds that are generated from a date by using the Java 1.4.1 runtime and then stored are interpreted differently when they are retrieved when using java runtime 1.5.0, if they happen to be one of those days in 1945. This could cause discrepancies when an application is migrated to JDK 1.5.0.
    This is only a minor problem, but is there any way to know what caused these changes in SDK 1.5.0 and what these changes are? Is there historical data that the Sun implementation is based on to calculate dates from millisecond values?
    Any help is appreciated.
    Kind regards

    I found the following at "http://thedailywtf.com/forums/70146/ShowPost.aspx"
    In summer 1945, Berlin and the Soviet-occupied part of Germany observed a daylight savings time of two hours. Unfortunately, Sun's JRE 1.4 implementation of GregorianCalendar defines a maximum DST of one hour and, in non-lenient mode, rejects the 2 hours as invalid when recalculating all fields after the millisecond field is set.
    Here's the bug report: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4639407

Maybe you are looking for

  • VL32N Zero Receiving or Setting Delivery Complete on Inbound Delivery

    ERP Retail Scenario: We receive ASN from vendor creating inbound delivery; however, some items are not received so we enter zero quantity for them into VL32N Zero quantity does not post to article document and invoice verification process (GR-IV)cann

  • Facetime won't work after Lion install... No mic from isight

    After installing Lion on my 2010 mac mini, Facetime won't recognize my firewire isight mic. Video comes in from the isight, but it doesn't find it as an audio input choice. System preferences recognizes it and hears your voice, but not Facetime. You

  • Certificate based authentication with iOS Client

    Hello experts, I have a question regarding the certificate based authentication in SAP Mobile Documents. With the Android Client it is "easy" possible to use certificate based authentication by just sending the user certificate to the Android device

  • Losing objects when producing a pdf

    CS5, Mac, 10.5.8 I have a page with 5 photos and type, grayscale photos and spot color stroke around the photos. Inverse rounded photos. When I produce any type pdf with bevel and emboss added to the photos they disappear in the pdf. In InDesign tran

  • Mac Adobe Bridge v4.0.0.529 impossible to use

    Bridge within the last month Bridge opens very slowly, always incompletely, and has become totally useless for me.  This remains true irrespective of the number of apps I have open on my MacBook Pro w 4GB RAM, 3.06 GHz processor speed.  No change eve