PTHAT Pick and Place Example using Buffered and Instant Commands on CNC Machine
With this example, we show how to use the PTHAT being used to learn commands for Pick and Place applications.
We have connected the PTHAT to our CNC 800mm x 800mm machine at work as a test.
Within the software you can alter the settings to suit your own CNC machine, such as Pulses per mm on each Axis and speeds.
Within the application you first connect to your Raspberry Pi serial port by clicking the Connect button.
You have a choice of manually adding commands that will be buffered and executed one after the other, or you can jog the machine to the position you require and click the store button to add the command.
For manually adding commands, both Incremental and Absolute modes are supported.
After storing the commands, you can then play them back.
Instant Commands used in this example are:
Set Axis CommandStart Axis Command
Stop Axis Command
Request Current Pulse Count Command
Set Aux Output Command
Set Wait Delay between commands
Toggle Motor Enable Line
Request Firmware Version
Reset PTHAT
Buffer Commands used in this example are:
H Initiate the bufferZ Buffer Start Command
In this video we show you how to add manual commands or how to use it in learning mode.
We use Instant commands for jogging and for playing the commands back we use Buffered commands. More of this is explained in the video.
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-buffer-pick-place-example/9npqgt2g93v1
Or please use the following link to download the full source code.
Select another example below
Closer look at the PCB's
PTHAT Mainboard
- Single Channel Main Board.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
PTHAT Add on Board
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- Set of Mounting Spacers.
PTHAT Full Package
- Single Channel Main Board.
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
- Save £10 with this Package