TDT-Protocol on CAN » Historie » Version 48
Maximilian Seesslen, 24.01.2023 10:57
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 | 44 | Maximilian Seesslen | h2. Function code |
16 | |||
17 | 1 | Maximilian Seesslen | |_. Code |_. Decription |_. Examples | |
18 | 44 | Maximilian Seesslen | | 0x0 | NMT | | |
19 | | 0x1 | Alarms | | |
||
20 | | 0x6 | Write object | Set Date, illumination | |
||
21 | | 0x7 | Read object | Get product codes | |
||
22 | | 0x8 | Send object | Send temperature | |
||
23 | | 0x9 | data blob | | |
||
24 | 28 | Maximilian Seesslen | | 0xC | log | | |
25 | 1 | Maximilian Seesslen | |
26 | h1. IDs, ranges and commands |
||
27 | |||
28 | 46 | Maximilian Seesslen | h2. Node IDs |
29 | 1 | Maximilian Seesslen | |
30 | 44 | Maximilian Seesslen | * 11-Bit-Identifier, (CAN 2.0A); 2048; 0x0 ... 0x7F0; 0x0 ... 0x7F with function code |
31 | 1 | Maximilian Seesslen | * 29-Bit-Identifier, (CAN 2.0B); 0x20000000 |
32 | |||
33 | |_. Range |_. Decription |_. Examples | |
||
34 | | 0x01-0x0F | Network Manager | PC | |
||
35 | | 0x10-0x2F | Active controller | CANDis | |
||
36 | | 0x30-0x4F | Actor | CANSwitch | |
||
37 | 47 | Maximilian Seesslen | | 0x50-0x6F | Sending sensors | Sensemux, CANIO | |
38 | 1 | Maximilian Seesslen | | 0x70-0x7F | Passive Sensors | CANRec | |
39 | |||
40 | 45 | Maximilian Seesslen | h2. Object structutre |
41 | 1 | Maximilian Seesslen | |
42 | 44 | Maximilian Seesslen | |_. Size |_. Decription |_. Examples | |
43 | | 2 | Object | Plain Sensor value; Set illumination | |
||
44 | | 1 | Data type | Int, Float, Time, Date, Percent, Promil, Multipacket-String | |
||
45 | | 1 | Unit | Hz, °C, Time, Date, PWM, CAN-ID, Name, Description, Room | |
||
46 | | 4 | Value | 32Bit | |
||
47 | 36 | Maximilian Seesslen | |
48 | 44 | Maximilian Seesslen | h2. Objects |
49 | 36 | Maximilian Seesslen | |
50 | 44 | Maximilian Seesslen | |_. Code |_. Description | |
51 | | none | | |
||
52 | | ambientLight | | |
||
53 | | plantLight | | |
||
54 | | multimediaSwitch | | |
||
55 | | mainSwitch | | |
||
56 | | date | | |
||
57 | | time | | |
||
58 | | dummy | | |
||
59 | | plantSensor | | |
||
60 | | plantSensor0 | | |
||
61 | | plantSensor1 | | |
||
62 | | plantSensor2 | | |
||
63 | | plantSensor3 | | |
||
64 | | plantSensor4 | | |
||
65 | | firmwareVersion | | |
||
66 | | firmwareDate | | |
||
67 | | hardwareRevision | | |
||
68 | | hardwareDate | | |
||
69 | | temperatureIntern | | |
||
70 | | temperatureIntern1 | | |
||
71 | | temperatureIntern2 | | |
||
72 | | temperatureIntern3 | | |
||
73 | | temperatureIntern4 | | |
||
74 | | temperatureExtern | | |
||
75 | | temperatureExtern1 | | |
||
76 | | temperatureExtern2 | | |
||
77 | | temperatureExtern3 | | |
||
78 | | temperatureExtern4 | | |
||
79 | | humidity | | |
||
80 | | voc | | |
||
81 | 1 | Maximilian Seesslen | |
82 | 44 | Maximilian Seesslen | h2. Units |
83 | 17 | Maximilian Seesslen | |
84 | 44 | Maximilian Seesslen | * Date: year 2B, month 1B, day 1B |
85 | 1 | Maximilian Seesslen | * Time: hour 1B, minute 1B, second 1B, subsecond 1B |
86 | 17 | Maximilian Seesslen | |
87 | 46 | Maximilian Seesslen | h2. Example: Turn on the lights |
88 | 1 | Maximilian Seesslen | |
89 | 46 | Maximilian Seesslen | |_.Data |_.Size |_.Description | |
90 | |0x300 | 29 Bits | Function code: Write Object; All objects. | |
||
91 | |0x0 | 2 Byte | Message-Type: Global command | |
||
92 | |0x1 | 1 Byte | Data-Type: Permill | |
||
93 | |0x1 | 1 Byte | PWM: PWM permilli | |
||
94 | |1000 | 4 Byte | Value: Full Brightness | |
||
95 | |||
96 | 1 | Maximilian Seesslen | h1. Multipacket-Strings |
97 | |||
98 | 46 | Maximilian Seesslen | There should be the posssibillity to write the complete SPI-Flash even if it takes forever. |
99 | Not every slave needs to be able to send super big blocks. But every slave should be able to |
||
100 | send e.g. descriptions. |
||
101 | 15 | Maximilian Seesslen | |
102 | 46 | Maximilian Seesslen | |_. Size |_. Type | |
103 | | 0x4 | Package number (0: Data contains package count) | |
||
104 | | 0x4 | Data | |
||
105 | |||
106 | 25 | Maximilian Seesslen | |
107 | 1 | Maximilian Seesslen | h1. ID Assigning |
108 | 48 | Maximilian Seesslen | |
109 | h2. Actuator introduction |
||
110 | |||
111 | When introduction is requested by system command, each device must send an description. |
||
112 | |||
113 | |_. Size |_. Decription |_. Examples | |
||
114 | | 2 | Object | Object | |
||
115 | | 6 | MAC/Unique ID| 48Bit | |
||
116 | |||
117 | Objects: |
||
118 | 1: MAC |
||
119 | 2: Protocol version |
||
120 | |||
121 | 25 | Maximilian Seesslen | |
122 | h1. V2 |
||
123 | |||
124 | |_. Size |_. Decription |_. Examples | |
||
125 | | 1 | Packet type | Standard TDT packet | |
||
126 | | 1 | Sub-Id; | Futher index; Sub-Sensor or more specifi kind of thing to be set | |
||
127 | | 1 | Data type | Int, Float, Time, Date, Percent, Promil, Multipacket-String | |
||
128 | 31 | Maximilian Seesslen | | 1 | Unit | Hz, °C, Time, Date, PWM, CAN-ID, Name, Description, Room | |
129 | 30 | Maximilian Seesslen | | 4 | Value | 32Bit | |
130 | |||
131 | 1 | Maximilian Seesslen | h2. Multimessage package |
132 | |||
133 | There should be the posssibillity to write the complete SPI-Flash even if it takes forever. |
||
134 | Not every slave needs to be able to send super big blocks. But every slave should be able to |
||
135 | send e.g. descriptions. |