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

Process control simulation? #3

Open
bbartling opened this issue Jan 5, 2019 · 5 comments
Open

Process control simulation? #3

bbartling opened this issue Jan 5, 2019 · 5 comments
Labels

Comments

@bbartling
Copy link

Hello, I apologize if this isn’t the appropriate place to ask this question but could I use this package to simulate a process mixing control application where an actuator and valve control to a temperature setpoint?

@JdeH JdeH added the question label Jan 5, 2019
@JdeH
Copy link
Member

JdeH commented Jan 5, 2019

You certainly could!
It's made for exacly that type of thing.

What works best is making at least 2 SimPyLC modules that cooperate.
One module simulates your physical process.
The other one is the control.
Then add a visualisation and some real time charts.
See the one armed robot for an example.

Additionally, if you want to control real hardware,
when your simulation is ready, autogenerate code for the Arduino single board controller.
Assign some ports and add a real valve c.q. actuator (and probably a temperature sensor).
The Arduino stove and traffic lights examples show you how that is done.
It's also discussed in the SimPyLC howto reader.
If you want to make a real time simulation, it's worth while reading this document in its entirity.

Important: All this will work quite well in my experience,
but nevertheless don't use it to control anything that may cause damage or injure someone.
SimPyLC has been constructed carefully, but neither it, nor Python are suitable for such
an application, since they aren't "industrial grade".

See the license
Apart from that, SimPyLC is a great learning and experimentation tool.

Kind regards
Jacques

PS If you need some sample code as a starting point, please let me know, it isn't that much work.

@bbartling
Copy link
Author

Hello this application is coming up again for me where I am looking to simulate an electric heater maintaining a tank temperature and setpoint... Would you have any sample code that you mention in your PS note?

Would it be possible to model the tank temperature and an electric heating element cycling to maintain a setpoint?

@JdeH
Copy link
Member

JdeH commented Feb 10, 2021

Sorry, haven't looked at this project for a long time.
Is this still something you need?

@bbartling
Copy link
Author

bbartling commented Feb 10, 2021 via email

@bbartling
Copy link
Author

Hi would you have any code/examples I could use to simulate a fan motor a variable fan motor controlling a temp/humidity sensors? I am trying to experiment with PID and fuzzy logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants