Supported platforms: CODESYS 2.3, CODESYS 3.5

 

PVC_SingleCurrentValve (FB)

Description

PVC_SingleCurrentValve function block controls one current controlled proportional valve in products that have a controller built in at firmware, like Epec 5050.

 

The FB calls PVC_Attenuation FB and one of the ramp FBs according to the user’s selection.

 

The FB uses PVC_To_CurrentReq function to scale the control signal to current requests.

 

The FB checks input parameters to ensure their valid values. In case of an incorrect value in any of the parameters, o_ParameterError output is activated.

 

If  i_Enable is inactive or in case of a parameter error or AI voltage error, the current request output is set to zero.

 

Limitations

Use with hardware that has a built-in current controller (i.e. mA value is written to output) or with PVC_AdaptiveController.

 

i_Control must be 0 on the rising edge of i_Enable status. Otherwise control is not enabled.

 

When the linear ramp type is selected, the ramp speed changes when the current parameters are changed.

 

Inputs

Input variable name

Data type

Range

Description

i_Enable

BOOL

FALSE/TRUE

Enables controlling of the o_CurrentRequest output.

i_Control

INT

0..32767

Control signal from e.g. pedal.

i_MaxCurrent

UINT

1..2500 mA

Maximum current for valve.

i_MinCurrent

UINT

1..2500 mA

Minimum current for valve.

i_RampType

BYTE

0..G_RampTypeMax

Defines which one of the available ramp functions is used.

i_AscendRamp

UINT

Ramp specific

Ascending speed for valve, range and unit depends on selected ramp type.

i_DescendRamp

UINT

Ramp specific

 

Descending speed for valve, range and unit depends on selected ramp type.

i_AttenuationOn

BOOL

FALSE/TRUE

If input is true, controlling is limited to given percentage of max control.

i_AttenuationAmount

BYTE

0..100%

Amount of attenuation.

Outputs

CODESYS 2.3CODESYS 2.3

 

Output variable name

Data type

Range

Description

o_CurrentRequest

UINT

0..2500 mA

Current request for valve.

o_ParameterError

BOOL

FALSE/TRUE

True when incorrect parameter value in any of the FB’s input.

 

CODESYS 3.5CODESYS 3.5

 

Output variable name

Data type

Range

Description

o_CurrentRequest

UINT

0..2500 mA

Current request for valve.

o_ParameterError

BOOL

FALSE/TRUE

True when incorrect parameter value in any of the FB’s input.

o_IllegalControlRequestInStartup

BOOL

FALSE/TRUE

True if unexpected control request occurs. i_Control is not 0 when i_Enable is set to true.

 

Example code

See also

 

Source file Topic000333.htm

Last updated 13-Jun-2024