Im trying to make program which will work in cycle: Reading inputs(DI,AI), Main program(calling subroutine), Setting outputs(DO), Communication in backcround. Something like PLC cykle.
What is the best way to make program like this? How to use semaphores, mutex, threats atp. Im asking this because doing mistake at the beginning of desing, create a lot of problems in future.
Thank you very much and sorry for my english.