Project

General

Profile

Main » History » Revision 16

Revision 15 (David Fredriksson, 08/25/2022 09:36 AM) → Revision 16/36 (David Fredriksson, 08/25/2022 09:37 AM)

h1. Then LION fieldbus concept 

 > LION is a joint venture between DAVITOR AB and Naronic AB 

 The concept consists of the following parts: 
 * Field bus specification 
 * Hardware form factor 
 * Source code 

 The bus is fundamentally an i2c bus and the IO-modules along the bus is slaves controlled by one master. 

 h3. Highlights 

 * 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. 
 * Data points as channels. 
 Currently supported channel types in the standard: 
 ** AL - Alert Channel. Special event channel to read when then ALERT line goes low. 
 ** AI - Analog Input 
 ** AO - Analog Output 
 ** DI - Digital Input 
 ** DO - Digital Output 
 ** SI - Input Stream. Forwards log text or serial data etc. to Master. 
 ** DA - Dali lightning control 
 * A dedicated ALERT line telling the master to read the alert channel 
 * Supports firmware boot loading of the slave modules over the filed bus. 

 !LION.png! 

 * 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. 
 * Alert - Goes low if a slave module needs to tell the master to read data. 
 * Clock - Clock signal 
 * Data - Data signal 
 * Power - The power supply for the slave module bus circuitry. Typically 3.3v. 
 * 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. 
 * Reset - When held low all modules bus chip will be rebooted. 
 * GND - Common ground for both Power and High Power lines. 

 h3. The channel concept in LION 

 All data points on a LION bus has a channel number assignment within it's channel type context. 
 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. 

 h3. Bus modes and adresses 

 The LION Bus operates in three modes. 
 * Data (0x28) - Normal operational mode 
 * Config (0x2C) - Halted operation while each module are acceded individually. 
 * Bootloader (0x33) - I used when modules need firmware upgrade 

 h3. LION Tool 

 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. 
 LionTool uses same java driver to become a LION master as the DTXr. 

 To install, first make shure you are in /home/admin/liontool, than you can download from davitor repository by 

 <pre> 
 wget --user admin --password **** https://artifacts.davitor.com/repository/davitor-mvn-release/com/davitor/multigrator/lion/1.7/lion-1.7-app.zip 
 </pre> 

 You may have to unzip the file and chose to overwrite All if you have a previous version installed. 

 Consult DAVITOR for correct version and password to use! 

 Before adressing stop DTX 
 <pre>sudo systemctl stop dtx</pre> 

 The path will be: **/home/admin/liontool** 
 Unzip and run as 
 *    For channel assignment add the -a option 
 <pre> 
 sudo java -jar lion-1.7.jar -a 
 </pre> 
 *    For test mode 
 <pre> 
 sudo java -jar lion-1.7.jar 
 </pre> 

 For now, you do get an error message at start that is perfectly normal: 
 "2022-05-20 10:45:08,939 main ERROR properties Properties has no parameter that matches element PatternMatch" 

 Remember to start dtx afterwards 

 <pre>sudo systemctl start dtx</pre> 

 You can always check the status of DTX by using the command: 


 <pre>sudo systemctl status dtx</pre> 

 The service hat runs DTX can be disabled all together and wont start again by: 
 <pre> 
 sudo systemctl disable dtx 
 </pre> 

 And than of cause to turn it on: 
 <pre> 
 sudo systemctl enable dtx 
 </pre> 
 DTX wont start automatically until untill its started after enable so don't forget to start by: 
 <pre> 
 sudo systemctl start dtx 
 </pre>