Reinder Feenstra 222c219fb7
Einige Prüfungen sind fehlgeschlagen
Build / client macos-15-arm64 (push) Has been cancelled
Build / client macos-15-intel (push) Has been cancelled
Build / client ubuntu_24.04 (push) Has been cancelled
Build / client ubuntu_24.04_arm64 (push) Has been cancelled
Build / client raspberrypios_arm64 (push) Has been cancelled
Build / client raspberrypios_arm7 (push) Has been cancelled
Build / client windows_x64_msvc (push) Has been cancelled
Build / server ubuntu_24.04 (debug+ccov) (push) Has been cancelled
Build / server macos-15-arm64 (push) Has been cancelled
Build / server macos-15-intel (push) Has been cancelled
Build / server raspberrypios_arm64 (push) Has been cancelled
Build / server raspberrypios_arm7 (push) Has been cancelled
Build / server ubuntu_24.04 (push) Has been cancelled
Build / server ubuntu_24.04_arm64 (push) Has been cancelled
Build / server windows_x64_clang (push) Has been cancelled
Build / language files (push) Has been cancelled
Build / manual (push) Has been cancelled
Build / Update contributers in README.md (push) Has been cancelled
Build / shared data raspberrypios_10 (push) Has been cancelled
Build / shared data ubuntu_24.04 (push) Has been cancelled
Build / package innosetup (push) Has been cancelled
Build / Deploy to website (push) Has been cancelled
[cbus] added Lua support for sending CBUS/VLCB message and DCC commands
2026-02-21 16:21:28 +01:00

1.8 KiB
Originalformat Blame Verlauf

CBUS/VLCB reference

CBUS is a Layout Control Bus developed by members of the Model Electronic Railway Group (MERG). CBUS uses the Controller Area Network (CAN) for communication between the CBUS modules.

VLCB is an CBUS extension developed by MERG members to it adds additional commands and introduced a a stricter priority system for commands.

This appendix does not explain the CBUS/VLCB protocol. Instead, it how Traintastic implements and uses CBUS/VLCB and which protocol messages are recognized. It is intended for advanced users who are already familiar with the basics of the CBUS/VLCB protocol.

Supported hardware

TODO: under development

Message support

General control

  • Track on/off: TOF, TON, RTOF, RTON - Supported
  • Emergency stop: ESTOP, RESTP - Supported

TODO: under development, will be expanded when implemented

Debugging and monitoring

Traintastic provides a debug option for CBUS/VLCB that logs all bus traffic. Messages are shown in hexadecimal format, and for many message types a human-readable textual description of the content is also provided.

This is useful for:

  • Diagnosing compatibility issues with specific modules.
  • Verifying that messages are transmitted and received as expected.

Sending raw messages

Through Lua scripting, it is also possible to:

  • Send raw CBUS/VLCB messages, see send().
  • Send raw DCC track commands (RDCCn), see send_dcc().

!!! warning "Use this with caution!" - These messages bypass Traintastics normal handling. - You need a solid understanding of CBUS/VLCB and DCC to avoid conflicts. - Side effects may occur that Traintastic is not aware of or cannot manage.