How does RTOS works in a PLC

I have been implementing a real-time scheduler for a project and now I want to use this in STM32 microcontroller and ultimately that will be used as the brain of a PLC. But when I learned about PLCs, I found out that PLCs has 4 steps in PLC scan cycle: input scan, program scan, output scan and housekeeping; and they are executing sequentially. Hence, I can't see a need of an RTOS on a PLC. But I know that PLCs (or at least some of them) are using RTOSes like VxWorks and RTLinux.
So, I'm confused about what RTOSes doing in a PLC. Can someone explain to me what does the RTOSes doing in PLCs?
 
I have been implementing a real-time scheduler for a project and now I want to use this in STM32 microcontroller and ultimately that will be used as the brain of a PLC. But when I learned about PLCs, I found out that PLCs has 4 steps in PLC scan cycle: input scan, program scan, output scan and housekeeping; and they are executing sequentially. Hence, I can't see a need of an RTOS on a PLC. But I know that PLCs (or at least some of them) are using RTOSes like VxWorks and RTLinux.
So, I'm confused about what RTOSes doing in a PLC. Can someone explain to me what does the RTOSes doing in PLCs?
Just try to have a search on the forum threads archives!
It can be very helpful !
Here is one of these post on RTOS & PLC Thema:
https://control.com/forums/threads/rtos-in-a-plc-program.10611/

I am sure that it can help,
Controls Guy25.
 
Just try to have a search on the forum threads archives!
It can be very helpful !
Here is one of these post on RTOS & PLC Thema:
https://control.com/forums/threads/rtos-in-a-plc-program.10611/

I am sure that it can help,
Controls Guy25.
I did searched on the forum threads archives. But none of them answers my question. What I want to know is not how RTOS works, I know the basics behind RTOSes. What I want to know is, if the PLC cycle executes in sequential order, why a real time scheduler is needed? In other words, for example, what does the VxWorks doing in a PLC?
 
Early PLCs didn't use RTOS. Now they are necessary to handle things like communications and timed events.
If you really want you can probably get by without an RTOS but as you add features you will find the RTOS simplifies things.
Often you don't need a full blown RTOS but just a real time kernel with a few system calls to handle waiting for interrupts, acknowledging interrupts. Gaining mutual exclusion to resources and releasing the resources, handling timing of events and timeouts. Handling timeouts is very important. Unlike windows a real time system should have a time out for critical inputs that affect going to the next step in a step sequence.
 
Early PLCs didn't use RTOS. Now they are necessary to handle things like communications and timed events.
If you really want you can probably get by without an RTOS but as you add features you will find the RTOS simplifies things.
Often you don't need a full blown RTOS but just a real time kernel with a few system calls to handle waiting for interrupts, acknowledging interrupts. Gaining mutual exclusion to resources and releasing the resources, handling timing of events and timeouts. Handling timeouts is very important. Unlike windows a real time system should have a time out for critical inputs that affect going to the next step in a step sequence.
Thank you very much for the explanation
 
Top