Git Product home page Git Product logo

linuxcnc-gcode-server's People

Contributors

iforce2d avatar

Stargazers

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

Watchers

 avatar

linuxcnc-gcode-server's Issues

Feedback

Figured I'd open this issue just to provide some feedback as I have a mostly working machine but I'm still trying to navigate my way through OpenPnP. I'm not really sure what all is an OpenPnP issue and what might be something that can be addressed with the server.

  • First issue is starting everything. Currently I have to start LinuxCNC in 1 shell and the gcode-server in another shell, then start
    openpnp. Maybe a script to start everything would be convenient? I tried the ./linuxcnc-gcode-server -i <path/to/ini> and it fails...
$ ./linuxcnc-gcode-server -i /home/justin/linuxcnc/configs/PnP_rev3.0/PnP.ini
Using ini file        : /home/justin/linuxcnc/configs/PnP_rev3.0/PnP.ini
Using nml file        : /usr/share/linuxcnc/linuxcnc.nml
Using subroutine path : /run/user/1000
libnml/os_intf/_shm.c 206: shmget(1001(0x3E9),8192,0) failed: (errno = 2): No such file or directory
libnml/os_intf/_shm.c 225: No shared memory buffer exists for this key and the IPC_CREAT was not given.
libnml/os_intf/_shm.c 413: rcs_shm_nattch: shmctl failed: Invalid argument
libnml/cms/cms_cfg.cc 829: cms_config: -4(CMS_NO_MASTER_ERROR: An error occurred because the master was not started.) Error occurred during SHMEM create.
libnml/nml/nml.cc 371: NML: cms_config returned -1.

**********************************************************
* Current Directory = /home/justin/git/linuxcnc-gcode-server
* 
**********************************************************
* BufferName = emcCommand
* BufferType = 0
* ProcessName = xemc
* Configuration File = /usr/share/linuxcnc/linuxcnc.nml
* CMS Status = -4 (CMS_NO_MASTER_ERROR: An error occurred because the master was not started.)
* Recent errors repeated:
cms_config: -4(CMS_NO_MASTER_ERROR: An error occurred because the master was not started.) Error oc
NML: cms_config returned -1.

No shared memory buffer exists for this key and the IPC_CREAT was not given.

rcs_shm_nattch: shmctl failed: Invalid argument

* BufferLine: B emcCommand            SHMEM   localhost       8192    0       0       1       16 1001 TCP=5005 xdr queue confirm_write serial
* ProcessLine: P xemc          emcCommand      LOCAL   localhost       W       0       10.0    0       10
* Config File = /usr/share/linuxcnc/linuxcnc.nml
* error_type = 0 (NML_NO_ERROR)
************************************************************

libnml/os_intf/_shm.c 206: shmget(1002(0x3EA),20480,0) failed: (errno = 2): No such file or directory
libnml/os_intf/_shm.c 225: No shared memory buffer exists for this key and the IPC_CREAT was not given.
libnml/os_intf/_shm.c 413: rcs_shm_nattch: shmctl failed: Invalid argument
libnml/cms/cms_cfg.cc 829: cms_config: -4(CMS_NO_MASTER_ERROR: An error occurred because the master was not started.) Error occurred during SHMEM create.
libnml/nml/nml.cc 371: NML: cms_config returned -1.

**********************************************************
* BufferName = emcStatus
* BufferType = 0
* ProcessName = xemc
* Configuration File = /usr/share/linuxcnc/linuxcnc.nml
* CMS Status = -4 (CMS_NO_MASTER_ERROR: An error occurred because the master was not started.)
* Recent errors repeated:
rcs_shm_nattch: shmctl failed: Invalid argument

cms_config: -4(CMS_NO_MASTER_ERROR: An error occurred because the master was not started.) Error oc
NML: cms_config returned -1.

No shared memory buffer exists for this key and the IPC_CREAT was not given.

* BufferLine: B emcStatus             SHMEM   localhost      20480    0       0       2       16 1002 TCP=5005 xdr
* ProcessLine: P xemc          emcStatus       LOCAL   localhost       R       0       10.0    0       10
* Config File = /usr/share/linuxcnc/linuxcnc.nml
* error_type = 0 (NML_NO_ERROR)
************************************************************

can't connect to LinuxCNC

  • 2nd issue is homing. When "home" is input to the server over telnet, it seems to issue an incremental home for each joint individually, so it has to be ran 3 times for X(0),Y(1), and Z(2). IMO "home" as a generic input should be EMC_JOINT_HOME -1 which is (I believe) the "home all" command that respects the ini homing order. If there's a reason to home individually then it should be "home (axis letter)" or "home (joint number)". Axis letter is probably more "general" but I'm not sure if EMC_AXIS_HOME is accepted.

Another issue with homing might have to do with OpenPnP, I'm not sure what command OpenPnP is trying to send to pass the "home" command. In my testing all it does is set the axis coordinates to what the home coordinates are set to Machine Setup -> Axis -> Home Coordinates. So what I have had to do is power on inside LinuxCNC GUI (power button doesn't communicate either), Then Home-All in LinuxCNC and not move anything otherwise. As long as the LinuxCNC home positions in the ini match what OpenPnP are set to, they will be "synced" but it seems like kind of an anecdotal way to sync the axis.

I'm not sure what is possible when interfacing between LinuxCNC and OpenPnP, but I would think that OpenPnP's home button should just issue the home-all command, then once LinuxCNC returns "is-homed" OpenPnP should grab the current position but I'm not sure how well that plays with OpenPnP seeming to need to know all the home positions beforehand.

Gcode Driver regex for 2 nozzles?

I have 2 nozzles, setup as A and B in LinuxCNC and OpenPnP.

I added the B nozzle to POSITION_REPORT_REGEX, GET_POSITION_COMMAND, and MOVE_TO_COMMAND by just copying the regex of A as it is in the examples.

After that I get this from OpenPnP.
Screenshot_20230815_012226
Screenshot_20230815_013257

If I just change POSITION_REPORT_REGEX from:
^ok X:(?<x>-?\d+\.\d+) Y:(?<y>-?\d+\.\d+) Z:(?<z>-?\d+\.\d+) A:(?<rotation>-?\d+\.\d+) B:(?<rotation>-?\d+\.\d+)

Back to:
^ok X:(?<x>-?\d+\.\d+) Y:(?<y>-?\d+\.\d+) Z:(?<z>-?\d+\.\d+) A:(?<rotation>-?\d+\.\d+)

........I can get through homing so I assume this is not the proper way to add B. What would the right regex for the 2nd nozzle be?

List dependencies

Trying to compile on Debian bookworm. I didn't write down the error but upon running $ make there was a complaint about "boost". Not sure which specific libboost package this is referring to so I installed libboost-all-dev and got past that error. Not sure if that's all that's required since I still haven't gotten through make, but that's a different issue.

no configure script?

Instructions say that running "make" is all that should be needed if LinuxCNC is compiled from source. Since 2.9 is available in the apt repo as linuxcnc-uspace-dev compiling from source isn't what most people are likely to do. I installed LinuxCNC from apt myself.

running make alone will fail:
$ make g++ -c -Wall -I. -I/usr/include -I/usr/include/linuxcnc -c -o obj/from_shcom.o from_shcom.cpp g++ -c -Wall -I. -I/usr/include -I/usr/include/linuxcnc -c -o obj/inifile.o inifile.cpp inifile.cpp:23:10: fatal error: config.h: No such file or directory 23 | #include "config.h" | ^~~~~~~~~~ compilation terminated. make: *** [Makefile:14: obj/inifile.o] Error 1

I believe config.h is typically generated from running ./configure?

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.