How could I choose some bytes from HEX string and then convert it to a decimal value?

Hi I am working with an OMRON E5EN temperature controller using VISA serial to get data, I send the Read from Variable Area command and get this string  in hexa 0230 3130 3030 3030 3130 3130 3030 3030 3030 3030 3041 3203 71 or .01000001010000000000A2.q in ASCII this string means:
02 STX
3031 3030 Node and subadress
3030 End Code Normal Completion
3031 3031 Command Read from Variable Area
3030 3030 respt code Normal completion
3030 3030 3030 4132 Hexadecimal A2 = 162  (this is the temperature data that I want to show in decimal)
03 ETX
71 Block Check Character
I want to choose the eight bytes for the temperature data and convert it to a decimal number. I have seen the examples to convert a Hexa string to decimal but I do not know how to choose the specifics bytes that I need.
I have look for a driver but i didn´t find any. I am a beginner so please include especific topics for me to study in your answer.
Thanks
Carlos Fuentes Silva Queretaro Mexico 

If the response always has the temperature starting with byte 15 and is always 8 bytes in length, you can use the String Subset function to get those bytes out of the string.  Then use Hex String to Number to convert to a decimal number.
Well someone already beat me to the solution:
Message Edited by tbob on 01-04-2008 04:42 PM
- tbob
Inventor of the WORM Global
Attachments:
HexStr2Decimal.png ‏7 KB

