Convert two U8 single 12-bit hex

This should be very simple, but for some reason, I am struggling to find a solution.    I have some data to 12-bit temperature sensor integrated into two U8.   I need to to strip-4 bits of the most significant byte of U8 and add them to the LSB U8 to get a reading in HEXADECIMAL in the temperature.

I have attached a simple snippett VI which emulates the incoming data.   The U8 MSB is typically 04 h, 14 h, 84 h or h 94, function of sensor that reads the FPGA.   Currently, the reading goes bonkers when the MSB U8 password 04 h and 14 h to read the second sensor.

Thank you

If I understand your problem, you want to take a 8-bit number representing the high byte of a quantity of 12 bit and basically keep the low 4 bits.  In other words, you want to hide (or clear) the high four bits of the page.  Boolean functions are your friends here...

Bob Schor

Tags: NI Software

Similar Questions

  • Two Windows 7 64 bit updates do not. (KB977074) (KB976972)

    Two Windows 7 64 bit updates do not.

    Update for Windows 7 for x 64-based systems (KB977074)

    Update for Windows 7 for x 64-based systems (KB976972)

    Error details: code A 80071, 90

    It's the third day, they fail to install.

    OS is Windows 7 64 bit

    Processor: Intel Core 2 Quad CPU 2 .40GHz

    Installed memory: 4.00 GB

    How can this be repaired?

    Hello

    Copy the file "C:\Windows\Logs\CBS\CBS.log" (otherwise you can not open it) in your documents folder and open it with Notepad. Now I get errors. Errors that you see?

    André "a programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

    It is correct. I found the answer here http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/6ee6ede7-7f6a-47dc-9562-acd08615532b
    I had to install updates one at a time.

  • Convert a sweep of 16-bit grayscale tif to DNG and getting 48-bit RGB?

    I have scanned hundreds of old black and white negative using Vuescan to TIFF 16-bit grayscale. If I open in Photoshop CC2014 the tab indicates that they are a single 16-bit grayscale channel. But if I have Lightroom convert them into DNG and then open them in Photoshop, they appear as 48 bit RGB or three 16-bit RGB channels. The three channels are identical. What happens here? Is it only returned as a 48-bit RGB or the DNG image byPhotoshop to store the RGB image? The DNG format is not much bigger than the TIF, so it doesn't seem to be store 48 - bits of information. I lose all the data on your way to the DNG format with a scanning in grayscale?

    Given that I can export the DNGs to a tif and it refers to a single channel 16-bit, I suppose I don't lose all the information, but I'd rather not use DNG for scans in grayscale? Or should I edit in Photoshop with the three RGB channels on and understand that I am change the grayscale channel should ever export back to tiff?

    It seems at least that there is a gap in the rendering of the shades of gray DNG in Photoshop?

    I think that the best way to answer here is to explain my own workflow.

    I have to be a little brief: it's getting very late, and I start tomorrow a roadtrip of six weeks.

    I do a lot of work with TIFF scanned, and it never occurred to me to convert to DNG.

    I start with rough tonal corrections, noise reduction and retouching in PS and then import the image (with all the shadow and highlight details present) in LR.

    Here, I'm very good tuning and capture sharpening, but sometimes the image must return to the PS for editing. I use then change the Original and the image opens grayscale in PS. After check-in PS, I click on the exclamation mark on the thumbnail and choose import disk settings and updates to images in LR.

    Given that I find the release of LR sharpening unsuitable for scanned images (it's probably optimized for digital capture), I export a new LR tiff image, open it in PS, conversion of RGB to grayscale and use Smart Sharpen for output sharpening. I wish you that LR could export in grayscale, but I've learned to live with it. You could easily implement an action of conversion in levels of gray (and 8 bits) and use it regularly.

    My knowledge of the technical aspects of the dng files is limited, but my impression is that they are files in grayscale, which explains the small size of the file.

    The color is added in the process of deconvolution in LR.

    I do not think that your workflow with convertin to DNG will affect the quality, so stick with it if you wish.

    I gladly carry on this discussion, but since I'll be on the road, you answer could take some time.

  • search string and convert whole real or 8-bit 32 bit

    I was hoping to get some advice on how I could search for the following string and convert it to a real number or an integer.  The following data is output as a device ascii characters and I would look for both in each line (starting with 7699,72 seconds in this case) and convert each one to a real number.  Furthermore, I would like to get the integer values in each row (0, but could be 1,2,10,12, etc.) and convert them to an 8-bit integer.  I think that using the template Match followed by analysis of chain would screw that I need, but am not sure how to match in each case. Thank you!!
















    7699,72 0

    7699,74 0

    7699,76 0

    7699,78 0

    What are the characters in the white space between the and the numbers?

    Scan chain can probably not what you want.  Note that in the image space characters include spaces, return carriage, line breaks and tabs.

    Lynn

  • 24-bit hex 2 Add-in

    Hello

    I need help with this problem, I have 24-bit hex data inbound and required for the output of the complement of 2 signed numbers. The parties work separately but not together. Any help would be appreciated.

    LabView 2011. If necessary, I can post a version especially.

    Thanks in advance.

    The problem in your first VI is that you use the hexadecimal string for the number function.  But you do not have a hexadecimal string.  Would be a string as 6 characters 7 F.  You have a string of 3 bytes 7F FF FF.  You just need to use the conversion you have.  But you first need to add a byte zero at the front of this so that it turns correctly in the I32 data type.

  • I'm looking for the 8th bit of a 13-bit-hex digit

    Basically, I have a 13-bit-hex figure, now I want to find the 8th bit of sales and output. How can I achieve it. I definitley tried but none of them worked.

    Thank you very much

    It seems you want the figure 8, not the 8th bit.  Make your mask 0000000F00000.  Who should choose the number you want. You may need to do a few extra things to get right and not 0000000C 00000.

    Lynn

  • How to convert Windows 7 pro 64-bit to windows 7 pro 32 bit

    How to convert Windows 7 pro 64-bit to windows 7 pro 32 bit

    You can't unless you are doing a new installation that would eliminate all of your files and installed programs.

    Clean install Windows 7 - Windows 7 Forums help

  • How can I create a multi page PDF from a multi .tif file?  On the creation of a file .pdf from a file multiple .tif, the .tif file is converted to a single page (always the first page of the .tif file) .pdf.  The rest of the document is cut off. The .tif

    How can I create a multi page PDF from a multi .tif file?  On the creation of a file .pdf from a file multiple .tif, the .tif file is converted to a single page (always the first page of the .tif file) .pdf.  The rest of the document is cut off. The .tif file comes from a document by using the fax & Scan app scanner in Windows 10.  I am running Adobe Acrobat Reader DC, which I run with my subscription 'Adobe PDF package, monthly'.  It worked fine until about a month.  I've since upgraded to Windows 10 and Acrobat Reader DC.   I would be very grateful for any help. Eoghainn

    Hello

    This problem has been reported as a bug. Our team of engineers working on this priority issue.

    Kind regards
    Nicos

  • How to send a single code of hexa from 1 byte with sending VISA for every 500 ms?

    Hello

    I would like to send only a 1-byte hex code in LabVIEW to an external device using RS - 232 (300 bps, 8 data bits, no parity bit, no flow control) every 500 ms.

    The TX pin on the computer should stay at the logical level 1 once he finished transmitting the 1 byte of data and wait before transmitting again 500 ms.

    I'm building a test below code:

    The output of "Channel 1" will connect in the sending VISA write buffer. (Please note that the code above does not include the 500 ms delay I mentioned. Just ignore for a moment.)

    This code will work like what I described above? I tried on my project, but I was getting weird things on the device.

    Convert the code hex correctly?

    And how to send it VISA pass in the string? Does include the other 'useless' strings with the hex code that I want to send?

    Any help will be appreciated.

    Thank you.

    Hi eddiechai...

    you will get a string of length 2, so you have 2 bytes. You must use the U8 and the cast function type. (see attached photo). You have to disable the stop character to get what you want.

    Mike

  • Multi lines convert to a single line

    Dear Group members
    I want to convert the queries that return multiple lines in a single line. Scanario is provided for in
    select * from inout v
    where v.empcode = '00047'
    and v. dated = '27-dec-09'
    
    EMPCODE      DATED        IN_TIME   NET_TIME     ATT_STATUS     VAL
    00047     27/12/2009     0     0       G             1
    00047     27/12/2009     0     0       R             1
    00047     27/12/2009     7.44     483       P             1
    This query gives multi lines, but I would like to convert it into a line like this
    EMPCODE      DATED        IN_TIME   NET_TIME     ATT_STATUS     VAL
    00047     27/12/2009     7.44     483       R             1
    If the employee came the day that has three traffic status ('G', 'R', 'P'), then it should show in_time, net_time situation and their participation should be 'R '.

    In this example there are two rows. I need the line that has in_time > 0, which is the 2nd bet replaces att_status 'P' for 'R '.
    EMPCODE      DATED        IN_TIME   NET_TIME     ATT_STATUS     VAL
    00047     25/12/2009     0     0       R             1
    00047     25/12/2009     7.59     476       P             1
    Suppose that there are the 25/12/2009 and employee came that day then it shows the following result.
    EMPCODE      DATED        IN_TIME   NET_TIME     ATT_STATUS     VAL
    00047     25/12/2009     7.59     476       R             1
    It presents 'R' Att_status coloums instead of 'P '.

    >
    Note that
    'G' = blew in gusts
    'R' = rest
    "P" = present
    >

    Test case is provided for in
    CREATE TABLE INOUT
    (
      EMPCODE     VARCHAR2(10),
      DATED       DATE,
      IN_TIME     NUMBER(10,2),
      NET_TIME    NUMBER(10,2),
      ATT_STATUS  VARCHAR2(5),
      VAL         NUMBER(3)
    )
    
    insert into inout(EMPCODE,    DATED     ,IN_TIME , NET_TIME, ATT_STATUS, VAL  )
    values           ('00047','25-DEC-2009',     0    ,       0     ,   'R' ,           1);
    insert into inout(EMPCODE,    DATED     ,IN_TIME , NET_TIME, ATT_STATUS, VAL  )
    values           ('00047','25-DEC-2009',     7.59 ,       476   ,   'P' ,           1);
    insert into inout(EMPCODE,    DATED     ,IN_TIME , NET_TIME, ATT_STATUS, VAL  )
    values           ('00047','27-DEC-2009', 0    ,    0         ,   'G'     ,       1);
    insert into inout(EMPCODE,    DATED     ,IN_TIME , NET_TIME, ATT_STATUS, VAL  )
    values           ('00047','27-DEC-2009',     0    ,       0     ,       'R'     ,       1);
    insert into inout(EMPCODE,    DATED     ,IN_TIME , NET_TIME, ATT_STATUS, VAL  )
    values           ('00047','27-DEC-2009',     7.44 ,       483   ,       'P' ,           1);
    Thanks and greetings
    select distinct empcode,dated,
           case when cnt>0 then
             max(in_time) over (partition by empcode,dated)
            else
               in_time
            end in_time,
           case when cnt>0 then
             max(net_time) over (partition by empcode,dated)
            else
               net_time
            end net_time,
    
           case when cnt >0 then
               case when status in  ('G','P','R')  then
                'R'
                    when status in ('HCP','1/2') THEN
                'HCP'
               end
             else
               status
            end status
           from (
            select v.empcode,v.dated,v.in_time,v.net_time,(count(*) over (partition by v.empcode,v.dated)) cnt,att_status status
             from inout v
            where v.empcode = '00047')
    

    Published by: Khaled Aradhye, January 20, 2010 02:23

  • Convert the string of 32 bits to a hexadecimal number of LV 7

    Hello!!

    I have a 32 bit string I need to convert a hexadecimal number, what program I can do?

    Can someone help me?

    Thank you

    Each character in a string is a BYTE.  So you tell each of these I8s are 0 or 1?  If this is the case, then why not just use Boolean values (TRUE or FALSE)?  An array of Boolean would do this very simple since you can simply use the primitive Boolean array of numbers to do the conversion for you.

  • read from bit hex

    Hello world

    I have been using a touch screen for a project. I am now able to read hexadecimal values and convert them to decimals through LabVIEW. However, I need to be able to read the beginning bit everytime. Now, when I move my finger on the touch screen, the scroll of hexidecmial values and I eventually read hexadecimal numbers in the middle of result rather than the beginning of the string. Any help on this would be highly appreciated.

    I have attaced my VI, so you can see what I have so far.

    Thank you very much

    James


  • 4-bit hex?

    Hi all

    Suppose I do a read VISA and the result I get is A602000000A8 in hexadecimal.  However, given that I am reading a VISA, I will get the Ascii equivalent of this spell.  I don't know how to convert the hexadecimal Ascii, so this isn't the problem.  Let me give you an example (see attachment).

    If I expect getting A9 in hexagonal back to read it, I should be reading \n\tclick VISA read.  When I do the conversion, instead of getting A9, I get A 0, 09.  This is due to the fact that ASCII is 8 bits.  However, since I expect a hexadecimal number I care about is 0-F in hexadecimal.  In a Word, I only need 4 bits.

    In short, how to convert \n\tclick chain to the A9 in hexadecimal (not 0A 09).

    Yik

    The warp the string according to the byte array. The first byte of the U8 array will be 0xA6. Make the hexagon of display format if you do not want to convert decimal 166 in your head.

  • How to divide scanned a 'double page' two pages 'single '?

    I read Community Forums of discussion of this date of the 2009 and 2011, but I wonder if a solution may have been added to Acrobat for the five years that have elapsed since the 2011 community discussions I read?  Ive downloaded the latest Acrobat Pro DC, and I use a PC with Windows 10 I scanned the stories of magazines and books to my computer in the form of PDF files. Books and magazines onto the tray of the scanner so that each test and each page of the PDF contains two pages (one double page) of the book/magazine. Is there an automated/simple process that will split each page scanned in two, so that the PDF contains now correctly sequenced images of a page each page in the book? (The 'perl' suggested solution in 2011 is beyond my expertise in it.) Thanks in advance if anyone can suggest a method that a person may not use computer savvy. I have over 200 pages, each parsed as a double page, I want to divide it into single pages, I have to then 400 correctly paged pages. I need to change these 400 pages and print them as a book-length document. -Wier has.

    • Duplicate the document
    • in a version mougenot left edges
    • in the other version cropping the right side
    • merge the two documents cropped
  • queries mergeing two in single query? Thank you!!!

    Hello gurus,

    How to merge below two queries in a single request. All the I'm trying to do is get the acc_office_id and the pay_office_id... We want it in two different columns because the office for access and compensation IDs are in the same column. .so I m try to divide it into two columns.

    Any help is greatly appreciated... Thank you very much!!!



    -request for VAC office_id

    Select acc.cust_id cust_id,
    RO.office_id acc_office_id,
    ACC.office_cd office_cd,
    ACC.type_cd type_cd
    of refoff ro,.
    (select distinct f.cust_id cust_id,
    f.type_cd type_cd,
    f.office_cd office_cd
    cutomer p,
    Office f
    where p.cust_id = f.cust_id
    and f.type_cd in ('ACCT')) VAC
    where acc.office_cd = ro.office_cd;


    -request for pay office_id


    Select bill.cust_id cust_id,
    RO.office_id acc_office_id,
    Bill.office_cd office_cd,
    Bill.type_cd type_cd
    of refoff ro,.
    (select distinct f.cust_id cust_id,
    f.type_cd type_cd,
    f.office_cd office_cd
    cutomer p,
    Office f
    where p.cust_id = f.cust_id
    and f.type_cd in ("wages")) pay
    where pay.office_cd = ro.office_cd;

    Hello

    SELECT       c.cust_id
    ,       MAX (CASE WHEN c.type_cd = 'part1' THEN o.office_cd END)     AS par1_offc_id
    ,       MAX (CASE WHEN c.type_cd = 'part2' THEN o.office_cd END)     AS par2_offc_id
    ,       MAX (CASE WHEN c.type_cd = 'part3' THEN o.office_cd END)     AS par3_offc_id
    FROM       cust_office     c
    JOIN       office     o     ON     c.office_cd     = o.office_id
    GROUP BY  c.cust_id
    ;
    

    The output I get from your sample data is a little different from what you have posted:

    CUST_ID    PAR1_OFFC_ID    PAR2_OFFC_ID    PAR3_OFFC_ID
    ---------- --------------- --------------- ---------------
    2001       10              10              10
    2003       12              14
    2002       11              11              12
    2004       13              13              15
    

    If the differences are not due to errors in your message, explain how you get correct results.

Maybe you are looking for