psypnp -- useful scripts for OpenPnP and a library of Python support modules to roll your own
Copyright (C) 2019-2021 Pat Deegan, https://psychogenic.com/
Released under the terms of the GPL v3 (see LICENSE file for details).
This package comes with two sets of components:
- some utility scripts to control an OpenPnP pick & place machine
- a set of Python modules that are used by the above scripts that can help you write powerful scripts of your own, easily
With this package you can work more efficiently with OpenPnP, for instance by using the auto-setup system to configure feeds for the project
then generate a map of the layout
move the set of part feeds around until satisfied and export a CSV of the configuration for ease of layout
The scripts include various motion control, configuration scripts that save me tons of clicking, a visualizer that shows you feed arrangement graphically through a generated SVG image, a useful REPL terminal, and more.
The modules have facilities for non-volatile information storage, easy use of the GUI to query users and other useful things.
See:
-
a walk-through of a simplified setup thanks to the use of many of the openpnp extension scripts
-
the (soon to be updated) psypnp for OpenPnP project page for a complete description and usage guide.
The contents of this project are meant to be house under the OpenPnP configuration directory (the place where it looks for the scripts/ directory for the contents of the Scripts toolbar menu).
Scripts, to be visible to OpenPnP, must be in the proper directory (~/.openpnp2/scripts under Linux).
Installation is as simple as sticking the contents of: scripts/ data/ and lib/
in there with the rest of the OpenPnP configuration.
The data/ dir is used to hold the non-volatile "db" (pickle) with information we want to have access to between script runs, so must be writeable by the OpenPnP process.
The scripts themselves, once installed, will be found under the OpenPnP Scripts menu. See the project description page or the source for details, but many of them are pretty self-explanatory.
Same story for the modules. There are examples online and in the scripts, but I also have an OpenPnP Scripting Deep Dive series on Youtube that may be of interest.