Re: [Emc-developers] LinuxCNC is in Debian!

2022-03-01 Thread Les Newell
So once you've bought the controller, there is no other restriction. As far as I can tell from their docs, that is the case. It's a pretty sound business model. I assume that royalty is 2x per axis, once for each end of the cable. From what I can tell, it would be one royalty per axis.

Re: [Emc-developers] LinuxCNC is in Debian!

2022-03-01 Thread Les Newell
I was not specificaly seeking the monetary cost, more the loss of rights, which could be far more costly than the monetary cost. As always, keep TANSTAAFL in mind. As far as Beckhoff are concerned this isn't a free lunch. Similar to Mesa they make their money on the hardware. Supporting the

Re: [Emc-developers] Using `main` instead of `master` branch

2021-07-30 Thread Les Newell
My personal opinion is that this sort of thing is taking PC to extremes and if anything it's a backward step. Trying to bury the words doesn't change what has happened and is still happening around the world. Just trying to forget and pretend slavery never happened isn't the way to go.

Re: [Emc-developers] Realtime-components for named/numbered parameters in G-Code (from Re: Question for the devs)

2021-07-28 Thread Les Newell
It shouldn't be too hard to implement something like: USER_PARAM_5021 = name_of_hal_pin However we already have M66 and M67 which can talk to HAL pins. Les On 28/07/2021 07:42, Stefan Freisei Muehlbacher wrote: Just an idea for a more flexible extension. [SomwareInTheINI] [RS274NGC]

Re: [Emc-developers] What to do about the docs?

2020-11-24 Thread Les Newell
On 23/11/2020 23:31, andy pugh wrote: I _think_ that gettext only works in the context of source code. I could be wrong, though. I looked in to gettext for halcompile and couldn't see how to make it work. Gettext is primarily designed to work with relatively short strings in source code. It's

Re: [Emc-developers] problem understanding diagram from help-pages of pncconf

2020-07-14 Thread Les Newell
On 14/07/2020 15:28, Reinhard wrote: The machine moves (assuming it does not have absolute encoders that are battery buffered) toward the home switch until the switch signals contact. That's the axis origin - and I thought, this is what the word "home"-position means. With any professional cnc I

Re: [Emc-developers] Buildbot Slaves

2020-02-29 Thread Les Newell
Hi Gene, It's unlikely that Mint supports the Pi. It's too much of a niche product. However LCNC doesn't really care what distro it is used with. As long as you satisfy the dependencies it's happy. For instance I have it running on Ubuntu rather than Debian. Pi is so different from the

Re: [Emc-developers] Looking to make hex offset list for NML status shared memoryr

2020-02-17 Thread Les Newell
Looking directly at the raw status data is likely to be very fragile. The layout is dependent on the NML structures and they can vary between builds and releases. If you really want to do that you will have to dig into the definitions for the RCS_STAT_CHANNEL structure. NML was never designed

Re: [Emc-developers] announcement OpenCN, a new fork of LinuxCNC

2019-11-22 Thread Les Newell
Hi Raul, Why create a fork? Maintaining a project like this is a huge amount of work and forking often results in a lot of duplicated work. LCNC is very modular so it is possible to add a lot of functionality without breaking existing code. If you work with the LCNC project you have access to

Re: [Emc-developers] Update to lowpass.comp - now MPG filtering

2019-08-18 Thread Les Newell
On 18/08/2019 02:41, Dewey Garrett wrote: It may be better but in many use-cases the expedient of a simple hal command: setp joint.N.max_acceleration some_low_value is sufficient to soften the thump of high mpg accel and it is considerably simpler than adding components and nets. I

Re: [Emc-developers] Update to lowpass.comp

2019-08-17 Thread Les Newell
Hi Andy, My main reason for adding FIR filtering was for MPGs, because it does a better job than IIR. After looking at ilowpass and lowpass it seemed a bit silly to have two components doing basically the same thing. I decided it would be better to combine the functionality while I was at

Re: [Emc-developers] Update to lowpass.comp

