Convert Voltage values to Decimal values.

I need to convert voltage values/range to decimal values/range.
Example: I read voltage (range 0 to 1.0volts) form DAC and covert it corresponding decimal value (decimal value range is 0 to 16000).
0 decimal = 0 volts
16000 decimal = 1.0volts.
Thanks for the help.

I'm not sure how you'd get a value of 16000 out of the 2620 as that is only a 12-bit DAC that will produce values from 0 to 4095. Here's the transfer function directly copied from page 12 of Linear's datasheet.
Charles Chickering
Architecture is art with rules.
...and the rules are more like guidelines
Attachments:
TransferFunction.JPG ‏17 KB

Similar Messages

  • Converting Time format to Decimal Value

    Dear All,
    How to convert time to decimal value for substraction of time and decimal value
    for eg l_time type tims
           l_dec type p.
    l_diff = l_time - l_dec
    Kindly let me know.
    Thanks in Advacne,
    Ranjan

    Hi,
    Try like this...
    PARAMETERS : tim TYPE tims,
                 y TYPE p.
    DATA : t TYPE string,
           t1 TYPE string,
           t2 TYPE string,
           t3 TYPE string.
    START-OF-SELECTION.
      t = tim(2).
      t  = t * 3600. " hours to second
      t1 = tim+2(2).
      t1 = t1 * 60.  " minutes to second
      t2 = tim+4(2).
      t3 = t + t1 + t2. " total time in second
      t3 = t3 - y.
    Regards
    Debarshi

  • Convert inch fraction to decimal value

    I get a lot of printer requirements tin Fractions (12 11/16 Inches, 2 1/8 inches, etc.) Is there a way in illustrator to convert those to decimal values?

    In illustrator, most dialog boxes can do math, so do the fraction first. 5/8  which would be .625 then enter the whole number 12 in front of the decimal 12.625
    That's assuming the dialog box can not handle the whole number and the fraction at the same time.

  • 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

  • How to display integer values and decimal values in same column in a table

    hi 
    in my report amount column is there in that column integer values (2234) and decimal values (3562.34) 
    i want to print this values as 1000 separate as like 2,234 as integer and 3,562.34 as decimal
    but this values print like 2,234.00 as integer and 3,562.34 as decimal

    Hi akilreddy,
    Per my understanding you have an field which data type may be "float" in the DB, so it have value which format like "2234" and "3562.34" in the same column, now you want to format them differently in the report, right?
    I have tested on my local environement and you can use the expression in the custom format in the Textbox properties to do this:
    Right click the field which you want to add the format and select the "Text Box Properties"
    Select the "Number" on the left pane and using expression below in the Custom format:
    =IIF(Split(Fields!yourfieldname.Value,".").Length=2,"#,###.##",Nothing)
    Or you can just use "#,###.##" in the format.
    Preview you will go the result like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Time format hours ("hh24") delim (.or,) (1/4) hour values as decimal value

    Dear all,
    What I need is a client (browser) site validation of values for a time recording system. The format should be as
    <hh24><Delimiter>(.(or),) 1/4 hours as decimal value (e.g. 15 minutes = 0.25). So as a result valid entrys should be. 00.00 as min., 24.00 as max.
    The "minutes"-part should only except full 1/4 hour values: 00, 25, 50, 75 or blank.
    More valid variation could be:
    .75 (45 minutes) should be considered as 00.75.
    1.25 , 9 ( = 9 hours)
    A colleague helped me and created the regexp pattern.
    (?<=\A)(([01]?[0-9]|2[0-4])[\.,]?)?([\.,](0{1,2}|25|50|75))?(?=(\z))
    It works perfect in "The Regex Coach", but sadly it does not work in a java script.
    My hope is, that someon already has a solution for this or a similar task.
    If so, please let me know and give me a hint.
    Thank you very much in advance.
    and best regards.
    Andre

    Hi Ben,
    thank you for your response.
    since I not only want to ask for help, I will let you konw our solution. It has been a little mind twisting
    However, Just in case someone is interestet in...
    function xaChk_TimeDecimalFormat(pItem)
       var check = $v(pItem);
       var regexpval = "^((([01]?[0-9])|(2[0-4]))?([,\.](00?))?|(([01]?[0-9])|(2[0-3]))?([,\.](00|25|50|5|75))?)$";
       if (check.search(regexpval,"g") < 0)
       {alert ('Ungültiges Zeiterfassungs-Format. \n gültig Werte sind: \n max. 24h und nur volle 1/4 Stunden als Decimalwert z.B. 0.25 für 15 Min.') };
    function xaChk_TimeClockFormat(pItem)
       var check = $v(pItem);
       var regexpval = "^((([01]?[0-9])|(2[0-4]))?([,\.](00))?|(([01]?[0-9])|(2[0-3]))?([,\.](00|15|30|45))?)$";
       if (check.search(regexpval,"g") < 0)
       {alert ('Ungültiges Zeiterfassungs-Format. \n gültig Werte sind: \n max. 24h und nur volle 1/4 Stunden als Minuten z.B. 0.15.') };
    ;Thanks again to all how wasted any thought on this. :-)
    Best Regards
    Andre

  • Integer values and decimal values in weblient UI - Display mode

    Hello,
    i have developed an custom assignmentblock with some custom fields.
    Some of this fields are integer values and text values.
    Some other fields are decimal values.
    I face the issue that this decimal values are in display mode  right-aligned all other fields are left-aligned.
    In edit mode all values are right-alligned.
    How can i change this behaviour? All values left-alligned in display mode!
    Otherwise this looks strange.
    Thank you
    Kind regards
    Manfred

    Hi,
    Decimal values will be displayed right-aligned. To change that you need to modify the GET_M method.
    In get_m method, you have to change the attr datatype to string.
    Data: attr type string.
    Data: dref type ref to data.
    Get reference of attr into dref.
    Regards,
    Arun
    Edited by: Arun Kumar on May 14, 2010 3:03 PM

  • Getting wrong values  for decimal value in Bex report

    Hi,
         I am getting some problem in Bexreport decimal values.
       In ODS i am able to look the values for this key figure
      (Total PO Release Val)= 140.692,00,the same value in Bex report looks like this $ 140,692.00.
         Here one calculation is going with these above values
       % Used = 'Total PO Release Val' / 'Target Value' * 100
        as per ODS value calculation  it is correct = 140.692/1000 * 100 =14.692
       as per Bex  it is coming like this = 140,692.00/1000 *100 = 142.692.
        in Bex report Percentage valus is not considering value is taking as 140,692.00 rather than 140.692.I mean to say decemal values are ignoring while calculation in Bexreport.can you any please advice me how to comeout of this problem.Appreciate your help.
    Regards
    Ramesh

    <i> "(Total PO Release Val)= 140.692,00,the same value in Bex report looks like this $ 140,692.00."
    </i>
    How do you check the ODS value? The amount will only have two decimal places after it, so you can't have a value like 140.692,00. It seems to be an issue of user's decimal notation (where decimal is represented by comma, and thousand seperator by '.'). Go to user profile, change this setting (in default tab) to correct one (ie decimal being represented by '.') and login again and check it. The value that you see in ODS is 'one hundred forty thousand six hundred ninety two, the same that you get in Bex, only the representation is different).

  • Error in Module pool/Screen while passing value as Decimal value

    Hi Experts,
    We have designed one customized screen with CHAR as input option to pass on Tax Percentage. We have defined as CHAR in screen logic as well as program also.
    Where as while we enter value with decimals like 2.5 or 5.4 its throwing a error message "Entry is too long for the field".  But when I pass on Integer values like 2 or 4 then its working fine.
    Can you pls suggest on this how to rectify this error.
    Thanks in advance.
    VJ

    Hi,
    Increase the length of the character field in the screen as well as in the program declaration.
    Example;
    DATA gv_tax(10) type C.
    Regards
    Karthik D

  • Need to convert a binary value into decimal

    Hi i need to convert a binary value which i would be getting as a string object to a decimal value......need code for the same

    Check Integer.parseInt
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#parseInt(java.lang.String,%20int)

  • How to convert a number to FLOAT with 9 decimal values.

    Hi all,
    I need to convert a number like '10.02' to a floating point number with 9 decimal values like '10.022111221'. I think that the right function is TO_BINARY_FLOAT, but how can I obtain 9 decimal values? If I use the following syntax:
    select TO_BINARY_FLOAT(num) from table
    I obtain a floating point values with a variable number of decimal numbers after the ".", instead I need 9 number after ".".
    Regards,
    Maurizio.

    Hi,
    the number I need to select is the result of a product, for example:
    select (Num_A * Num_B) from Table;
    Num_A has 2 decimal numbers, like 12.01 and Num_B could be: 12.111111111.
    Now, Num_A * Num_B = 653.999999994
    but I issue:
    select TO_BINARY_FLOAT(54.00 * 12.111111111) from Table
    I obtain:
    654, a rounded value, but I need 653.999999994.

  • Convert non-ASCII character to decimal value

    Hi all,
    I have the following problem:
    When reading a String containing the full spectrum of UTF-8 characters from a BufferedReader:
    How can I get the decimal value of the String's characters outside the ASCII range?
    When I try to do a MyBufferedReader.read(), I get the int value 65533 for these characters, instead of their real value in the UTF-8 set.
    Can anyone help?
    Thanks!
    Dre

    That's the character you get when you try to decode a character with no valid decoding. Of course there aren't any such characters for UTF-8. Therefore whatever you did, don't do that. More specifically: you've already got a String, don't do anything which involves converting it to bytes. That's completely unnecessary.
    Or perhaps the problem is the way you create the String in the first place. Who knows?

  • Very Urgent - Converting Character value to Hexa Decimal value

    Hi
    data: lv_stsor_hex(16) type X.
    p_is_ppc_comp_conf-stsor is a char 10 field ***
    <b>write p_is_ppc_comp_conf-stsor to lv_stsor_hex.</b> "<-- Hex Conversion
    In 4.6C version this write statement is working fine but this is obsolete in ECC 6.0
    and its showing syntax error.
    Can anyone tell me how to convert a 10 char length value to a hexa decimal value
    which is of 16 characters length and of type hexadecimal
    Thanks a lot. Points will be rewarded immediately.

    Hi,
    Use the Function module CHAR_HEX_CONVERSION.
    report zeta_hex.
    data: s type string.
    data: h(1) type x.
    data: c(1) type c.
    data: byte(2) type c.
    data: length type i.
      FIELD-SYMBOLS: <DUMMY>.
    s = 'ThisIsAString'.
    length = strlen( s ).
    do length times.
      byte = ( sy-index - 1 ).
      c = s+byte(1).
    * You can do this
      ASSIGN h TO <DUMMY> TYPE 'X'.
      WRITE c TO <DUMMY>.
    * or you can do this
    *  call function 'CHAR_HEX_CONVERSION'
    *       exporting
    *            input     = c
    *       importing
    *            hexstring = h.
      write:/ h.
    enddo.
    Regards
    Sudheer

  • Decimal value automatically converting into int

    Hi,
    I have a SQL column which is a string and its value is casted to have decimal value. For example 92.57
    In C#, below is the code I have written to retreive the value.
    command.Parameters.Add("@ProcessCompliance", SqlDbType.Decimal).Direction = ParameterDirection.Output;
     ProcessComplaincecount = command.Parameters["@ProcessCompliance"].Value.ToString());
    But value is getting converted as 93 as a int. I want it as 92.57
    Regards, Shreyas R S

    For best results, you should post this question in the SQL development or C# forums. (This is a SharePoint forum.)
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • Converting char to decimal value format as defined in SU3(User profile)

    Hi Techies,
    Is there any FM to convert CHAR value into Decimal fomat as defined in SU3.
    If we use, WRITE statement for printing the value in decimal format , it shows the value in decimal format correctly
    in SU3 transaction , there are three different decimal format notations which can be user specific
    I would appreciate your valuable inputs ....
    Thanks
    Santhosh

    This is my code in a generic method to transform a table into a csvrow
    when 'P'.
            tmpstr = <p_field>.
            len = strlen( tmpstr ) - 1.
            tmpstr = tmpstr+0(len).
            if <p_field> < 0.
              sign = '-'.
            else.
              sign = ' '.
            endif.
            case decimalformat.
              when 'X' or 'E'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of '.' in cp with ','.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when 'Y' or 'D'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of ',' in cp with '.'.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when ' '.
                concatenate s sign tmpstr delimiter into s in character mode.
              when others.
                concatenate s '????????' delimiter into s in character mode.
            endcase.
    where pfield is a fieldsymbol type P. (honestly ist from type any, but determined by RTTI). I needed this cause i want to format the value from "outside" without taking the user settings in consideration as write...to.. is doing.
    What i'm doing is to use the write... to... clause modifying the result (change decimal point, thousand separator and sign) according to the demanded decimal notation.
    Edited by: Rainer Hübenthal on Oct 7, 2009 4:47 PM

Maybe you are looking for