Difference between revisions of "1wire"

From IPLOG
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=== Configuration 1-WIRE Temperature Sensors ===
 
=== Configuration 1-WIRE Temperature Sensors ===
IF-07G allow connect 1-wire temperature sensors. For easy configuration and using variables in Metel IEC61131-3 is prepared small application which is possible control from CLI for example putty.
+
IF-07G allow connect 1-wire temperature sensors. For easy configuration and using variables in Metel IEC 61131-3 is prepared small application which is possible control from CLI for example putty.
 
=== 1. Update List of Available Packages ===
 
=== 1. Update List of Available Packages ===
 
{{NotePre|text= root@iplog:~# opkg update
 
{{NotePre|text= root@iplog:~# opkg update
Line 10: Line 10:
 
  Downloading http://www.iplog.eu/opkg/firmware/Packages.gz.
 
  Downloading http://www.iplog.eu/opkg/firmware/Packages.gz.
 
  Updated source 'firmware'.
 
  Updated source 'firmware'.
 
+
Note: Command '''"opkg list"''' display all available packages.
 
=== 2. Install metel-1wire-temperature Package ===
 
=== 2. Install metel-1wire-temperature Package ===
 
{{NotePre|text= root@iplog:~# opkg install metel-1wire-temperature
 
{{NotePre|text= root@iplog:~# opkg install metel-1wire-temperature
Line 16: Line 16:
  
 
Example of Package Installing:  
 
Example of Package Installing:  
  Installing metel-1wire-temperature (0.0.2-11980.203140748) on root.
+
  Installing metel-1wire-temperature (0.0.2-12014) on root.
  Downloading http://www.iplog.eu/opkg-debug/base/metel-1wire-temperature_0.0.2-11980.203140748_all.ipk.
+
  Downloading http://www.iplog.eu/opkg/base/metel-1wire-temperature_0.0.2-12014_all.ipk.
 
  Configuring metel-1wire-temperature.
 
  Configuring metel-1wire-temperature.
 
  Starting metel-1wire-temperatured: OK
 
  Starting metel-1wire-temperatured: OK
  
=== 3. Using metel-1wire-temperature Package ===
+
=== 3. Available Commands for metel-1wire-temperature Package ===
 +
Display help
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature help }}
 +
Usage: metel-1wire-temperature <command>
 +
Commands:
 +
  help          - Shows commands
 +
  list          - Shows list of actual connected devices
 +
  config        - Shows list with sensors which are used for creating variables for IEC 61131-3
 +
  add {<id>|all} - Add one or all devices into config list
 +
  del {<id>|all} - Delete one or all sensors from config list
 +
  update_iec    - Updates the list of IEC variables depending on the config list
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature list}}
 +
Example of list with all connected devices. Column Addr is empty, because we have not yet defined which sensors we will use.
 +
Id                      Addr
 +
28.202877911702
 +
28.2341E00A0000
 +
28.2BFD77911702
 +
28.40C577911602
 +
28.6FDFDE0A0000
 +
28.7325DF0A0000
 +
28.73F877910E02
 +
28.7B1CDF0A0000
 +
28.87D5DE0A0000
 +
28.C94D0F020000
 +
28.EB9277910C02
 +
Total 11 devices
 +
Configuration that we want to use all connected sensors. Command which add all devices without Addr to config list. Config list is used for creating variables for Metel IEC 61131-3
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature add all}}
 +
Display config list.
 +
{{NotePre|text= metel-1wire-temperature config}}
 +
Example of config list with all configurated devices
 +
Id                      Addr
 +
28.202877911702        1
 +
28.2341E00A0000        2
 +
28.2BFD77911702        3
 +
28.40C577911602        4
 +
28.6FDFDE0A0000        5
 +
28.7325DF0A0000        6
 +
28.73F877910E02        7
 +
28.7B1CDF0A0000        8
 +
28.87D5DE0A0000        9
 +
28.C94D0F020000        10
 +
28.EB9277910C02        11
 +
 
 +
==== Connecting New Device(s) ====
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature list}}
 +
Id                      Addr
 +
28.202877911702        1
 +
28.2341E00A0000        2
 +
28.2BFD77911702        3
 +
28.40C577911602        4
 +
28.6FDFDE0A0000        5
 +
28.7325DF0A0000        6
 +
28.73F877910E02        7
 +
28.7B1CDF0A0000        8
 +
28.87D5DE0A0000        9
 +
28.C94D0F020000        10
 +
28.EB9277910C02        11
 +
28.EED777911602
 +
Total 12 devices
 +
In the list is one new device, without Addr. For add this sensor to config list we use next command.
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature add 28.EED777911602}}
 +
Check that the sensor has been added to the config list.
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature config}}
 +
Id                      Addr
 +
28.202877911702        1
 +
28.2341E00A0000        2
 +
28.2BFD77911702        3
 +
28.40C577911602        4
 +
28.6FDFDE0A0000        5
 +
