RIGHT (FUN) ¶ FUNCTION RIGHT : STRING(255) Returns a specific number of characters of a string, starting from right RIGHT (STR, SIZE) means: Return the first SIZE characters from the right in string STR (* Example declaration *) VarSTRING1 : STRING ; (* Example in ST , result is 'USI' *) VarSTRING1 := RIGHT ( 'SUSI' , 3 ); InOut: Scope Name Type Comment Return RIGHT STRING(255) Resulting string Input STR STRING(255) String to be analyzed SIZE INT Number of characters
Timer ¶ TOF (FunctionBlock) TON (FunctionBlock) TP (FunctionBlock)
TOF (FB) ¶ FUNCTION_BLOCK TOF Implements a timer with a turn-off delay (* Example declaration *) TOFInst : TOF ; (* Example in ST *) TOFInst ( IN := VarBOOL1 , PT := T#5s ); VarBOOL2 := TOFInst.Q ; InOut: Scope Name Type Comment Input IN BOOL Falling edge: starts delay counter Rising edge: resets delay counter PT TIME Time for the delay counter [ms] Output Q BOOL TRUE if IN is TRUE FALSE if IN is FALSE and delay time PT elapsed ET TIME Elapsed time since falling edge at IN
TON (FB) ¶ FUNCTION_BLOCK TON Implements a timer with a turn-on delay (* Example declaration *) TONInst : TON ; (* Example in ST *) TONInst ( IN := VarBOOL1 , PT := T#5s ); VarBOOL2 := TONInst.Q ; InOut: Scope Name Type Comment Input IN BOOL Rising edge: starts delay counter Falling edge: resets delay counter PT TIME Time for the delay counter [ms] Output Q BOOL FALSE if IN is FALSE TRUE if IN is TRUE and delay time PT elapsed ET TIME Elapsed time since rising edge at IN
TP (FB) ¶ FUNCTION_BLOCK TP Implements a pulse timer (* Example declaration *) TPInst : TP ; (* Example in ST *) TPInst ( IN := VarBOOL1 , PT := T#5s ); VarBOOL2 := TPInst.Q ; InOut: Scope Name Type Comment Input IN BOOL Rising edge starts the pulse timer and sets Q to TRUE PT TIME Length of the pulse (high-signal) Output Q BOOL Pulse signal, set to TRUE for PT milliseconds if EN has a rising edge ET TIME Elapsed time since pulse timer started. It will then remain constant after PT is reached.
Trigger ¶ F_TRIG (FunctionBlock) R_TRIG (FunctionBlock)
F_TRIG (FB) ¶ FUNCTION_BLOCK F_TRIG Detects a falling edge of a boolean signal (* Example declaration *) FTRIGInst : F_TRIG ; (* Example in ST *) FTRIGInst ( CLK := VarBOOL1 ); VarBOOL2 := FTRIGInst.Q ; InOut: Scope Name Type Comment Input CLK BOOL Boolean signal to be checked Output Q BOOL TRUE : Falling edge detected
Standard Library Documentation ¶ Company System Title Standard Version 3.5.15.0 Categories Application|Common Author 3S - Smart Software Solutions GmbH Placeholder Standard Description 1 ¶ Functions and functionblocks defined in the IEC61131-3 standard Contents: ¶ Bistable Function Blocks RS (FunctionBlock) SR (FunctionBlock) Counter CTD (FunctionBlock) CTU (FunctionBlock) CTUD (FunctionBlock) Miscellaneous RTC (FunctionBlock) String Functions CONCAT (Function) DELETE (Function) FIND (Function) INSERT (Function) LEFT (Function) LEN (Function) MID (Function) REPLACE (Function) RIGHT (Function) Timer TOF (FunctionBlock) TON (FunctionBlock) TP (FunctionBlock) Trigger F_TRIG (FunctionBlock) R_TRIG (FunctionBlock) Indices and tables ¶ 1 Based on standard.library, last modified 24.07.2019, 08:30:36. LibDoc 4.4.0.0-b.27 The content file standard.clean.json was generated with CODESYS V3.5 SP15 on 24.07.2019, 08:30:38.
Bistable Function Blocks ¶ RS (FunctionBlock) SR (FunctionBlock)
RS (FB) ¶ FUNCTION_BLOCK RS Realizes a bistable reset-dominat latch (* Example declaration *) RSInst : RS ; (* Example in ST *) RSInst ( SET := VarBOOL1 , RESET1 := VarBOOL2 ); VarBOOL3 := RSInst.Q1 ; InOut: Scope Name Type Comment Input SET BOOL Rising edge: Set Q1 to TRUE RESET1 BOOL Rising edge: Reset Q1 to FALSE (dominant) Output Q1 BOOL Output value