Git Product home page Git Product logo

modbus's Introduction

WASA SCADA

This repository contains all the Python modules for communicating with modbus devices which are used to retrieve data and send it to the server using mqtt protocol

Documentation of the Modules

Energy Meter

This module contains 2 classes:

EnergyMeter_DZS100() We can create object with initialization and use methods of those classes like below. We just have to pass boolean value for those methods if we want to print or not.

dzs100 = EnergyMeter_DZS100(port='COM12', baudrate=9600, slaveAddress= 2)
combined_active_energy = dzs100.readCombinedActiveEnergy(print = False)
import_active_energy = dzs100.readImportActiveEnergy(print = False)
frequency = dzs100.readFrequency(print = False)

EnergyMeter_DZS500() We can create object like DZS100. But we have to pass parameters to the methods based on the query. In readCurrent(self, phase = None, Print = True) method we have to pass the phase name as string among 'A', 'B', 'C'

dzs500 = EnergyMeter_DZS100(port='COM12', baudrate=9600, slaveAddress= 2)
current_A = dzs500.readCurrent(phase = 'A')
current_B = dzs500.readCurrent(phase = 'B'\)

In readVoltage(self, phase=None, line=None, Print = True) method we can read voltage of phase or voltage of line. We have to pass parameters based on the requirement. We can read voltage of phases 'A', 'B', 'C' or voltage of lines 'AB', 'BC', 'CA'

voltage_A = dzs500.readVoltage(phase = 'A')
voltage_AB = dzs500.readVoltage(line = 'AB')

In readPower(self, category, phase=None, Print = True) method we have several options for category and phase. For category we have 'active', 'reactive', 'apparent' and 'factor'. Foy phases 'A', 'B' and 'C'. So if we want to read "Phase A active power" we can call the method like below

phaseA_activePower = dzs500.readPower(category = 'active', phase = 'A')
phaseB_reactivePower = dzs500.readPower(category = 'reactive', phase = 'B')

In changeBaudrate(self, baudrate = 9600, Print = True) method we can change the baudrate of communication.

#the below code will set baudrate to 9600 by default
dzs500.changeBaudrate()
#the below code will set baudrate to 2400
dzs500.changeBaudrate(baudrate= 2400)

In writeTime(self, value, unit='seconds') method we can write value of time using different units like 'seconds', 'minutes', 'hour', 'day', 'month', 'year'.

dzs500.writeTime(value=12, unit='seconds')
dzs500.writeTime(value=50, unit='minutes')

alt text

Contributors

modbus's People

Contributors

aurxine avatar fkhjoy avatar nadimulhaque0403 avatar faiza-sfa avatar

Watchers

 avatar

modbus's Issues

Add Fault History function to the class

We need another method in VFD class that will show the faults history.


Modbus/VFD.py

Lines 182 to 187 in da5d201

@todo Add Fault History function to the class
@body We need another method in VFD class that will show the faults history.
The detailed documentation will be provided
'''
def writeRunningFrequency(self, frequency_value):


This issue was generated by todo based on a todo comment in da5d201. It's been assigned to @aurxine because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.