Fórum | MyPower.CZ | Obnovitelné zdroje energie - energetická soběstačnost | Poslední návštěva: čtv čer 30, 2022 12:12 am
kodl69 píše:snad 4x, 100/4=25... ale to jde jenom s průvlekovými trafy, pokud má vývody a je celý zalitý tak se nic neprovlíká.
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 2.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
IPython profile: pysh
@compecogment-PC[C:compecogment]|1> pip install git+https://github.com/kipe/siem
ens-pac.git
Collecting git+https://github.com/kipe/siemens-pac.git
Cloning https://github.com/kipe/siemens-pac.git to c:\users\compec~1\appdata\l
ocal\temp\pip-tffldt-build
Collecting modbus-tk>=0.4.3 (from siemens-pac==0.20)
Downloading modbus_tk-0.4.3.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pyserial>=2.7 in c:\py
thon27\lib\site-packages (from siemens-pac==0.20)
Building wheels for collected packages: modbus-tk
Running setup.py bdist_wheel for modbus-tk
Stored in directory: C:\Users\compecogment\AppData\Local\pip\Cache\wheels\7c\a
0\b0\ef1b75d1a7924460b79fe570f0350336125afab81592dc14b8
Successfully built modbus-tk
Installing collected packages: modbus-tk, siemens-pac
Running setup.py install for siemens-pac
Successfully installed modbus-tk-0.4.3 siemens-pac-0.20
@compecogment-PC[C:compecogment]|2> from siemens.pac import PACx200
@compecogment-PC[C:compecogment]|3> p = PACx200('192.168.1.222')
@compecogment-PC[C:compecogment]|4> p.read() # Reads all values from PAC
@compecogment-PC[C:compecogment]|5> # Print whole PAC as dictionary, with NaN va
lues replaced with 0 (useful for JSON dumping).
@compecogment-PC[C:compecogment]|6> print(p.as_dict(replace_nan=True))
{u'phases': {u'L2': {u'current': {u'value': 0.0, u'unit': u'A'}, u'voltage': {u'
value': 0.0, u'unit': u'V'}, u'power': {u'active': {u'value': 0.0, u'unit': u'W'
}, u'reactive': {u'value': 0.0, u'unit': u'VAR'}, u'apparent': {u'value': 0.0, u
'unit': u'VA'}}}, u'L3': {u'current': {u'value': 0.0, u'unit': u'A'}, u'voltage'
: {u'value': 0.0, u'unit': u'V'}, u'power': {u'active': {u'value': 0.0, u'unit':
u'W'}, u'reactive': {u'value': 0.0, u'unit': u'VAR'}, u'apparent': {u'value': 0
.0, u'unit': u'VA'}}}, u'L1': {u'current': {u'value': 0.0, u'unit': u'A'}, u'vol
tage': {u'value': 230.51483154296875, u'unit': u'V'}, u'power': {u'active': {u'v
alue': 0.0, u'unit': u'W'}, u'reactive': {u'value': 0.0, u'unit': u'VAR'}, u'app
arent': {u'value': 0.0, u'unit': u'VA'}}}}, u'power': {u'active': {u'value': 0.0
, u'unit': u'W'}, u'reactive': {u'value': 0.0, u'unit': u'VAR'}, u'apparent': {u
'value': 0.0, u'unit': u'VA'}}, u'energy': {u'import': {u'active': {u'value': 0.
0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0, u'unit': u'VARh'}, u'apparent':
{u'value': 0.0, u'unit': u'VAh'}}, u'export': {u'active': {u'value': 0.0, u'uni
t': u'Wh'}, u'reactive': {u'value': 0.0, u'unit': u'VARh'}, u'apparent': {u'valu
e': 0.0, u'unit': u'VAh'}}}, u'frequency': 49.99508285522461, u'tariffs': [{u'im
port': {u'active': {u'value': 0.0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0,
u'unit': u'VARh'}, u'apparent': {u'value': 0.0, u'unit': u'VAh'}}, u'export': {
u'active': {u'value': 0.0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0, u'unit'
: u'VARh'}, u'apparent': {u'value': 0.0, u'unit': u'VAh'}}}, {u'import': {u'acti
ve': {u'value': 0.0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0, u'unit': u'VA
Rh'}, u'apparent': {u'value': 0.0, u'unit': u'VAh'}}, u'export': {u'active': {u'
value': 0.0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0, u'unit': u'VARh'}, u'
apparent': {u'value': 0.0, u'unit': u'VAh'}}}], u'balance': {u'active': {u'value
': 0.0, u'unit': u'Wh'}, u'reactive': {u'value': 0.0, u'unit': u'VARh'}, u'appar
ent': {u'value': 0.0, u'unit': u'VAh'}}}
@compecogment-PC[C:compecogment]|7>
Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 0 návštevníků