addressing-en
Differences
This shows you the differences between two versions of the page.
— | addressing-en [2024/04/14 15:19] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Addressing & Co.====== | ||
+ | [[english|{{ | ||
+ | [[english|Content]] -> [[english# | ||
+ | * [[rocrail-components-en|Rocrail' | ||
+ | * [[addressing-examples-en|Examples]] | [[: | ||
+ | \\ | ||
+ | |||
+ | ^ __[[: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====IID or Interface ID===== | ||
+ | Unique identification of a __**[[: | ||
+ | * 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 __**[[: | ||
+ | * IDs are __case sensitive__. | ||
+ | * An ID must be unique in its object group. | ||
+ | * Commas and other special characters are not allowed. (ASCII 7bit) | ||
+ | * Replace blanks with dots or underscores. __Blanks in IDs will lead to unexpected behaviour.__ | ||
+ | * An ID for Block, Turntable, Staging Block and FiddleYard must be unique. (Block based objects.) | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====CSV Lists===== | ||
+ | CSV lists in Rocrail must be separated with commas __without any additional blanks__.\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Node ID (Bus)===== | ||
+ | The meaning of the Node ID variable depends on the used system: | ||
+ | ^ System ^ Value ^ Range ^ Remark ^ | ||
+ | | **[[: | ||
+ | | **[[: | ||
+ | | RCAN | Node ID | 8 bit | Zero is reserved for broadcast. | | ||
+ | | **[[: | ||
+ | | Selectrix | Bus | 7 bit | | ||
+ | | **[[: | ||
+ | | **[[: | ||
+ | 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' | ||
+ | Towards addressing of switches, signals and outputs see also __**[[: | ||
+ | |||
+ | |||
+ | //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" | ||
+ | \\ | ||
+ | |||
+ | =====Glossary===== | ||
+ | | iid | interface ID. Only used if you have more than one Command Station. | ||
+ | | **[[# | ||
+ | | 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:// | ||
+ | \\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====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/ | ||
+ | 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.\\ | ||
+ | \\ | ||
+ | **Note:** __[[: | ||
+ | \\ | ||
+ | |||
+ | ==== 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. | ||
+ | - __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/ | ||
+ | \\ | ||
+ | ^ 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 |||||||| | ||
+ | ^ 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 |||||||| | ||
+ | | 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+1) |\\ | ||
+ | |||
+ | \\ | ||
+ | Check for FADA/PADA support the [[controllers-en|Command Stations]] page.\\ | ||
+ | Sensors are always addressed with FADA in Rocrail (see next paragraph). \\ | ||
+ | |||
+ | \\ | ||
+ | ===== Addressing Sensors ===== | ||
+ | | The __[[: | ||
+ | |||
+ | |||
+ | {{sensor-int-en.png? | ||
+ | |||
+ | \\ | ||
+ | Only the **Address** field is looked at. All other fields of the dialogue are described in detail on page **[[: | ||
+ | |||
+ | 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**: | ||
+ | |||
+ | > **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 ^ | ||
+ | |||
+ | > **Note**: With SwitchPilots from ESU, it is possible that the address is prefixed with 16. |