User Tools

Site Tools


mbus:mbus-en

Differences

This shows you the differences between two versions of the page.


Previous revision
mbus:mbus-en [2025/05/20 15:49] (current) rjversluis
Line 1: Line 1:
 +====== MBUS TrackBox======
 +[[:english#command_stations|{{  :interface.png}}]][[:english|{{  :rocrail-logo-35.png}}]]
 +[[:english|Content]] -> **[[:english#command_stations|Command Stations]]**
 +  * **[[:mbus:mbus2-en|MBUS]]**
 +    * [[:mbus:functions-en|Function Codes]] | [[:mbus:cs3-en|CS2/CS3]] | **[[:mbus:mbus-en|TrackBox(Gleisbox)]]** | [[:mbus:channels-en|Channels]]
 + \\
 +=====Introduction=====
 +The goal of MBUS is to use the **{{:cs2:cs2can-protokoll-2_0.pdf|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.\\
  
 +====Devices====
 +{{ :mbus:ms2.png}}
 +  * Raspberry Pi + Rocrail Server + __**[[:rocnet:pi01can-en|PiCAN_01]]**__
 +  * Märklin TrackBox(GleisBox) [[https://www.maerklin.de/de/produkte/details/article/60116|60116]] [[https://www.maerklin.de/de/produkte/details/article/60113|60113]]
 +  * Märklin Mobile Station [[https://www.maerklin.de/de/produkte/details/article/60657|60657]] (Optional)
 +  * [[http://can-digital-bahn.com|CAN-Digital-Bahn]]
 +  * [[:gca-wio_can-en|WIO-CAN]] on port **5550**
 +
 + \\
 +=====Setup=====
 +{{:mbus:mbus-interface-en.png}}\\
 +====Type====
 +This defines over which interface Rocrail communicate with CAN.\\
 +===USB GridConnect===
 +//"For small systems."//\\
 +The company [[https://www.gridconnect.com|Grid Connect]] defined an ASCII framing protocol designed for using frames over serial connections.\\
 +Fixed baud rate of 500000.\\
 +  * WIO-CAN
 +  * Arduino RCAN
 +===SocketCAN===
 +//"Highly recommended."//\\
 +SocketCAN can be used in combination of the following components:
 +  * Raspberry Pi 2, 3 or 4
 +  * Rocrail Server with MBUS as controller (Assuming CAN0 as device.)
 +  * __**[[:rocnet:pi01can-en|PICan_01]]**__
 +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/4 B+** can be used for visualisation by Rocview, Rocweb and/or andRoc.\\
 +===CC-Schnitte===
 +//"If you already have one."//\\
 +__**[[:cc-schnitte-en|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.
 +  * WIO-CAN
 +
 +===UDP===
 +//"The old Märklin way."//\\
 +Fixed read/write ports 15730/15731.\\
 +Compatible with CS2/CS3 communication.\\
 +The __**[[:mbus:canservice-en|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 [[http://www.can232.com|LAWICEL]] / SLCAN protocol to use with common serial CAN interfaces like **[[http://www.fischl.de/usbtin/|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.\\
 +Note: **WIO-CAN** uses port **5550**.\\
 + \\
 +====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.\\ 
 +
 + \\
 +=====Options=====
 +{{:mbus:mbus-options-en.png}}\\
 +===Report state===
 +Report the current, voltage and temperature of the **[[#channels|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 |
 +
 +===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 __**[[:arduino:rcan-en|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===
 +**Note:** MS2 Firmware 3.55 and higher does negotiate different, compared with previous versions. This none conform update will be not supported.\\
 +**Note:** //Master mode will be disabled in case a CS2/CS3 is detected.//\\ 
 +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.  |
 +|  {{:mbus:ms-slave-empty-en.jpeg}}  |
 +|  Select a new loco from the master list.  |
 +|  {{:mbus:ms-slave-select-en.jpeg}}  |\\
 +
 +===Read only===
 +Trace only the traffic on the CAN bus, and do not evaluate.\\
 +
 +===MSApp===
 +{{ :mbus:msapp-disney.png?100}}{{ :mbus:msapp-icon.png}}
 +Support for the [[https://www.maerklin.de/de/service/kundenservice/mainmobile-station-app-hilfe/|Mobile Station App]].\\
 +Because the App needs also a HTTP access, the __**[[:rocrailini-service-en#http_service|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.\\
 +
 + \\
 +
 +=====Tips=====
 +  * Note: In order to show changes of loco functions in Rocview, option **[[:rocrailini-automode-en#allow_zero_throttle_id|Allow Zero Throttle ID]]** has to be activated.