====== Pulse generator ====== {{:en:mervis-ide:35-help:bd2.png}} ===== Block name ===== BD2_PULSE_GENERATOR ===== ST call ===== PROGRAM TEST_BD2 VAR B1 : BOOL; FB : LIB.CORE.V1_1.BD2_PULSE_GENERATOR; END_VAR FB(); B1 := FB.OUT; END_PROGRAM ===== Library ===== LIB\CORE ===== Version ===== V1.1 ===== Description ===== The block is a binary pulses generator with settable true and false time for testing purposes. Verze V1.1\\ Fixed working with indexes that led to the OutOfBounds error ===== Inputs ===== |Input |Type|Description |Default value| |ENABLE |BOOL|Generation enabled |True | |PAUSING|BOOL|Behaviour after ENABLE (if//FALSE// the pulses start from beginning of the period, if //TRUE// the pulse continues from where it was disabled).|True | |TFALSE |TIME|Interval for //FALSE// period. |1s | |TTRUE |TIME|Interval for //TRUE// period. |1s | ===== Outputs ===== |Output|Type|Description | |OUT |BOOL|Output signal. | |OUTN |BOOL|Output negated signal | |TRES |TIME|Time remaining until end of period [s].| ===== Function ===== The function block BD2 generates pulses at the //OUT// terminal. ===== Application example ===== {{:en:mervis-ide:35-help:bd2_example.png}}\\ The block is used mostly for testing purposes, for automatic periodic reset of flip-flop circuits, etc. Use B87, PWM, to create a pulse-width modulation signal.