Similar Messages

  • How can we read some bytes from every line of the file

    How can we read some bytes from the every line of the file moving on to the next line
    without using the read line

    Actualiy readLine() takes more execution time
    for reading a part of line if we can do so without
    readLine() we can save some time...Well, if you knew, beforehand, the length of each line, you could use RandomAccessFile and its seek method, but, since you don't, you would have to read the rest of the line character-by-character, checking to see if it is a newline, in order to place the "cursor" at the beginning of the next line in order to read the next few characters you want.
    So, as you can see, you will need to read the entire line anyway (and if you do it yourself you also have to do the checking yourself considering all three possible end-of-line sequences), so you just as well use readLine().
    Some people may suggest Scanner and it's nextLine() method, but that also needs to read the rest of line (as evidenced by the fact that it returns it), so that is no different than the readLine() (or read it yourself) solution.

  • I've can't open any applications on my Mac ! I tried to delete some files from safari (history) and then none of the apps including iphoto, safari, mail, facetime. I don't know how to fix it, help ? any idea ?

    I've can't open any applications on my Mac ! I tried to delete some files from safari (history) and then none of the apps including iphoto, safari, mail, facetime. I don't know how to fix it, help ? any idea ?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • How can i extract a person from a picture and then animate the person

    how can i extract a person from a picture and then animate the person

    Basically you select the person using the various selection tools, copy the selection to the clipboard, and paste the selection onto the destination picture. Then use the Move tool to resize/reposition the person as necessary. Here is a tutorial demonstrating this as well as some advanced techniques.
    http://home.earthlink.net/~msand42/PSE/composite/

  • How do I completely delete firefox from my computer and then reload it without losing settings, background, toolbars, etc.?

    I need to completely remove Firefox from my computer and then reload it because the current one on my computer is compromised... I don't want to lose my settings, background, and toolbars if at all possible... my computer has been having a lot of problems for a long time, finally got a hacker and viruses removed but programs and apps are still having problems and all have suggested a compromised browser along with the browser itself having issues with "stop script", "not responding", freezing, crashing, and blue screen...

    See:
    * http://kb.mozillazine.org/Profile_backup
    You can transfer files from the old profile to that new profile (be careful not to copy corrupted files)<br />
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • SSRS - How to display all the results from a query and then be able to filter the data

    Let's say I have a simple query that will return products name, ID, price
    SELECT pname,
    pID,
    price
    FROM products
    When I display the results in SSRS the user will (without entering any parameters) see something like:
    Product Name | ID | Price
    xyz                    1     $10.00
    .zzz                    10   $4,000.00
    How can I filter my results once they are displayed? For instance, Out of the results the user wants to see only the products where price is between $10 and $3000?
    -Alan

    Hi Visahk,
    Maybe I did not explain my issue very good. 
    I want the user to first see all results (without entering the price range) - then if he wants she/he can filter the results by price.
    As soon as I add 
    WHERE price BETWEEN @StartPrice AND @EndPrice
    to my SQL query, the user is prompted to enter a price range before seeing any data.
    -Alan
    Ok for that what you can do is to set allow null value property for the parameters.
    Then set NULL as default value for parameters in parameter properties tab
    and make the query as below
    WHERE price BETWEEN @StartPrice AND @EndPrice
    OR (@StartPrice IS NULL AND @EndPrice IS NULL)
    and then report will get executed without waiting for any prompt and user may change values at a later stage and rerun it
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to configure visa to adquire dat from serial port and then converted to numeric value from a home embedded device

    I already stablish communication with my serial port using VISA, selecting COM1 as the resoure name.
    After that, I tried to read the data from the port (as we know the data was in string format )but I need to convert the data to numeric value to hadle it (no arrays).
    Another main thing is that I'm develoing a new based Embedded design and tthe info that will trhow out from the device to the PC is binary.
    How can I solved the problem, and if I want to make bidirectional communication with my system how can I do it? The VISA intructions as *IDN? and so forthetc can be recognize by the external system if the COM1 port is recognized by NI Max as ADSRL1::I
    NSTR1?

    Hello,
    For an example of bidirectional serial communication in LabVIEW, please see the shipping example LabVIEW <-> Serial.vi. This can be found from LabVIEW by going to Help >> Find Examples. From the example finder, select Hardware Input and Output >> Serial >> LabVIEW <-> Serial.vi.
    Once you are able to read the string data in, you can use the VIs in the String/Number Conversion palette to convert the data to numeric format. To access these, right-click on the block diagram >> All Functions >> String >> String/Number Conversion.
    Let me know if this does not help.
    Regards,
    Sean C.
    Applications Engineer
    National Instruments

  • How do you save your DVD to your Hard Drive, and then convert to iPod?

    Hello everyone, I was wondering how you save your DVD to your hard drive and then convert it to the iPod Video.
    Please respond.
    P.S.
    I know that it's been discussed all the time, but none of the posts are useful for me.
    Thanks

    Hi,
    The best option is to pull the card out and plug to your computer UNLESS your computer does not have a card reader. If your computer did not have a card reader, you need to map the cardreader on your printer to your network using the following method:
        http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&dlc=en&cc=us&docname=c00149194
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can i delete some books from ibook?

    How can i delete some books from ibook? It says: this book can't be opened. The book is corrupt. I can't open and I can't delete it

    I was unable to delete a book sample from my iPhone 5s running iOS 7.  This seems to be what worked for me.  I went to the Library and clicked "edit" in upper right side of the screen.  I then tapped one time on the book I wanted to remove and a blue check appeared at the bottom right corner of that book (presumably you could tap several at a time)  Anyway, when the blue check is on the book, you will see in the upper left of the screen the word "Delete" (mine was in red) I clicked that and then a confirming dialog came up from the bottom of the screen with the choices of "delete" or "cancel".  I chose "delete" and the book was gone.  Hope this helps.

  • How can I save some pics from my Mac onto my Ipod touch?

    How can I save some pics from my Mac to my Ipod Touch ?

    Syncing photos with iTunes is explained here: http://support.apple.com/kb/HT4236
    You'll have to choose the photos you want to sync in the photo pane in iTunes with your phone connected, then apply sync.

  • How could I Import RAW  photos from sony A300 into Lightroom 1.4.1?

    How could I Import RAW photos from sony A300 into Lightroom 1.4.1?
    RAW photos files in sony A300 are saved as "*.arw".
    any one can help?

    This is well known bug. One day Adobe will recognise that with the best live view system (A350/300) and best usability (A700) they need to take the Sony DSLR's seriously.
    Use the Import function, but use "choose files". Your CF card (in Camera or reader) will just be another drive. Navigate down to the folder with the pictures - control+A, choose selected. Then choose copy to new location and import (safer than using move).
    Don't forget to tick the backup box.
    Hope this helps. Peter

  • HT1338 how could iI upgrade my OS from Mac OS 10.5.8 to the Latest version Mountain Lion

    how could iI upgrade my OS from Mac OS 10.5.8 to the Latest version Mountain Lion

    Hello,
    You need to get 10.6 & update to 10.6.8 first to be able to buy it from the App Store & download it.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store, so you have to call Apple to buy it, last I heard, but quick, call before it's gone!
    Call Apple 1-800-MY-APPLE
    You have to get 10.6.8 first to go even higher to 10.7 or 10.8

  • Hello , how could i insert some content into a large file?

    hello , how could i insert some content in a large file? ----just like a txt editor do.
    assume that i have a 6G file(i think it large enough), then i wann insert one ascii character at the begining of the file,does that means:
    1> i need create one 6G+1byte new file, then copy all content of the original file following by that addition character?
    2> not creat new file,just set original file length to 6G+1byte,then offset all 6G byte by one byte,after all adding my one character?(it seems not some kind of optimization ...)
    what should i do?
    Edited by: littleJohnny on Jan 16, 2008 2:03 AM

    could some means can set the read hint of 6Gbyte content after my character first read out? ----just let my addition point to the begining of 6G original content ,then the addition character take the place of the file header? ----the inster may be the same....
    i just think the already used txt editor seem so fast to process insert, replace .... 2M 10M maybe.... does they doing those operation use Java Type ---String? ------read all contet into memory,then it is easy to regular expression ,relinking read order....-----does it mean large file couldn't against with pattern?
    does all ctrl+s shortcut-----rewrite original file with memory relinked order? then large file could not easily manipulate its structure but all structured file is large than plain format...
    just teach me some "already used txt editor " trick,thanks very much.

  • How can I transfer some photos from PE11 to be saved on my new IPad?

    How can I transfer some photos from PE11 to be saved on my new IPad? I know I can use Adobe Revel but that relies on an Internet connection. The person I wish to show the photos do not have internet connection.

    You can use iTunes on your local computer to transfer photos:
    http://www.howstuffworks.com/tablets/transfer-pictures-to-ipad.htm

  • How can I delete some music from my iCloud but not from my iTunes in my computer? please??

    how can I delete some music from my iCloud but not from my iTunes in my computer? please??

    iCloud doesn't store your music.

