Re: [Emc-users] switch_two_spindle_ZA
thanks Andy 07.05.2021 14:49, andy pugh пишет: On Fri, 7 May 2021 at 12:27, nkp216 wrote: addf switchZA.0 servo-thread ... can a component cause problems for stepper motors - they are jerky Your switch would need to run in the base-thread to transfer steps directly. I am not 100% clear on what you want to do, but would it work to swap around the stephen commands rather than the stepgen steps? You can do that in the servo thread. But, if your component has no floating-point operations it can run in the base thread. ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] switch_two_spindle_ZA
On Fri, 7 May 2021 at 12:27, nkp216 wrote: addf switchZA.0 servo-thread ... > can a component cause problems for stepper motors - they are jerky Your switch would need to run in the base-thread to transfer steps directly. I am not 100% clear on what you want to do, but would it work to swap around the stephen commands rather than the stepgen steps? You can do that in the servo thread. But, if your component has no floating-point operations it can run in the base thread. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] switch_two_spindle_ZA
the machine works with a parallel port it is required to switch outputs from stepgens depending on the tool number: M6T1 - axis Z worked, M6T2 - axis A worked, M6T0 - both axes worked simultaneously the component was written : component switchZA "switch spindle Z A"; pin in bit stepz "stepgen.2.step"; pin in bit stepa "stepgen.3.step"; pin in bit dirz "stepgen.2.dir"; pin in bit dira "stepgen.3.dir"; pin in bit isrunning"halui.program.is-running"; pin out bit outZstep "parport"; pin out bit outAstep "parport"; pin out bit outZdir "parport"; pin out bit outAdir "parport"; pin in s32 ntool"iocontrol.0.tool-number"; license "GPL"; function _; ;; FUNCTION(_) { if (isrunning) { if (ntool==1) { outZstep = stepz; outZdir = dirz; outAstep = 0; outAdir = 0;} if (ntool==2) { outZstep = 0; outZdir = 0; outAstep = stepz; outAdir = dirz;} if (ntool==0) { outZstep = stepz; outZdir = dirz; outAstep = stepz; outAdir = dirz;} } else { outZstep = stepz; outZdir = dirz; outAstep = stepa; outAdir = dira;} ++ # hal loadrt switchZA addf switchZA.0 servo-thread net Ntool iocontrol.0.tool-number switchZA.0.ntool net is:runninghalui.program.is-running switchZA.0.isrunning net zstep switchZA.0.stepz net zdir switchZA.0.dirz net astep switchZA.0.stepa net adir switchZA.0.dira net outZdir switchZA.0.outZdir parport.0.pin-07-out net outZstep switchZA.0.outZstep parport.0.pin-06-out net outAdir switchZA.0.outAdir parport.0.pin-09-out net outAstep switchZA.0.outAstep parport.0.pin-08-out can a component cause problems for stepper motors - they are jerky ?? ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users