Pulse Generator Period: On-Time Plus Off-Time, Not Either

Daniel Price6 min read
Other ManufacturerPLC HardwareTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

With the pulse-generator on-time and off-time both set to , the output completes one full cycle every : ON followed by OFF. That is a one-second period, a frequency of 1 Hz, and a 50% duty cycle.

What settings produce a one-second period?

A pulse period includes both output states. The timer first holds the output ON for the configured on-time, then holds it OFF for the configured off-time. Add those two intervals to calculate the period:

Tperiod = Ton + Toff

Function-block setting Value Effect
On-time Output remains active for half a second
Off-time Output remains inactive for half a second
Complete period One ON/OFF cycle per second
Frequency 1 Hz One complete cycle per second
Duty cycle 50% Equal ON and OFF intervals

The period is not the on-time alone. Entering for ON and for OFF would create a two-second period. Confirm that one rising edge occurs for each ON/OFF pair before changing any other setting.

Where does the timing value travel?

Follow the signal from the timing fields to the observed output. The configured values enter the pulse-generator function block, its internal timer changes the logical output state, the controller scan transfers that state to an output image or internal variable, and the physical output circuit drives the connected load.

  1. Programming software supplies the on-time and off-time values.
  2. The function block accumulates elapsed controller time.
  3. The block changes its Boolean output when the active interval expires.
  4. The program routes that Boolean state to an internal bit or physical output.
  5. The output circuit and connected device reproduce the commanded state, subject to their own response times.

Start at layer one when checking real hardware. Confirm controller power, output wiring, the correct output terminal, and the load supply before diagnosing the timer. An internal monitored bit can toggle correctly while a disconnected, miswired, or unsuitable physical load remains stationary. Prove the function-block output changes state before tracing the signal through the output mapping and field wiring.

How should the timing units be interpreted?

For the stated pulse-generator setup, enter the required intervals in milliseconds: 500 for the pulse and 500 for the pause. Because , their sum produces the requested one-second period.

Displayed or entered value Interpretation Commissioning decision
500 with an ms unit Half-second interval Use for both ON and OFF
5 ON and 4 OFF in the simulator Observed as approximately one second during simulation Do not use the observed screen cadence to infer hardware timing units
No visible engineering-unit label Scaling is not identifiable from the numeric value alone Read the function-block input definition or programming-software help

A bare integer does not carry a time unit by itself. The function-block declaration determines whether a value represents milliseconds, another time base, or a typed duration. Inspect the input field, tooltip, parameter declaration, or function-block documentation. If the software accepts typed time literals, use the syntax displayed by that environment rather than inventing one.

The decisive check is the displayed engineering unit associated with each timing input. It must identify the same time base used in the period calculation.

How should the pulse generator be configured?

  1. Open the pulse-generator function block and identify its on-time and off-time inputs.
  2. Confirm that both inputs use milliseconds. If the fields lack unit labels, open the block definition or software help before entering values.
  3. Write 500 to the on-time input.
  4. Write 500 to the off-time input.
  5. Connect the block output first to a monitorable internal Boolean point. This separates timer operation from output hardware.
  6. Run the program and watch the Boolean point. It must remain ON and OFF for equal intervals.
  7. Map the verified signal to the required physical output.
  8. Check the output indicator and terminal signal while the program runs.

If the application needs a one-second period with a duty cycle other than 50%, retain the sum and divide that time between the two states as required. Calculate duty cycle as Ton / Tperiod × 100%. The evidence supplies only the equal / case, so select any unequal split from the process requirement rather than from the simulator display.

Before proceeding, verify that the internal Boolean point completes one ON/OFF sequence in one second.

Why can simulator timing look different from real timing?

A simulator presents controller behavior through a host computer, programming application, screen refresh path, and possibly an adjustable simulation rate. The displayed animation is therefore not a precision time reference. The reported 5-unit ON and 4-unit OFF combination appearing to take approximately one second indicates a mismatch between entered values and observed presentation; it does not redefine the function block's millisecond time base.

Controller timing and visual observation are different measurement paths. The timer advances according to the runtime's time handling, while the programming screen samples and redraws the state. Brief transitions can appear stretched, shortened, or skipped on the display. A forced slow simulation mode can add another scaling layer.

Observation point What it proves What it does not prove
Function-block status The logical output changes state Physical output voltage is present
Simulator animation The simulated state is being displayed The screen cadence equals controller time
Controller output indicator The output channel is commanded The load terminal has the expected electrical state
Measured output transitions The end-to-end cycle reaches the field output The connected process responds correctly

Use the simulator to prove sequence logic and state transitions. Use a measured timestamp, trace facility, or suitable instrument at the output to prove elapsed time. The check passes when measured rising edges are separated by approximately one second and the ON and OFF intervals are approximately equal.

How is the real programmable relay verified end to end?

Download the program with both timing inputs set to , place the programmable relay in its operating state, and trace the signal in order. Confirm the enable condition first, then the function-block output, the mapped output point, the hardware indicator, and finally the field terminal or connected load.

  1. Record a rising transition at the pulse-generator output.
  2. Record the following falling transition and confirm an ON interval of approximately .
  3. Record the next rising transition and confirm an OFF interval of approximately .
  4. Calculate the complete period from one rising edge to the next. It should be approximately .
  5. Repeat the measurement across several cycles to distinguish a recurring timing error from observation or display jitter.

If the internal bit passes but the physical point does not, leave the timer settings unchanged and troubleshoot the output mapping, output circuit, wiring, load supply, and device response in that order. If the internal bit itself has the wrong period, inspect the timing units, values written to the block, enable logic, and any program logic that rewrites or resets the timer inputs. The stage where the expected transition disappears identifies the fault domain.

Frequently Asked Questions

A period contains both intervals: . The output therefore completes one cycle per second, or 1 Hz.

Why does 5 ON and 4 OFF look like one second in the simulator?

The simulator's execution or screen-update cadence can differ from the timing represented by the function-block inputs. Read the input's engineering-unit label and measure timestamps or output edges instead of scaling the timer from the animation.

Why does the internal pulse work but the real output not switch?

Trace the path from the block output through the output mapping, hardware indicator, terminal wiring, load supply, and connected device. Finish by measuring two successive rising edges at the physical output and verify that they are approximately apart.

Back to blog