📄
SPAD.neXt
  • SPAD.neXt Manual
  • About SPAD.neXt
  • Getting Started
    • System Requirements
    • Supported hardware
      • Check Hardware
    • Installation
      • Simulation Specifc Steps
        • SimConnect Configuration
        • MSFS: Enable PMDG data access
        • X-Plane Configuration
    • First Start
      • Configuration Wizard
    • Common Tasks and Issues
      • SPAD
        • Online Services
        • Fresh reinstall
        • Move SPAD.neXt to new Computer
        • License Issues
      • MSFS Specific Topics
      • X-Plane specific Topics
      • Saitek/Logitech MP/RP blinking
      • USB Powermanagement
  • Guides and Videos
    • New User Series
    • MSFS SimConnect
    • L:Vars / H:Events and B:Events
    • Features & Functions
    • Device Specific
      • Arduino / SPAD Serial
      • Authentikit
      • Cockpit Simulator CDU
      • Honeycomb
      • Joystick (Generic HID)
      • miniCockpit
      • RealSimGear
      • Saitek/Logitech
      • Script Panel
      • Stream Deck
      • Thrustmaster TCA
      • vFIP
      • Virtual Avionics
      • vJoy
      • VRinsight
      • X-Touch MC Mode
      • X-Touch Midi Mode
    • Simulation Specific
      • ATR 600 (MSFS)
      • AS CRJ 550/700/900/1000 (MSFS)
      • FBW A32NX (MSFS)
      • FFX/MG HJet (MSFS)
      • FFX Vision Jet (MSFS)
      • FSW C414AW (MSFS)
      • PMDG 737 (MSFS)
      • PMDG 777 (MSFS)
      • SWS Kodiak (MSFS)
      • WT CJ4 (MSFS)
      • WT G1000 NXi (MSFS)
      • PMDG 777 (P3D)
  • User Interface
    • UI Familiarization
      • Home Page
      • Profiles Page
  • Features
    • Expressions
      • Values
      • Referencing Simulation Data
      • Operators
      • Functions
      • Examples
    • Tuner Acceleration
    • Event Execution Order
  • Simulations
    • MSFS 2024
    • MSFS 2020
    • X-Plane
      • Pre-Requisites
      • Dataref Tool
      • Helping Spad Help You
      • Dataref vs. Command: Know Your Copilots
      • Basic Flight Controls – Axis Setup
    • P3d and FSX
    • Other
  • Hardware specific
    • USB HUB Requirements
    • CPFlight Devices
    • Saitek FIP (Flight Instrument Panel)
      • Saitek FIP: Driver & Function Check
    • Loupedeck Image Devices
    • Midi Devices
      • X-Touch Mini
    • Serial (COM) Devices
    • Skalarki
    • VRInsight Overhead
  • Extending and API's
    • Gauges and Extensions
      • SPAD Gauges: GaugeSettings
    • C# Scripting Interface
      • C# Scripting: ScriptStub
      • C# Scripting: Provide Values
      • C# Scripting: PreCompile
    • Device Interface
      • Device Communication Flow
        • Device INIT-Phase
        • Device CONFIG-Phase
          • Device options
          • Device COLORSET configuration
          • Device PROFILE configuration
          • Device OUTPUT Configuration
          • Device INPUT configuration
            • Device input AXIS
            • Device input ENCODER
            • Device input PUSHBUTTON
            • Device input ROTARY
            • Device input SWITCH
            • Device input SWITCH3
            • Device LABEL
          • Device config: Advanced topics
        • Device STATESCAN-Phase
      • Device General Commands
      • Device commands
        • Page-Control
      • Device SPAD.neXt Events (2)
      • Device Simulation Events (Channel 4)
      • Device Data (Channel 5)
      • Device LED Update (Channel 6)
      • Device Display Update (Channel 7)
      • Device Input Updates (Channel 8)
      • Device Virtual Power
      • Device Custom UI
      • Device HTML UI
      • Device preconfigured definition
      • Serial V2
        • Command 1,RAISE
        • Command: 0,AUTH
    • X-Plane Datarefs & Commands
    • FSUIPC: Custom Offsets
    • RestAPI
    • HTML Rendering API
    • Other API's
  • FAQ
    • General FAQ
    • MSFS: Lost profile aircraft assigments
  • Changes
    • 0.9.21
    • 0.9.14.0
    • 0.9.13.39
  • Glossar
  • Old-Docs
    • Old-Getting-Started-Guide
Powered by GitBook
On this page

Was this helpful?

  1. Simulations
  2. X-Plane

Dataref vs. Command: Know Your Copilots

Okay, aviator—before we start wiring buttons to things like flaps, lights, ejector seats (hey, no judgment), we need to understand the two main languages X-Plane speaks: Datarefs and Commands.

Think of these like your cockpit crew. One tells you what’s going on. The other makes things happen.

🎧 Datarefs: The Sim Whisperers

Datarefs are like the gauges and readouts in your cockpit. They tell you the current state of something in the sim. They’re informational. Want to know if the landing gear is down? There’s a dataref for that. Want to see your fuel level? Yep—dataref.

They're like saying: 📻 “Hey sim, what’s the current altitude of this bird?” And the sim replies: 🛩️ “You’re at 2,700 feet, boss.”

You read datarefs to get info. Some can be written to (we’ll get to that), but they don’t do anything on their own.

✍️ Example: sim/cockpit2/switches/landing_lights_on = 1 (This tells you the landing lights are on. Maybe. Sometimes. Depending on the aircraft. Yay, X-Plane!)

🛎️ Commands: The Doers

Commands are the sim’s action-takers. They make something happen—like flipping a switch, toggling a light, or yelling “CLEAR PROP!” before engine start (okay, maybe not that last one… yet).

They’re like saying: 🎙️ “Hey sim, turn on the landing lights.” And the sim does it—no questions asked.

You don’t get a value back, you just send the command and hope the sim complies. (Most of the time, it does. Sometimes it acts like a teenager.)

✈️ Example: sim/lights/landing_lights_toggle (This tells the sim: “Toggle the landing lights!”)

So... Which One Do I Use?

  • ✅ Use a command when you want to make something happen. (Buttons, switches, momentary events)

  • ✅ Use a dataref when you want to check the state of something. (LEDs, displays, conditions)

  • ✅ Sometimes, use both if you want to change something and confirm it worked.

🧩 Bonus Tip: Not All Aircraft Play Nice

Some aircraft (especially custom ones) love using their own secret datarefs and commands. So if your button doesn’t seem to be doing anything, you may need to do a little detective work using DataRefTool to figure out what’s actually going on under the hood.

That's it! You've just passed the "Datarefs vs. Commands" ground school exam. No written test required, but feel free to celebrate with a smug throttle push.

PreviousHelping Spad Help YouNextBasic Flight Controls – Axis Setup

Last updated 28 days ago

Was this helpful?