QQuick / SimPyLC

PLC simulator with Arduino code generation
64 stars 16 forks source link

Process control simulation? #3

Open bbartling opened 5 years ago

bbartling commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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 commented 3 years ago

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

bbartling commented 3 years ago

Sure if you had any examples related to HVAC this is what I am working on at the moment.

I work in the utility industry where we shut off HVAC mechanical cooling equipment to trim power consumption. Any examples related to fan, pumping, or mechanical cooling application (chillers) would be super helpful.

Thanks!

On Wed, Feb 10, 2021 at 9:40 AM Jacques de Hooge notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/QQuick/SimPyLC/issues/3#issuecomment-776799855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHC4BHM5I5YAVUWUU3GXCCLS6KSFNANCNFSM4GOFKWWA .

bbartling commented 3 years ago

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.