#linuxcnc-devel Logs

Jul 11 2023

#linuxcnc-devel Calendar

02:05 AM linuxcnc-build2: Build [#1073](http://buildbot2.highlab.com/buildbot/#builders/18/builds/1073) of `30-dsc-uspace.debian-10-buster` 4failed.
02:15 AM linuxcnc-build2: Build [#1241](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1241) of `00-checkin` 4failed.
03:48 AM -!- #linuxcnc-devel mode set to +v by ChanServ
03:52 AM linuxcnc-build2: Build [#1074](http://buildbot2.highlab.com/buildbot/#builders/18/builds/1074) of `30-dsc-uspace.debian-10-buster` 8completed with warnings.
04:02 AM linuxcnc-build2: Build [#1242](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1242) of `00-checkin` 3completed successfully.
08:33 AM -!- #linuxcnc-devel mode set to +v by ChanServ
09:02 AM linuxcnc-build2: Build [#1175](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1175) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 4failed.
09:22 AM linuxcnc-build2: Build [#1245](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1245) of `00-checkin` 4failed.
10:41 AM linuxcnc-build2: Build [#1176](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1176) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 8completed with warnings.
11:22 AM linuxcnc-build2: Build [#1246](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1246) of `00-checkin` 3completed successfully.
01:07 PM dyntaos: Can someone point me to what file and possibly funtions relating to linear move trajectory planning? My goal here is to implement optional arguments on G0/G1 with an acceleration parameter and deceleration parameter. I am not looking at the interpreter yet, but I would like to wrap my head around the motion planning portion.
01:10 PM Unterhaus_ is now known as Unterhausen
01:44 PM rene-dev5: May I ask what your intentions are?
01:45 PM rene-dev5: The moves are blended together, changing limits within moves is probably not trivial
01:55 PM dyntaos: I have a machine with a single axis. Its not a mill, its to impart momentum on an object that I need to accelerate to a given speed and begin decelerating at a consistent position. Being able to control acceleration and deceleration independently would allow me to control this. I cannot see any existing mechanisms in LCNC that would allow me to acheive this. Do you know of any other
01:55 PM dyntaos: way I could acheive this?
02:04 PM dyntaos: I should also add I am issuing these GCode commands via MDI
02:29 PM fdarling: dyntaos: if you don't need proper G-code interpretation, you could use LinuxCNC + Mesa cards (or whatever) to control a servo or stepper, but implement the target position/velocity algorithm yourself
02:30 PM fdarling: dyntaos: you could even trigger it from G-code with digital I/O that interfaces to HAL, similar to what people do with tool changers
02:35 PM dyntaos: That may be an option for me. I have not played around with that before. Do you have any resources you would reccomend?
02:37 PM fdarling: dyntaos: I have written drivers, I could help you. There is documentation online, but it can be scattered and the learning curve can be steep
02:38 PM fdarling: dyntaos: I would recommend creating a "hello world" realtime component that compiles/installs and you can use from a HAL file, and once you get it successfully counting for say, you can figure out more elaborate logic
02:40 PM fdarling: https://linuxcnc.org/docs/devel/html/hal/comp.html#_sincos
02:40 PM dyntaos: Forgive my ignorance, but does the communication between LCNC and the Mesa card occur solely though HAL via the hm2_* component?
02:41 PM fdarling: dyntaos: at the end of the day, yes
02:41 PM fdarling: dyntaos: and you can get "in between" LinuxCNC and the Mesa card if you like, or directly talk to the Mesa card despite what LinuxCNC's "motion" module is trying to do
02:42 PM dyntaos: That seems feasible
02:42 PM fdarling: dyntaos: first you must understand how the HAL files are put together, what order things are evaluated in, etc. then you need to write your own component and load it in the HAL file and queue it to be evaluated per "servo thread cycle" in the right order
02:43 PM fdarling: typically you want an order that is "read, think, write"
02:43 PM fdarling: if you are ignoring the "motion" component, that simplifies things a lot
02:43 PM dyntaos: Yeah I have written a few hal comps before, in both Python and C so I am pretty comfortable there
02:43 PM fdarling: it's just realtime vs userspace components, the realtime ones is what you want for motion control, but it cannot do file I/O and a whole bunch of things
02:44 PM fdarling: however, it can definitely do some "thinking" and implement your acceleration/velocity control that you want
02:44 PM fdarling: and have some digital I/O to enable it to start and it can signal when it's finished for instance
02:44 PM fdarling: (or maybe signal when it's at cruising speed, whatever...)
02:44 PM dyntaos: My inputs are very limited so I can easily get that in via input pins
02:45 PM dyntaos: Awesome, I think this should suit my needs quite well actually. Thanks fdarling, much appreciated!
02:46 PM fdarling: dyntaos: if you get stuck, message me
02:46 PM dyntaos: Cool, I will. Thanks again :)
05:01 PM -!- #linuxcnc-devel mode set to +v by ChanServ
05:14 PM seb_kuzminsky: dyntaos: i'd try that in hal, without involving task, motion, or g-code. i'd try using a limit3 component to control motion, and a small custom realtime component to change the limit3 accel rate for the accel phase vs the decel phase
10:42 PM Tom_itx is now known as Tom_L