#linuxcnc Logs
Jan 28 2025
#linuxcnc Calendar
12:48 AM NoSpark: I have a linuxcnc specific GCODE question. how do you return from a function inside an if statement? https://gist.github.com/Laosson/a315a4817fa833babd773fec1a3821e5
01:19 AM lcnc-relay: <meisterdippel@> moin
01:49 AM lcnc-relay: <lolthekidison@> big_kevin420@: Idk why I was struggling so much yesterday, I think I was just at it to long. All I needed was to check the motor direction pin. 😅 got it working in just a few min today
04:41 AM Tom_L: morning
04:47 AM Tom_L: NoSpark, if you want to exit the subroutine you could issue a M30 inside it
04:48 AM NoSpark: this is inside a toolchange sub, wouldn't an M30 be a bad idea?
04:49 AM Tom_L: for example i do this sometimes:
04:49 AM Tom_L: o100 if [#5400 EQ 0]
04:49 AM Tom_L: (debug,Tool must be non zero)
04:49 AM Tom_L: M30
04:49 AM Tom_L: o100 endif
04:49 AM Tom_L: and it will go no further
04:49 AM NoSpark: does that end the program? or just exit the current sub?
04:50 AM Tom_L: i think it ends the program
04:50 AM Tom_L: test it
04:50 AM Tom_L: http://linuxcnc.org/docs/stable/html/gcode/o-code.html#ocode:subroutines
04:50 AM Tom_L: in the 2nd example you could issue a return to the sub above it
04:51 AM Tom_L: (nested sub)
04:51 AM NoSpark: I will have another look
04:51 AM NoSpark: It does seems that the "return" block (?) should work
04:52 AM Tom_L: you could consider logic too, if (this) OR (that)
04:52 AM Tom_L: etc
04:52 AM Tom_L: inside blocks []
04:52 AM NoSpark: can you see any reason why the code in the gist I linked to wouldn't work?
04:53 AM Tom_L: i'd want to test it but it looks like it might break out and quit on the first false return
04:54 AM NoSpark: linuxcnc fails with something about fanuc style subroutines
04:54 AM Tom_L: yeah
04:54 AM Tom_L: they return differently
04:54 AM NoSpark: that first o100 bit should return if _task is 0
04:54 AM Tom_L: i didn't use fanuc style on mine
04:55 AM NoSpark: I could use M30 for the other tests
04:55 AM NoSpark: neither do I
04:55 AM NoSpark: I have tried it with fanuc style deliberatly disabled in the config, but doesn't make a difference
04:55 AM Tom_L: https://github.com/tlight9/flexgui/blob/master/examples/rpi_mill_probe/subroutines/thread_mill.ngc
04:55 AM Tom_L: see if that might help you
04:56 AM Tom_L: for the logic flow
04:57 AM NoSpark: thanks
04:57 AM NoSpark: actually, it might be that I'm trying to return a number
04:57 AM NoSpark: that seems to be the only difference
04:57 AM Tom_L: it looked like that's a possibility
07:45 AM rdtsc-w: ccatlett1984 > modifying pncconf to add the 7c80: consider https://github.com/jethornton/mesact
10:39 AM Deejay: yay, new N100 mainboard with new 16GB RAM at my position. running ram-test now :)
10:40 AM CloudEvil: E:)
10:40 AM Deejay: the ram of my old intel atom D525 died :/
10:41 AM Deejay: so I needed something new
10:41 AM Deejay: and a litte more power is not bad :)
10:41 AM Deejay: really neat, those little itx boards, passive cooled...
10:42 AM bjorkintosh: https://www.datacenterdynamics.com/en/news/trump-plans-100-percent-tax-on-foreign-semiconductors-to-incentivize-us-manufacturing/
10:42 AM bjorkintosh: great.
10:42 AM bjorkintosh: better hoard your chips, folks.
10:43 AM CloudEvil: It is in general possible to design stuff with US made parts. Buuut, you'll be facing some odd choices. Like using high-rel stuff instead of jellybean
10:43 AM CloudEvil: And there will be steep costs.
10:43 AM CloudEvil: Possibly less than 100%, but possibly not once low volumes kick in.
10:44 AM rdtsc-w: low-budget makers enjoy their $0.10 microcontrollers
10:44 AM CloudEvil: Indeed.
11:01 AM Rab: I paid Trump tariffs on electronic parts the last go-round. Paying double is cheaper than paying a factor of ten. Ironically, complete consumer electronics assemblies were exempted--can't upset TV buyers--so you only get punished if you try to manufacture in the US.
11:04 AM CloudEvil: :/
11:04 AM Rab: Although I would like to see more domestic semiconductor manufacturering and less dependence on Taiwan (no offense to Taiwan, they're great), it just seems like a tax on the American electronics industry.
11:05 AM roycroft: i too want to see more domestic manufacturing
11:05 AM roycroft: but to build a high-tech chip manufacturing plant costs tens to hundreds of millions of dollars and takes about five years after initial design and permitting is complete
11:06 AM Rab: Yeah, nobody wants to squander capital to appease such a volatile office.
11:06 AM CloudEvil: Hundreds of millions gets you 10? year old tech.
11:07 AM roycroft: this is a case where the president's goal is correct (i do agree with some of his goals) but the solution is ludicrous, at best
11:08 AM roycroft: but it sure is nice that eggs are $2/dozen and gasoline is $0.60/gallon now
11:08 AM roycroft: wait
11:08 AM roycroft: i guess that part is still coming
11:13 AM roycroft: meanwhile, my electric boxes are out for delivery, and i think by not the usps, so perhaps they will actually arrive on time
11:13 AM roycroft: once they get here i can get the studio tidied up, and get the little cnc router on the bench to start working on getting it going
11:13 AM * roycroft could have linuxcnc working on a real machine soon
11:34 AM lcnc-relay: <ccatlett1984@> Also, Taiwan has laws against exporting newest node tech to other countries
12:15 PM rdtsc-w: interesting... https://github.com/replaysMike/Binner
12:52 PM Deejay: hmm, booting with rtai-kernel 5.4.258, the x-server doesnt start
12:52 PM Deejay: i can load the i915 kernel module, but there is no /dev/dri/...
12:53 PM Deejay: hoped it would be easier
01:23 PM Tom_L: Deejay, did you start with a debian 12 install or a prebuilt deb?
01:33 PM Deejay: debian 12 install
01:33 PM Deejay: with kernel 6.1.x, it works. but when i boot 5.4.2**, x-server cannot start
01:34 PM -!- #linuxcnc mode set to +v by ChanServ
02:18 PM -!- #linuxcnc mode set to +v by ChanServ
02:53 PM bjorkintosh: this, is _everything_ https://www.youtube.com/watch?v=UZttbDfUa70
02:55 PM Tom_L: you feelin like a kid again???
02:56 PM bjorkintosh: always!
02:57 PM Tom_L: pretty cool...
04:01 PM JT-Shop: I should go take the drivers seat out so I can change the accelerator cable
04:13 PM -!- #linuxcnc mode set to +v by ChanServ
04:49 PM Tom_L: JT-Shop, no room to work?
04:51 PM JT-Shop: gotta lay upside down to disconnect the cable
04:51 PM JT-Shop: I 'think'
04:52 PM Tom_L: dejay got that board but can't get RTAI to work on it so far
04:54 PM JT-Shop: which board?
04:54 PM Tom_L: the MB you got
04:54 PM JT-Shop: ah
04:55 PM Tom_L: Deejay> with kernel 6.1.x, it works. but when i boot 5.4.2**, x-server cannot start
04:55 PM Unterhaus_ is now known as unterhausen
04:55 PM JT-Shop: uspace the latency test is not great but axis runs without errors
04:56 PM Tom_L: i'd be curious what happens with a flex front end on it
04:56 PM Tom_L: i had to change mine some
04:56 PM JT-Shop: that's next for me
04:56 PM JT-Shop: I want to use it on the bp
04:57 PM Tom_L: for me i'd need RTAI to work
04:58 PM Tom_L: it does better on a parallel interface even with mesa
04:58 PM Tom_L: not just a port card
05:18 PM JT-Shop: even with a parallel port on the mb?
05:36 PM Tom_L: yeah that's where mine is
05:39 PM Tom_L: on the D525 and the gigabyte mb
05:40 PM lcnc-relay: <lolthekidison@> Next after homing I was confused Why I couldn't get my controllers relay to switch with the spindle control. I was looking back over the examples and a forum and realized mine Is just needing a basic enable. net spindle-enable motion.spindle-on => parport.0.pin-14-out instead of net motion.spindle-on => parport.0.pin-14-out
06:02 PM rdtsc: wouldn't it be nice to visualize all of the .hal stuff? like a node editor
06:09 PM lcnc-relay: <Lcvette> yes
06:09 PM lcnc-relay: <Lcvette> i recently had the same thought
06:11 PM lcnc-relay: <Lcvette> would be great to have a visual representation of hal that was easy to understand, like a series of switches. even better to build a hal file from a visual perspective, like drag and drop the components as a graphical widget onto the screen and make your connections and have a working test bench on screen
06:11 PM lcnc-relay: <Lcvette> i always struggle with hal
06:11 PM lcnc-relay: <Lcvette> rdtsc: ^^^
06:12 PM lcnc-relay: <Lcvette> JT-Shop how hard would it be to make something like that?
06:13 PM Tom_L: you would need something to cover all the hal functions as well as all the comps
06:13 PM Tom_L: quite extensive
06:13 PM lcnc-relay: <Lcvette> i wonder if there is some opensource electronics project that could be used as a starting point
06:14 PM lcnc-relay: <Lcvette> i ran across a PLC system that had a similar form of this for setup
06:14 PM lcnc-relay: <lolthekidison@> For me this so far has been about the same difficulty for building a 3d printer for the first time. I just miss obvious stuff sometimes. It was a bit confusing wether there should be a spindle section in the hal or ini
06:15 PM Tom_L: the 'sections' typically go in the ini
06:15 PM Tom_L: the 'wiring' is generally in a hal file
06:16 PM lcnc-relay: <Lcvette> https://www.youtube.com/watch?v=f52GV1IpwVk&t=21s
06:16 PM lcnc-relay: <Lcvette> something l;ike this
06:17 PM Tom_L: go for it
06:17 PM lcnc-relay: <Lcvette> add some graphical representation to mesact
06:17 PM lcnc-relay: <Lcvette> 😄
06:26 PM acer is now known as _unreal_
06:36 PM lcnc-relay: <skunkworks8841@> well - I didn't blow the 1/2 amp fuse running a relay of the 7i97... so yay - and the amc drive enables and outputs
06:37 PM lcnc-relay: <skunkworks8841@> 1/2 way there
06:39 PM _unreal_: still house hunting
06:40 PM _unreal_: UGH
06:40 PM lcnc-relay: <skunkworks8841@> that doesn't sound like fun
06:40 PM _unreal_: NOT at all
07:08 PM lcnc-relay: <big_kevin420@> lolthekidison@: sounds like you have a handle on it now
07:20 PM roycroft: "Democratic state attorneys generals brought their own lawsuit against the Trump administration."
07:21 PM roycroft: i've seen the correct form, attorneys general, and increasingly what i thought was the only incorrect form, attorney generals, but i've never seen "attorneys generals" before
07:21 PM roycroft: and this is from the associated press, where i think one is supposed to have passed at least 3rd grade english to get a job as a reporter
07:23 PM * roycroft wonders if parts of speech are even taught in grade school english any more
07:26 PM lcnc-relay: <ccatlett1984@> Nah, they asked chatGPT to generate the article 😉
07:28 PM roycroft: so chatgpt did not take third grade english
07:29 PM lcnc-relay: <big_kevin420@> attornies general
07:29 PM roycroft: i'm hoping that the reporter incorrectly wrote "attorney generals", the editor attempted to correct it to "attorneys general", but botched the edit
07:30 PM roycroft: attorneys is the correct plural form, not attornies
07:31 PM lcnc-relay: <big_kevin420@> depends where you from
07:31 PM lcnc-relay: <big_kevin420@> i think in canada we say attourni]
07:32 PM lcnc-relay: <big_kevin420@> like octopus
07:32 PM lcnc-relay: <big_kevin420@> or cacti
07:34 PM roycroft: i don't think you do, properly
07:35 PM roycroft: at least not since the time of confederation
07:35 PM roycroft: "attornies" was a plural form used in english in the 18th and 19th centuries
07:35 PM roycroft: it's been "attorneys" for the last 150 or so years both in the uk and in the us
07:35 PM roycroft: canada mostly follows uk spellings, but sometimes uses us spellings
07:36 PM roycroft: i'm not aware of any unique canadian spellings
07:38 PM lcnc-relay: <ccatlett1984@> I blame the french
07:41 PM roycroft: the french are ok
07:41 PM roycroft: it's all scott's fault - blame him
07:41 PM roycroft: he's a dick
07:41 PM * roycroft follows the only road
07:45 PM rdtsc: it's Switzerland...
07:47 PM rdtsc: Lvette I was thinking something like this: https://www.youtube.com/watch?v=qTCZFkICOlk
07:57 PM rdtsc: looks like there are several packages for Python, such as https://wonderworks-software.github.io/PyFlow/
08:22 PM lcnc-relay: <skunkworks8841@> stupid question - I have a 7i97 analog board.. I found out analog out 0-3 use the same enable. So I used analog output 4 so it has a separate enable. well - 4 seems to work differently - I set both to 'Offset PWM mode must be enabled for correct bipolar output' but output 4 is at 10v when the output is set to 0 - and 0 when the output is set to -1
08:22 PM lcnc-relay: <skunkworks8841@> are the 4 and 5 pwm's different than the 0-3?
08:23 PM rdtsc: dunno, but is this behavior something that can be flipped using -not terminology in .hal?
08:24 PM lcnc-relay: <skunkworks8841@> not that I know of..
08:42 PM lcnc-relay: <ccatlett1984@> i'm about 40% of the way through adding the 7c80 to pncconf.py, looks like no cards that use inmux are already defined. /me sighs
08:42 PM lcnc-relay: <ccatlett1984@> guessing this is why it hasn't been added already
08:53 PM rdtsc: SW is there a line in the .hal like ... hm2_7i97.0.pwmgen.04.out0 but for your AO4? If so, perhaps try setp hm2_7i97.0.pwmgen.04.out0.invert_output true
08:59 PM -!- #linuxcnc mode set to +v by ChanServ
09:35 PM lcnc-relay: <Lcvette> could be attorney general's
09:35 PM lcnc-relay: <Lcvette> or attorney generals'
09:39 PM lcnc-relay: <Lcvette> hmm or would it be attorneys generals for plural possesive form
09:45 PM roycroft: attorney is the noun and general is the adjective
09:45 PM roycroft: so attorneys general is the correct usage - in modern english we add the plural form to the noun, not its adjectives
09:48 PM roycroft: the genitive is an interesting question, though, and i think you're correct that it should be appended to the noun phrase, not just the noun
09:48 PM roycroft: but that does not apply to plurals
09:49 PM roycroft: but before we spend a lot of time on that nuance, let's try to figure out how to use "its" and "it's" properly again :)
09:50 PM xxcoder: it's "its" when it dont mean it is. ;)
09:51 PM * roycroft wonders if "attorneys general's" could be used as a posessive plural
09:53 PM roycroft: similary, "captains courageous'"
10:12 PM memleak: hello
10:14 PM xxcoder: yo
10:20 PM roycroft: i got the electrical work done in my studio after work today, and have started putting that room back together
10:20 PM lcnc-relay: <lolthekidison@> This isnt the exact one I have but can I use a switch like this to set the bits offset? https://kb-3d.com/store/kits-packages/1083-ldo-motors-long-john-cnc-tool-setter-kit-1708819425777.html
10:20 PM roycroft: fedex had perfect timing - they showed up with my box exactly when i was checking out the scope of the project
10:21 PM * roycroft is also getting a cold for the first time in years, and that's been slowing him down
10:22 PM roycroft: i asssume it's a cold - it doesn't feel like the flu and the covid test was negative
10:26 PM firephoto__ is now known as firephoto_