PTHAT changing speed on the fly example using Instant Commands

With this example, we show how to use the PTHAT being used to control the speed of a Closed Loop Servo motor and Closed Loop Stepper Motor.

 

Within the application you first connect to your Raspberry Pi serial port by clicking the Connect button.

Now you can click on the Start button and the motor will spin up to the speed you have set by sending a Set Axis Command and a Start Axis Command.

Changing the speed is easy, simply choose the resolution of the RPM you wish to use and click on the arrow keys. This will send a Change Speed on the Fly command and the motor will change it’s speed to the new speed that has been set.

 

Commands used in this example are:

Set Axis Command

Start Axis Command

Stop Axis Command

Pause/Resume Axis Command

Change Axis Speed on the fly Command

Request Firmware Version

Reset PTHAT

In this video we demonstrate the application.

The end developer has easily modify this example to build their own application.

The example application was developed in Visual Studio 2015 that can be used with Windows 10 IOT on the Raspberry Pi or compiled to x86/x64 for use on a PC.
The example has been written in C# as a Universal Windows Platform (UWP).

You can either download the compiled program from the Windows App Store on the following link
https://www.microsoft.com/en-gb/store/p/pulse-train-hat-rpm-on-the-fly/9njzp8rkbtf5

Or please use the following link to download the full source code.

Gallery

Closer look at the PCB's