TDT-Protocol on CAN » Historie » Version 102
Maximilian Seesslen, 09.09.2024 16:44
| 1 | 12 | Maximilian Seesslen | h1. Intro |
|---|---|---|---|
| 2 | 1 | Maximilian Seesslen | |
| 3 | 95 | Maximilian Seesslen | With the TDT-Protocol sensors can send their values on the BUS without necessarily knowing about complex object catalogue. |
| 4 | An monitor-software is able to display sensor values of nodes without knowing anything about the sensors or their configuration. |
||
| 5 | An XML file can be used for supplement for an monitor software. |
||
| 6 | The CANId consists of an function code and the node id. Like CANOpen the function code is 4 Bits and the Node-ID is 7 Bit. |
||
| 7 | 46 | Maximilian Seesslen | In CAN2.0A there can only be 128 Nodes. |
| 8 | 1 | Maximilian Seesslen | |
| 9 | 35 | Maximilian Seesslen | CAN 2.0A: 0..0x7FF |
| 10 | CANOpen: 4 Bit Function code, 7 Bit Node-ID |
||
| 11 | Node-Id: 0..0x7F |
||
| 12 | 1 | Maximilian Seesslen | Function-Code Mask: 0x780 |
| 13 | 46 | Maximilian Seesslen | There are 14 or 28 Filters on STM32Fs |
| 14 | Some STM32 have an internal 96-bit unique ID. |
||
| 15 | 1 | Maximilian Seesslen | |
| 16 | 74 | Maximilian Seesslen | |_. Bits |_. Area |_. Decription |_. Examples | |
| 17 | 73 | Maximilian Seesslen | | 4 |/2.CAN-Id | Function code | Send object | |
| 18 | 74 | Maximilian Seesslen | | 7 | NodeId | Sensemux WZ | |
| 19 | | 16 |/4.Data | Object | Set illumination | |
||
| 20 | | 8 | Unit | promilPwm | |
||
| 21 | | 8 | Flags | Confirmation required | |
||
| 22 | | 32 | Value | 350‰ | |
||
| 23 | 98 | Maximilian Seesslen | | _64Bits Data_ | | | | |
| 24 | 71 | Maximilian Seesslen | |
| 25 | 87 | Maximilian Seesslen | [[NMT]] |
| 26 | [[MMP]] |
||
| 27 | 89 | Maximilian Seesslen | [[Alerts]] |
| 28 | 87 | Maximilian Seesslen | |
| 29 | 44 | Maximilian Seesslen | h2. Function code |
| 30 | 86 | Maximilian Seesslen | |
| 31 | 83 | Maximilian Seesslen | Function code can be 0..15 / 0x00..0x0F |
| 32 | 44 | Maximilian Seesslen | |
| 33 | 1 | Maximilian Seesslen | |_. Code |_. Decription |_. Examples | |
| 34 | 51 | Maximilian Seesslen | | 0x0 | NMT-Write | | |
| 35 | 1 | Maximilian Seesslen | | 0x1 | NMT-Send | | |
| 36 | 79 | Maximilian Seesslen | | 0x2 | NMT-Introduce | Device sends UID only | |
| 37 | 82 | Maximilian Seesslen | | 0x3 | NMT-setId | Set NodeId on Device | |
| 38 | 90 | Maximilian Seesslen | | 0x4 | Alarms | Send by nodes | |
| 39 | 82 | Maximilian Seesslen | | 0x5 | Write object | Set Date, illumination | |
| 40 | | 0x6 | Read object | Get product codes | |
||
| 41 | | 0x7 | Send object | Send temperature | |
||
| 42 | | 0x8 | Resend object | Replay recorded data | |
||
| 43 | 58 | Maximilian Seesslen | | 0x9 | data blob | | |
| 44 | 1 | Maximilian Seesslen | |
| 45 | 94 | Maximilian Seesslen | h2. Node-ID |
| 46 | |||
| 47 | Depending on the function code, the Node-ID can be the target or the source. Node-ID '0' means every node should inspect the message. |
||
| 48 | |||
| 49 | |_. Function code |_. Node-ID interpretation| |
||
| 50 | | NMT-Write | Destination or 0 | |
||
| 51 | | NMT-Send | Source | |
||
| 52 | | NMT-Introduce | Source | |
||
| 53 | | NMT-setId | New Node-ID | |
||
| 54 | | Alarms | Source | |
||
| 55 | | Write object | Destination or 0 | |
||
| 56 | | Read object | Targeted Source | |
||
| 57 | | Send object | Source | |
||
| 58 | | Resend object | Replayed Source | |
||
| 59 | | data blob | Destination | |
||
| 60 | 102 | Maximilian Seesslen | | Ack | | |
| 61 | |||
| 62 | 94 | Maximilian Seesslen | |
| 63 | 1 | Maximilian Seesslen | h1. IDs, ranges and commands |
| 64 | |||
| 65 | 46 | Maximilian Seesslen | h2. Node IDs |
| 66 | 1 | Maximilian Seesslen | |
| 67 | 44 | Maximilian Seesslen | * 11-Bit-Identifier, (CAN 2.0A); 2048; 0x0 ... 0x7F0; 0x0 ... 0x7F with function code |
| 68 | 1 | Maximilian Seesslen | * 29-Bit-Identifier, (CAN 2.0B); 0x20000000 |
| 69 | |||
| 70 | |_. Range |_. Decription |_. Examples | |
||
| 71 | | 0x01-0x0F | Network Manager | PC | |
||
| 72 | | 0x10-0x2F | Active controller | CANDis | |
||
| 73 | | 0x30-0x4F | Actor | CANSwitch | |
||
| 74 | 47 | Maximilian Seesslen | | 0x50-0x6F | Sending sensors | Sensemux, CANIO | |
| 75 | 1 | Maximilian Seesslen | | 0x70-0x7F | Passive Sensors | CANRec | |
| 76 | |||
| 77 | 75 | Maximilian Seesslen | h2. CAN data structutre |
| 78 | 1 | Maximilian Seesslen | |
| 79 | 68 | Maximilian Seesslen | |_. Size |_. Decription |_. Examples | |
| 80 | 75 | Maximilian Seesslen | | 2 | Object | Set ambient illumination | |
| 81 | 1 | Maximilian Seesslen | | 1 | Unit | hz, Float, Time, Date, Percent, promilPwm, centiCelsius, canId, room, Multipacket-String | |
| 82 | 93 | Maximilian Seesslen | | 1 | Flags | Confirmation required | |
| 83 | 68 | Maximilian Seesslen | | 4 | Value | The kind of data that was specified in 'unit' | |
| 84 | 36 | Maximilian Seesslen | |
| 85 | 44 | Maximilian Seesslen | h2. Objects |
| 86 | 36 | Maximilian Seesslen | |
| 87 | 59 | Maximilian Seesslen | |_. Code |_. Description | |
| 88 | | none | | |
||
| 89 | | ambientLight | | |
||
| 90 | | plantLight | | |
||
| 91 | | multimediaSwitch | | |
||
| 92 | | mainSwitch | | |
||
| 93 | | date | | |
||
| 94 | | time | | |
||
| 95 | | dummy | | |
||
| 96 | | plantSensor | | |
||
| 97 | | plantSensor [0-7] | | |
||
| 98 | | firmwareVersion | | |
||
| 99 | | firmwareDate | | |
||
| 100 | | hardwareRevision | | |
||
| 101 | | hardwareDate | | |
||
| 102 | | temperatureIntern [0-7] | | |
||
| 103 | 64 | Maximilian Seesslen | | temperatureExtern [0-7] | | |
| 104 | 59 | Maximilian Seesslen | | humidity | | |
| 105 | | VOC | | |
||
| 106 | 60 | Maximilian Seesslen | | Replay | | |
| 107 | 63 | Maximilian Seesslen | | Data-Dump (SD-Card) | | |
| 108 | 1 | Maximilian Seesslen | |
| 109 | 44 | Maximilian Seesslen | h2. Units |
| 110 | 17 | Maximilian Seesslen | |
| 111 | 44 | Maximilian Seesslen | * Date: year 2B, month 1B, day 1B |
| 112 | 1 | Maximilian Seesslen | * Time: hour 1B, minute 1B, second 1B, subsecond 1B |
| 113 | 17 | Maximilian Seesslen | |
| 114 | 46 | Maximilian Seesslen | h2. Example: Turn on the lights |
| 115 | 1 | Maximilian Seesslen | |
| 116 | 46 | Maximilian Seesslen | |_.Data |_.Size |_.Description | |
| 117 | 100 | Maximilian Seesslen | |0x300 | 29 Bits | Function code: Write Object; All nodes. | |
| 118 | 91 | Maximilian Seesslen | |0x0 | 2 Byte | Object: Ambient illumination | |
| 119 | 67 | Maximilian Seesslen | |0x1 | 1 Byte | Data-Type: PWM Permill | |
| 120 | 1 | Maximilian Seesslen | |0x1 | 1 Byte | Flags: None | |
| 121 | |1000 | 4 Byte | Value: Full Brightness | |
||
| 122 | 100 | Maximilian Seesslen | |
| 123 | h2. Allerts |
||
| 124 | |||
| 125 | |_.Data |_.Size |_.Description | |
||
| 126 | 101 | Maximilian Seesslen | |0x300 | 29 Bits | Function code: Alert | |
| 127 | 100 | Maximilian Seesslen | |0x0 | 1 Byte | Component | |
| 128 | 101 | Maximilian Seesslen | |0x0 | 1 Byte | Data-Type; 0=good/Gone | |
| 129 | 100 | Maximilian Seesslen | |0x0 | 2 Byte | Allert-Code | |
| 130 | |1000 | 4 Byte | Value; Voltage etc. | |
||
| 131 | |||
| 132 | The component has to be defined befor including the event-header. |
||
| 133 | The unit is part of the code in the header files. |