Comments (2)
Put the read code in a try catch.
On an exception. Execute the parent function again but put a sleep in
there..
Def readfunction ():
Try:
Db.read ()
Except:
#Prevent fast looping
Sleep (2)
readfunction ()
Do shit when read was ok..
On Mar 28, 2014 10:25 PM, "standerAnder" [email protected] wrote:
Hi,
I read the data cyclically from the plc, now if the connection is
suddenly lost,
how do I a reconnect?—
Reply to this email directly or view it on GitHub.
from python-snap7.
Hi,
Thank you for your help. I'll try it as soon as I have time for it. ;-)
from python-snap7.
Related Issues (20)
- Can I still use snap7 with python2.7? HOT 1
- Switch to pyproject.toml (pep-621)
- Function Refused By CPU HOT 4
- Replace the "can't find snap7 library" error message with something more useful HOT 1
- snap7.util.DB_Row set_dtl HOT 2
- Too much logging in client db_read() method HOT 2
- PLC crashed when executing the "get_cpu_info" function HOT 1
- How to read and write values of type bool using snap7 module?
- Can not use this library to read timers of simatic S7-200 smart PLC HOT 2
- Redundant 400-H get_cpu_state() returning incorrect value.
- Add python 3.12 support, build wheels HOT 2
- RuntimeError: b' ISO : An error occurred during recv TCP : Connection timed out'
- Error in util.Set_String and util.Get_String
- as_db_read() doesnt work
- Wrong values set_lreal
- db[0]['x']=22.33 raises ValueError HOT 2
- Improve doc for area_read in client HOT 2
- Communication between PLC and PC HOT 1
- Can't read from S210 Drive
- Get data block layout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-snap7.