Skip to content

LogicSteps (Pro)

LogicSteps provide a visual, component-based system for creating automation sequences without PLCs or programming. You can control drives, sensors, and signals through predefined logic components that execute in sequence.

LogicSteps system in action showing sequential execution flow and real-time status updates

LogicSteps container configuration in Unity Inspector showing parallel and sequential execution options

LogicSteps enable automation engineers to create complex production sequences using Unity’s Inspector interface. Each step is a component attached to a GameObject, and the component order determines execution sequence. The system supports both sequential and parallel execution patterns through container components.

LogicSteps automatically handle execution flow, progress visualization, and state management. Blocking steps pause execution until completion, while non-blocking steps execute immediately.

LogicSteps Inspector interface

All LogicStep components inherit these common properties:

Unique identifier for the logic step.

  • Type: String
  • Default: Empty
  • Use case: Required for jump operations and sequence debugging

Progress indicator for blocking operations.

  • Type: Float (0-100)
  • Default: 0
  • Use case: Visual feedback for step completion progress (hidden for non-blocking steps)

Indicates if this step is currently executing.

  • Type: Boolean (read-only)
  • Use case: Runtime debugging and monitoring

Executes child LogicSteps in sequential order.

Enables detailed execution logging.

  • Type: Boolean
  • Default: false
  • Use case: Troubleshooting sequence execution

Index of currently executing step.

  • Type: Integer (read-only)
  • Use case: Monitor current execution position

Total number of child steps.

  • Type: Integer (read-only)
  • Use case: Sequence overview and validation

Executes child LogicSteps simultaneously.

Enables detailed execution logging.

  • Type: Boolean
  • Default: false
  • Use case: Troubleshooting parallel execution

Pauses execution for a specified duration.

Time to wait in seconds.

  • Type: Float
  • Default: 1.0
  • Range: 0.1 to 3600.0
  • Use case: Timing delays in production sequences

Delay LogicStep configuration

Moves a drive to a specific position and waits for completion.

Target drive component to control.

  • Type: Drive reference
  • Default: None
  • Use case: Connect to the drive you want to position

Target position in millimeters or degrees.

  • Type: Float
  • Default: 0
  • Use case: Set absolute or relative target position

Alternative position source from PLC interface.

  • Type: PLCOutputFloat reference
  • Default: None
  • Use case: Dynamic positioning from external control systems

Treats destination as offset from current position.

  • Type: Boolean
  • Default: false
  • Use case: Incremental movements relative to current position

Enables real-time parameter adjustment during runtime.

  • Type: Boolean
  • Default: false
  • Use case: Runtime tuning and debugging

Drive To LogicStep configuration

Initiates drive movement without waiting for completion (non-blocking). Execution continues immediately to the next step while the drive moves in the background.

This is useful when you want to start multiple drives simultaneously or continue with other logic while a drive is moving. To wait for the drive to finish, follow with a Wait for Signal Bool step monitoring the drive’s AtPosition signal.

Target drive component to control.

  • Type: Drive reference
  • Default: None

Target position in millimeters or degrees.

  • Type: Float
  • Default: 0

Movement direction.

  • Type: Enum (Automatic / Forward / Backward)
  • Default: Automatic

Treats destination as offset from current position.

  • Type: Boolean
  • Default: false
  • Use case: Incremental movements relative to current position

Enables real-time parameter adjustment during runtime.

  • Type: Boolean
  • Default: false

Usage pattern:

1. Start Drive To (position 500, non-blocking)
2. Set Signal Bool (activate something while drive moves)
3. Wait for Signal Bool (drive AtPosition = true)

Start Drive To LogicStep configuration

Sets drive speed for continuous movement.

Target drive component to control.

  • Type: Drive reference
  • Default: None
  • Use case: Connect to the drive you want to control

Movement speed in mm/s or deg/s.

  • Type: Float
  • Default: 100
  • Range: -1000 to 1000
  • Use case: Positive for forward, negative for backward, zero to stop

