Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created basic example code and s7util code edit db blocks in a pythonic way #2

Merged
merged 8 commits into from Nov 4, 2013

Conversation

spreeker
Copy link
Collaborator

No description provided.

gijzelaerr added a commit that referenced this pull request Nov 4, 2013
created basic example code and s7util code edit db blocks in a pythonic way
@gijzelaerr gijzelaerr merged commit 60b7783 into gijzelaerr:master Nov 4, 2013
gijzelaerr added a commit that referenced this pull request Mar 19, 2021
* added small int support

* change order

* spaces between functions

* changed functions small_int to usint (unsigned small int)

* change in db_row get value y set value changed comparation from sint to usint (0-255)

* added to db_row get_value and set_value comparation to sint (-128 to 127)

* added support for SMALL INT (-127 to 128)

* changes in test_util in bytearray, added numbers to ocuppe all bytes of the data structure in DTL

* test passed | changed _bytearray in test to match the lenght for the test

* added doc

* change space

* arreglos de espacios en blanco

* added s7areaDB  for default

* added default to db and db_row -> area=S7AreaDB

* same

* added read area | write area --- TODO tests

* correction to the db1['test'].read() -> added client

* read area debe corregirse

* correction to client.read_area of function write in class db_row

* corrections to def write in class db_row

* Small changes

- Types.py:
 * Added enum class to handle areas
- Utils:
 * Added some missing types
 * Added area parameter to the DB class, this way you could handle the inputs, outputs, or marks as a DB for reading it TODO: add tests
- Common.py:
   * Missing types
- Client.py:
 * Added an optional init parameter for the lib location, this way people who can't instal properly the library, they can specify the path to the .dll file.

* Types.py readd S7Areas as alone values

* Test fixes 1

* Typing errors fix 2

* White spaces fixes

* White spaces

* Remove enum Areas, so we stick to the ADict class

* Remove it TODOs in util.py

* Utils type export fix

* _type parameter switch to type_

* Fix typing for areas Adict

* Migration to Enum for Areas and WordLen

* switch assert date

* whitespaces

* Fix typing errors in util file

* ignore typing

* fix test

* whitespaces

* Added find locally snap7.dll
Fix logo errors

* fix assert error in date

* types.py:
* remove it string multiline methods added-

common.py
* Remove it type ignore from ctypes import

* Added common test and change common find_locally from using os to pathlib

* Pathlib

* Path lib fix to find in the current working directory

* prefill server areas for testing

* como crear un arreglo desde un buffer

* ...

* test mainloop prefill working until  double int

* Working filled values for:
- DWORD
- WORD
- STRING
- DINT
- INT
- USINT
- SINT
- BOOL

* fix pycodestyle

* Fixed test_read_real adding 0.00001% of almost equal assert

* Server and test changes

- Mainloop init standar values move to it's own function
- Change how binary is written
- Doc added?
- Move each datatype to a round decimal place

* fix pycodestyle

* added test_mainloop to the makefile

* also run tests on github actions

Co-authored-by: Lautaro Dapino <lautarodapin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants