Example of data types

stu1980
2012-09-19
2012-09-20
  • stu1980 - 2012-09-19

    Hi, can anyone show me any examples of data types e.g. DWORD, UINT, REAL. Used for real world applications e.g. a DWORD is 32 bit. But what can i assign to this? What can use with this?

     
  • shooter - 2012-09-20

    A totaliser is often a DWORD
    this way you can add words together and make calcs with them.

    REAL is very much used when having analog signals.
    Example input is an analog signal (WORD) of 2345
    i change it with WORD_TO_REAL to 2345.0
    then divide it by 10 to get actual temp at input for a Pt100 thus 234.5 degrees celsius.

    UINT is used when number is not negative.
    A counter is never negative so you use a UINT to get the full range instead of half of it.

     

Log in to post a comment.