Maybe you are looking for

  • How to create delivery with lesser quantity than Scheduling agreement

    HI all, I have one Scheduling Agreement SCHDMNT1 with ITEM A and Qty 100. Now i want to create 2 deliveries against this Agreement i.e DEL1 - ITEM A QTY 40 and DEL2 - ITEM A QTY 60. How to achieve this while manually entering the deliveries. What are

  • Boot issue

    My laptop has been working since few days back. It started booting up slow, freezing every few mins etc. And I was entirely on Ubuntu. Than, today I wanted to boot windows 7 (which came licenced with laptop).  I normaly shut all programs down and pre

  • ITunes 9.0 Will Not Install

    hey guys can u plz plz help me.....mah new itunes won't install nt the older one stopped workin too. ~~~ wen i install i tunes is shows d error msg ""Servie 'iPod Service' (iPod Service) failed to start. verify that u have sufficient privileges to st

  • Menu.createMenu is not working in flex 4.1.

    Hi, I have created a menu bar with menu item using flex 4. My problem is that the meubar is not clickable on left and right side. How to make it clickableon both sides? For this problem i have found a solution by clicking a button using Menu.createMe

  • Content based image retrieval using Oracle Multimedia

    I'm doing a thesis in which I'm trying to improve content based image retrieval, and using Oracle 11g Multimedia and I'm hoping to do CBIR system based on signature generated by Multimedia. To do my application I'm using  this documentation http://fi