2019-08-17 Thread Les Newell
Hi Dewey, A FIR low pass works better than reducing the acceleration. The problem with just reducing acceleration is that it affects the MPG response over the whole speed range. If you try to move fast the machine responds slowly. A FIR filter effectively sets the minimum time to make a jog

Re: [Emc-developers] Update to lowpass.comp

2019-08-17 Thread Les Newell
Hi Moses, I saw bug #579 had been fixed. The mill is running an older buildbot build so I'm holding off updating it until the homing issue is sorted in master. The router (currently running a very recent buildbot build) also uses ON_ABORT_COMMAND but the bug doesn't really affect it much.

[Emc-developers] Update to lowpass.comp

2019-08-17 Thread Les Newell
dwith single pole) gain = \\fB0.466\\fR T = 0.001 seconds (typical servo thread period) a = (2*pi*10) ( \\fB10Hz\\fR bandwith single pole) gain = \\fB0.0609\\fR T = 0.001 seconds (typical servo thread period) a = (2*pi*1) ( \\fB1Hz\\fR bandwith single pole) ga

Re: [Emc-developers] malloc in hal modules

2019-08-14 Thread Les Newell
Hi Andy, Thanks for looking into this. Looking at the kinematics modules I suspect malloc can only be used in user space modules. For example genserkins.c seems to use hal_malloc if RTAPI is defined and malloc if ULAPI is defined. I also see references to rtapi_kmalloc. hm2 seems to be

Re: [Emc-developers] malloc in hal modules

2019-08-14 Thread Les Newell
Further to this question, how do I go about deleting the memory at shutdown? I see a reference in the halcompile docs to EXTRA_CLEANUP but the docs aren't too clear on how I iterate through each loaded module to delete it's memory (if allocated). Les On 14/08/2019 13:48, Les Newell wrote: I

[Emc-developers] malloc in hal modules

2019-08-14 Thread Les Newell
I am working on a hal module that may need a variable amount of memory depending on it's configuration. Is it acceptable to use malloc in a hal module? Should I use hal_malloc or is that specifically for pins? Les ___ Emc-developers mailing list

Re: [Emc-developers] Simultaneous 4 axis + new TP

2019-03-14 Thread Les Newell
That does not help the trajectory planner lookahead problem. It just tries to correct the feed rates for each movement segment. Les https://www.ganotechnologies.com/cnc/rapidrotary/ ___ Emc-developers mailing list

Re: [Emc-developers] TYPO in export hal parameter name in ppmc driver

2018-09-06 Thread Les Newell
An option would be to have both ppmc.0.dout.03-invert and ppmc.0.dout.03.invert with a note in the docs that ppmc.0.dout.03-invert is deprecated and will be removed in the future. Code wise it's ugly but you won't end up breaking anyone's configs. Les On 06/09/2018 16:48, Jon Elson wrote:

Re: [Emc-developers] Mode switching bug

2017-12-05 Thread Les Newell
I don't think you can lost the modes completely as you still need to know the current machine state. For instance if the machine is running MDI code and you enter another MDI line before the previous one has finished, the next line should be queued. However if you enter an MDI line while

Re: [Emc-developers] hal scanning

2017-12-05 Thread Les Newell
I generally split my hal files by function. For instance load.hal loads everything, spindle.hal deals with spindle stuff, motion.hal deals with the axes and so on. Les -- Check out the vibrant tech community on one

Re: [Emc-developers] Mode switching bug

2017-12-04 Thread Les Newell
This is master as of a couple of months ago. I'd rather not install the patch because I want it to switch back to manual after MDI. Les On 04/12/2017 15:04, Rene Hopf wrote: are you using master or 2.7? this issue only occurs in master. can you check if the patch has the desired behaviour for

Re: [Emc-developers] Mode switching bug

2017-12-04 Thread Les Newell
I have experienced this. In the current release it doesn't consistently change back to manual. For instance if I issue a G0,G1,G2 or G3 it generally switches back to manual but if I issue a M3 or M5 it generally doesn't. I would really like switching back to manual to be an option. On most of

Re: [Emc-developers] Building more complex components with linuxcnc-dev

