User Tools

Site Tools


elster_meter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
elster_meter [2020/12/23 13:29] emozolyakelster_meter [2022/01/15 20:54] (current) – ↷ Links adapted because of a move operation 127.0.0.1
Line 1: Line 1:
 ====== Electricity meters Elster ====== ====== Electricity meters Elster ======
  
-{{ ::1140_view.png?direct&400|}} +{{ network:1140_view.png?direct&200|}} 
-Two models are supported with the help of custom protocols:+Two models are supported with the help of [[custom_protocols?s[]=custom#custom_protocols|custom protocols]]:
   * A1170   * A1170
   * A1140   * A1140
  
 +There are custom protocol versions for 7bit Mediator devices. Turn to your local representative for more information.
  
  
 +
 +<code lua - example.lua>
 +function poll_meter(port, conn_num, init_mb_addr) 
 +    
 +    local params = {voltage =   {poll_t = {mbtcp_base = init_mb_addr,      code = "1B2B4B00", count = 10, name = 'U'}},     
 +                    current =   {poll_t = {mbtcp_base = init_mb_addr + 10, code = "1A2A4A00", count = 9,  name = 'I'}}, 
 +                    a_power =   {poll_t = {mbtcp_base = init_mb_addr + 20, code = "1C2C4C0C", count = 12, name = 'P'}}, 
 +                    r_power =   {poll_t = {mbtcp_base = init_mb_addr + 30, code = "1D2D4D0D", count = 12, name = 'R'}}, 
 +                    total_pwr = {poll_t = {mbtcp_base = init_mb_addr + 40, code = "1E2E4E0E", count = 12, name = 'tp'}}, 
 +                    cos_ =      {poll_t = {mbtcp_base = init_mb_addr + 50, code = "13234303", count = 12, name = 'cos_'}},  
 +                    freq_ =     {poll_t = {mbtcp_base = init_mb_addr + 60, code = "18284800", count = 10, name = 'freq'}}, 
 +                    energy    {poll_t = {mbtcp_base = init_mb_addr + 70}}       
 +        }
 +    
 +    if (not Connect(port,  conn_num)) then 
 +        print('Could not make Connect!')
 +        return 'timeout' 
 +    else        
 +        print('Connected!')
 +                                                   -- VOLTAGE READ 
 +        local all_read_flag = true 
 +        for k, p in pairs(params) do 
 +            if (k ~= 'energy') then 
 +                all_read_flag = all_read_flag and ReadStructure(port, p.poll_t)  
 +            else 
 +                all_read_flag = all_read_flag and ReadEnergy(port, p.poll_t)  
 +            end 
 +        end 
 +        
 +        if all_read_flag then 
 +              print('read all!')
 +              return 'cached'
 +        else 
 +             dbg_state = 'voltageData was  not read...'
 +             return 'undefined' 
 +        end 
 +        disconnect(port)
 +    end -- connect 
 +end 
 +</code>
elster_meter.1608730165.txt.gz · Last modified: 2020/12/23 13:29 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki