dimanche 28 juin 2015

Can you provide tips to implement a simple control system in an OOP Approach?

I'm writing a complex control system for several machines. I'm using C# for convenience, since no true-real time is required, just fast response.

My question is regarding the sampling of sensors in the physical controlled systems: I want to perform actions depending on their values (e.g. if the temperature drops below X do Action A, if the pressure is higher than Y do action B).

There's the simple loop-with-value-querying approach, and there's the option to implement a clock that periodically (hmmm, every 0.01 second) checks the value of about 50 different sensors.

Any finer, more efficient, smarter, more OOP-ish approaches?

Thanks!

Aucun commentaire:

Enregistrer un commentaire