CtrlRampStep (FB)

FUNCTION_BLOCK CtrlRampStep EXTENDS AbbETrig3

This function block processes input signal with ramp algorithm according to PLC cycle time (scan period) and processes output variable as Out. This is a ramp processing FB with defined steps.

Transfer Function = U(s)/ E(s) = Gain * [ In / (Step / Cycle Time in Sec )]

../../../../../../_images/CtrlRampStep.PNG
InOut:

Scope

Name

Type

Initial

Comment

Input

Mode

BYTE

1

2: Process mode:
  • 0 = Out = In,

  • 1 = Out = Gain*(In/Step)

In

REAL

0

3: Input of the signal to be processed by Ramp function

Kp

REAL

1

4: Propotional gain of CtrlRampStep function block, Kp >=0.

Step

WORD

1

5: Step to reach the input target value In, 10000.0>=Step>=0. Input step refers to the Steps per cycle time. For example, If cycle time = 10ms and Step = 5, then the output will increase 5 steps per 10ms. To observe this operation, execute the block with 1s task cycle time.

Output

ErrorID

ERROR_ID

3: error identifier if an invalid value was applied to an input

Out

REAL

0

4: Input signal In is processed by CtrlRampStep function block, the manipulated output signal is sent to Out