Git Product home page Git Product logo

haasmtconnect's Introduction

HAAS VF2 MTConnect Adapter

An MTConnect adapter for the HAAS VF2 CNC machine written in Python.

Introduction

A python encoded adapter for the HAAS VF2 CNC machine named 'HAAS_adapterv2.py' has been released on the public domain. Unless required by applicable law or agreed to in writing, the software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.

The adapter makes a HAAS VF2 CNC machine MTConnect protocol compliant and enables the machine to communicate with an MTConnect agent. The software has been tested on a HAAS VF2 machine with the MTConnect cpp agent. The steps to build and create the agent can be found at https://github.com/mtconnect/cppagent. The accompanying HAAS-VF2.xml mtconnect schema is to be appropriately routed to in the agent.cfg file once the agent is installed.

Usage

The implementation assumes that the adapter would be running on an external IOT device, e.g, a beaglebone, raspberry pi (or a PC) that is connected and communicating with the HAAS VF2 via RS232 communication. Hence, the primary mode of fetching process parameters from the HAAS is through serial communication. The adapter code in its current state assumes that the HAAS is connected to the IOT device through the ttyUSB0 port (would be 'COM' for PC based systems). The HAAS with its serial DB9 port has to be connected to the IOT device via the implementation of appropriate TTL - RS 232 logic converter modules ( such as a serial to USB module). It is therefore upto the discretion of the user to change the serial port address to an appropriate value when running the adapter.

The default TCP/IP port that the adapter publishes data to is set to:

PORT = 7000

The port address has to be changed (if needed), to suit user/system requirement.

Process Parameters

The current implementation fetches a limited number of process parameters from the HAAS VF2, namely:

  1. Power Status
  2. Part Number
  3. Program Name
  4. Spindle Speed
  5. Spindle Load
  6. Execution Status
  7. Absolute X, Y and Z co-ordinates

These parameter values are obtained by writing specific macros to the serial port of the IOT device that is connected to the HAAS. For example, writing Q600 5023 yields the absolute Z co-ordinate. It is upto the discretion of the user to add code content if there is need of fetching of other types of process parameters. The user is referred to the HAAS mill operator's manual at https://goo.gl/wxH7YE for appropriate macro codes for different process parameters.

MTConnect

For more information on the MTConnect standard and the dataitems included within the standard please visit http://www.mtconnect.org/

haasmtconnect's People

Contributors

nombreinvicto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

haasmtconnect's Issues

HAAS Control freezes when the adapter fetches data

Hello, first of all, thank you for providing a solution for getting machine data for using MTConnect protocol, we have HAAS VF2YT and HS7R models, both were manufactured in 2011.

The machines were connected to the PC via DB25 - DB9 RS232 cables, the parameters such as baudrate, parity, stopbits and databits were set to match the machine with the adapter code.

When the adapter is executed, the data gets fetched and is sent to the configured HOST and PORT number but after some time the HAAS control freezes, only the RESET button resumes the control but the data collection gets terminated. Unless the machine is restarted data collection is not possible.

Depending on the baudrate, the time to freeze varies, for instance when the baudrate is set to 300, the time to freeze is around 4 minutes and if the baudrate is 9600 (HAAS recommended), the control freezes within seconds.

Kindly let us know if we are missing anything and thank you for your contribution.

P.S. The adapter successfully fetches and sends data to the configured HOST and PORT number only on Python 2.7.15 and not on the latest Python version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.