User Tools

Site Tools


addressing-en

Differences

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

Link to this comparison view

addressing-en [2018/11/12 08:56] (current)
Line 1: Line 1:
 +======Addressing & Co.======
 +[[english|{{ ​ rocrail-logo-35.png}}]]
  
 +[[english|Content]] -> [[english#​Basics|Basics]]
 +  * [[rocrail-components-en|Rocrail'​s Components]] | **Addressing**
 +    * [[addressing-examples-en|Examples]] | [[:​addressing:​accessory-pg-en|Addressing Accessory Decoders]]
 +// \\ // \\
 +
 +=====IID or Interface ID=====
 +Unique identification of a __**[[:​english#​command_stations|Command Station]]**__.\\
 +  * IIDs are __case sensitive__.
 +  * An IID must be unique.
 +  * Commas and other special characters are not allowed.
 +  * Avoid using blanks; Use dots or underscores instead.
 +
 + \\
 +=====ID=====
 +Unique identification of an __**[[:​english#​objects|Object]]**__ of a certain type.\\
 +  * IDs are __case sensitive__.
 +  * An ID must be unique in its object group.
 +  * Commas and other special characters are not allowed.
 +  * Avoid using blanks; Use dots or underscores instead.
 +  * An ID for Block, Turntable, Staging Block and FiddleYard must be unique.
 +
 + \\
 +
 +=====ID Lists=====
 +Object ID lists in Rocrail must be separated with commas __without any additional blanks__.\\
 +
 + \\
 +
 +=====Bus=====
 +The meaning of the Bus variable depends on the used system:
 +^ System ^ Value ^ Range ^
 +| **[[:​bidib-en|BiDiB]]** | [[:​bidib:​bidib-config-en#​unique-id|Unique-ID]] | 32 bit |
 +| **[[:​cbus-en#​addressing|MERG CBUS]]** | Node number | 16 bit |
 +| **[[:​rocnet:​rocnet-prot-en|RocNet]]** | [[:​rocnet:​rocnetnode-setup-en#​id1|Node-ID]] | 16 bit |
 +| Selectrix | Bus | 7 bit | 
 +| **[[:​roco:​roco-z21-en|Roco Z21]]** | Sensor type | 0...2 | \\
 +For all other systems this value can be set to zero and has no effect.\\
 +
 +
 +
 + \\
 +
 +===== Addressing of sensors, switches, signals and outputs =====
 +This page outlines the addressing scheme used in Rocrail, and how to map different manufacturer'​s address settings to Rocrail and vice-versa.\\
 +Towards addressing of switches, signals and outputs see also  __**[[:​addressing:​accessory-pg-en|Addressing Accessory Decoders - A Practical Guide]]**__ ​
 +
 +
 +//This page may not make sense if you are just reading about Rocrail for the first time. You may skip it for now, but refer back here when configuring your devices.// \\
 + \\
 +| Address value zero is in Rocrail regarded as "Not Used"​.\\ Rocrail will decrease the address value by one If the underlaying hardware starts addressing with offset zero. |\\
 +\\
 +
 +=====Glossary=====
 +| iid | interface ID.  Only used if you have more than one Command Station. ​ Leave blank if not sure. |
 +| **[[#​bus|bus]]** | Extra identification;​ System dependent. |
 +| module | collection of ports (Accessory decoder) |
 +| modulesize | number of ports per module (swmodsize) |
 +| port or pair | collection of 2 gates |
 +| gate or coil | output capable of doing ON/OFF |
 +| address | the address of an output is calculated as: module * modulesize + port *2 + gate |
 +| modulo or % | [[http://​en.wikipedia.org/​wiki/​Modulo_operation|the remainder of division]] |
 +\\
 +
 + \\
 +
 +=====Addressing Basics=====
 +Most devices on the layout are controlled by a single Address. Mobile decoders (locomotives) are usually controlled by a single Address.\\
 +Some devices, notably switches and signals connected to stationary/​accessory decoders, are controlled by an __Address and Port pair__. This is because one decoder can handle 2 or more devices.\\
 +The original standard has a single decoder controlling four devices. The decoder has a single Address, but an additional Port parameter is used to select one of four devices at that Address.(NMRA)\\
 + \\
 +A port can have 1 or more Gates. Mobile decoders (locomotives) don't have a Gate, you just use their address. But a typical solenoid turnout needs 2 gates, one for straight and one for turnout. The default for a stationary device is 2 Gates for an Address and Port.\\
 +
 + \\
 +
 +==== NMRA Accessory Decoder ====
 +|  Module 1...1023 ​ ||||||||
 +|  Port 0  ||  Port 1  ||  Port 2  ||  Port 3  ||
 +| gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 |\\
 + \\
 +
 +There are three basic schemes for addressing Stationary Decoders:​\\  ​
 +  - __NMRA like Addressing__ (MADA) specifies the Address of a Module, and then the Port on that module. ​ Each Module has a size, which is the number of Ports it can control. Each Port has two Gates, one for each wire used to switch the device. ​ The number of Ports defaults to 4.
 +  - __Port Addressing__ (PADA) specifies the Address of a single device, using two the Gates.
 +  - __Flat Addressing__ (FADA) specifies the Address of a single Gate.
 +
 +
 +\\
 +=====Module Accessory Decoder Address (MADA)=====
 +This is almost the same as the NMRA addressing except for the Ports, they are numbered from 1 to 4.
 +
 +^ Attribute ^ NMRA ^ MADA ^
 +| addr | 1...1023 | 1...* |
 +| port | 0...3 | 1...4 |
 +| gate | 0...1 | 0...1 |
 +| swmodsize | 4 | 4 |\\
 + \\
 +In Rocrail **gate 0** equals **RED**, and **gate 1** equals **GREEN** on the decoder port/​pair.\\
 + \\
 +^ 1 ^^^^^^^^ 2 ^^^^^^^| MADA (addr) |
 +^ 1 ^^ 2 ^^ 3 ^^ 4 ^^ 1 ^^ 2 ^^ 3 ^^ 4 ^| MADA (port) |
 +| gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 |\\
 + \\
 +
 + \\
 +
 +=====Port Accessory Decoder Address (PADA)=====
 +PADA is a scheme at port level. A module with 4 ports has 4 PADA addresses.\\
 +Port addressing is in between NMRA-DCC and FADA, and is only supported in a few libraries.\\
 + \\
 +| :!: If the address value is set to zero and port > 0 then in some [[controllers-en|libraries]] PADA will be activated. | \\
 + \\
 +===Calculating to PADA from MADA: ===
 +^ PADA = (addr-1) * 4 + port ^
 + \\
 +===Calculating back from PADA to MADA:===
 +  * addr = (PADA-1) / 4 + 1
 +  * port = (PADA-1) modulo 4 + 1
 + \\
 +The PADA points to one gate **pair**, starting with 1 for the first in a system.\\
 +|  Module 1  |||||||| ​ Module 2  ||||||||
 +^ 1 ^^ 2 ^^ 3 ^^ 4 ^^ 5 ^^ 6 ^^ 7 ^^ 8 ^| PADA (port) |
 +| gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 | gate 0 | gate 1 |\\
 + \\
 +
 +=====Flat Accessory Decoder Address (FADA)=====
 +This addressing scheme is at gate(output) level.\\
 +A module with 4 ports has 8 FADA addresses.\\
 + \\
 +| :!: If the port value of a accessory is set to zero and address > 0 then in some [[controllers-en|libraries]] FADA will be activated.| \\
 + \\
 +===Calculating to FADA from MADA:===
 +^ FADA = (addr-1) * 8 + (port-1) * 2 + gate ^
 + \\
 +===Calculating back from FADA to MADA:==
 +  * addr = (FADA / 8) + 1
 +  * port = (FADA modulo 8) / 2 + 1
 +  * gate = (FADA modulo 8) modulo 2
 + \\
 +|  Module 1  |||||||| ​ Module 2  ||||||||
 +|  Port 1  ||  Port 2  ||  Port 3  ||  Port 4  ||  Port 1  ||  Port 2  ||  Port 3  ||  Port 4  ||
 +^ 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6 ^ 7 ^ 8 ^ 9 ^ 10 ^ 11 ^ 12 ^ 13 ^ 14 ^ 15 ^ 16 | FADA (addr) |\\
 +
 + \\
 +Check for FADA/PADA support the [[controllers-en|Command Stations]] page.\\
 +Sensors are always addressed with FADA in Rocrail (see next paragraph). \\
 +
 + \\
 +===== Addressing Sensors =====
 +{{sensor-int-en.png|}}
 +
 + \\
 +Only the **Address** field is looked at. All other fields of the dialogue are described in detail on page **[[:​sensor-int-en|Sensors:​ Interface]]**.
 +
 +Sensors are always addressed flat in Rocrail starting with 1. The address of a single sensor connected to a 16-port sensor module is calculated as follows:
 +^ Address = ( Module - 1 ) * 16 + Port ^
 +
 +> **Example**:​ Port 5 of the second module has the address ( 2 - 1 ) * 16 + 5 = 21
 +
 +> **Note**: With Lenz command stations the first module has the __module address__ 65 and the addressing is based on 8-port modules. The first port of the first module has address 512: \\ ( 65 - 1 ) * 8 + 1 - 1 = 512 or in general
 +
 +^ Address = ( Module - 1 ) * 8 + Port - 1 ^
addressing-en.txt ยท Last modified: 2018/11/12 08:56 (external edit)