LogoLogo
REV Brushless DocsREV ION Control System Docs
  • REVLib
  • Installation
    • Changelog
  • REVLib Code Examples (GitHub)
  • Migrating to REVLib 2025
  • Configuring Devices
    • Retrieving Configurations
    • Flexibility with Configurations
  • SPARK Motor Controllers
    • SPARK MAX vs SPARK Flex
    • Configuring a SPARK
    • Closed Loop Control
      • Closed Loop Control Getting Started
      • Getting Started with PID Tuning
      • Position Control Mode
      • Velocity Control Mode
      • Current Control Mode
      • MAXMotion Position Control
      • MAXMotion Velocity Control
      • Smart Motion Control
      • Smart Velocity Control
    • Simulation
      • Simulation Getting Started
      • REVLib Simulation Feature Overview
      • Simulating Additional Sensors and Auxiliary Devices
  • Servo Hub
    • Configuring a Servo Hub
    • Commanding Servos
Powered by GitBook
On this page
  • SparkSim Features
  • Automatic GUI Generation
  • WPILib Physics Model Integration
  • Control Over Native Spark Object
  • Simulated Fault Manager
  • Algorithms and Features
  • Closed Loop Control
  • MAXMotion Simulation
  • Voltage Compensation Algorithm
  • Current Limiting Algorithm
  • Encoder, Sensor, and Limit Switch Simulation

Was this helpful?

Export as PDF
  1. SPARK Motor Controllers
  2. Simulation

REVLib Simulation Feature Overview

PreviousSimulation Getting StartedNextSimulating Additional Sensors and Auxiliary Devices

Last updated 4 months ago

Was this helpful?

SparkSim Features

Automatic GUI Generation

As your simulation runs, GUI elements will be added to the Devices tab as they are called, with specific dialogues for each sensor and tool.

WPILib Physics Model Integration

Every device simulation object includes a .iterate method designed for easy integration with WPILib's Physics models and tools.

Control Over Native Spark Object

Nearly every attribute of the Spark object is directly addressable via the SparkSim object, allowing you to tailor your simulations to any scenario.

Simulated Fault Manager

By creating a SimFaultManager object, you are given the ability to throw each possible fault individually, either through the GUI or programmatically with the object.

Algorithms and Features

Closed Loop Control

Position, velocity, current, MAXMotion Position Control, and MAXMotion Velocity Control algorithms have been translated into the simulation.

MAXMotion Simulation

Both MAXMotion Position Control and MAXMotion Velocity Control are able to be fully simulated.

Voltage Compensation Algorithm

The Voltage Compensation algorithm from the Sparks has been ported to the simulation.

Current Limiting Algorithm

The Smart Current Limiting algorithm from the Sparks has been ported to the simulation.

Encoder, Sensor, and Limit Switch Simulation

All auxiliary devices are able to be fully controlled, through their individual simulation objects. Selected sensors will automatically be updated by the SparkSim.iterate() method. For more details on how to set these device simulations up, see Simulating Additional Sensors and Auxiliary Devices.