User Tools

Site Tools


cbus-en

Differences

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

Link to this comparison view

cbus-en [2018/11/12 08:56] (current)
Line 1: Line 1:
 +====== CANBUS ======
 +[[:​english#​command_stations|{{ ​ :​interface.png}}]][[:​english|{{ ​ :​rocrail-logo-35.png}}]]
 +[[:​english|Content]] -> [[:​english#​command_stations|Command Stations]] ->  **[[:​cbus-en|CANBUS]]** ​
 +  * [[:​cbus:​flim-en|Node Setup]]
 +  * [[:​english#​merg_cbus|CAN-GCx Modules and Command Station]]
 +    * [[:​can-gca1e-en|CAN-GC1e]] Ethernet Interface
 +    * [[:​can-gca1-en|CAN-GC1]] Serial-USB Interface
 +    * [[:​cbus:​socketcan-en|RPI-CAN MCP251x Interface (SocketCAN)]]
 +    * [[:​can-gca2-en|CAN-GC2]] 16 port programmable I/O
 +    * [[:​can-gc3-en|CAN-GC3]] DCC Command Station
 +    * [[:​can-gc4-en|CAN-GC4]] RFID Concentrator
 +    * [[:​can-gca5-en|CAN-GC5]] Stationary Throttle
 +    * [[:​can-gc6-en|CAN-GC6]] 4 Channel servo controller
 +    * [[:​can-gc7-en|CAN-GC7]] Fast clock
 +    * [[:​can-gc8-en|CAN-GC8 Display driver for dynamic text]]
 +  * [[:​can:​portmapping-en|USB Port mapping]] (Optional)
 +  * [[:​cbus:​protocol|Protocol]]
 +
 + \\
 +
 +
 +===== Setup =====
 +[[:​can-gca1e-en|{{ :​cbus:​can-gc1e_pict01.jpg?​200}}]][[:​can-gca1-en|{{ :​cbus:​can-gc1_pict02.jpg?​200}}]]
 +{{:​cbus:​cbus-en.png}}
 +
 +==== CAN-ID ====
 +The __**[[:​cbus:​flim-en#​can-id|CAN-ID]]**__ used for the CAN Interface like CANGC1(e) and SocketCAN.\\
 +
 +==== Sub-Library ====
 +The connected CAN nterface:
 +^ Type ^ BPS ^ Kit code ^ Manufacturer ^ Remark ^
 +| TCP/IP | 10/100 MBPS | **[[:​can-gca1e-en|CAN-GC1e]]** | GCA Peter Giling | Preferred. |
 +| USB | 500 KBPS | **[[http://​www.merg.org.uk/​merg_resources/​cbus.php|CANUSB]]** | MERG | Preferred by MERG. The 12V version can be used in combination with the CAN-GCA line. \\ RTS/CTS should be disabled because its not supported by this module. |
 +| Serial | 230400 | **[[:​can-gca1-en|CAN-GC1]]** | GCA Peter Giling | Uses **[[:​cangc1-firmware-en#​binary_response|binary responses]]** to improve through put. (Not MERG compatible.) |
 +| Serial | 115200 | **[[http://​www.merg.org.uk/​merg_resources/​cbus.php|CANRS]]** | MERG | Deprecated; It is not fast enough to keep up with CBUS at full speed! |
 +| SocketCAN | - | | **[[https://​github.com/​GBert/​misc/​tree/​master/​RPi-MCP2515|RPi-MCP2515]]** | **[[https://​en.wikipedia.org/​wiki/​SocketCAN|SocketCAN]]** compatible devices. |
 +\\
 +
 +==== Device ====
 +The serial device used for the CAN interface.\\
 +^ Kit code ^ Windows ^ Linux ^ Remark ^
 +| CANUSB | COM5...COMn | /​dev/​ttyUSB0.../​dev/​ttyUSBn | |
 +| CAN-GC1, CANRS | COM1...COM4 | /​dev/​ttyS0.../​dev/​ttySn | An **[[:​usb-rs232-en|USB-RS232 converter]]** can also be used. (Tested) |\\
 +
 +==== Host/Port ====
 +The hostname and port for the **[[:​can-gca1e-en|CAN-GC1e]]** interface.\\
 +In case of SocketCAN the host name is the device name. Default **can0**\\
 +
 +
 +==== Short events ====
 +Use the short version of the accessory events; Event number only. (Recommended)\\
 +The long events are based on node number and event number.\\
 +
 +
 +==== Fastclock ====
 +Send **[[:​cbus:​can-gc7-firmware#​opc|fast clock packets]]** on the CBUS.\\
 +It is recommended to set this enabled in case of using a TCP/IP connection to prevent idle timeout disconnection.\\
 +
 +==== Command Ack ====
 +| :!: Use only in case of data loss in combination with WiFi. |
 +Activates the command acknowledgment handshake.\\
 +A next command can only be send if the interface did acknowledged the previous command.\\
 +This handshake prevents loss of commands due buffer overflow. (10/100MBit → 125kBit)\\
 +Other manufacturers,​ like Lenz, are also using such a handshake on there Ethernet interfaces.\\
 +| Only the **[[:​cangc1e-firmware-en#​binaries|CAN-GC1e version 1.c]]** is capable of handling this acknowledgment when this option is **[[:​can-gca1e-en#​setup|activated in the firmware]]**. |\\
 + \\
 +
 +==== FONFOF ====
 +Use the OPC_DFON/​OPC_DFOF instead of OPC_DFUN. (Not implemented by CANCMD.)\\
 +
 +==== Heartbeat ====
 +Sends every second an event# 4712 OPC_ACON/​OPC_ACOF on the bus to be able to check for hardware/​cable problems.\\
 +The LEDs on the modules should flash every second.\\
 +A CAN-GC2 can be programmed on this event# to be able to add a LED mounted on the dashboard.\\
 +
 +
 +==== SoD ====
 +"Start of Day" address for query all input states.\\
 +This must be programmed as event in all input nodes which should report.\\
 +
 +==== Slot purge time ====
 +CS timeout for updating DCC mobile decoders.\\
 +If a loco becomes idle before this time out a keep alive command is send to the CS.\\
 +:!: The hardware purgetime is 20 seconds, so this value should be **set to less then 20** to assure the slot is not purged during automatic runs!\\
 +
 +==== Decoder check ====
 +Check if all __**[[:​accdec-gen-en|Decoders]]**__ are online. (NET-ID=CAN-ID,​ Bus=Node Number)\\
 +The default interval is 10 seconds.\\
 +A power off will be issued if a decoder is not responding. (Lost node.)\\
 +Loco sessions will be invalidated if the GC3(CANCMD) was lost.\\
 +| If a CAN-ID is found, which is not in the decoder list, it will be automatically added for checking. (It will be saved in the accessory decoder table, flagged as generated.) |
 + \\
 +
 +===== FLAT Addressing =====
 +mergCBUS addressing is **[[:​addressing-en#​flat_accessory_decoder_address_fada|FLAT]]**,​ __only the bus and address values are used.__\\
 +^ Rocrail ^ mergCBUS ^ Range ^Remark ^
 +| - | CAN ID | 0...127 | Unique number within a CAN segment to be used in the CAN transport layer.\\ //This is the low part of the CAN **[[http://​en.wikipedia.org/​wiki/​CAN_bus#​ID_allocation|Message Identifier]]** without priority bits.// |
 +| Bus | Node number | 0...65535 | Used for **[[:​cbus-en#​short_events|long events]]** and **[[:​cbus:​flim-en|programming]]**. This must be set unique for all modules. |
 +| Address | Event number | 0...65535 ​ |  |
 +| Gate | Added to the address of output objects. | 0,1 | This is needed for signal pattern support. | \\
 +
 +
 +
 + \\
 +
 +===== Resources =====
 +==== Sites ====
 +  * http://​www.merg.org.uk/​merg_resources/​cbus.php
 +  * http://​groups.yahoo.com/​group/​mergcbus/​
 +
 +==== Kits & PCBs ====
 +  * http://​www.merg.org.uk/​kits.php (Members only.)
 +  * http://​www.phgiling.net/​ **[[:​english#​merg_cbus|CBUS-GCA]]**
  
cbus-en.txt · Last modified: 2018/11/12 08:56 (external edit)