WFIND (FUN) ¶ FUNCTION WFIND : INT Find the wcharacter position of the beginning of the first occurence of STR2 in STR1. If no occurence of STR1 is found, then the result is 0. InOut: Scope Name Type Return WFIND INT Input STR1 WSTRING(255) STR2 WSTRING(255)
WINSERT (FUN) ¶ FUNCTION WINSERT : WSTRING(255) Insert STR2 into STR1 after the POS-th wcharacter position. POS = 0 inserts before the first wcharacter. POS = 1 inserts after the first wcharacter. InOut: Scope Name Type Return WINSERT WSTRING(255) Input STR1 WSTRING(255) STR2 WSTRING(255) POS INT
WLEFT (FUN) ¶ FUNCTION WLEFT : WSTRING(255) Return leftmost SIZE wcharacters of STR. InOut: Scope Name Type Return WLEFT WSTRING(255) Input STR WSTRING(255) SIZE INT
WLEN (FUN) ¶ FUNCTION WLEN : INT String length function. Returns the number of wcharacters in STR. InOut: Scope Name Type Return WLEN INT Input STR WSTRING(255)
WMID (FUN) ¶ FUNCTION WMID : WSTRING(255) Return LEN characters of STR, beginning at the POS-th wcharacter position. POS = 1 is the first character. InOut: Scope Name Type Return WMID WSTRING(255) Input STR WSTRING(255) LEN INT POS INT
WREPLACE (FUN) ¶ FUNCTION WREPLACE : WSTRING(255) Replaces L wcharacters of STR1 by STR2, starting at the POS-th wcharacter position and returns the new string. POS = 1 is the first character. Note The current implementation is unfortunately not correct for the case P=0 . The implementation cannot be changed for compatibility reasons. If P=0 is used, the parameter L is internally reduced by one! It is generally recommended to use values in the range specified by IEC 61131-3. The smallest value for P is specified there as 1 . InOut: Scope Name Type Return WREPLACE WSTRING(255) Input STR1 WSTRING(255) STR2 WSTRING(255) L INT P INT
WRIGHT (FUN) ¶ FUNCTION WRIGHT : WSTRING(255) Returns rightmost SIZE wcharacters of STR. InOut: Scope Name Type Return WRIGHT WSTRING(255) Input STR WSTRING(255) SIZE INT
Timer ¶ LTOF (FunctionBlock) LTON (FunctionBlock) LTP (FunctionBlock)
LTOF (FB) ¶ FUNCTION_BLOCK LTOF Timer of delay. Q is FALSE, after the delay defined in PT and IN had a faling edge. InOut: Scope Name Type Comment Input IN BOOL starts timer with falling edge, resets timer with rising edge PT LTIME time to pass, before Q is reset Output Q BOOL is FALSE, PT seconds after IN had a falling edge ET LTIME elapsed time since falling edge at IN
LTON (FB) ¶ FUNCTION_BLOCK LTON Timer on delay. Q is TRUE, after the delay defined in PT and IN had a rising edge. InOut: Scope Name Type Comment Input IN BOOL starts timer with rising edge, resets timer with falling edge PT LTIME time to pass, before Q is set Output Q BOOL ET LTIME elapsed time since rising edge at IN