ADD
The IEC operator adds variables.
Allowed data types: __UXINT, __XINT, __XWORD, BYTE, DATE, DATE_AND_TIME, DINT, DT, DWORD, INT, LDATE, LDATE_AND_TIME, LDT, LINT, LREAL, LTIME, LTOD, LWORD, REAL, SINT, TIME, TIME_OF_DAY, TOD, UDINT, UINT, ULINT, USINT, WORD
Possible combinations for time data types:
TIME + TIME = TIME
TIME + LTIME = LTIME
LTIME + LTIME = LTIME
Possible combinations for date and time data types:
TOD + TIME = TOD
DT + TIME = DT
TOD + LTIME = LTOD
DT + LTIME = LDT
LTOD + TIME = LTOD
LDT + LTIME = LDT
LTOD + LTIME = LTOD
LDT + LTIME = LDT
Special feature in the FBD/LD editor: You can extend the ADD operator with function block inputs. The number of additional function block inputs is limited.
Samples:
ST:
nVar := 7+2+4+7;
FBD: