Changing stepgen position-scale parameter dynamically
- Hossein74Majidi
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
11 Dec 2024 12:41 #316467
by Hossein74Majidi
Changing stepgen position-scale parameter dynamically was created 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.
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.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
11 Dec 2024 15:23 #316473
by PCW
Replied by PCW 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.
Note that dynamically changing the stepgen position scale
will result in following errors.
Please Log in or Create an account to join the conversation.
- Hossein74Majidi
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
12 Dec 2024 05:28 #316496
by Hossein74Majidi
and to avoid errors I need to restart the linuxcnc after changing that parameter, right?
Replied by Hossein74Majidi on topic Changing stepgen position-scale parameter dynamically
You mean I need to write a hal command (setp) in my python code?Parameters can be changed with a hal setp command
Note that dynamically changing the stepgen position scale
will result in following errors.
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
- Away
- Moderator
Less
More
- Posts: 19407
- Thank you received: 6507
12 Dec 2024 08:38 #316500
by tommylight
Replied by tommylight on topic Changing stepgen position-scale parameter dynamically
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.
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.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
12 Dec 2024 15:15 #316520
by PCW
Replied by PCW on topic Changing stepgen position-scale parameter dynamically
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.
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