×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | abb | ABB PLC Data type : Bool, INT, String and Real

Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


ABB PLC Data type : Bool, INT, String and Real

abb plc have data type like bool, int, DINT, String, real, UINT etc. each plc have specific memory size so these data type helps to save plc internal memory size. plc is used for industrial process controller so controlling these process required more inputs and output configuration and program. use proper data type can make program more effective and fast performance of your plc. each data type have specific range of value. if value is not in the range than you get an error message before assigning plc data type know the range and what is max process value. for example you can not store numerical value in bool data type. int data type doesn't store real value.


ABB PLC BOOL Data type

BOOL it is data type which have only two value true or false. where true represent 1 or ON and false represent 0 or OFF. these data type used for on off switches, output coil, alarm assignment, comparison instruction output, timer and counter coil output etc. Normally open and normally closed contact output. below is the example of abb plc bool data type in first example of momentary push button with motor start and stop. second example represent timer coil assign to run a pneumatic vale after specific interval. 8 bits of memory space will be reserved.

ABB PLC BOOL Data type

ABB PLC integer Data type

integer data types are used to store numerical value without decimal like 12, 34, -34 etc. each integer data type have specific range to store value. following are the integer data type
  • BYTE it is 8 bit data type which store value between 0 to 255.minimum value is 0 and maximum value is 255.
  • WORD it is 16 bit data type which store value between 0 to 65535. minimum value is 0 and maximum value is 65535.
  • DWORD it is 32 bit data type which store value between 0 to 4294967295. minimum value is 0 and maximum value is 4294967295.
  • LWORD it is 64 bit data type which store value between 0 to 264-1.
  • SINT signed integer data type, it is 8 bit data type which store value between -128 to 127.minimum value range is -128 and maximum value is 127.
  • USINT un signed integer, it is 8 bit data type which store value between 0 to 255. minimum value is 0 and maximum value is 255.
  • INT 16 bit integer data type which store value between -32768 to 32767. minimum value is -32768 and maximum value is 32767.
  • UINT 16 bit unsigned integer which store value between 0 to 65535.
  • DINT 32 bit double data type, which store value between -2147483648 to 2147483647.
  • UDINT 32 bit unsigned double integer, which store value between 0 to 4294967295.
  • LINT 64 bit long integer data type which store value between -263 to 263-1
  • ULINT 64 bit unsigned Long integer which store value between 0 to 264-1.

ABB PLC integer Data type

above is the example of multiple integer data type with 3 input add instruction and an output. in this example input 1 is byte type, input 2 is word type and input 3 is DINT type. output of this add instruction is LINT.


ABB PLC real Data type

REAL and LREAL are floating-point types. They are required to represent rational numbers. 32 bits of memory space is reserved for REAL and 64 bits for LREAL. both are store real value like 1.2345 etc. Valid values for REAL: 1.175494351e-38 to 3.402823466e+38,Valid values for LREAL: 2.2250738585072014e-308 to 1.7976931348623158e+308. real data type is mostly used in all analog sensor, encoder, positioner, division instruction, PID programming etc.

ABB PLC real Data type

ABB PLC string Data type

A STRING type variable represent any string of character, strings type not limited but only process 1 to 255 character. during string type declaration also declare how much memory space should be reserved for the variable. It refers to the number of characters in the string and can be placed in parentheses or square brackets. If no size specification is given, the default size of 80 characters will be used. for example string[21]='plc blog'. below is the example of string data type in abb plc.in this example two string combine by a CONCAT instruction and return a result.

ABB PLC string Data type
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

comment