User Tools

Site Tools


mbus:mbus-en

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
mbus:mbus-en [2019/01/14 12:56] rjversluismbus:mbus-en [2019/02/25 16:47] rjversluis
Line 1: Line 1:
 ====== MBUS ====== ====== MBUS ======
 [[:english#command_stations|{{  :interface.png}}]][[:english|{{  :rocrail-logo-35.png}}]] [[:english#command_stations|{{  :interface.png}}]][[:english|{{  :rocrail-logo-35.png}}]]
-[[:english|Content]] -> [[:english#command_stations|Command Stations]] -> **MBUS**+[[:english|Content]] -> [[:english#command_stations|Command Stations]] -> **[[:english#can|CAN]]** 
 +  * **[[:mbus:mbus-en|MBUS]]** 
 +    [[:mbus:functions-en|Function Codes]] | [[:mbus:cs3-en|CS3]] | [[:mbus:channels-en|Channels]]
  \\  \\
-WIP |+ ToDo: UPDATE.  |
  \\  \\
 =====Introduction===== =====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.\\ 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.\\ 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/FMX/MM2 protocols. A Mobile Station can be used as throttle and programmer.\\+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==== ====Overview====
 {{mbus:mbus-socketcan.jpeg?400}}\\ {{mbus:mbus-socketcan.jpeg?400}}\\
 ====Devices==== ====Devices====
-  * Raspberry Pi + Rocrail Server + __**[[:rocnet:pi01can-en|Pi01CAN]]**__ +{{ :arduino:gc2a-module.jpg?200}}{{ :mbus:ms2.png}} 
-  * __**[[:arduino:rcan-en|CANGC2a]]**__ +  * Raspberry Pi + Rocrail Server + __**[[:rocnet:pi01can-en|Pi01CAN]]**__ or __**[[:cbus:socketcan-en|RPI-CAN]]**__ 
-  * Märklin TrackBox(GleisBox)+  * or Banana Pi M1 + Rocrail Server + [[http://lnxpps.de/bpi/|BPi CAN]]  
 +  * __**[[:arduino:rcan-en|CANGC2a]]**__ 16 I/O 
 +  * 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)
   * __**[[:rocnet:rocnetnode-en|RocNetNode]]**__ + __**[[:rocnet:pi01can-en|Pi01CAN]]**__ (Open)   * __**[[:rocnet:rocnetnode-en|RocNetNode]]**__ + __**[[:rocnet:pi01can-en|Pi01CAN]]**__ (Open)
   * [[http://can-digital-bahn.com|CAN-Digital-Bahn]] Direct connected without //'Startpunkt'//   * [[http://can-digital-bahn.com|CAN-Digital-Bahn]] Direct connected without //'Startpunkt'//
Line 27: Line 32:
 //"For small systems."//\\ //"For small systems."//\\
 The company [[https://www.gridconnect.com|Grid Connect]] defined an ASCII framing protocol designed for using frames over serial connections.\\ The company [[https://www.gridconnect.com|Grid Connect]] defined an ASCII framing protocol designed for using frames over serial connections.\\
-The USB connection of the __**[[:arduino:rcan-en|CANGC2a]]**__ can be used for this type. (Baud rate fixed at 500000)\\+The USB connection of the __**[[:arduino:rcan-en|CANGC2a]]**__ can be used for this type.\\ 
 +Fixed baud rate of 500000.\\
 ===SocketCAN=== ===SocketCAN===
 //"Highly recommended."//\\ //"Highly recommended."//\\
 SocketCAN can be used in combination of the following components: SocketCAN can be used in combination of the following components:
-  * Raspberry Pi 2 or 3+  * Raspberry Pi 2 or 3, __**[[:pi:bananapi-en|Banana Pi M1]]**__
   * Rocrail Server with MBUS as controller (Assuming CAN0 as device.)   * Rocrail Server with MBUS as controller (Assuming CAN0 as device.)
   * __**[[:rocnet:pi01can-en|Pi01CAN]]**__, __**[[:cbus:socketcan-en|RPI-CAN]]**__   * __**[[:rocnet:pi01can-en|Pi01CAN]]**__, __**[[:cbus:socketcan-en|RPI-CAN]]**__
 The advantage of this type is the direct Rocrail Server connection with CAN; It can run without EtherNet and USB.\\ 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.\\+The WiFi on the **Raspberry Pi 3 B+** can be used for visualisation by Rocview, Rocweb and/or andRoc.\\
 ===CC-Schnitte=== ===CC-Schnitte===
 //"If you already have one."//\\ //"If you already have one."//\\
 __**[[:cc-schnitte-en|CAN-Digital-Bahn]]**__ serial CAN interface.\\ __**[[:cc-schnitte-en|CAN-Digital-Bahn]]**__ serial CAN interface.\\
 The communication does not use serial framing which could lead to wrong interpretations of data.\\ The communication does not use serial framing which could lead to wrong interpretations of data.\\
 +Fixed baud rate of 500000.\\
  
-===TCP/IP GridConnect=== +===TCP=== 
-//"If a RocNetNode runs with a Pi01CAN/RPI-CAN."//\\ +//"The Märklin way."//\\ 
-Fixed port 5550.\\ +Default port 15731.\\ 
-RocNetNode on a Raspberry Pi and a Pi01CAN interface.\\ +Compatible with CS2/CS3 communication.\\
-The GridConnect framing protocol is also used because TCP/IP is regarded as a serial connection.\\ +
-The __**[[:mbus:canservice-en|CANService]]**__ application can also be used for TCP communication. This utility is automatically installed on Linux platform under /opt/rocrail/canservice.\\+
  
 ===UDP=== ===UDP===
-//"The Märklin way."//\\+//"The old Märklin way."//\\
 Fixed read/write ports 15730/15731.\\ Fixed read/write ports 15730/15731.\\
 Compatible with CS2/CS3 communication.\\ 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.\\ 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.\\
 + \\
 ====Device==== ====Device====
 The serial device used with type **USB GridConnect** or **CC-Schnitte**.\\ The serial device used with type **USB GridConnect** or **CC-Schnitte**.\\
- + \\ 
-====Slot purge time==== +====Track Protocols====
-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.\\ +
-====Protocol====+
 The supported digital protocols by the TrackBox.\\ 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.\\  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 state====
-Report the current, voltage and temperature of the TrackBox.+Report the current, voltage and temperature of the **[[#channels|TrackBox channels]]**.
 |< >| |< >|
 ^ Selection ^ Function ^ Remark ^ ^ Selection ^ Function ^ Remark ^
Line 72: Line 86:
 | Regular | Report every 5 seconds | For use in combination with the Power Manager | | 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 __**[[: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===
 +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==== ====Programming track====
 This output addressing can be used for activating a relay before programming.\\ This output addressing can be used for activating a relay before programming.\\
Line 77: Line 123:
  
  \\  \\
-=====TrackBox===== +=====Accessory Addressing===== 
-====Channels==== +====DCC/MM==== 
-Table of known channels:+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.\\
 |< >| |< >|
-Channel Measurement ^ Units +Parameter Description 
-  | Current mA +Control Aspect numbers 
- 3  Voltage hundredth of +Port type LED | 
- 4  Temperature | C° +| Bus | CAN-ID of the GC2a 
-Those three channels will be polled every 5 seconds, and in case of a change reported to the Rocrail Server.\\ +Addressing FLAT from 1 to 16 - number of aspects 
-The Trackbox can be added to the __**[[:powerman-en|Power Manger]]**__ with address 1 or the UID.\\+ 
 +====Aspect Values==== 
 +See: __**[[:signal-props-en#value|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: 2022/02/10 22:05 by rjversluis