Changing stepgen position-scale parameter dynamically

More
11 Dec 2024 12:41 #316467 by Hossein74Majidi
Hi
The thing I want is being able to do some calibration on axes using hm2_7i90.0.stepgen.00.position-scale parameter dynamically.
How can I access to this parameter?
I tried to define a new halpin in my hal file by writing:
net stepScale_Axis_X hm2_7i90.0.stepgen.00.position-scale
But I get the following error:
./my_LinuxCNC_machine.hal:616: Pin 'hm2_7i90.0.stepgen.00.position-scale' does not exist

so if its pin is not available what can I do to access this parameter for example in my python code for qt designer.

Please Log in or Create an account to join the conversation.

More
11 Dec 2024 15:23 #316473 by PCW
Parameters can be changed with a hal setp command
 Note that dynamically changing the stepgen position scale
will result in following errors.

Please Log in or Create an account to join the conversation.

More
12 Dec 2024 05:28 #316496 by Hossein74Majidi
Replied by Hossein74Majidi on topic Changing stepgen position-scale parameter dynamically

Parameters can be changed with a hal setp command
 Note that dynamically changing the stepgen position scale
will result in following errors.
 

You mean I need to write a hal command (setp) in my python code?
and to avoid errors I need to restart the linuxcnc after changing that parameter, right?

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
12 Dec 2024 08:38 #316500 by tommylight
It would be much easier for you and for us if you skip the secrecy and just tell us what do you want to achieve, usually there are more than one way of doing things in LinuxCNC as it is very flexible.
Changing the scale is not good/safe/smart as noted above, but moving stuff more/less while the program is running is easy using external offsets.

Please Log in or Create an account to join the conversation.

More
12 Dec 2024 15:15 #316520 by PCW
You don't need to restart LinuxCNC before changing the stepgen scale
you just have to make sure motion.motion-enabled is false when changing it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum