FB_SimClock

Clock block with variable pulse width.

FB_SimClock 1:

VAR_INPUT

VAR_INPUT
    bRun     : BOOL; (* Enabled *)
    tOffTime : TIME; (* Down Time of a pulse *)
    tOnTime  : TIME; (* Up Time of a pulse *)
END_VAR

bRun: Activates the clock block

tOffTime: Duration of low level

tOnTime: Duration of high level

VAR_OUTPUT

VAR_OUTPUT
    Q        : BOOL; (* PULSE *)
END_VAR

Q: Output signal

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)