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