User Tools

Site Tools


mbus:mbus-en

MBUS

Introduction

The goal of MBUS is to use the CAN CS2 protocol for running trains and controlling I/O.
And this with only one interface and one CAN bus.
The Command Station, Märklin TrackBox(GleisBox), is economically priced and supports the digital DCC/MfX/MM2 protocols. A Mobile Station can be used as throttle and programmer.

Overview

mbus-socketcan.jpeg

Devices

gc2a-module.jpg


Setup


Type

This defines over which interface Rocrail communicate with CAN.

USB GridConnect

"For small systems."
The company Grid Connect defined an ASCII framing protocol designed for using frames over serial connections.
The USB connection of the CANGC2a can be used for this type.
Fixed baud rate of 500000.

SocketCAN

"Highly recommended."
SocketCAN can be used in combination of the following components:

The advantage of this type is the direct Rocrail Server connection with CAN; It can run without EtherNet and USB.
The WiFi on the Raspberry Pi 3 B+ can be used for visualisation by Rocview, Rocweb and/or andRoc.

CC-Schnitte

"If you already have one."
CAN-Digital-Bahn serial CAN interface.
The communication does not use serial framing which could lead to wrong interpretations of data.
Fixed baud rate of 500000.

TCP

"The Märklin way."
Default port 15731.
Compatible with CS2/CS3 communication.

UDP

"The old Märklin way."
Fixed read/write ports 15730/15731.
Compatible with CS2/CS3 communication.
The CANService application can also be used for UDP communication. This utility is automatically installed on Linux platform under /opt/rocrail/canservice.

Dummy

"Just for testing without any hardware connected."
All CAN frames are echoed with the response bit set.

LAWICEL / SLCAN

The LAWICEL / SLCAN protocol to use with common serial CAN interfaces like USBTin.
Fixed baud rate of 115200.

Hostname

For UDP and TCP type.
The extra field on the right is to set the TCP port; 15731 is used if not set.

Device

The serial device used with type USB GridConnect or CC-Schnitte.

Track Protocols

The supported digital protocols by the TrackBox.
If all protocols are disabled in the settings, they will be all activated at startup. At least one protocol must be activated.

Report state

Report the current, voltage and temperature of the TrackBox channels.

Selection Function Remark
None Reporting is off
Changing Only changes are reported
Regular Report every 5 seconds For use in combination with the Power Manager


Options

Slot purge time

If a locomotive is nonactive for this period of time, and the speed is zero, it will be removed from the refresh cycle to make place for other locomotives.
Purging is deactivated if this time is set to zero.
The purge time is defined in seconds, default is 60s.

Acknowledge sensor events

Acknowledge the Block type inputs of the GC2a.
Only the ON will be acknowledged. If an acknowledgement was not received the GC2a will resend the event until the block input goes OFF.
The GC2a enables this option automatically after receiving the first acknowledge, and this will be active only for the current session.

Master

Puts the connected MS2 in slave mode and provide loco information.
After the MS2 is in slave mode, a loco can be selected from the Rocrail server with the following sequence:

Select a free loco position, or one to replace.
ms-slave-empty-en.jpeg
Select a new loco from the master list.
ms-slave-select-en.jpeg

Read only

Trace only the traffic on the CAN bus, and do not evaluate.

MSApp

Support for the Mobile Station App.
Because the App needs also a HTTP access, the HTTP Service must be activated on port 80.
Note: MSApp support is not possible if there is already a WEB Service running on this port.


Programming track

This output addressing can be used for activating a relay before programming.
The TrackBox does not provide a separate output for programming. To avoid programming all locomotives on the main track, it can be helpful to switch to the isolated programming track.


Accessory Addressing

DCC/MM

All addressing schemes are supported. (FADA/PADA/MADA)
The bus value must be set to zero.

GC2a

  • Bus = CAN-ID
  • Address = GC2a port number, 1…16


GC2a Signal support

This is for simple signals up to 4 LED and max. 5 aspects.
Only the RED address will be used as offset for all LEDs.

Parameter Description
Control Aspect numbers
Port type LED
Bus CAN-ID of the GC2a
Addressing FLAT from 1 to 16 - number of aspects

Aspect Values

See: Aspect Values
The number of controlled LEDs will be calculated from the aspect values.

Example

Aspect value examples

Value (dec) LEDs
0x01 (1) LED 1 on
0x02 (2) LED 2 on
0x04 (4) LED 3 on
0x08 (8) LED 4 on
0x11 (17) LED 1 blinking
0x55 (85) LED 1 and 3 blinking
0x03 (3) LED 2 and LED 1 on
0x13 (19) LED 2 on and LED 1 blinking


mbus/mbus-en.txt · Last modified: 2019/04/21 08:02 by rjversluis