Supported platforms: CODESYS 3.5 SAFETY

S_CurrentRequestLimiter (FUN)

 

This POU exists in library version 2.0.1.0 or newer.


 

Description

 

This function limits the current request value between given minimum and maximum currents.

 

Operation

POU is in normal operation mode if:

 

In normal operation POU set S_i_CurrentRequest value to output S_o_CurrentRequest if:

 

POU set S_i_MinimumCurrent value to output S_o_CurrentRequest and output o_InputLow true if:

 

POU set S_i_MaximumCurrent value to output S_o_CurrentRequest and output o_InputHigh true if:

 

The output o_OutputValid is always true in normal operation mode.

The outputs o_InputLow and o_InputHigh are set to false automatically, when  S_i_MinimumCurrent S_i_CurrentRequestS_MaximumCurrent.

 

Operation in fault situations

The output S_o_CurrentRequest is set to 0, o_OutputValid is set to false and o_ParameterError is set to true, if: 

 

Error is reset when S_i_MinimumCurrent <  S_MaximumCurrent. The rising edge of i_Enable signal is not required. 
 

Inputs

Input variable name

Data type

Unit

Range

Description

i_Enable

BOOL

 

-

Enable POU operation

S_i_CurrentRequest

SAFEUINT

mA

-

Current request

S_i_MinimumCurrent

SAFEUINT

mA

-

Minimum allowed current

S_i_MaximumCurrent

SAFEUINT

mA

-

Maximum allowed current

 

Outputs

Output variable name

Data type

Unit

Range

Description

S_o_CurrentRequest

SAFEUINT

mA

-

Current request

o_OutputValid

BOOL

 

-

Current request is valid

o_InputHigh

BOOL

 

-

Input current request is too high

o_InputLow

BOOL

 

-

Input current request is too low

o_ParameterError

BOOL

 

-

Parameter error is active

 

Error diagnostic

Conditions

S_o_CurrentRequest

 OutputValid

InputHigh

InputLow

ParameterError 

i_Enable = FALSE

 

0

FALSE

FALSE

FALSE

FALSE

i_Enable = TRUE AND
S_i_MinimumCurrent ≥ S_i_MaximumCurrent

0

FALSE

FALSE

FALSE

TRUE

i_Enable = TRUE AND
Parameter Ok AND
S_i_CurrentRequest > 0 AND S_i_CurrentRequest < S_i_MinimumCurrent

S_i_MinimumCurrent

TRUE

FALSE

TRUE

FALSE

i_Enable = TRUE AND
Parameter Ok AND
S_i_CurrentRequest > S_i_MaximumCurrent  

S_i_MaximumCurrent

TRUE

TRUE

FALSE

 FALSE

i_Enable = TRUE AND
 Parameter Ok AND
S_i_CurrentRequest = 0

S_i_CurrentRequest

TRUE

FALSE

FALSE

 FALSE

i_Enable = TRUE AND
 Parameter Ok AND 
S_i_MinimumCurrent ≤ S_i_CurrentRequest ≤ S_i_MaximumCurrent

S_i_CurrentRequest

TRUE

FALSE

FALSE

FALSE

 

See also

 

 

 

 

Source file S_CurrentRequestLimiter.htm

Last updated 4-Sep-2025