Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:33 07 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Operating Valves.

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:09am 11 Jul 2016
Copy link to clipboard 
Print this post

Hi All,

Looking for some feedback on operating my ball valves.
They will only move a few times a day.

I know I can just call a Sub & have the main loop suspended for 10 or 15 seconds while I wait for the valve to move & the limit change, then return to the main loop.

But can I move & check them in the background?

It's not super important for the valves, but once I start adding Coms, I'd rather not have the main loop pausing every time data is exchanged between different MicroMites.

Similar code could be applied to both needs.

Thanks

Phil.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 03:36pm 11 Jul 2016
Copy link to clipboard 
Print this post

Thinking along the lines of a Subroutine that activates the appropriate relay when called, then returns to the main loop while the valves are in motion.

Probably checking the limits every 5 seconds to see they do reach their destination and also shutting the relay off after a timeout of 30 seconds.

I get the impression it might need a SETTICK Sub, but don't want to fall in the trap of calling that same sub from my main routine & getting tied up in recursive calls.


Cheers

Phil.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025