On Tuesday, May 19, 2020 at 9:55:51 AM UTC+2, Bas de Bruijn wrote: > > Forgot to mention what has cost me a lot of time in the past. > > IIRC then in python ‘import hal’ imports the ‘legacy’ LCNC python bindings. > > If you use ‘from machinekit import hal’ then you use the Machinekit cython > generated bindings. > > If I’m not right about this I hope to get corrected. > > > > *From:* machi...@googlegroups.com <javascript:> <machi...@googlegroups.com > <javascript:>> *On Behalf Of *b...@basdebruijn.com <javascript:> > *Sent:* Tuesday, 19 May 2020 09:51 > *To:* 'Michael Brown' <mib.ho...@gmail.com <javascript:>>; 'Machinekit' < > machi...@googlegroups.com <javascript:>> > *Subject:* RE: [Machinekit] Re: halcmd setp equivalent in python > > > > The Cython bindings do not support Params. I do not know about the > original python bindings that came from the LCNC fork. > > If you have a pin (not param), then you can set it with > hal.Pin(‘pinname’).set(value) >
> If the params are needed in a python program, the best way would be to > change the params to pins in the components source. > Well this seems to be doable, I just don't know if its currently possible to compile in the machinekit-cnc or lcnc part with the current machinekit-hal status (I'm running a cnc router with a machinekit-hal/-cnc combo from november or so) Perhaps I should rephrase my question: What I would like to construct is something like this (where i can specify the max spindle rpm [12000] in the ini file) hal.Param('hm2_5i25.0.pwmgen.00.scale').set(c.find('SPINDLE', 'MAXRPM')) or hal.Pin('hm2_5i25.0.pwmgen.00.scale').set(c.find('SPINDLE', 'MAXRPM')) What I have is this: os.system('halcmd setp hm2_5i25.0.pwmgen.00.scale 12000') where I would like to replace the hard coded 12000 with a c.find('SPINDLE', 'MAXRPM') construction, that probes it from the .ini file I just can't figure out how ? -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/fc0003e5-83af-417f-ac52-ba1d26d53da9%40googlegroups.com.