TDT-Protocol on CAN » Historie » Version 104
  Maximilian Seesslen, 10.12.2024 11:54 
  
| 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 | 104 | Maximilian Seesslen | [[MMP-Transfer]]  | 
| 28 | 89 | Maximilian Seesslen | [[Alerts]]  | 
| 29 | 87 | Maximilian Seesslen | |
| 30 | 44 | Maximilian Seesslen | h2. Function code  | 
| 31 | 86 | Maximilian Seesslen | |
| 32 | 83 | Maximilian Seesslen | Function code can be 0..15 / 0x00..0x0F  | 
| 33 | 44 | Maximilian Seesslen | |
| 34 | 1 | Maximilian Seesslen | |_. Code |_. Decription |_. Examples |  | 
| 35 | 51 | Maximilian Seesslen | | 0x0 | NMT-Write | |  | 
| 36 | 1 | Maximilian Seesslen | | 0x1 | NMT-Send | |  | 
| 37 | 79 | Maximilian Seesslen | | 0x2 | NMT-Introduce | Device sends UID only |  | 
| 38 | 82 | Maximilian Seesslen | | 0x3 | NMT-setId | Set NodeId on Device |  | 
| 39 | 90 | Maximilian Seesslen | | 0x4 | Alarms | Send by nodes |  | 
| 40 | 82 | Maximilian Seesslen | | 0x5 | Write object | Set Date, illumination |  | 
| 41 | | 0x6 | Read object | Get product codes |  | 
||
| 42 | | 0x7 | Send object | Send temperature |  | 
||
| 43 | | 0x8 | Resend object | Replay recorded data |  | 
||
| 44 | 58 | Maximilian Seesslen | | 0x9 | data blob | |  | 
| 45 | 103 | Maximilian Seesslen | | 0xA | Ackowledge | |  | 
| 46 | |||
| 47 | 1 | Maximilian Seesslen | |
| 48 | 94 | Maximilian Seesslen | h2. Node-ID  | 
| 49 | |||
| 50 | 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.  | 
||
| 51 | |||
| 52 | |_. Function code |_. Node-ID interpretation|  | 
||
| 53 | | NMT-Write | Destination or 0 |  | 
||
| 54 | | NMT-Send | Source |  | 
||
| 55 | | NMT-Introduce | Source |  | 
||
| 56 | | NMT-setId | New Node-ID |  | 
||
| 57 | | Alarms | Source |  | 
||
| 58 | | Write object | Destination or 0 |  | 
||
| 59 | | Read object | Targeted Source |  | 
||
| 60 | | Send object | Source |  | 
||
| 61 | | Resend object | Replayed Source |  | 
||
| 62 | | data blob | Destination |  | 
||
| 63 | 102 | Maximilian Seesslen | | Ack | |  | 
| 64 | |||
| 65 | 94 | Maximilian Seesslen | |
| 66 | 1 | Maximilian Seesslen | h1. IDs, ranges and commands  | 
| 67 | |||
| 68 | 46 | Maximilian Seesslen | h2. Node IDs  | 
| 69 | 1 | Maximilian Seesslen | |
| 70 | 44 | Maximilian Seesslen | * 11-Bit-Identifier, (CAN 2.0A); 2048; 0x0 ... 0x7F0; 0x0 ... 0x7F with function code  | 
| 71 | 1 | Maximilian Seesslen | * 29-Bit-Identifier, (CAN 2.0B); 0x20000000  | 
| 72 | |||
| 73 | |_. Range |_. Decription |_. Examples |  | 
||
| 74 | | 0x01-0x0F | Network Manager | PC |  | 
||
| 75 | | 0x10-0x2F | Active controller | CANDis |  | 
||
| 76 | | 0x30-0x4F | Actor | CANSwitch |  | 
||
| 77 | 47 | Maximilian Seesslen | | 0x50-0x6F | Sending sensors | Sensemux, CANIO |  | 
| 78 | 1 | Maximilian Seesslen | | 0x70-0x7F | Passive Sensors | CANRec |  | 
| 79 | |||
| 80 | 75 | Maximilian Seesslen | h2. CAN data structutre  | 
| 81 | 1 | Maximilian Seesslen | |
| 82 | 68 | Maximilian Seesslen | |_. Size |_. Decription |_. Examples |  | 
| 83 | 75 | Maximilian Seesslen | | 2 | Object | Set ambient illumination |  | 
| 84 | 1 | Maximilian Seesslen | | 1 | Unit | hz, Float, Time, Date, Percent, promilPwm, centiCelsius, canId, room, Multipacket-String |  | 
| 85 | 93 | Maximilian Seesslen | | 1 | Flags | Confirmation required |  | 
| 86 | 68 | Maximilian Seesslen | | 4 | Value | The kind of data that was specified in 'unit' |  | 
| 87 | 36 | Maximilian Seesslen | |
| 88 | 44 | Maximilian Seesslen | h2. Objects  | 
| 89 | 36 | Maximilian Seesslen | |
| 90 | 59 | Maximilian Seesslen | |_. Code |_. Description |  | 
| 91 | | none | |  | 
||
| 92 | | ambientLight | |  | 
||
| 93 | | plantLight | |  | 
||
| 94 | | multimediaSwitch | |  | 
||
| 95 | | mainSwitch | |  | 
||
| 96 | | date | |  | 
||
| 97 | | time | |  | 
||
| 98 | | dummy | |  | 
||
| 99 | | plantSensor | |  | 
||
| 100 | | plantSensor [0-7] | |  | 
||
| 101 | | firmwareVersion | |  | 
||
| 102 | | firmwareDate | |  | 
||
| 103 | | hardwareRevision | |  | 
||
| 104 | | hardwareDate | |  | 
||
| 105 | | temperatureIntern [0-7] | |  | 
||
| 106 | 64 | Maximilian Seesslen | | temperatureExtern [0-7] | |  | 
| 107 | 59 | Maximilian Seesslen | | humidity | |  | 
| 108 | | VOC | |  | 
||
| 109 | 60 | Maximilian Seesslen | | Replay | |  | 
| 110 | 63 | Maximilian Seesslen | | Data-Dump (SD-Card) | |  | 
| 111 | 1 | Maximilian Seesslen | |
| 112 | 44 | Maximilian Seesslen | h2. Units  | 
| 113 | 17 | Maximilian Seesslen | |
| 114 | 44 | Maximilian Seesslen | * Date: year 2B, month 1B, day 1B  | 
| 115 | 1 | Maximilian Seesslen | * Time: hour 1B, minute 1B, second 1B, subsecond 1B  | 
| 116 | 17 | Maximilian Seesslen | |
| 117 | 46 | Maximilian Seesslen | h2. Example: Turn on the lights  | 
| 118 | 1 | Maximilian Seesslen | |
| 119 | 46 | Maximilian Seesslen | |_.Data |_.Size |_.Description |  | 
| 120 | 100 | Maximilian Seesslen | |0x300 | 29 Bits | Function code: Write Object; All nodes. |  | 
| 121 | 91 | Maximilian Seesslen | |0x0 | 2 Byte | Object: Ambient illumination |  | 
| 122 | 67 | Maximilian Seesslen | |0x1 | 1 Byte | Data-Type: PWM Permill |  | 
| 123 | 1 | Maximilian Seesslen | |0x1 | 1 Byte | Flags: None |  | 
| 124 | |1000 | 4 Byte | Value: Full Brightness |  | 
||
| 125 | 100 | Maximilian Seesslen | |
| 126 | h2. Allerts  | 
||
| 127 | |||
| 128 | |_.Data |_.Size |_.Description |  | 
||
| 129 | 101 | Maximilian Seesslen | |0x300 | 29 Bits | Function code: Alert |  | 
| 130 | 100 | Maximilian Seesslen | |0x0 | 1 Byte | Component |  | 
| 131 | 101 | Maximilian Seesslen | |0x0 | 1 Byte | Data-Type; 0=good/Gone |  | 
| 132 | 100 | Maximilian Seesslen | |0x0 | 2 Byte | Allert-Code |  | 
| 133 | |1000 | 4 Byte | Value; Voltage etc. |  | 
||
| 134 | |||
| 135 | The component has to be defined befor including the event-header.  | 
||
| 136 | The unit is part of the code in the header files.  |