2017-08-31 Thread Les Newell
Hi Andy, Thanks. I should be able to work it out from there. Regards, Les Newell http://www.sheetcam.com On 31/08/2017 13:21, andy pugh wrote: On 31 August 2017 at 13:14, Les Newell <les.new...@fastmail.co.uk> wrote: Halcompile runs the compiler and linker when it builds a comp f

Re: [Emc-developers] Building more complex components with linuxcnc-dev

2017-08-31 Thread Les Newell
/linker flags to use. I just need some way of getting that information so I can build manually. Les On 31/08/2017 13:05, andy pugh wrote: On 31 August 2017 at 12:09, Les Newell <les.new...@fastmail.co.uk> wrote: It has multiple C++ files so it is out of the scope of halcompile. I

Re: [Emc-developers] Building more complex components with linuxcnc-dev

2017-08-31 Thread Les Newell
Hi Andy, It has multiple C++ files so it is out of the scope of halcompile. Les On 30/08/2017 23:40, andy pugh wrote: On 30 August 2017 at 19:43, Les Newell <les.new...@fastmail.co.uk> wrote: I have a LinuxCNC install using the latest buildbot packages. Is it possible to build more c

[Emc-developers] Building more complex components with linuxcnc-dev

2017-08-30 Thread Les Newell
I have a LinuxCNC install using the latest buildbot packages. Is it possible to build more complex components than halcompile allows without installing source and building that way? Presumably the linuxcnc-dev package contains most of the header files and libraries but don't know where they

Re: [Emc-developers] Another spindle + gearbox component

2017-08-21 Thread Les Newell
It's a good thing Andrew reminded me to submit this one. I didn't think may others would have a use for limited acceleration. Les On 21/08/2017 13:54, Marius Liebenberg wrote: Ah Les just in time for me to test. I recently moved off the grid and now use a generator to run my machines. The

Re: [Emc-developers] Another spindle + gearbox component

2017-08-18 Thread Les Newell
Hi Gene, It should run on any RT flavour. I have used it on both RT-Preempt and RTAI. I'm not sure how well it will work on your dc motor. It is designed to run with separate speed + direction outputs. The output speed command never goes negative. By the way, if the spindle keeps twitching

Re: [Emc-developers] [SPAM] Re: Demux component

2017-08-18 Thread Les Newell
Hi Andy, I probably won't get any time to look into this for a couple of days. Les On 18/08/2017 14:11, Andy Pugh wrote: On 18 Aug 2017, at 13:58, Les Newell <les.new...@fastmail.co.uk> wrote: Looking at the code this looks suspect: out(i) = (bargraph) ? (in > i) : (in == i);

[Emc-developers] Tool turret component

