FB_SimRamp

Ramp block

A signal that changes linearly over time can be simulated via the ramp block. The signal initialises with the value 'fStart' and ends after a time 'tRampTime' with the value 'fTarget'.

FB_SimRamp 1:

VAR_INPUT

VAR_INPUT
    bEnable     : BOOL; (* Starts ramp with rising edge, Stops ramp with falling edge *)
    fStart      : REAL; (* Start value *)
    fTarget     : REAL; (* Target value *)
    tRampTime   : TIME; (* Time needed from fStart to fTarget *)
END_VAR

bEnable: The ramp is started with a rising edge, and stopped with a falling one

fStart: Start value

fTarget: Target value

tRampTime: Time duration from fStart to fTarget

VAR_OUTPUT

VAR_OUTPUT
    fOut          : REAL; (* Output value *)
    bValueReached : BOOL; (* Target value reached *)
END_VAR

fOut: Current value

bValueReached: TRUE : Target value reached

Requirements

Development
Environment

Target System

PLC Libraries to include

TwinCAT v2.9.0 Build > 1020

PC (i386)

TcSimManager.Lib

(Standard.Lib; TcBase.Lib; TcSystem.Lib are included automatically)