Projekt

Allgemein

Profil

TDT-Protocol on CAN » Historie » Version 90

Maximilian Seesslen, 11.07.2023 14: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 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 89 Maximilian Seesslen
[[Alerts]]
26 87 Maximilian Seesslen
27 44 Maximilian Seesslen
h2. Function code
28 86 Maximilian Seesslen
29 83 Maximilian Seesslen
Function code can be 0..15 / 0x00..0x0F
30 44 Maximilian Seesslen
31 1 Maximilian Seesslen
|_. Code |_. Decription    |_. Examples             |
32 51 Maximilian Seesslen
| 0x0    | NMT-Write       |                        |
33 1 Maximilian Seesslen
| 0x1    | NMT-Send        |                        |
34 79 Maximilian Seesslen
| 0x2    | NMT-Introduce   | Device sends UID only  |
35 82 Maximilian Seesslen
| 0x3    | NMT-setId       | Set NodeId on Device   |
36 90 Maximilian Seesslen
| 0x4    | Alarms          | Send by nodes          |
37 82 Maximilian Seesslen
| 0x5    | Write object    | Set Date, illumination |
38
| 0x6    | Read object     | Get product codes      |
39
| 0x7    | Send object     | Send temperature       |
40
| 0x8    | Resend object   | Replay recorded data   |
41 58 Maximilian Seesslen
| 0x9    | data blob       |                        |
42 1 Maximilian Seesslen
43
h1. IDs, ranges and commands
44
45 46 Maximilian Seesslen
h2. Node IDs
46 1 Maximilian Seesslen
47 44 Maximilian Seesslen
* 11-Bit-Identifier, (CAN 2.0A); 2048; 0x0 ... 0x7F0; 0x0 ... 0x7F with function code
48 1 Maximilian Seesslen
* 29-Bit-Identifier, (CAN 2.0B); 0x20000000
49
50
|_. Range      |_. Decription           |_. Examples              |
51
| 0x01-0x0F    | Network Manager        | PC                      |
52
| 0x10-0x2F    | Active controller      | CANDis                  |
53
| 0x30-0x4F    | Actor                  | CANSwitch               |
54 47 Maximilian Seesslen
| 0x50-0x6F    | Sending sensors        | Sensemux, CANIO         |
55 1 Maximilian Seesslen
| 0x70-0x7F    | Passive Sensors        | CANRec                  |
56
57 75 Maximilian Seesslen
h2. CAN data structutre
58 1 Maximilian Seesslen
59 68 Maximilian Seesslen
|_. Size |_. Decription |_. Examples                                                                                |
60
| 2      | Object       | Plain Sensor value; Set illumination                                                      |
61
| 1      | Unit         | hz, Float, Time, Date, Percent, promilPwm, centiCelsius, canId, room, Multipacket-String  |
62 75 Maximilian Seesslen
| 1      | Flags        | Confirmation required                                                                     |
63 88 Maximilian Seesslen
| 4      | Value        | The kind of data that was specified in 'unit'                                             |
64 68 Maximilian Seesslen
65 36 Maximilian Seesslen
66 44 Maximilian Seesslen
h2. Objects
67 36 Maximilian Seesslen
68 59 Maximilian Seesslen
|_. Code                  |_. Description             |
69
| none                    |                           |
70
| ambientLight            |                           |
71
| plantLight              |                           |
72
| multimediaSwitch        |                           |
73
| mainSwitch              |                           |
74
| date                    |                           |
75
| time                    |                           |
76
| dummy                   |                           |
77
| plantSensor             |                           |
78
| plantSensor [0-7]       |                           |
79
| firmwareVersion         |                           |
80
| firmwareDate            |                           |
81
| hardwareRevision        |                           |
82
| hardwareDate            |                           |
83
| temperatureIntern [0-7] |                           |
84 64 Maximilian Seesslen
| temperatureExtern [0-7] |                           |
85 59 Maximilian Seesslen
| humidity                |                           |
86
| VOC                     |                           |
87 60 Maximilian Seesslen
| Replay                  |                           |
88 63 Maximilian Seesslen
| Data-Dump (SD-Card)     |                           |
89 1 Maximilian Seesslen
90 44 Maximilian Seesslen
h2. Units
91 17 Maximilian Seesslen
92 44 Maximilian Seesslen
* Date: year 2B, month 1B, day 1B
93 1 Maximilian Seesslen
* Time: hour 1B, minute 1B, second 1B, subsecond 1B
94 17 Maximilian Seesslen
95 46 Maximilian Seesslen
h2. Example: Turn on the lights
96 1 Maximilian Seesslen
97 46 Maximilian Seesslen
|_.Data   |_.Size   |_.Description                              |
98
|0x300    | 29 Bits | Function code: Write Object; All objects. |
99
|0x0      | 2 Byte  | Message-Type: Global command              |
100 67 Maximilian Seesslen
|0x1      | 1 Byte  | Data-Type: PWM Permill                    |
101 1 Maximilian Seesslen
|0x1      | 1 Byte  | Flags: None                               |
102 70 Maximilian Seesslen
|1000     | 4 Byte  | Value: Full Brightness                    |