Profibus data type converting to floating point

Hi, 
Is there an efficient way to convert  the incoming data to the floating point in the NI cRIO Profibus system? 
1) The system is : NI cRIO 9068 Controller with Comsoft profibus slave module. The lavview we are using is 2013. 
2) We are using profibus slave example and are able to see a array of unsigned 8 bit data. Please see the Output data shown in the attachement.
3) On the other side of profibus system, thrid party profibus master are converting floating points and tranmit the converted data to NI profibus slave. 
Attachments:
Screenshoot.png ‏7 KB

If it's just a matter of converting data types once you have the data in LabVIEW, you can always manually scale and convert the data using the arithmetic functions and the "To Double Precision Float" or "To Single Precision Float" functions. You just have to know what floating point value the unsigned byte integer corresponds to. Is that what you're asking?
If you're asking for a way to this inherently with the Profibus functions, I'm afraid I can't be of much help...
Ryan K.

Similar Messages

  • Data Type Convertion in ABAP

    Hi,
    i want to convert a numeric type field to character type field in ABAP,
    and also i want to concatenate some set of different types of field to a character type field at last
    if i give just like this
    <b>CONCATENATE '   ' it_pa0000-pernr it_pa0105-usrid '                        ' it_pa0105-begda into record_tab-string.</b>
    it remove space out from the string i need space also in the <b>record_tab-string</b>,
    Reg,
    Hariharan

    Hi,
    The CONCATENATE statement combines two or more separate strings into one.
    <b>CONCATENATE <c1> ... <cn> INTO <c> [SEPARATED BY <s>].</b>
    This statement concatenates the character fields <c1> to <cn> and assigns the result to <c>. The system ignores spaces at the end of the individual source strings.
    The addition SEPARATED BY <s> allows you to specify a character field <s> which is placed in its defined length between the individual fields.
    try with this sample code..........
    CONCATENATE  it_pa0000-pernr it_pa0105-usrid  it_pa0105-begda INTO record_tab-string  SEPARATED BY SPACE.
    regards,
    Ashok Reddy

  • MessageType and Data Type

    Hi Experts,
    In IR we are creating DataTypes and MessageTypes what excatly the main difference between why we need to create 2 things.

    Hi,
    Data types are abstract in nature,
    Data type defines the structure of your xml message.Message type is the wrapper of data type.You will be using your message type while mapping and not the data type.Its the abstraction concept used in oops
    A data type in a programming language is a set of data with values having predefined characteristics.
      Examples of data types are: integer, floating point unit number, character, string, and pointer.
    The characteristic of columns and variables that defines what types of data values they can store.
    Examples include character, floating point and integer
    Check out the details:
    http://en.wikipedia.org/wiki/Data_type
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type.
    details: http://help.sap.com/saphelp_nw04/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm

  • Difference Between Data type and message type

    Hi,
        i have doubt on data type and message type.why we are mapping the message type why not data type?wht is the difference between data type and message type?

    Hi Narayanana,
    Data type defines the structure of your xml message.Message type is the wrapper of data type.You will be using your message type while mapping and not the data type.Its the abstraction concept used in oops
    kanan thiyam  
    Posts: 28
    Questions: 7
    Registered: 1/8/07
    Forum points: 24 
       Re: What is deffernce b/w Data type and message type  
    Posted: Jun 13, 2007 8:05 AM    in response to: suresh k         Reply      E-mail this post 
    Hi Suresh,
    Data Type defines the structure of the message and it will be wrapped under Message Type.
    Hope the details below will clearify your doubts.
    A data type in a programming language is a set of data with values having predefined characteristics. Examples of data types are: integer, floating point unit number, character, string, and pointer.
    The characteristic of columns and variables that defines what types of data values they can store.
    Check out the details:
    http://en.wikipedia.org/wiki/Data_type
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:
    Details:
    http://help.sap.com/saphelp_nw04/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm
    kanan

  • Converting a floating pt field to a date/integer

    Hi,
        I have a problem of converting a floating point field in a transparent table to a date for display. For example I needs to convert '2.0050101000000000E+07' to '01.01.2005'. What are the methods available? I also need to convert this kind of field to a integer.
    Any suggestions are welcome.
    Thanks,
    CK.

    Try doing this,
    DATA: LV_DATE type d,
          LV_STR1(30) type c,
          LV_STR2(8) type c,
          LV_INT type i.
    write lv_float to lv_str1.
    replace '.' in lv_str1 with ''.
    shift lv_str1 left deleting leading space.
    lv_str2 = lv_str1.
    lv_date = lv_str2.
    lv_int = lv_str2.
    Message was edited by: Nablan Umar

  • Floating point to Date conversion

    Do any Function module is available for converting the floating point value into Date.

    hi,
      do this way  ...
    DATA : p_float TYPE f,
               p_date LIKE cawn-atwrt,
               p_flt LIKE cawn-atflv,
               p_dt LIKE sy-datum.
    p_float = '2.006123100000000E+07'.
    p_flt = p_float.
    CALL FUNCTION 'CTCV_CONVERT_FLOAT_TO_DATE'
      EXPORTING
        float = p_flt
      IMPORTING
        date  = p_date.
    WRITE : p_date TO p_dt DD/MM/YYYY.
    WRITE : p_dt.

  • Ho to Comapre with Number Data Type

    hi
    My reqt is to do validation in ValidateEntity Method.
    How to compare the with Number Data type:
    For ex: Number a = gatAbc();
    If(a>10)
    throw new oaExcption...
    But while comapring i got compiler Error
    Error(218,17): method >(oracle.jbo.domain.Number, int) not found in class abc.oracle.apps.per.irc.pqr.schema.server.XxabcEOImpl
    So plz tell me how to compare the integer value with Number data type
    Thanx

    Check with float. It will work definitely.
    float number = Float.parseFloat(HrsPerDay); //HrsPerDay is a String and I am converting it to float
    if(( number <= 0) || (number >= 21))
                            throw new OAAttrValException(OAAttrValException.TYP_VIEW_OBJECT,
                                              "xxCopyResourceVO1",
                                              rowi.getKey(),
                                              "NoOfCopies",
                                              rowi.getAttribute("NoOfCopies"),
                                              "PA",
                                              "xx_xx_COPY_POSITIVE_NUM");
                       }Here in this code i am also checking that the Hours cannot be less then 0 and greater than 20.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Floating Point arithmetic conversion

    Hi Everyone,
    Can you tell me how to convert a floating point arithmetic field value to a currency field value.
    thanks,
    chan

    Hi,
    I hope simple move statement should work.
    MOVE l_float TO l_curr.
    Make sure that curr field has enough length.
    Thanks,
    Vinod.

  • Floating point to binary conversion

    Hi
    I need to convert a floating point decimal number to bits.
    Eg. 0.000532 to be converted to binary(bits).
    How do I do this?

    Now if I convert that decimal number to bits(in
    the usual method of dividing by 2),will that be the
    exact binary representation of the floating point
    decimal number?You have the same bit pattern in both cases. In one it's held in a double and will be interpreted as a floating point number according to the IEEE 754 representation. In the other it's held in a long and will be interpreted according to the two's complement representation. But it's the same bitpattern.
    Note that Long has a toString method which allows you to convert the long to a String. The radix in your case is 2 for binary.

  • How to store beyond the range value for a given data type!!!

    Hi all,
    I want to know.Is it possible to create a new data type like int,float in java. which can store any number without any range restrictions.As you know the range of byte data type is -128 - + 127.I don't want any range restrictions.The data type should be able to grow dynamically.
    Regards!!
    Tameshwar Sahu

    The only solution I can think of is to use java objects, Im not sure youll be able to create a new primitive for java !!
    Youd have to put together Integers, posibly in a vector depending on how HUGE a number youd like to create.
    If you reached the max of one, add another to the vector. and then continue with the next.. The problem with this of course is the fact that math operations, will be a bit of a challenge to code. also actuall representation of the value would be a bit tricky as well !! There are however ways to go about this, you just have to think about it a little.

  • UDF data type

    Hi,
    Does anyone know how to create a UDF with data type double or float? I tried on my B1, it only create integer type. Does UDF only support interge data type?
    Thanks!
    Lan

    Hi Lan,
    There are two types supported for UDF: Numeric or Units and Totals.  Numeric may only support integer but not the other.
    Thanks,
    Gordon

  • Pack  and Floating Point Data Type in ABAP

    Dear All,
    I am new to ABAP. Started with data types. Came across pack and floating point.
    Please let me know what PACK  and Floating Point stands for with few examples and the main difference between them.
    Regards
    Arun V

    Hi,
    You'd better ask this question in ABAP forum http://forums.sdn.sap.com/forum.jspa?forumID=50 .
    Best Regards,
    Ada

  • Function module to convert float value to data type 'dec'

    Hi experts,
      In a report i need to convert float value to the data type 'DEC'. How to convert it. Is there any function module for this conversion.
    Thanks and Regards,
    Vaibhav Tiwari.

    Hi ..
    We can do like this...
    Data : V_float type F value '12345.67'.
    Data: V_dec type P Decimals 2.
    Write:/ V_float exponent 0. "This will display it like Type P
    or
    Write V_float to V_dec EXPONENT 0.
    Write:/ V_dec.
    reward if Helpful.
    <b></b>

  • Arithmetic Overflow error converting float to data type numeric

    Hi,
    Am facing strange issue,I have function which returns money datatype and assigning the return money value to float datatype in table.
    Error msg:
    Msg 8115, Level 16, State 6, Procedure GBCalcCatalogPriceNewV2, Line 204
    Arithmetic overflow error converting float to data type numeric.
    The statement has been terminated.
    Strange thing is the same stored procedure is working fine in production environment,but in the deveopment i see this error.Am scared if the same happens in the production environment.Please advice and advance
    thanks
    Regards
    RAj

    Strange thing is the same stored procedure is working fine in production environment,
    How could that be strange? This is an error that occurs depending on the data. Accidents that are waiting to happen will happen sooner or later.
    Then again, a development database may be more prone to such errors, because data that entered are completely out of whack with real life data. Still it is a warning sign. If you have some place where you convert data from float to numeric, you must consider
    the risk that the float value is outside the range for the numeric data type. How do you prevent that from happening? Maybe a CHECK constraint on the column? Of if the data origins from a money column, use a numeric data type with sufficient precision.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Convert string to floating-point

    Hi all,
    ..very basic question, but I tryed it for hours and only received short-dumps
    <b>How can I convert a string into a floating-point number?</b>
    Kind regards,
    Stefan

    hi
    try this
    to convert  string to float.
    data : a type f,
    s type string value '1.023'.
    a = s.
    write :/ a.
    to convert float to string.
    data : a type f value '1.023',
    s type string.
    s = a.
    write : s.

Maybe you are looking for