2017-08-18 Thread Les Newell
s a switch on the ratchet to indicate when one tool has been indexed. When the turret has rotated to the correct tool the motor is then driven backwards to hold the turret against the ratchet. Note at startup """; author "Les Newell"; license "GPLv2 or greater"; pin

Re: [Emc-developers] Demux component

2017-08-18 Thread Les Newell
wrote: On 16 August 2017 at 19:49, Les Newell <les.new...@fastmail.co.uk> wrote: This is the inverse of the mux components. It takes an integer value and decodes it to up to 16 outputs. I don't know how much comp has changed since the date on that comp, but it could be simpler and have v

[Emc-developers] Demux component

2017-08-16 Thread Les Newell
be on. Les / * Description: Demux16 HAL component. * * Author: Les Newell * License: GPL Version 2 or later * * Copyright (c) 2009 All rights reserved

Re: [Emc-developers] Making the correct axis letters show in Axis

2017-07-03 Thread Les Newell
Sorry to flood the list with questions but I have another one. On my lathe I have knobs for feed override, spindle override and max velocity. They come in over modbus and are connected to Halui. The problem I have is that at startup Axis applies it's defaults for these values, overriding the

Re: [Emc-developers] Making the correct axis letters show in Axis

2017-07-03 Thread Les Newell
Sorry, it was operator error. It's working fine, just not the way I am used to. Les On 02/07/2017 20:49, andy pugh wrote: On 1 July 2017 at 22:33, Les Newell <les.new...@fastmail.co.uk> wrote: Does anyone have any idea what I'm doing wrong? Not really, displaying "H" for

[Emc-developers] Making the correct axis letters show in Axis

2017-07-01 Thread Les Newell
I'm in the process of writing a lathe kinematics module. Everything seems to be mostly working but Axis doesn't show the axis letters for the DROs. When in joint mode it displays the joint numbers as expected. In world mode it just shows H for each axis. This is a basic XZ lathe config. If I

[Emc-developers] A couple of mb2hal patches

2017-07-01 Thread Les Newell
Here are a couple of patches for mb2hal. One fixes the excessive CPU load. On my machine it took CPU load from 60% to 0%. The other adds an option to give pins names rather than numbers. Les >From adabc44228869510f69cbfd31d38af2d75dfd730 Mon Sep 17 00:00:00 2001 From: Les

Re: [Emc-developers] Special config for a lathe, practical?

2017-06-29 Thread Les Newell
Hi Gene, G8 is hard coded to work on X axis. It doesn't really make sense for any other axis. Could you swap the axes in your config? Lathe uses X-Z because lathes are essentially treated as milling machines on their side. By convention Z is parallel to the spindle axis. Les On 29/06/2017

Re: [Emc-developers] NML message rate

2017-01-09 Thread Les Newell
Hi John, Unfortunately it needs to be able to run g-code as well. Les On 09/01/2017 17:26, John Kasunich wrote: > Are you sure that sending jogs is the right way to do the application? > > Is this a "normal", g-code controlled machine that sometimes needs to > do this "chase a moving target"

Re: [Emc-developers] NML message rate

2017-01-09 Thread Les Newell
TCP is pretty quick as well. I can easily get a round trip of less than 1ms for small packets over a local network. Les > I guess shared memory is a very fast mechanism. TCP has builtin resend > mechanism and are relatively complex compared to just send periodically so > this is most

Re: [Emc-developers] NML message rate

2017-01-09 Thread Les Newell
> 30 updates/second is rather slow, servo control loop is usually 1kHz which is > about 30 times more often. Indeed. That was why I was a little shocked to find the NML round trip takes so long. > As I understand it NML use TCP/IP and then you probably to not send a new jog > command until

[Emc-developers] NML message rate

2017-01-09 Thread Les Newell
I have an application where I need to send jog commands at a high rate (anything up to 30 updates/second on two axes). Basically the machine needs to chase a moving target. Using sendJogCont with emcWaitType set to EMC_WAIT_RECEIVED takes over 100ms per axis which is way to slow. If I set

Re: [Emc-developers] Checking NML version

2016-12-28 Thread Les Newell
Thanks Frank, I missed that one. Les On 27/12/2016 21:25, Frank Tkalcevic wrote: > > if ( m_emcStatus->size != sizeof(EMC_STAT) ) > { > > > The size of the structure is in the message, so you can check the version of > your application, against the version of linuxcnc that

Re: [Emc-developers] Checking NML version --> Universal GUI, g-code?

2016-12-27 Thread Les Newell
Hi Nicklas, > I could see linuxcnc EMCTASK impelement a g-code interpreter. Could the use > interface run the hardware with g-code? The interface is capable of running g-code on LinuxCNC. When you open a g-code file in the GUI it will be automatically uploaded to the controller if you are

Re: [Emc-developers] Checking NML version

2016-12-27 Thread Les Newell
Thanks Dewey, I didn't think of using Python. That's a great idea. Les On 27/12/2016 13:10, Dewey Garrett wrote: > $ python > ... import sys import linuxcnc as l s=l.stat() sys.getsizeof(s) > 13552 >

Re: [Emc-developers] Checking NML version

2016-12-27 Thread Les Newell
> I had the same problem. A half solution was to check the size of the > structures eg sizeof(EMC_STAT). I only need to know if a binary has > changed, and stop when there was a mismatch. I wish there was a way to do that at runtime. As far as I know that trick only works at compile time. You

Re: [Emc-developers] Checking NML version

2016-12-22 Thread Les Newell
Hi Nicklas, Theoretically you can do that with NML directly but I'm not sure what GUIs acually implement this functionality. Unfortunately I can't do that because my applications (SheetCam and Scanything ) are closed source so I am writing an interface layer between NML and the outside world.

Re: [Emc-developers] Checking NML version

2016-12-21 Thread Les Newell
Thanks for all of your suggestions. linuxcnc_var sounds quite handy. Thanks. It looks like I'll have to build a test version of my comms module under every version that I need to support and check the size of emcStatus for each one. That way I can work out how many versions I need to

Re: [Emc-developers] Why is it not allowed to jog in MDI mode?

2016-01-16 Thread Les Newell
I have to agree with Norbert here. On my mill I mostly do one-offs. I have jog wheels for each axis, making it possible to operate the machine very much like a manual with DRO. For simple stuff like facing off or squaring up an edge I'll use the jog wheels. If for instance I want to drill a

Re: [Emc-developers] Why is it not allowed to jog in MDI mode?

2016-01-16 Thread Les Newell
> A -- The tool is dull and we need to move to a new position and replace the > tool with a sharp one. In that case, we might want to also touch off the > new tool to measure it's length and also change the tool length in a tool > table. B -- You are cutting a stringy material such as plastic and

Re: [Emc-developers] I would like to contribute a modbus to hal component, AKA mb2hal.

2012-10-25 Thread Les Newell
I haven't been following this thread but I found a couple of bugs in modbus.c some time back. I don't know if they are the same problems Victor found. Here is the patch for modbus.c: From ebaefba238af22e4f30febc61175c7f9d3211cb4 Mon Sep 17 00:00:00 2001 From: Les Newell les.new

Re: [Emc-developers] modbus discussion was: future plannig

2012-08-16 Thread Les Newell
However, the leftovers from my 'generic modbus component to end all modbus components' can be reused. This is an starting point for folks who would want a modbus driver for multiple identical modbus clients (in this case, modbus-capable servo amplififers)

Re: [Emc-developers] modbus discussion was: future plannig

2012-08-13 Thread Les Newell
Some time back I wrote a universal Modbus module and have been meaning to make it available but never got around to it. I uploaded it to http://www.shootspammers.org.uk/modbus.zip. This file contains: A patch for modbus.c, fixing a couple of bugs The new module - modbuscomms.c A patch for

Re: [Emc-developers] future plannig was: LinuxCNC (EMC2) with RCS

2012-08-12 Thread Les Newell
While comp is pretty easy to use it does take quite a lot of work to set up the environment for building components. I think scripting would be a useful addition and Lua is a very good choice. It is one of the fastest of the common scripting languages and it has relatively low memory

Re: [Emc-developers] future plannig was: LinuxCNC (EMC2) with RCS

2012-08-12 Thread Les Newell
IMHO this suggestion is completely opposite to real life, when commercial machine builds have some deadlines and have performance targets to be met, otherwise there is additional cost - directly as financial penalty or indirectly as customer dissatisfaction which can lead to unsigned

Re: [Emc-developers] potentiometer to the parport

2012-07-25 Thread Les Newell
I have had some success using an old USB joystick and the hal_input HAL module. Some joysticks are very sensitive to electrical noise so you may have to experiment a bit. I now use an Arduino, talking to HAL via Modbus. This is rock solid reliable. Les On 25/07/2012 12:24, andy pugh wrote:

Re: [Emc-developers] jog-while-paused in auto: video

2012-04-27 Thread Les Newell
For tri-state, don't write to the pin. Normally components process the input and write to the output every cycle. However if you only write to the pin when your data changes you get a sort of tri-state. A normal component: read inputs do something write to pin A tri-state component: read

Re: [Emc-developers] jog-while-paused in auto: video

2012-04-26 Thread Les Newell
Looking good. Is this capable of using the existing jog mechanism? For instance I have MPGs on my machines so ideally they need to still function correctly. Les On 26/04/2012 09:10, Michael Haberler wrote: Here's Ken Lerman's idea worked in: jog in coordinated mode during pause

Re: [Emc-developers] Multiple instances of user mode modules

2011-04-24 Thread Les Newell
. The config can either be a standalone file or part of the main ini file. Les On 22/04/11 15:54, Les Newell wrote: Hi Jeff, loadusr -Wn copy1 mymodule name1=copy1 loadusr -Wn copy2 mymodule name2=copy2 Hmm, that is starting to look a little ugly and doesn't really fit

[Emc-developers] Multiple instances of user mode modules

2011-04-22 Thread Les Newell
Is it acceptable to load multiple instances of user space HAL modules? e.g: loadusr mymodule name=copy1 loadusr mymodule name=copy2 The other alternative is to make my module multi-threaded so I only need one instance: loadusr mymodule names=copy1,copy2 The would have to be multi-threaded as it

Re: [Emc-developers] Multiple instances of user mode modules

2011-04-22 Thread Les Newell
Hi Jeff, loadusr -Wn copy1 mymodule name1=copy1 loadusr -Wn copy2 mymodule name2=copy2 Hmm, that is starting to look a little ugly and doesn't really fit in with the way most modules are loaded. Perhaps I would be better off keeping it all in one multi-threaded module. I'll have a

[Emc-developers] Intercept MDI

2011-04-19 Thread Les Newell
I am thinking about writing a teach component. It would generate G-code depending on the machine movement and state (spindle/coolant etc). When making one-offs I often use a mix of MDI and manual. Is there any way my teach component could catch these MDI commands? Les

Re: [Emc-developers] Intercept MDI

2011-04-19 Thread Les Newell
Hmm, that would be a bit invasive. I was hoping I could just hook into an existing function rather then modifying the core EMC code. Is there any other way to sniff the messages before they hit task? To be honest, this isn't a major issue. In most cases the code can be deduced from the machine

Re: [Emc-developers] user mode modules

2011-04-04 Thread Les Newell
Hi Steve, I tried nanosleep as well with similar results. The 1ms delay does not need to be accurate. I just have a fairly short loop that needs to run quite often. Even at 1ms it should spend most of it's time sleeping. I'll have to do some more experiments to try to tie down what is

[Emc-developers] A few more components

2011-04-03 Thread Les Newell
why the drives have not come on. Les / * Description: message.comp * Message HAL component. * * Author: Les Newell les at sheetcam dot com * License: GPL Version 2 or later * * Copyright (c) 2011 All rights

Re: [Emc-developers] A few more components

2011-04-03 Thread Les Newell
is the one in the current 2.5 branch (it has the scales upside down) / * Description: spindle.comp * Typedefs for spindle HAL component. * * Author: Les Newell les at sheetcam dot com * License: LGPL Version 3 or later

[Emc-developers] user mode modules

2011-04-03 Thread Les Newell
What is the correct way to sleep in the main loop of a user mode component? I have code like the following: while(1) { do something... usleep(1000); } For some reason the usleep almost never returns. If I take the usleep out the component works fine, though it obviously hogs the CPU.

Re: [Emc-developers] G10 L2 patch for review

2010-12-31 Thread Les Newell
Generally when converting floats to integers it is best to add 0.5 so it rounds up. Les On 31/12/10 10:40, Michael Büsch wrote: Well, no. The reason for it seems to be that floating point numbers come with some inaccuracies. So the number 1 in floating point might be 1.001 or 0.9998

Re: [Emc-developers] Another minor stepconf bug

2009-06-01 Thread Les Newell
Hi Jeff, Stepconf's Charge pump is an output activated when the PC is running and you click the estop reset button or press F1; it deactivates if you activate that button again. That is what I expected but in practice the charge pump never activates. With ESTOP in (i.e., you have a real

Re: [Emc-developers] Another minor stepconf bug

2009-06-01 Thread Les Newell
Sorry about that. Minor brain fade on my part. Les John Thornton wrote: Les, Take a look here. http://www.linuxcnc.org/docview/html//hal_basic_hal.html#r1_1_4 John -- Register Now for Creativity and

Re: [Emc-developers] Adding lathe diameter mode

2008-12-16 Thread Les Newell
Oops - RTFM :-) Thanks, Les Alex Joni wrote: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS#Patch_Submission Regards, Alex -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The