Main » History » Version 15
David Fredriksson, 08/25/2022 09:36 AM
1 | 3 | Torbjorn Carlqvist Admin | h1. Then LION fieldbus concept |
---|---|---|---|
2 | 1 | Torbjorn Carlqvist Admin | |
3 | 2 | Torbjorn Carlqvist Admin | > LION is a joint venture between DAVITOR AB and Naronic AB |
4 | |||
5 | The concept consists of the following parts: |
||
6 | * Field bus specification |
||
7 | * Hardware form factor |
||
8 | * Source code |
||
9 | |||
10 | The bus is fundamentally an i2c bus and the IO-modules along the bus is slaves controlled by one master. |
||
11 | |||
12 | h3. Highlights |
||
13 | |||
14 | * All slaves share same i2c address independent of the number of slaves. This lowers the complexity in the Master code when the whole bus looks like a singe i2c slave device independent of the number of modules. |
||
15 | * Data points as channels. |
||
16 | Currently supported channel types in the standard: |
||
17 | ** AL - Alert Channel. Special event channel to read when then ALERT line goes low. |
||
18 | ** AI - Analog Input |
||
19 | ** AO - Analog Output |
||
20 | ** DI - Digital Input |
||
21 | ** DO - Digital Output |
||
22 | ** SI - Input Stream. Forwards log text or serial data etc. to Master. |
||
23 | ** DA - Dali lightning control |
||
24 | * A dedicated ALERT line telling the master to read the alert channel |
||
25 | * Supports firmware boot loading of the slave modules over the filed bus. |
||
26 | |||
27 | !LION.png! |
||
28 | |||
29 | * Config - This is a daisy changed link that goes _through_ all slave modules. This line is used when performing channel setup but also when there is a need for stepping the bus for single modules access. Typically for maintenance, firmware upgrade etc. |
||
30 | * Alert - Goes low if a slave module needs to tell the master to read data. |
||
31 | * Clock - Clock signal |
||
32 | * Data - Data signal |
||
33 | * Power - The power supply for the slave module bus circuitry. Typically 3.3v. |
||
34 | * High Power - Typically 12v-24v that can be used when there is high power consumers internally or external from the module. Eg. motors, solenoids and lightning. |
||
35 | * Reset - When held low all modules bus chip will be rebooted. |
||
36 | * GND - Common ground for both Power and High Power lines. |
||
37 | |||
38 | h3. The channel concept in LION |
||
39 | |||
40 | All data points on a LION bus has a channel number assignment within it's channel type context. |
||
41 | Eg. If the device has three modules with 4 DO points each the total number of DO _channels_ are 12. After the initial (usual factory preset) channel assignment process is done the master will only work with channels, not modules and points. |
||
42 | |||
43 | h3. Bus modes and adresses |
||
44 | |||
45 | The LION Bus operates in three modes. |
||
46 | * Data (0x28) - Normal operational mode |
||
47 | * Config (0x2C) - Halted operation while each module are acceded individually. |
||
48 | * Bootloader (0x33) - I used when modules need firmware upgrade |
||
49 | |||
50 | h3. LION Tool |
||
51 | |||
52 | A java software called LionTool can be downloaded to handle all operation needed for test and maintain the bus. The software act as the Master and supports all three bus modes. |
||
53 | LionTool uses same java driver to become a LION master as the DTXr. |
||
54 | 1 | Torbjorn Carlqvist Admin | |
55 | 11 | David Fredriksson | To install, first make shure you are in /home/admin/liontool, than you can download from davitor repository by |
56 | 4 | Torbjorn Carlqvist Admin | |
57 | <pre> |
||
58 | 1 | Torbjorn Carlqvist Admin | wget --user admin --password **** https://artifacts.davitor.com/repository/davitor-mvn-release/com/davitor/multigrator/lion/1.7/lion-1.7-app.zip |
59 | </pre> |
||
60 | 11 | David Fredriksson | |
61 | You may have to unzip the file and chose to overwrite All if you have a previous version installed. |
||
62 | 5 | Torbjorn Carlqvist Admin | |
63 | 7 | Torbjorn Carlqvist Admin | Consult DAVITOR for correct version and password to use! |
64 | 5 | Torbjorn Carlqvist Admin | |
65 | 9 | David Fredriksson | Before adressing stop DTX |
66 | <pre>sudo systemctl stop dtx</pre> |
||
67 | |||
68 | 8 | David Fredriksson | The path will be: **/home/admin/liontool** |
69 | 5 | Torbjorn Carlqvist Admin | Unzip and run as |
70 | * For channel assignment add the -a option |
||
71 | <pre> |
||
72 | sudo java -jar lion-1.7.jar -a |
||
73 | </pre> |
||
74 | * For test mode |
||
75 | 6 | Torbjorn Carlqvist Admin | <pre> |
76 | 5 | Torbjorn Carlqvist Admin | sudo java -jar lion-1.7.jar |
77 | 6 | Torbjorn Carlqvist Admin | </pre> |
78 | 9 | David Fredriksson | |
79 | 12 | David Fredriksson | For now, you do get an error message at start that is perfectly normal: |
80 | "2022-05-20 10:45:08,939 main ERROR properties Properties has no parameter that matches element PatternMatch" |
||
81 | |||
82 | 9 | David Fredriksson | Remember to start dtx afterwards |
83 | |||
84 | <pre>sudo systemctl start dtx</pre> |
||
85 | 10 | David Fredriksson | |
86 | You can always check the status of DTX by using the command: |
||
87 | |||
88 | |||
89 | <pre>sudo systemctl status dtx</pre> |
||
90 | 13 | David Fredriksson | |
91 | The service hat runs DTX can be disabled all together and wont start again by: |
||
92 | <pre> |
||
93 | 14 | David Fredriksson | sudo systemctl disable dtx |
94 | </pre> |
||
95 | |||
96 | And than of cause to turn it on: |
||
97 | <pre> |
||
98 | sudo systemctl enable dtx |
||
99 | 13 | David Fredriksson | </pre> |
100 | 15 | David Fredriksson | DTX wont start automatically untill its started after enable so don't forget to start by: |
101 | <pre> |
||
102 | sudo systemctl start dtx |
||
103 | </pre> |