TDT-Protocol on CAN » Historie » Version 87
Maximilian Seesslen, 11.07.2023 14:22
| 1 | 12 | Maximilian Seesslen | h1. Intro |
|---|---|---|---|
| 2 | 1 | Maximilian Seesslen | |
| 3 | 17 | Maximilian Seesslen | With the TDT-Protocol sensors can just send their values on the BUS without complex object catalogue. |
| 4 | An monitor-software is able to display values without knowing anything about the sensors or their configuration. |
||
| 5 | 46 | Maximilian Seesslen | The CANId cinsists of an function code and the node id. Like CANOpen the function code is 4 Bits and the Node-ID is 7 Bit. |
| 6 | In CAN2.0A there can only be 128 Nodes. |
||
| 7 | 1 | Maximilian Seesslen | |
| 8 | 35 | Maximilian Seesslen | CAN 2.0A: 0..0x7FF |
| 9 | CANOpen: 4 Bit Function code, 7 Bit Node-ID |
||
| 10 | Node-Id: 0..0x7F |
||
| 11 | 1 | Maximilian Seesslen | Function-Code Mask: 0x780 |
| 12 | 46 | Maximilian Seesslen | There are 14 or 28 Filters on STM32Fs |
| 13 | Some STM32 have an internal 96-bit unique ID. |
||
| 14 | 1 | Maximilian Seesslen | |
| 15 | 74 | Maximilian Seesslen | |_. Bits |_. Area |_. Decription |_. Examples | |
| 16 | 73 | Maximilian Seesslen | | 4 |/2.CAN-Id | Function code | Send object | |
| 17 | 74 | Maximilian Seesslen | | 7 | NodeId | Sensemux WZ | |
| 18 | | 16 |/4.Data | Object | Set illumination | |
||
| 19 | | 8 | Unit | promilPwm | |
||
| 20 | | 8 | Flags | Confirmation required | |
||
| 21 | | 32 | Value | 350‰ | |
||
| 22 | 71 | Maximilian Seesslen | |
| 23 | 87 | Maximilian Seesslen | [[NMT]] |
| 24 | [[MMP]] |
||
| 25 | |||
| 26 | 44 | Maximilian Seesslen | h2. Function code |
| 27 | 86 | Maximilian Seesslen | |
| 28 | 83 | Maximilian Seesslen | Function code can be 0..15 / 0x00..0x0F |
| 29 | 44 | Maximilian Seesslen | |
| 30 | 1 | Maximilian Seesslen | |_. Code |_. Decription |_. Examples | |
| 31 | 51 | Maximilian Seesslen | | 0x0 | NMT-Write | | |
| 32 | 1 | Maximilian Seesslen | | 0x1 | NMT-Send | | |
| 33 | 79 | Maximilian Seesslen | | 0x2 | NMT-Introduce | Device sends UID only | |
| 34 | 82 | Maximilian Seesslen | | 0x3 | NMT-setId | Set NodeId on Device | |
| 35 | | 0x4 | Alarms | | |
||
| 36 | | 0x5 | Write object | Set Date, illumination | |
||
| 37 | | 0x6 | Read object | Get product codes | |
||
| 38 | | 0x7 | Send object | Send temperature | |
||
| 39 | | 0x8 | Resend object | Replay recorded data | |
||
| 40 | 58 | Maximilian Seesslen | | 0x9 | data blob | | |
| 41 | 1 | Maximilian Seesslen | |
| 42 | h1. IDs, ranges and commands |
||
| 43 | |||
| 44 | 46 | Maximilian Seesslen | h2. Node IDs |
| 45 | 1 | Maximilian Seesslen | |
| 46 | 44 | Maximilian Seesslen | * 11-Bit-Identifier, (CAN 2.0A); 2048; 0x0 ... 0x7F0; 0x0 ... 0x7F with function code |
| 47 | 1 | Maximilian Seesslen | * 29-Bit-Identifier, (CAN 2.0B); 0x20000000 |
| 48 | |||
| 49 | |_. Range |_. Decription |_. Examples | |
||
| 50 | | 0x01-0x0F | Network Manager | PC | |
||
| 51 | | 0x10-0x2F | Active controller | CANDis | |
||
| 52 | | 0x30-0x4F | Actor | CANSwitch | |
||
| 53 | 47 | Maximilian Seesslen | | 0x50-0x6F | Sending sensors | Sensemux, CANIO | |
| 54 | 1 | Maximilian Seesslen | | 0x70-0x7F | Passive Sensors | CANRec | |
| 55 | |||
| 56 | 75 | Maximilian Seesslen | h2. CAN data structutre |
| 57 | 1 | Maximilian Seesslen | |
| 58 | 68 | Maximilian Seesslen | |_. Size |_. Decription |_. Examples | |
| 59 | | 2 | Object | Plain Sensor value; Set illumination | |
||
| 60 | | 1 | Unit | hz, Float, Time, Date, Percent, promilPwm, centiCelsius, canId, room, Multipacket-String | |
||
| 61 | 75 | Maximilian Seesslen | | 1 | Flags | Confirmation required | |
| 62 | 68 | Maximilian Seesslen | | 4 | Value | 32Bit | |
| 63 | |||
| 64 | 36 | Maximilian Seesslen | |
| 65 | 44 | Maximilian Seesslen | h2. Objects |
| 66 | 36 | Maximilian Seesslen | |
| 67 | 59 | Maximilian Seesslen | |_. Code |_. Description | |
| 68 | | none | | |
||
| 69 | | ambientLight | | |
||
| 70 | | plantLight | | |
||
| 71 | | multimediaSwitch | | |
||
| 72 | | mainSwitch | | |
||
| 73 | | date | | |
||
| 74 | | time | | |
||
| 75 | | dummy | | |
||
| 76 | | plantSensor | | |
||
| 77 | | plantSensor [0-7] | | |
||
| 78 | | firmwareVersion | | |
||
| 79 | | firmwareDate | | |
||
| 80 | | hardwareRevision | | |
||
| 81 | | hardwareDate | | |
||
| 82 | | temperatureIntern [0-7] | | |
||
| 83 | 64 | Maximilian Seesslen | | temperatureExtern [0-7] | | |
| 84 | 59 | Maximilian Seesslen | | humidity | | |
| 85 | | VOC | | |
||
| 86 | 60 | Maximilian Seesslen | | Replay | | |
| 87 | 63 | Maximilian Seesslen | | Data-Dump (SD-Card) | | |
| 88 | 1 | Maximilian Seesslen | |
| 89 | 44 | Maximilian Seesslen | h2. Units |
| 90 | 17 | Maximilian Seesslen | |
| 91 | 44 | Maximilian Seesslen | * Date: year 2B, month 1B, day 1B |
| 92 | 1 | Maximilian Seesslen | * Time: hour 1B, minute 1B, second 1B, subsecond 1B |
| 93 | 17 | Maximilian Seesslen | |
| 94 | 46 | Maximilian Seesslen | h2. Example: Turn on the lights |
| 95 | 1 | Maximilian Seesslen | |
| 96 | 46 | Maximilian Seesslen | |_.Data |_.Size |_.Description | |
| 97 | |0x300 | 29 Bits | Function code: Write Object; All objects. | |
||
| 98 | |0x0 | 2 Byte | Message-Type: Global command | |
||
| 99 | 67 | Maximilian Seesslen | |0x1 | 1 Byte | Data-Type: PWM Permill | |
| 100 | 1 | Maximilian Seesslen | |0x1 | 1 Byte | Flags: None | |
| 101 | |1000 | 4 Byte | Value: Full Brightness | |
||
| 102 | 69 | Maximilian Seesslen | |
| 103 | h2. Alarms/Alerts |
||
| 104 | |||
| 105 | Devices should indicate issues; e.g.: |
||
| 106 | |||
| 107 | * Battery low |
||
| 108 | * I2C problems |
||
| 109 | 70 | Maximilian Seesslen | |
| 110 | h2. Object structutre |
||
| 111 | |||
| 112 | |_. Size |_. Decription |_. Examples | |
||
| 113 | | 2 | Object | I2C, VBat, | |
||
| 114 | | 1 | Unit | hz, Float, Time, Date, Percent, promilPwm, centiCelsius, canId, room, Multipacket-String | |
||
| 115 | | 1 | Issue | Whats wrong, Undervolts, Communication error | |
||
| 116 | | 4 | Value | 32Bit | |