@zimo-elektronik/zcan 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +7 -0
- package/.editorconfig +15 -0
- package/.eslintignore +7 -0
- package/.eslintrc.cjs +17 -0
- package/.gitattributes +1 -0
- package/.github/workflows/docs.yml +46 -0
- package/.github/workflows/library.yml +59 -0
- package/.nvmrc +1 -0
- package/.prettierignore +14 -0
- package/.prettierrc.json +8 -0
- package/LICENSE.md +21 -0
- package/README.md +8 -0
- package/__tests__/connection.test.ts +58 -0
- package/__tests__/dataGroup.test.ts +98 -0
- package/__tests__/infoGroup.test.ts +30 -0
- package/__tests__/lanDataGroup.test.ts +82 -0
- package/__tests__/lanInfoGroup.test.ts +41 -0
- package/__tests__/systemControlGroup.test.ts +42 -0
- package/__tests__/trackCfgGroup.test.ts +43 -0
- package/__tests__/util/index.ts +14 -0
- package/__tests__/vehicleGroup.test.ts +128 -0
- package/dist/@types/communication.d.ts +30 -0
- package/dist/@types/communication.js +2 -0
- package/dist/@types/communication.js.map +1 -0
- package/dist/@types/models.d.ts +172 -0
- package/dist/@types/models.js +2 -0
- package/dist/@types/models.js.map +1 -0
- package/dist/MX10.d.ts +45 -0
- package/dist/MX10.js +233 -0
- package/dist/MX10.js.map +1 -0
- package/dist/docs_entrypoint.d.ts +6 -0
- package/dist/docs_entrypoint.js +7 -0
- package/dist/docs_entrypoint.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/bites.d.ts +9 -0
- package/dist/internal/bites.js +10 -0
- package/dist/internal/bites.js.map +1 -0
- package/dist/internal/speedUtils.d.ts +9 -0
- package/dist/internal/speedUtils.js +29 -0
- package/dist/internal/speedUtils.js.map +1 -0
- package/dist/internal/utils.d.ts +1 -0
- package/dist/internal/utils.js +4 -0
- package/dist/internal/utils.js.map +1 -0
- package/dist/util/enums.d.ts +113 -0
- package/dist/util/enums.js +137 -0
- package/dist/util/enums.js.map +1 -0
- package/dist/util/extended-ascii.d.ts +7 -0
- package/dist/util/extended-ascii.js +162 -0
- package/dist/util/extended-ascii.js.map +1 -0
- package/dist/zcan/accessoryCommandGroup.d.ts +6 -0
- package/dist/zcan/accessoryCommandGroup.js +9 -0
- package/dist/zcan/accessoryCommandGroup.js.map +1 -0
- package/dist/zcan/dataGroup.d.ts +31 -0
- package/dist/zcan/dataGroup.js +233 -0
- package/dist/zcan/dataGroup.js.map +1 -0
- package/dist/zcan/fileControlGroup.d.ts +7 -0
- package/dist/zcan/fileControlGroup.js +9 -0
- package/dist/zcan/fileControlGroup.js.map +1 -0
- package/dist/zcan/fileTransferGroup.d.ts +7 -0
- package/dist/zcan/fileTransferGroup.js +9 -0
- package/dist/zcan/fileTransferGroup.js.map +1 -0
- package/dist/zcan/index.d.ts +18 -0
- package/dist/zcan/index.js +19 -0
- package/dist/zcan/index.js.map +1 -0
- package/dist/zcan/infoGroup.d.ts +15 -0
- package/dist/zcan/infoGroup.js +64 -0
- package/dist/zcan/infoGroup.js.map +1 -0
- package/dist/zcan/lanDataGroup.d.ts +23 -0
- package/dist/zcan/lanDataGroup.js +226 -0
- package/dist/zcan/lanDataGroup.js.map +1 -0
- package/dist/zcan/lanInfoGroup.d.ts +11 -0
- package/dist/zcan/lanInfoGroup.js +58 -0
- package/dist/zcan/lanInfoGroup.js.map +1 -0
- package/dist/zcan/lanNetworkGroup.d.ts +11 -0
- package/dist/zcan/lanNetworkGroup.js +37 -0
- package/dist/zcan/lanNetworkGroup.js.map +1 -0
- package/dist/zcan/lanZimoProgrammableScriptGroup.d.ts +7 -0
- package/dist/zcan/lanZimoProgrammableScriptGroup.js +9 -0
- package/dist/zcan/lanZimoProgrammableScriptGroup.js.map +1 -0
- package/dist/zcan/networkGroup.d.ts +10 -0
- package/dist/zcan/networkGroup.js +38 -0
- package/dist/zcan/networkGroup.js.map +1 -0
- package/dist/zcan/propertyConfigGroup.d.ts +7 -0
- package/dist/zcan/propertyConfigGroup.js +9 -0
- package/dist/zcan/propertyConfigGroup.js.map +1 -0
- package/dist/zcan/railwayControlGroup.d.ts +7 -0
- package/dist/zcan/railwayControlGroup.js +9 -0
- package/dist/zcan/railwayControlGroup.js.map +1 -0
- package/dist/zcan/systemControlGroup.d.ts +13 -0
- package/dist/zcan/systemControlGroup.js +35 -0
- package/dist/zcan/systemControlGroup.js.map +1 -0
- package/dist/zcan/trackCfgGroup.d.ts +16 -0
- package/dist/zcan/trackCfgGroup.js +77 -0
- package/dist/zcan/trackCfgGroup.js.map +1 -0
- package/dist/zcan/trainControlGroup.d.ts +8 -0
- package/dist/zcan/trainControlGroup.js +19 -0
- package/dist/zcan/trainControlGroup.js.map +1 -0
- package/dist/zcan/vehicleGroup.d.ts +26 -0
- package/dist/zcan/vehicleGroup.js +145 -0
- package/dist/zcan/vehicleGroup.js.map +1 -0
- package/dist/zcan/zimoProgrammableScriptGroup.d.ts +7 -0
- package/dist/zcan/zimoProgrammableScriptGroup.js +9 -0
- package/dist/zcan/zimoProgrammableScriptGroup.js.map +1 -0
- package/gulpfile.js +37 -0
- package/jest.config.js +26 -0
- package/package.json +50 -0
- package/protocol_docs/README.md +41 -0
- package/protocol_docs/babel.config.js +3 -0
- package/protocol_docs/docs/command-groups/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/accessories/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/accessories/accessory-state.md +7 -0
- package/protocol_docs/docs/command-groups/command-groups.md +50 -0
- package/protocol_docs/docs/command-groups/data/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/data/data-name-extended.md +60 -0
- package/protocol_docs/docs/command-groups/data/group-count.md +52 -0
- package/protocol_docs/docs/command-groups/data/item-fx-info.md +27 -0
- package/protocol_docs/docs/command-groups/data/item-image-config.md +44 -0
- package/protocol_docs/docs/command-groups/data/item-list-by-index.md +45 -0
- package/protocol_docs/docs/command-groups/data/item-list-by-nid.md +43 -0
- package/protocol_docs/docs/command-groups/data/remove-train.md +33 -0
- package/protocol_docs/docs/command-groups/info/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/info/bidi-info.md +34 -0
- package/protocol_docs/docs/command-groups/lan-data/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/lan-data/data-value-extended.md +65 -0
- package/protocol_docs/docs/command-groups/lan-data/loco-gui-extended.md +48 -0
- package/protocol_docs/docs/command-groups/lan-info/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/lan-info/module-power-info.md +26 -0
- package/protocol_docs/docs/command-groups/lan-network/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/lan-network/open-port.md +47 -0
- package/protocol_docs/docs/command-groups/network/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/network/ping.md +49 -0
- package/protocol_docs/docs/command-groups/system/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/system/system-state.md +59 -0
- package/protocol_docs/docs/command-groups/track/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/track/tse-prog-read.md +37 -0
- package/protocol_docs/docs/command-groups/track/tse-prog-write.md +35 -0
- package/protocol_docs/docs/command-groups/train/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/train/train-part-find.md +33 -0
- package/protocol_docs/docs/command-groups/vehicles/_category_.json +4 -0
- package/protocol_docs/docs/command-groups/vehicles/vehicle-function.md +36 -0
- package/protocol_docs/docs/command-groups/vehicles/vehicle-mode.md +143 -0
- package/protocol_docs/docs/command-groups/vehicles/vehicle-special-function-switch.md +35 -0
- package/protocol_docs/docs/command-groups/vehicles/vehicle-speed.md +55 -0
- package/protocol_docs/docs/description.md +4 -0
- package/protocol_docs/docs/introduction/_category_.json +4 -0
- package/protocol_docs/docs/introduction/how-it-works.md +61 -0
- package/protocol_docs/docs/introduction/implementation.md +39 -0
- package/protocol_docs/docs/introduction/interface.md +62 -0
- package/protocol_docs/docs/introduction/introduction.md +82 -0
- package/protocol_docs/docusaurus.config.js +111 -0
- package/protocol_docs/package-lock.json +25611 -0
- package/protocol_docs/package.json +47 -0
- package/protocol_docs/sidebars.js +22 -0
- package/protocol_docs/src/components/CommandAndGroup/index.tsx +16 -0
- package/protocol_docs/src/components/CommandAndGroup/styles.module.css +12 -0
- package/protocol_docs/src/components/HomepageFeatures/index.tsx +70 -0
- package/protocol_docs/src/components/HomepageFeatures/styles.module.css +11 -0
- package/protocol_docs/src/css/custom.css +76 -0
- package/protocol_docs/src/pages/index.module.css +23 -0
- package/protocol_docs/src/pages/index.tsx +41 -0
- package/protocol_docs/src/pages/markdown-page.md +7 -0
- package/protocol_docs/static/.nojekyll +0 -0
- package/protocol_docs/static/img/docusaurus.png +0 -0
- package/protocol_docs/static/img/favicon.ico +0 -0
- package/protocol_docs/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/protocol_docs/static/img/undraw_docusaurus_react.svg +170 -0
- package/protocol_docs/static/img/undraw_docusaurus_tree.svg +40 -0
- package/protocol_docs/static/typedoc/index.html +10 -0
- package/protocol_docs/tsconfig.json +7 -0
- package/src/@types/communication.ts +73 -0
- package/src/@types/models.ts +215 -0
- package/src/MX10.ts +351 -0
- package/src/docs_entrypoint.ts +34 -0
- package/src/index.ts +8 -0
- package/src/internal/bites.ts +11 -0
- package/src/internal/speedUtils.ts +36 -0
- package/src/internal/utils.ts +3 -0
- package/src/util/enums.ts +147 -0
- package/src/util/extended-ascii.ts +179 -0
- package/src/zcan/accessoryCommandGroup.ts +24 -0
- package/src/zcan/dataGroup.ts +342 -0
- package/src/zcan/fileControlGroup.ts +25 -0
- package/src/zcan/fileTransferGroup.ts +25 -0
- package/src/zcan/index.ts +37 -0
- package/src/zcan/infoGroup.ts +90 -0
- package/src/zcan/lanDataGroup.ts +361 -0
- package/src/zcan/lanInfoGroup.ts +86 -0
- package/src/zcan/lanNetworkGroup.ts +70 -0
- package/src/zcan/lanZimoProgrammableScriptGroup.ts +25 -0
- package/src/zcan/networkGroup.ts +71 -0
- package/src/zcan/propertyConfigGroup.ts +25 -0
- package/src/zcan/railwayControlGroup.ts +25 -0
- package/src/zcan/systemControlGroup.ts +62 -0
- package/src/zcan/trackCfgGroup.ts +109 -0
- package/src/zcan/trainControlGroup.ts +48 -0
- package/src/zcan/vehicleGroup.ts +267 -0
- package/src/zcan/zimoProgrammableScriptGroup.ts +25 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +49 -0
- package/tsconfig.test.json +9 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: data-value-extended
|
|
3
|
+
title: Data Value Extended
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="17" command="08"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x08_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| NID | Unused 🚧 | Flag bytes | Unused 🚧 | Track mode | Function count | Unused 🚧 | Speed and direction | Functions | Special functions |
|
|
16
|
+
|--------|-----------|------------|-----------|------------|----------------|-----------|---------------------|-----------|-------------------|
|
|
17
|
+
| 16 Bit | 16 Bit | 32 Bit | 128 Bit | 8 Bit | 8 Bit | 144 Bit | 16 Bit | 32 Bit | 32 Bit |
|
|
18
|
+
|
|
19
|
+
### Speed and direction flags
|
|
20
|
+
|
|
21
|
+
| Bit | Meaning |
|
|
22
|
+
|-----------|----------------------------------------------------------------------------------------------------------------------------------|
|
|
23
|
+
| 0 ... 9 | Vehicle speed. Note: For all track formats, the maximum ZIMO speed is 1008. Values > 1008 are automatically scaled to 1008. |
|
|
24
|
+
| 10 | Direction instruction (client to MX10)<br/> '0' ➔ Forward<br/> '1' ➔ Backward |
|
|
25
|
+
| 11 | Current track direction (MX10 to client)<br/> '0' ➔ Forward<br/> '1' ➔ Backward |
|
|
26
|
+
| 12 ... 13 | Sideways <br/>'0' ➔ Undefined<br/> '1' ➔ East<br/> '2' ➔ West |
|
|
27
|
+
| 14 | Unused 🚧 |
|
|
28
|
+
| 15 | Vehicle Emergency Stop |
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Track mode flags
|
|
32
|
+
|
|
33
|
+
| Bit | Meaning |
|
|
34
|
+
|---------|--------------------------------------------------------------------------------------------|
|
|
35
|
+
| 4 ... 7 | 0: unknown<br/> 1: DCC<br/> 2: MM2<br/> 3: not defined<br/> 4: mfx<br/> 7: System Use<br/> |
|
|
36
|
+
|
|
37
|
+
### Flag bytes 🚧
|
|
38
|
+
|
|
39
|
+
:::caution Under construction🚧
|
|
40
|
+
|
|
41
|
+
Description of flags is needed
|
|
42
|
+
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
### Special functions
|
|
46
|
+
|
|
47
|
+
| Bit | Meaning |
|
|
48
|
+
|---------|-------------------------|
|
|
49
|
+
| 0 ... 3 | Shunting function state |
|
|
50
|
+
| 4 ... 5 | Manual mode state |
|
|
51
|
+
|
|
52
|
+
## Sending
|
|
53
|
+
|
|
54
|
+
When sending command _0x08_ the 'Data' section will look like this:
|
|
55
|
+
|
|
56
|
+
| Mx10 NID | NID | 0 |
|
|
57
|
+
|----------|--------|--------|
|
|
58
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:::note
|
|
62
|
+
|
|
63
|
+
Mode should be set to 0b00.
|
|
64
|
+
|
|
65
|
+
:::
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: loco-gui-extended
|
|
3
|
+
title: Loco Gui Extended
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="17" command="27"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x27_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| NID | Sub ID | Vehicle group | Name | Image ID | Tacho | Speed forward | Speed rev 🚧 What is this? (Rev as max rev on cars?) | Speed range | Drive type | Era | Country code | Icons 🚧 What is done with icons? |
|
|
16
|
+
|--------|--------|---------------|----------|----------|--------|---------------|------------------------------------------------------|-------------|------------|--------|--------------|-----------------------------------|
|
|
17
|
+
| 16 Bit | 16 Bit | 16 Bit | 26 Bytes | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 64 Bytes |
|
|
18
|
+
|
|
19
|
+
### Era parsing 🚧
|
|
20
|
+
|
|
21
|
+
:::caution Under construction🚧
|
|
22
|
+
|
|
23
|
+
Further description is needed! Is the era parsing needed and if so then explain
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
### Functions 🚧
|
|
28
|
+
|
|
29
|
+
:::caution Under construction🚧
|
|
30
|
+
|
|
31
|
+
Further description is needed! Explain What is done with functions
|
|
32
|
+
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Sending
|
|
36
|
+
|
|
37
|
+
When sending command _0x27_ the 'Data' section will look like this:
|
|
38
|
+
|
|
39
|
+
| Mx10 NID | NID | 0 |
|
|
40
|
+
|----------|--------|--------|
|
|
41
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
:::note
|
|
45
|
+
|
|
46
|
+
Mode should be set to 0b00.
|
|
47
|
+
|
|
48
|
+
:::
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: module-power-info
|
|
3
|
+
title: Module Power Info
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="18" command="00"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
If a PC software/client has 'long' data-grams enabled, the MX10 sends its track status, current and voltage values in a 'long' data-gram.
|
|
14
|
+
|
|
15
|
+
When receiving command _0x00_ the 'Data' section will look like this:
|
|
16
|
+
|
|
17
|
+
| Device NID | Port 1 | Port 1 voltage | Port 1 amperage | Port 2 | Port 2 voltage | Port 2 amperage | Amperage 32V | Amperage 12V | Voltage total | Temperature |
|
|
18
|
+
|------------|--------|----------------|-----------------|--------|----------------|-----------------|--------------|--------------|---------------|-------------|
|
|
19
|
+
| 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit | 16 Bit |
|
|
20
|
+
The 'Device NID' is the Network Id of the queried device, or the Network Id of the source of the Power Info message. This can be (currently 2020.05.18) the master MX10(ec), MX10 booster or StEin[e].
|
|
21
|
+
|
|
22
|
+
:::info Recommendation
|
|
23
|
+
|
|
24
|
+
A PC software MUST be prepared to send more data bytes!!! Depending on future requirements the MX10 will send more status information.
|
|
25
|
+
|
|
26
|
+
:::
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: open-port
|
|
3
|
+
title: Open Port
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="1a" command="0e"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x0e_ , NID is used from message data-gram for connection!
|
|
14
|
+
|
|
15
|
+
## Sending
|
|
16
|
+
|
|
17
|
+
When sending command _0x0e_ the 'Data' section will look like this:
|
|
18
|
+
|
|
19
|
+
| Options | App code | App name |
|
|
20
|
+
|---------|----------|-------------|
|
|
21
|
+
| 32 Bit | 32 Bit | 0 ... x Bit |
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
With this data-gram a device can 'open' the Ethernet interface of the MX10. In response, the device receives a 'ping' from the MX10.
|
|
25
|
+
|
|
26
|
+
With length '0' a simple 'Open' of the interface takes place, further specifications are not necessary.
|
|
27
|
+
|
|
28
|
+
If length is greater than 8, then:
|
|
29
|
+
|
|
30
|
+
- The first 4 bytes contain options
|
|
31
|
+
- In the bytes 5 ... 8 an application identifier (unique program identifier) follows. After that up to 24 characters can be sent as application name.
|
|
32
|
+
- This name is used in various displays on MX10 and MX32.
|
|
33
|
+
|
|
34
|
+
If NO name is sent, the 32 bit identifier is displayed, if this is not sent either, then simply 'PC control' is displayed. This is especially user unfriendly for larger systems.
|
|
35
|
+
|
|
36
|
+
### Options
|
|
37
|
+
|
|
38
|
+
| Bit | Content |
|
|
39
|
+
|-----------|----------------------------------|
|
|
40
|
+
| 0 | Long message |
|
|
41
|
+
| 1 | Free |
|
|
42
|
+
| 2 ... 7 | Multi list |
|
|
43
|
+
| 8 ... 22 | Free |
|
|
44
|
+
| 23 | Connection lost ➔ Stop all locos |
|
|
45
|
+
| 24 | Debug Output |
|
|
46
|
+
| 25 ... 31 | Free |
|
|
47
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ping
|
|
3
|
+
title: Ping
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="0a" command="00"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x00_ you use the NID provided in the message!
|
|
14
|
+
|
|
15
|
+
With a ping request devices can ask other devices on the CAN bus to respond with a ping ack. This allows each device to check whether the other device(s) is/are present. The NId of a specific device can be specified in the request. In this case the device answers immediately, the sender can therefore assume after approx. 100mS that the device is responding or is not available at the moment. If instead of a concrete NId a group NId (e.g. 0xD000 for new modules) is requested, all devices of this group will answer with a random NId. devices of this group answer with a random delay of up to 1000mS.
|
|
16
|
+
|
|
17
|
+
All devices should send a ping regularly! The following criteria should be observed:
|
|
18
|
+
|
|
19
|
+
- After starting the device should ping at least once within the first second.
|
|
20
|
+
- The time intervals should have a deliberate jitter by a random value.
|
|
21
|
+
- At low CAN bus load each module should send one ping between 500 and 1000mS.
|
|
22
|
+
|
|
23
|
+
**Exceptions** (slower ping):
|
|
24
|
+
|
|
25
|
+
- At high CAN bus utilization (> 500 messages/second) pings should be omitted. In any case one ping must be sent every 5000mS.
|
|
26
|
+
- If the device itself has many messages to send, the ping can also be omitted.
|
|
27
|
+
- In any case, each device MUST send at least ONE message every 5000mS on the CAN bus that is VALID!!!
|
|
28
|
+
|
|
29
|
+
The primary control panel sends this command approximately every 500ms, but at least every second.
|
|
30
|
+
|
|
31
|
+
With this command, the connected modules should recognize that they are still connected to the known control panel. The session number must also be checked. This session number is incremented by the central unit with every UID change. This happens e.g.: when the control panel adds a new object to your object list or when an existing object is removed. or if an existing object is deleted from this list. If a module detects that it is connected to an 'unknown' control center, it must initiate a login process.
|
|
32
|
+
|
|
33
|
+
## Sending
|
|
34
|
+
|
|
35
|
+
When sending command _0x00_ the 'Data' section will look like this:
|
|
36
|
+
|
|
37
|
+
| Mx10 NID |
|
|
38
|
+
|----------|
|
|
39
|
+
| 16 Bit |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Sending [0x0a, 0x07]
|
|
43
|
+
|
|
44
|
+
When sending command _0x00_ the 'Data' section will look like this:
|
|
45
|
+
|
|
46
|
+
| Mx10 NID |
|
|
47
|
+
|----------|
|
|
48
|
+
| 16 Bit |
|
|
49
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: system-state
|
|
3
|
+
title: System State
|
|
4
|
+
sidebar_position: 0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="00" command="00"/>
|
|
10
|
+
|
|
11
|
+
The Command Group 0x00 summarizes all system 'High-Priority' commands and must be implemented by all boosters and drive consoles.
|
|
12
|
+
|
|
13
|
+
With Cmd=0x00/M=0b00 the power status of the respective device can be queried.
|
|
14
|
+
|
|
15
|
+
:::caution
|
|
16
|
+
|
|
17
|
+
A query immediately after a Power Command can lead to inconsistent answers! After a Power Mode Command the device (specified by NId, e.g.: MX10, StEin, ...)) changes to the desired mode, but this is only reported AFTER the internal control loops have executed the change and it is verified by measurements. This process can take several 100ms depending on the desired change!
|
|
18
|
+
|
|
19
|
+
:::
|
|
20
|
+
|
|
21
|
+
With Cmd=0x00/M=0b01 the port power status of the device can be set. The current status is 'acknowledged' by Cmd=0x00/M=0b11. The valid status is also included in the regular (approx. 500ms) power message.
|
|
22
|
+
|
|
23
|
+
The object ports are binary coded and this combinations are allowed:
|
|
24
|
+
|
|
25
|
+
| Port | Output |
|
|
26
|
+
|------------|---------------------------------------------------|
|
|
27
|
+
| 0b00000001 | Rail 1 |
|
|
28
|
+
| 0b00000010 | Rail 2 |
|
|
29
|
+
| 0b0………. 00 | Track 3 ... 7 (Further MX10 in booster mode) |
|
|
30
|
+
| 0b10000000 | Booster output, resp. track output 8 at MX9/StEin |
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
_Therefore, to switch ALL outputs with one command, port 255 (=0xFF, =0b111111) must be used._
|
|
34
|
+
|
|
35
|
+
:::caution
|
|
36
|
+
|
|
37
|
+
If several outputs are switched at the same time, the confirmation still takes place individually for each of the 'existing' ports. So if e.g.: no further MX10 is available in booster mode, there will be NO ACK for these non-existent rails!
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
Applications (whether via PC interface or one of the internal bus systems) should ALWAYS wait for the ACK of the MX10 after a power mode change. ALWAYS wait for the respective ACK of the MX10, which basically makes a 'query' unnecessary.
|
|
42
|
+
|
|
43
|
+
## Receiving
|
|
44
|
+
|
|
45
|
+
When receiving command _0x00_ the 'Data' section will look like this:
|
|
46
|
+
|
|
47
|
+
| Device NID | Port | Mode state |
|
|
48
|
+
|------------|-------|------------|
|
|
49
|
+
| 16 Bit | 8 Bit | 8 Bit |
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## Sending
|
|
53
|
+
|
|
54
|
+
When sending command _0x00_ the 'Data' section will look like this:
|
|
55
|
+
|
|
56
|
+
| Device NID | Port | Mode state |
|
|
57
|
+
|------------|-------|------------|
|
|
58
|
+
| 16 Bit | 8 Bit | 8 Bit |
|
|
59
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: tse-prog-read
|
|
3
|
+
title: TSE Prog Read
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="16" command="08"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x08_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
With the TSE Read commands CV's can be read from a decoder. The selected TSE mode (Cmd=0x00) decides whether this should be done by POM (default) or Service Mode commands.
|
|
16
|
+
|
|
17
|
+
| System NID | Vehicle NID | Config number | Value |
|
|
18
|
+
|------------|-------------|---------------|-------|
|
|
19
|
+
| 16 Bit | 16 Bit | 32 Bit | 8 Bit |
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
The command (0b01) causes the command station (NID) to send a 'Config Read' command to the rail decoder (vehicle NID). As long as the read command is 'active', the progress will be reported by TSE Info's. AAs soon as the control panel has the desired config value, this is signaled by a 'TSE Read ACK' telegram.
|
|
23
|
+
|
|
24
|
+
:::danger
|
|
25
|
+
|
|
26
|
+
After Read/Write commands the respective control unit (MX32, PC, ...) should keep a pause of approx. 200mS. This serves that other rail commands can be processed.
|
|
27
|
+
|
|
28
|
+
:::
|
|
29
|
+
|
|
30
|
+
## Sending
|
|
31
|
+
|
|
32
|
+
When sending command _0x08_ the 'Data' section will look like this:
|
|
33
|
+
|
|
34
|
+
| Train address | CV |
|
|
35
|
+
|---------------|--------|
|
|
36
|
+
| 16 Bit | 32 Bit |
|
|
37
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: tse-prog-write
|
|
3
|
+
title: TSE Prog Write
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="16" command="09"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x09_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| System NID | Vehicle NID | Config number | Value |
|
|
16
|
+
|------------|-------------|---------------|-------|
|
|
17
|
+
| 16 Bit | 16 Bit | 32 Bit | 8 Bit |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
The command (0b01) causes the command station (NID) to send a 'Config Write' command to the rail decoder (vehicle NID). As long as the write command is 'active', the progress will be reported by TSE Info's. As soon as the command station writes the desired Config value, this is reported by a 'TSE Write ACK' telegram.
|
|
21
|
+
|
|
22
|
+
:::danger
|
|
23
|
+
|
|
24
|
+
After Read/Write commands the respective control unit (MX32, PC, ...) should keep a pause of approx. 200mS. This serves that other rail commands can be processed.
|
|
25
|
+
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
## Sending
|
|
29
|
+
|
|
30
|
+
When sending command _0x09_ the 'Data' section will look like this:
|
|
31
|
+
|
|
32
|
+
| Train address | CV | Value |
|
|
33
|
+
|---------------|--------|-------|
|
|
34
|
+
| 16 Bit | 32 Bit | 8 Bit |
|
|
35
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: train-part-find
|
|
3
|
+
title: Train Part Find
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="05" command="02"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x02_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| NID | Train NID | Owner NID | State |
|
|
16
|
+
|--------|-----------|-----------|--------|
|
|
17
|
+
| 16 Bit | 16 Bit | 16 Bit | 16 Bit |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Sending
|
|
21
|
+
|
|
22
|
+
When sending command _0x02_ the 'Data' section will look like this:
|
|
23
|
+
|
|
24
|
+
| NID |
|
|
25
|
+
|--------|
|
|
26
|
+
| 16 Bit |
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
:::note
|
|
30
|
+
|
|
31
|
+
Mode should be set to 0b00.
|
|
32
|
+
|
|
33
|
+
:::
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: vehicle-function
|
|
3
|
+
title: Vehicle Function
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="02" command="04"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x04_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| NID | Function number | Function state |
|
|
16
|
+
|--------|-----------------|----------------|
|
|
17
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
18
|
+
|
|
19
|
+
If Mode = 0b00, then the function of the locomotive with 'NID' and the function 'No.' is queried. <br/> If Mode = 0b01, then the locomotive function 'Function number' of the locomotive 'NID' is set to the specified value. <br/> If Mode = 0b11, then the loco responds to a function value query. <br/> Where function state = 0x00 always means "Off" and function state not equal to 0x00 depends on the respective locomotive decoder. For "normal" DCC and MM locomotive decoders this is interpreted as the function being "On".
|
|
20
|
+
|
|
21
|
+
The 'Function number' is divided into several areas for this command:
|
|
22
|
+
|
|
23
|
+
| From function number | To function number | Description | Valid values |
|
|
24
|
+
|----------------------|--------------------|---------------------------------------------------------------------------------------------|--------------|
|
|
25
|
+
| 0 | 31 | The known 'normal' functions. The maximum function number depends on the respective format. | On/Off |
|
|
26
|
+
| 256 | 512 | 256 analog functions | 0 ... 255 |
|
|
27
|
+
| 32768 | 65536 | Binary States (see NMRA 9.2.1) | On/Off |
|
|
28
|
+
|
|
29
|
+
## Sending
|
|
30
|
+
|
|
31
|
+
When sending command _0x04_ the 'Data' section will look like this:
|
|
32
|
+
|
|
33
|
+
| Vehicle address | Function ID | Function status |
|
|
34
|
+
|-----------------|-------------|-----------------|
|
|
35
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
36
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: vehicle-mode
|
|
3
|
+
title: Vehicle Mode
|
|
4
|
+
sidebar_position: 0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="02" command="01"/>
|
|
10
|
+
|
|
11
|
+
These data-grams are used to query or set the vehicle's operating mode. In order for the MX10 to control the vehicle, the operating parameters must be known. The operating parameters of the vehicle can/must be determined by the PC software! To do this, it can query them first and add only the "unknown" parameters, or simply send "your" parameters as a command. In any case, the MX10 works with the last defined (received) vehicle parameters and stores them on the end of operation.
|
|
12
|
+
|
|
13
|
+
## Receiving
|
|
14
|
+
|
|
15
|
+
When receiving command _0x01_ the 'Data' section will look like this:
|
|
16
|
+
|
|
17
|
+
| NID | Mode1 | Mode2 | Mode3 |
|
|
18
|
+
|--------|-------|-------|-------|
|
|
19
|
+
| 16 Bit | 8 Bit | 8 Bit | 8 Bit |
|
|
20
|
+
|
|
21
|
+
Mode=0b00 allows the control unit to query the current operating parameters for a vehicle. With a response with M1=0x00 and M2=0x00 the respective vehicle is unknown to the MX10.
|
|
22
|
+
|
|
23
|
+
### Mode 1 flags
|
|
24
|
+
|
|
25
|
+
| Bit | Meaning |
|
|
26
|
+
|---------|--------------------------------------------------------------------------------------------------------------------------------|
|
|
27
|
+
| 0 ... 3 | **Speed Steps:** <br/> 0: 'unknown<br/> 1: 14FS<br/> 2: 27FS<br/> 3: 28FS<br/> 4: 128FS<br/> 5: 1024FS<br/> 6 - 7: not defined |
|
|
28
|
+
| 4 ... 7 | **Operating mode:** <br/> 0: unknown<br/> 1: DCC<br/> 2: MM2<br/> 3: not defined<br/> 4: mfx<br/> 7: System Use |
|
|
29
|
+
|
|
30
|
+
### Mode 2 flags
|
|
31
|
+
|
|
32
|
+
| Bit | Meaning |
|
|
33
|
+
|---------|---------------------------------------------------------|
|
|
34
|
+
| 0 ... 7 | Max. Number of functions: None (0) to currently max. 32 |
|
|
35
|
+
|
|
36
|
+
### Mode 3 flags
|
|
37
|
+
|
|
38
|
+
| Bit | Meaning |
|
|
39
|
+
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
40
|
+
| 0 | Pulse Fx (functions are thus sent pulse chain, LGB) |
|
|
41
|
+
| 1 | Analog Fx (Analog Functions) |
|
|
42
|
+
| 2 ... 3 | **Speed Limit SIMO / Speed Limit NMRA**<br/> 0b00 = Do not send Speed Limit<br/> 0b01 = Send NMRA Speed Limit<br/> 0b10 = Send ZIMO Speed Limit |
|
|
43
|
+
| 4 ... 7 | Not defined |
|
|
44
|
+
|
|
45
|
+
## Sending
|
|
46
|
+
|
|
47
|
+
When sending command _0x01_ the 'Data' section will look like this:
|
|
48
|
+
|
|
49
|
+
| Vehicle address |
|
|
50
|
+
|-----------------|
|
|
51
|
+
| 16 Bit |
|
|
52
|
+
|
|
53
|
+
## Summary table
|
|
54
|
+
|
|
55
|
+
<html>
|
|
56
|
+
|
|
57
|
+
<head> <link rel="stylesheet" href="../../../src/css/custom.css"></link> </head>
|
|
58
|
+
<body>
|
|
59
|
+
|
|
60
|
+
<table>
|
|
61
|
+
<thead>
|
|
62
|
+
<tr>
|
|
63
|
+
<th> Byte </th>
|
|
64
|
+
<th> Length (in Bytes) </th>
|
|
65
|
+
<th> Name </th>
|
|
66
|
+
<th> Description </th>
|
|
67
|
+
</tr>
|
|
68
|
+
</thead>
|
|
69
|
+
<tbody>
|
|
70
|
+
<tr>
|
|
71
|
+
<td> 0 </td>
|
|
72
|
+
<td> 2 </td>
|
|
73
|
+
<td> NID </td>
|
|
74
|
+
<td> Some identification number </td>
|
|
75
|
+
</tr>
|
|
76
|
+
<tr>
|
|
77
|
+
<td rowspan="1"> 2 </td>
|
|
78
|
+
<td rowspan="1"> 1 </td>
|
|
79
|
+
<td> Mode 1 </td>
|
|
80
|
+
<td class="tables">
|
|
81
|
+
<table class="tables">
|
|
82
|
+
<thead>
|
|
83
|
+
<tr>
|
|
84
|
+
<td class="tablesBitCol"> Bit </td>
|
|
85
|
+
<td class="tablesDescriptionCol"> Description </td>
|
|
86
|
+
</tr>
|
|
87
|
+
</thead>
|
|
88
|
+
<tbody>
|
|
89
|
+
<tr>
|
|
90
|
+
<td> 0 ... 3 </td>
|
|
91
|
+
<td> <strong>Speed Steps:</strong> <br /> 0: 'unknown<br /> 1: 14FS<br /> 2: 27FS<br /> 3: 28FS<br /> 4: 128FS<br /> 5: 1024FS<br /> 6 - 7: not defined </td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td> 4 ... 7 </td>
|
|
95
|
+
<td> <strong>Operating mode:</strong> <br /> 0: unknown<br /> 1: DCC<br /> 2: MM2<br /> 3: not defined<br /> 4: mfx<br /> 7: System Use </td>
|
|
96
|
+
</tr>
|
|
97
|
+
</tbody>
|
|
98
|
+
</table>
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<td> 3 </td>
|
|
103
|
+
<td> 1 </td>
|
|
104
|
+
<td> Mode 2 </td>
|
|
105
|
+
<td> Max. Number of functions: None (0) to currently max. 32 </td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td rowspan="1"> 4 </td>
|
|
109
|
+
<td rowspan="1"> 1 </td>
|
|
110
|
+
<td> Mode 3 </td>
|
|
111
|
+
<td class="tables">
|
|
112
|
+
<table class="tables">
|
|
113
|
+
<thead>
|
|
114
|
+
<tr>
|
|
115
|
+
<td class="tablesBitCol"> Bit </td>
|
|
116
|
+
<td class="tablesDescriptionCol"> Description </td>
|
|
117
|
+
</tr>
|
|
118
|
+
</thead>
|
|
119
|
+
<tbody>
|
|
120
|
+
<tr>
|
|
121
|
+
<td> 0 </td>
|
|
122
|
+
<td> Pulse Fx (functions are thus sent pulse chain, LGB) </td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td> 1 </td>
|
|
126
|
+
<td> Analog Fx (Analog Functions) </td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td> 2 ... 3 </td>
|
|
130
|
+
<td> <strong>Speed Limit SIMO / Speed Limit NMRA</strong><br /> 0b00 = Do not send Speed Limit<br /> 0b01 = Send NMRA Speed Limit<br /> 0b10 = Send ZIMO Speed Limit </td>
|
|
131
|
+
</tr>
|
|
132
|
+
<tr>
|
|
133
|
+
<td> 4 ... 7 </td>
|
|
134
|
+
<td> Not defined </td>
|
|
135
|
+
</tr>
|
|
136
|
+
</tbody>
|
|
137
|
+
</table>
|
|
138
|
+
</td>
|
|
139
|
+
</tr>
|
|
140
|
+
</tbody>
|
|
141
|
+
</table>
|
|
142
|
+
</body>
|
|
143
|
+
</html>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: vehicle-special-function-switch
|
|
3
|
+
title: Vehicle Special Function Switch
|
|
4
|
+
sidebar_position: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CommandAndGroup from '@site/src/components/CommandAndGroup';
|
|
8
|
+
|
|
9
|
+
<CommandAndGroup group="02" command="05"/>
|
|
10
|
+
|
|
11
|
+
## Receiving
|
|
12
|
+
|
|
13
|
+
When receiving command _0x05_ the 'Data' section will look like this:
|
|
14
|
+
|
|
15
|
+
| NID | Special function mode | Special function value |
|
|
16
|
+
|--------|-----------------------|------------------------|
|
|
17
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Special function mode and values
|
|
21
|
+
|
|
22
|
+
| Special function mode | Description | Special function value |
|
|
23
|
+
|-----------------------|-------------------|---------------------------------------------------------------|
|
|
24
|
+
| 1 | Manual | OFF = 0<br/> ON = 1 |
|
|
25
|
+
| 2 | Shunting function | OFF = 0<br/> AZBZ = 1<br/> Half = 2 |
|
|
26
|
+
| 3 | DirectionDefault | No change = 0<br/> Direction East = 1<br/> Direction West = 2 |
|
|
27
|
+
|
|
28
|
+
## Sending
|
|
29
|
+
|
|
30
|
+
When sending command _0x05_ the 'Data' section will look like this:
|
|
31
|
+
|
|
32
|
+
| NID | Special function mode | Special function value |
|
|
33
|
+
|--------|-----------------------|------------------------|
|
|
34
|
+
| 16 Bit | 16 Bit | 16 Bit |
|
|
35
|
+
|