Start Drive Speed LogicStep configuration

Pauses execution until specified drives reach their target positions.

List of drives to monitor.

  • Type: Drive array
  • Default: Empty
  • Use case: Synchronize multiple drive movements

Wait for Drives at Target LogicStep configuration

Pauses execution until sensor reaches specified state.

Target sensor component to monitor.

  • Type: Sensor reference
  • Default: None
  • Use case: Connect to proximity, vision, or other sensor types

Determines which sensor state triggers continuation.

  • Type: Boolean
  • Default: true
  • Use case: true waits for occupied, false waits for not occupied

Wait for Sensor LogicStep configuration

Pauses execution until boolean signal reaches specified state.

Target signal to monitor.

  • Type: Signal reference
  • Default: None
  • Use case: Connect to PLC or internal boolean signals

Determines which signal state triggers continuation.

  • Type: Boolean
  • Default: true
  • Use case: true waits for signal true, false waits for signal false

Sets a boolean signal to true or false.

Target signal to modify.

  • Type: Signal reference
  • Default: None
  • Use case: Control PLC outputs or internal flags

Value to assign to the signal.

  • Type: Boolean
  • Default: true
  • Use case: true sets signal high, false sets signal low

Set Signal Bool LogicStep configuration

Pauses execution until a float signal meets a specified condition. Supports five comparison operators with configurable tolerance for equality checks. Useful for waiting on analog values like temperatures, pressures, or position feedback.

Target float signal to monitor.

  • Type: Signal reference
  • Default: None
  • Use case: Connect to any float-type signal (PLCOutputFloat, PLCInputFloat, etc.)

Comparison operator for evaluating the signal value against the target.

  • Type: ComparisonType (dropdown)
  • Default: GreaterOrEqual
  • Options: GreaterThan (>), LessThan (<), Equals (==), GreaterOrEqual (>=), LessOrEqual (<=)
  • Use case: Select the condition that must be met before proceeding

Target value to compare the signal against.

  • Type: Float
  • Default: 0
  • Use case: Set the threshold or target value in signal units

Tolerance for equality comparison to handle floating-point precision.

  • Type: Float
  • Default: 0.01
  • Minimum: 0.0001
  • Use case: Only applies when Comparison is set to Equals. A tolerance of 0.01 means values within ±0.01 of the target are considered equal

Sets a float signal to a specified value and immediately proceeds to the next step. This non-blocking step is commonly used for setting speed values, position targets, or analog control outputs.

Target float signal to modify.

  • Type: Signal reference
  • Default: None
  • Use case: Connect to any float-type signal (PLCInputFloat, PLCOutputFloat, etc.)

Float value to assign to the signal.

  • Type: Float
  • Default: 0
  • Use case: Set the desired value in signal units (e.g., speed in mm/s, temperature in °C)

Conditionally jumps to a named step based on signal state.

Name of the target LogicStep to jump to.

  • Type: String
  • Default: Empty
  • Use case: Must match the Name property of target step exactly

Signal to evaluate for jump condition.

  • Type: Signal reference
  • Default: None
  • Use case: Connect to boolean signal for conditional logic

Signal state that triggers the jump.

  • Type: Boolean
  • Default: true
  • Use case: true jumps when signal is high, false jumps when signal is low

Jump on Signal LogicStep configuration

Controls GameObject active state.

Target GameObject to enable or disable.

  • Type: GameObject reference
  • Default: None
  • Use case: Show/hide objects or enable/disable components

Desired active state for the GameObject.

  • Type: Boolean
  • Default: true
  • Use case: true activates GameObject, false deactivates it

Controls virtual camera activation for scene visualization.

Target Cinemachine virtual camera.

  • Type: CinemachineVirtualCamera reference
  • Default: None
  • Use case: Switch camera views during automation sequences

Triggers a Grip component to pick MUs.

Target Grip component.

  • Type: Grip reference
  • Default: None