28.7325DF0A0000        6
 +
28.73F877910E02        7
 +
28.7B1CDF0A0000        8
 +
28.87D5DE0A0000        9
 +
28.C94D0F020000        10
 +
28.EB9277910C02        11
 +
28.EED777911602        12
 +
 
 +
=== 4. Creates variables for IEC 61131-3 ===
 +
If you have define all sensors or you did some changes, it is neccesary create actual list of varibales for one wire sensors.
 +
{{NotePre|text= root@iplog:~# metel-1wire-temperature update_iec}}
 +
Example of updating proccess
 +
Stopping metel-1wire-temperatured: OK
 +
Starting metel-1wire-temperatured: OK
 +
Stopping IEC 61131-3
 +
Starting IEC 61131-3
 +
Now are variables available for programming in Metel IEC 61131-3 program.

Latest revision as of 07:51, 23 July 2021

Configuration 1-WIRE Temperature Sensors

IF-07G allow connect 1-wire temperature sensors. For easy configuration and using variables in Metel IEC 61131-3 is prepared small application which is possible control from CLI for example putty.

1. Update List of Available Packages

root@iplog:~# opkg update

Example of Update Process:

Downloading http://www.iplog.eu/opkg/base/Packages.gz.
Updated source 'base'.
Downloading http://www.iplog.eu/opkg/firmware/Packages.gz.
Updated source 'firmware'.

Note: Command "opkg list" display all available packages.

2. Install metel-1wire-temperature Package

root@iplog:~# opkg install metel-1wire-temperature

Example of Package Installing:

Installing metel-1wire-temperature (0.0.2-12014) on root.
Downloading http://www.iplog.eu/opkg/base/metel-1wire-temperature_0.0.2-12014_all.ipk.
Configuring metel-1wire-temperature.
Starting metel-1wire-temperatured: OK

3. Available Commands for metel-1wire-temperature Package

Display help

root@iplog:~# metel-1wire-temperature help
Usage: metel-1wire-temperature <command>
Commands:
 help           - Shows commands
 list           - Shows list of actual connected devices
 config         - Shows list with sensors which are used for creating variables for IEC 61131-3
 add {<id>|all} - Add one or all devices into config list
 del {<id>|all} - Delete one or all sensors from config list
 update_iec     - Updates the list of IEC variables depending on the config list
root@iplog:~# metel-1wire-temperature list

Example of list with all connected devices. Column Addr is empty, because we have not yet defined which sensors we will use.

Id                      Addr
28.202877911702
28.2341E00A0000
28.2BFD77911702
28.40C577911602
28.6FDFDE0A0000
28.7325DF0A0000
28.73F877910E02
28.7B1CDF0A0000
28.87D5DE0A0000
28.C94D0F020000
28.EB9277910C02
Total 11 devices

Configuration that we want to use all connected sensors. Command which add all devices without Addr to config list. Config list is used for creating variables for Metel IEC 61131-3

root@iplog:~# metel-1wire-temperature add all

Display config list.

metel-1wire-temperature config

Example of config list with all configurated devices

Id                      Addr
28.202877911702         1
28.2341E00A0000         2
28.2BFD77911702         3
28.40C577911602         4
28.6FDFDE0A0000         5
28.7325DF0A0000         6
28.73F877910E02         7
28.7B1CDF0A0000         8
28.87D5DE0A0000         9
28.C94D0F020000         10
28.EB9277910C02         11

Connecting New Device(s)

root@iplog:~# metel-1wire-temperature list
Id                      Addr
28.202877911702         1
28.2341E00A0000         2
28.2BFD77911702         3
28.40C577911602         4
28.6FDFDE0A0000         5
28.7325DF0A0000         6
28.73F877910E02         7
28.7B1CDF0A0000         8
28.87D5DE0A0000         9
28.C94D0F020000         10
28.EB9277910C02         11
28.EED777911602
Total 12 devices

In the list is one new device, without Addr. For add this sensor to config list we use next command.

root@iplog:~# metel-1wire-temperature add 28.EED777911602

Check that the sensor has been added to the config list.

root@iplog:~# metel-1wire-temperature config
Id                      Addr
28.202877911702         1
28.2341E00A0000         2
28.2BFD77911702         3
28.40C577911602         4
28.6FDFDE0A0000         5
28.7325DF0A0000         6
28.73F877910E02         7
28.7B1CDF0A0000         8
28.87D5DE0A0000         9
28.C94D0F020000         10
28.EB9277910C02         11
28.EED777911602         12

4. Creates variables for IEC 61131-3

If you have define all sensors or you did some changes, it is neccesary create actual list of varibales for one wire sensors.

root@iplog:~# metel-1wire-temperature update_iec

Example of updating proccess

Stopping metel-1wire-temperatured: OK
Starting metel-1wire-temperatured: OK
Stopping IEC 61131-3
Starting IEC 61131-3

Now are variables available for programming in Metel IEC 61131-3 program.