Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Robot Framework library for driving CNC mill

Project Description

This is a Robot Framework library for driving a CNC milling machine. Idea here is that the mill is modified/built so that the cutter is replaced by a tool tip that can be used to touch physical device e.g. device with numpad. With this library you can move the tool tip to predefined locations and use it to press (buttons). This is useful for auomating acceptance testing for devices that can only be accessed physically. Library only contains keywords for driving the tool. Assertions needs to be done with some other way depending on the device under test e.g. camera+image recognition.

In our case we used ShapeOko 2 CNC-milling machine controlled by Arduino based grbl motion controller connected to Raspberry Pi 2 with camera module. The device under test in example is iZettle payment terminal.

Image Recognition library we used with camera for assertions is not included in this library.

Prerequisities

  • Python 2.7
  • pip
  • Robot Framework

Installation

If you have pip, installation is straightforward

$ pip install robotframework-cnclibrary

This will automatically install dependencies as well as their dependencies.

Note: if pip install does not find the package, download, extract and pip install the folder

Configuration file format

Configuration uses simple json format where you define positions in 3D-space.

There is a special location called ‘device_location’ that needs to exist in the configuration. The ‘device_location’ is relative to the home location where you always start the test cases. This ‘device_location’ is also special location in a sense that it must be the highest location in Z-coordinates. This location is used as safe height when raising and moving the tool – ie. no other location can be above the ‘device_location’ - otherwise the tool might collide to the device under test.

Button locations are relative to ‘device_location’ in xy-plane to make it more simple to map the location of the buttons. Z-coodinate is however always relative to the home location ie. Z should never have negative value.

You can also define special locations that are not buttons. e.g. location where the tool should go to take a photo if you have a camera attached. You can use ‘Go To’ keyword to move the tool to such location without lowering/pressing.

See example config in examples/test_device.json.

Keyword documentation

Keyword Documentation

Running tests

To run tests:

$ cd tests/itest/
$ python test_cnclibrary.py
Release History

Release History

This version
History Node

0.1.1

History Node

0.1-dev

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
CncLibrary-0.1.1.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Dec 1, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting