Giter Site home page Giter Site logo

shenren / qtmdi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unseenlaser/qtmdi

0.0 2.0 0.0 485 KB

Qt5 based module for MachineKit, which will run linear programs using MDI commands only

Python 8.24% C 38.41% C++ 26.38% Objective-C 0.47% Makefile 26.42% QMake 0.08%

qtmdi's Introduction

qtMDI


Qt5 based module for MachineKit, which will run linear programs using MDI commands only

(FOR PRE-MULTICORE MACHINEKIT ONLY)

Useful for the huge linear files produced by CAM, which will lock up Axis.

These files are without loops or subroutines and generally consist of G00 and G01 moves only, with curves being made of series of short straight lines

qtMDI is launched from the hal file as a userspace module and sits alongside Axis

All machine control, homing etc is done through Axis as usual

The file to be run, is loaded into qtMDI instead of Axis and run from there

qtMDI reads in the first 25K of the selected file and then loads the file in 5K increments as it is nearing the end of the currently loaded section

Moves are read line by line from the browser and output via MDI commands

Tested on a 11MB ngc file of nearly 500,000 lines


To build:

Install Qt5 (http://www.qt.io/download-open-source/#)

and set the pathspecs in your ~/.bashrc file along these lines

export QT5DIR=/YOURPATH/Qt/5.4/gcc
export QTCREATEDIR=/YOURPATH/Qt/Tools/QtCreator

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/realtime/bin:/usr/src/linuxcnc-dev-rtai/bin:$QT5DIR/bin:$QTCREATE

INCLUDE_PATH=/usr/include:/usr/src/linuxcnc-dev-rtai/include:/usr/realtime/include:/usr/include/linuxcnc:$QT5DIR/include:$INCLUDE_PATH

ENV=$HOME/.bashrc
USERNAME="YOURUSERNAME"

export USERNAME ENV PATH INCLUDE_PATH

export QTVERSION=5.4

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/src/linuxcnc-dev-rtai/lib:/usr/realtime/lib:$QT5DIR/lib:$QTCREATEDIR/lib:$LD_LIBRAR

export QT_INSTALL_PLUGINS=$QTDIR/plugins

Go to the git /src directory and open qtMDI.pro

Edit the Qt5 and library paths to match your location for Qt5 headers and libs (a full copy of all the machinekit headers is included in the local /include dir, as those without a RIP environment will not have them all)

From git /src directory run

'qmake -makefile'

'make'

'strip qtMDI'

Then copy or symlink the qtMDI executable to a directory in $PATH

At the end of the config main hal file add the line

'loadusr -W qtMDI'


To use:

Start the config and the qtMDI window will appear with Axis Size and place the qtMDI window and its state and position will be saved and restored at subsequent launches.( Axis won't though!)

Take out of Estop, put Machine On, Home and Touch Off in Axis

---Thereafter all actions whilst running are from qtMDI -------------

When ready to run, go to qtMDI and select File > Open from the menu or press the FileOpen icon

Select the file required (it will be remembered under File > Recent files)

Run by clicking the Run icon or pressing 'R', the plot will be rendered in Axis

Pause will wait, Step will move one line if in Pause, pressing Stop [Esc] or clicking Run again will abort.

Pause and select the line above the new place to start with the mouse and use right mouse button for a context menu and select 'Run from Here'

(No account is taken of feed/speed/spindle settings in 'Run From' which remain as they were when paused.


Update:


Error checking has been added to qtMDI.

If an error is returned to the last MDI command, the program will halt with a message on the status bar giving line number and message

There are problems running 2 GUIs, both polling status. Axis could easily poll before qtMDI, take the error message and display it, but not halt the program because it is unaware of it.

Accordingly an 'axisui.msg-disable' pin has been built into Axis, which when set during the running of a program in qtMDI, will disable error status polling by Axis.

Because qtMDI is hugely faster at initiating than Axis, the linkage of this pin has to occur in a post-gui hal file to give Axis time to create it

Included in the repo is now the replacement python file for Axis and a sample config folder, showing the linkage required.

Rename machinekit/bin/axis and insert new file, ensuring that it is executable (sudo chmod 755 axis)

qtmdi's People

Contributors

arceye avatar

Watchers

James Cloos avatar 任申-RenShen avatar

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.