If true, waits up to 10 seconds for the MU to be successfully gripped before proceeding.

  • Type: Boolean
  • Default: false
  • Use case: Enable when subsequent steps depend on the MU being picked. Leave disabled when you just want to trigger the pick and continue.

Triggers a Grip component to place (release) all currently held MUs.

Target Grip component.

  • Type: Grip reference
  • Default: None

If true, waits up to 10 seconds for all MUs to be successfully placed before proceeding.

  • Type: Boolean
  • Default: false
  • Use case: Enable when subsequent steps depend on the MU being placed at its target.

Sets the ActiveOnly property on one or more realvirtualBehavior components. This non-blocking step allows you to enable or disable specific behaviors during a sequence without affecting other components.

List of realvirtualBehavior components to modify.

  • Type: List of realvirtualBehavior references
  • Default: Empty

If true, sets ActiveOnly to Always (active). If false, sets it to Never (inactive).

  • Type: Boolean
  • Default: true
  • Use case: Temporarily disable drives or behaviors during a sequence phase

Marks the beginning of a production cycle for statistics.

Marks the end of a production cycle for statistics.

Records state information for performance analysis.

Generates statistical output data.

  1. Create an empty GameObject for your sequence
  2. Add LogicStep components in desired execution order
  3. Configure each step’s properties in the Inspector
  4. Use Name property for steps referenced by jumps
  5. Run the scene to execute the sequence
1. Start Drive Speed (move conveyor forward)
2. Wait for Sensor (part detected)
3. Delay (settling time)
4. Drive To (position actuator)
5. Set Signal Bool (activate gripper)
6. Set Signal Float (set pressure to 5.0 bar)
7. Wait for Signal Float (wait until pressure >= 4.5 bar)
8. Drive To (return actuator)
9. Start Drive Speed (continue conveyor)
  1. Add Parallel Container component
  2. Add child LogicSteps that should execute simultaneously
  3. Each child step runs independently
  4. Container completes when all children finish
  1. Use Jump on Signal for branching logic
  2. Set up signal monitoring for decision points
  3. Create named target steps for jump destinations
  4. Implement error handling with conditional jumps
  • Scene Menu: Right-click when LogicStep component is attached
  • Component Menu: Component > realvirtual > Add Component > LogicStep
  • Quick Access: Overlay menu appears with all available steps

LogicStep selection overlay

  • Drag and Drop: Reorder components to change execution sequence
  • Progress Bars: Visual feedback for blocking operations
  • Live Edit: Runtime parameter adjustment for debugging
  • Debug Mode: Detailed logging for troubleshooting

LogicSteps basic concepts

  1. Create new script in LogicSteps folder
  2. Inherit from LogicStep base class
  3. Implement required methods:
    • NonBlocking(): Return true for non-blocking steps
    • OnStarted(): Execute step logic
  4. Call NextStep() when step completes
public class LogicStep_StartDriveSpeed : LogicStep
{
public Drive drive;
public float Speed;
protected new bool NonBlocking()
{
return true;
}
protected override void OnStarted()
{
if (drive != null)
{
drive.TargetSpeed = Mathf.Abs(Speed);
if (Speed > 0)
{
drive.JogForward = true;
drive.JogBackward = false;
}
else if (Speed == 0)
{
drive.JogForward = false;
drive.JogBackward = false;
}
else if (Speed < 0)
{
drive.JogForward = false;
drive.JogBackward = true;
}
}
NextStep();
}
}
  • protected void NextStep(): Advance to next step in sequence
  • protected void NextStep(string stepName): Jump to named step
  • public void StartStep(): Initialize step execution
  • protected void Start(): Begin sequence at runtime
  • protected new bool NonBlocking(): Define step execution type
  • protected override void OnStarted(): Implement step behavior

💡 Hint
Always call NextStep() when your custom step completes to ensure proper sequence flow.


© 2025 realvirtual GmbH https://realvirtual.io - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.