IEC 61131-3 - Data Types

Data Types

  • Bit Strings - groups of on/off values
    • BOOL - 1 bit
    • BYTE - 8 bit
    • WORD - 16 bit
    • DWORD - 32 bit
    • LWORD - 64 bit
  • INTEGER - whole numbers
    • SINT - signed short (1 byte)
    • INT - signed integer (2 byte)
    • DINT - double integer (4 byte)
    • LINT - long integer (8 byte)
    • U - Unsigned - prepend a U to the type to make it unsigned integer.
  • REAL - floating point IEC 559 (IEEE)
    • REAL - (4 byte)
    • LREAL - (8 byte)
  • TIME - duration for timers, processes.
  • Date and Time of day:
    • DATE - calendar date
    • TIME_OF_DAY - clock time
    • DATE_AND_TIME: time and date
  • STRING - character strings surrounded by single quotes.
    Escaped characters are preceded by a dollar sign.
    ($$ $' $L $N $P $R $T $xx) => ($ quote linefeed newline page(FF) return tab hex_value)
    • WSTRING - holds multi-byte strings.
  • Arrays - multiple values stored in the same variable.
  • Sub Ranges - puts limits on value i.e., (4-20) for current
  • Derived - type derived from one of the above types.
    • TYPE - single type
    • STRUCT - composite of several variables and types.
  • Generic - groups of the above types:
    • ANY
      • ANY_DERIVED
      • ANY_ELEMENTARY
      • ANY_MAGNITUDE
        • ANY_NUM - LREAL, REAL
        • ANY_INT - LINT, DINT, INT, SINT, ULINT, UDINT, UINT, USINT
      • ANY_BIT - LWORD, DWORD, WORD, BYTE, BOOL
      • ANY_STRING - STRING, WSTRING
      • ANY_DATE - DATE, TOD, DT

Read more about this topic:  IEC 61131-3

Famous quotes containing the words data and/or types:

    Mental health data from the 1950’s on middle-aged women showed them to be a particularly distressed group, vulnerable to depression and feelings of uselessness. This isn’t surprising. If society tells you that your main role is to be attractive to men and you are getting crow’s feet, and to be a mother to children and yours are leaving home, no wonder you are distressed.
    Grace Baruch (20th century)

    The bourgeoisie loves so-called “positive” types and novels with happy endings since they lull one into thinking that it is fine to simultaneously acquire capital and maintain one’s innocence, to be a beast and still be happy.
    Anton Pavlovich Chekhov (1860–1904)