Project

General

Profile

Main » History » Version 34

Torbjorn Carlqvist Admin, 11/06/2023 09:08 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 20 Torbjorn Carlqvist Admin
* 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 single i2c slave device independent of the number of modules.
15 2 Torbjorn Carlqvist Admin
* 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 31 Torbjorn Carlqvist Admin
To install, first make sure you are in /home/admin/liontool, create the folder if not exists, then you can download from davitor repository by
56 1 Torbjorn Carlqvist Admin
57 31 Torbjorn Carlqvist Admin
Create if not exists
58 1 Torbjorn Carlqvist Admin
<pre>
59 31 Torbjorn Carlqvist Admin
mkdir /home/admin/liontool;cd liontool
60
</pre>
61
Else
62
<pre>
63
cd liontool
64
</pre>
65
Donwload
66
<pre>
67 19 Torbjorn Carlqvist Admin
wget --user admin --password **** https://artifacts.davitor.com/repository/davitor-mvn-release/com/davitor/multigrator/lion/3.1/lion-3.1-app.zip
68 1 Torbjorn Carlqvist Admin
</pre>
69
Unzip the file and chose to Overwrite All if you have a previous version installed.
70 31 Torbjorn Carlqvist Admin
<pre>
71
unzip lion-3.1-app.zip
72
</pre>
73 5 Torbjorn Carlqvist Admin
74 18 Torbjorn Carlqvist Admin
Consult DAVITOR for correct version and password to use!
75 1 Torbjorn Carlqvist Admin
76 9 David Fredriksson
%{color:red}If project:DTXr is installed and running it is important to stop that service first!%
77
<pre>sudo systemctl stop dtx</pre>
78 8 David Fredriksson
79 31 Torbjorn Carlqvist Admin
80 19 Torbjorn Carlqvist Admin
*  For automatic module setup with channel adress assignment use option -a as:
81 5 Torbjorn Carlqvist Admin
<pre>
82 30 Torbjorn Carlqvist Admin
sudo java -jar lion-3.1.jar -a
83 5 Torbjorn Carlqvist Admin
</pre>
84 19 Torbjorn Carlqvist Admin
*  For test mode only where a test menu will be shown use:
85 6 Torbjorn Carlqvist Admin
<pre>
86 30 Torbjorn Carlqvist Admin
sudo java -jar lion-3.1.jar
87 9 David Fredriksson
</pre>
88 34 Torbjorn Carlqvist Admin
*  There are optional inputs to liontool for each of the lion-specific pin routing. This is useful when a non-raspberry platform is used.
89 32 Torbjorn Carlqvist Admin
-i2c: Path to i2c device to use
90
-fl: factory reset line (if supported)
91
-rl: reset line
92
-gcl: GPIO bus config line
93
-hcl: HMI bus vonfig line
94
-al: Alert line
95
96 33 Torbjorn Carlqvist Admin
  Example for a Banana PI Zero setup:
97 32 Torbjorn Carlqvist Admin
<pre>
98
sudo java -jar lion-3.1.jar -i2c /dev/i2c-0 -fl 14 -rl 3 -gcl 1 -hcl 0 -al 6
99 24 Torbjorn Carlqvist Admin
</pre>
100 10 David Fredriksson
101 18 Torbjorn Carlqvist Admin
%{color:red}If project:DTXr is installed you can start it again now!%
102 10 David Fredriksson
<pre>sudo systemctl start dtx</pre>
103 25 Torbjorn Carlqvist Admin
104
h3. Bootloader
105 26 Torbjorn Carlqvist Admin
106 25 Torbjorn Carlqvist Admin
It is possible to update the LION modules on the field bus.
107
Simply copy the new module firmware to same directory where you have the lion tool unpacked.
108
Perform a "-a" operation and the tool will update each and one of the modules with the files you have supplied.
109
The bootloader will try to match a file in the directory to the module hardware type.
110
lets say you have a Hw1 module (4R8DI) on the bus. Then if you place a file with pattern "4RC-hw001-va003-ve004.hex" in the directory the module will be updated to Variant 3 and Version 4.
111
You can have multiple files for different module hardware types but you will get an error if you place more than one file for same hardware type.