This application discloses an electric cylinder control method,
system, and storage medium, belonging to the field of
electric control technology. The electric cylinder control method includes establishing a three-level hierarchical architecture of host computer-controller-driver, which completes a
closed loop from instruction issuance and logic
processing to power execution; dividing the CPU's runtime of the host computer into several
fixed time slices and configuring the time slices; using a
timer to enable the controller to generate a reference
clock and configuring the reference
clock; based on the three-level hierarchical architecture, performing time slice
polling scheduling according to the reference
clock and the time slices to achieve control of the electric cylinder by the driver; by adopting time slice
polling scheduling, without relying on an expensive real-time
operating system, and due to the matching of the reference clock and the time slices, it effectively ensures the stable switching of the driver's cyclic start, run, and stop state machines, as well as the real-time performance of multi-task concurrent
processing in
actual use.