githubEdit

Signal Test Generator

Generate test signal values for interface testing without a PLC

circle-info

This feature was added in realvirtual 6.3.

Overview

The Signal Test Generator automatically generates cyclic test values for all PLCInput signals on its parent interface. It discovers Bool, Float, and Int input signals and applies test patterns: sine waves for floats, on/off toggling for bools, and incrementing counters for ints.

Attach it to any interface GameObject to simulate signal activity without a real PLC connection. This is useful for testing interface communication, verifying signal routing, and demonstrating data exchange in demo scenes.

Setup

  1. Select the interface GameObject that contains your PLC signals as children

  2. Add the Signal Test Generator component (realvirtual > Interfaces > Signal Test Generator)

  3. Press Play — all PLCInput signals will start generating test values automatically

The component discovers signals at startup. If you add or remove signals at runtime, click Refresh Signals to re-scan.

Properties

Test Settings

Property
Description

Enable Testing

Enable or disable test signal generation

Update Interval

Time in seconds between signal value updates

Sine Amplitude

Amplitude of the sine wave for float signals

Sine Offset

Center offset of the sine wave for float signals

Sine Frequency

Frequency of the sine wave in Hz

Toggle Interval

Time in seconds between bool signal toggles

Int Increment

Increment value per update cycle for int signals

Int Max

Maximum value before the int counter resets to zero

Status

Property
Description

Cycle Count

Number of update cycles completed since play started

Test Patterns

Float Signals (Sine Wave)

Each PLCInputFloat signal follows a sine wave: Offset + Amplitude * sin(2pi * Frequency * time + phase). Multiple float signals get different phase offsets so they don't move in sync.

Bool Signals (Toggle)

PLCInputBool signals toggle between true and false at the configured toggle interval. Even-indexed and odd-indexed signals toggle on opposite phases for visual variety.

Int Signals (Counter)

PLCInputInt signals increment by the configured step each update cycle and wrap around at the maximum value. Multiple int signals get different offsets.

Common Use Cases

  • Interface demo scenes — Show live signal exchange without requiring a PLC

  • WebSocket testing — Verify server/client signal transmission with changing values

  • UI development — Generate varying signals for testing HMI displays and dashboards

  • Integration testing — Simulate signal activity for automated test scenarios

See Also

Last updated