Linear Stepper Motor Example

So we’re just getting our blog up and running. The blog is aimed at getting more information to you, our users! We want to demonstrate what is going on within the world of Matrix, with an insight into what we’ve recently been doing, what we are doing right now and what we plan on doing in the future (well, we won’t be giving too much away).

Hopefully by now you have heard that we are shortly releasing Flowcode version 6, and for now you can actually gain access to an Open Beta, which is very exciting. In Flowcode 6 we have made many significant improvements over previous versions. We will start to detail the most significant of these updates in blog entries as we can provide more user friendly content than we can within a datasheet. In this article I’d like to demonstrate the ability to characterise relatively simple 3D models which react according to the created flowchart, allowing us to simulate electro-mechanical systems.


In this design we have utilised two stepper motors to provide movement on two axes. Stepper motors are used in applications where precise mechanical movements are required as they produce small incremental step sizes. It is also common to convert rotational movement from a stepper motor to linear movement. One example of where we may convert rotational to linear movement would be in a 3D printer in order to move the axes.

In Flowcode 6 you can create simple 3D models with the primitives we have provided, or use dedicated 3D drawing packages and import mesh files into your flowchart. Here we demonstrate that the simple primitives can be used to create an interesting 3D model. For complex models we would always recommend the use of a dedicated 3D drawing package however.

Here we have the first stepper motor connected to a simulated threaded bar, commonly used to simply convert rotational movement to linear movement. The second motor is mounted in the same way, but attached to the vertical arm, and as the motor spins, it moves the arm away from the vertical section.

This design also features some simulation only commands, used to detect when the motor has reached the limit of its movement, here seen by the yellow tabs within the model. In this situation, the Flowchart program polls to determine whether two 3D shapes have collided; the orange bracket and the yellow tab. If they have collided, the motor drive direction is reversed. This applies for the horizontal movement also. We’ve uploaded a video to YouTube so you can see the model operating even if you don’t yet have Flowcode. We’ve also included the necessary flowcode files to allow you to recreate the example yourself for those who already have access. If you haven’t yet tried the beta, we suggest you give it a try!

Flowchart Download

If you have any questions or suggestions, please let us know via comments on the blog.


25,082 total views, 6 views today


Leave a Reply