Can't SIM programs with spindle speed over 12500rpm

  • macsddau@linuxcnc
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 months 2 weeks ago #346450 by macsddau@linuxcnc
Can't SIM programs with spindle speed over 12500rpm was created by macsddau@linuxcnc
Hi,From few month program SIM (not on the CNC) are stucking before controled movement (not G0). By chance, I have fond that reducing spindle speed unlock the program.
I take a look a the HAL configuration and check some values with HalShow. Starting from spindle-speed-cmd to spindle-at-speed, There is a calculation error between sim_encoder_0.speed input pin and encoder_0.velocity output pin.

Attached a calc file with some values of tested values
Version info : LCNC 2.9.8 Run In Place SIM on LinuxMint 22.3 (6.8.0-117-generic

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

  • tommylight
  • Away
  • Moderator
  • Moderator
More
5 months 1 week ago #346548 by tommylight
The following user(s) said Thank You: macsddau@linuxcnc

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

  • macsddau@linuxcnc
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 months 1 week ago #346553 by macsddau@linuxcnc
Replied by macsddau@linuxcnc on topic Can't SIM programs with spindle speed over 12500rpm
Yes
The ini file is from gmoccapy sim sample
Only adjusted machine size and speeds according to real cnc.

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

More
5 months 4 days ago #346748 by HansU
The BASE_PERIOD in the sim config is too low for that spindle speed so the sim_encoder component cannot calculate the speed correctly.
Setting a lower BASE_PERIOD in the gmoccapy.ini increases the possible maximum spindle speed ;-)
 
The following user(s) said Thank You: macsddau@linuxcnc

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

  • macsddau@linuxcnc
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 months 4 days ago #346763 by macsddau@linuxcnc
Replied by macsddau@linuxcnc on topic Can't SIM programs with spindle speed over 12500rpm
Very nice
Set BASE_PERIOD to 5000. spindle_at_speed works correctly.
Thanks for help !

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

  • tommylight
  • Away
  • Moderator
  • Moderator
More
5 months 4 days ago #346772 by tommylight
The following user(s) said Thank You: macsddau@linuxcnc

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

  • macsddau@linuxcnc
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 months 4 days ago #346774 by macsddau@linuxcnc
Replied by macsddau@linuxcnc on topic Can't SIM programs with spindle speed over 12500rpm
Yes 50000
The following user(s) said Thank You: tommylight

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

More
1 month 1 week ago - 1 month 1 week ago #349793 by DauntlessA
I came across this issue in QtPyVCP/Probe Basic because they share the same spindle_sim.hal as Gmoccapy.

It's really not ideal to have a simulated config be non-functional for spindle speeds ≥12500rpm at the default base period of 100000ns, I know it can be 'fixed', but ideally it should work by default, high speed spindles are not rare now.

Is there a reason why instead of modifying the base period, the value of sim_encoder_0.ppr (and therefore also encoder_0.position.scale) can't be decreased?
Is there actually a reason to sample this frequently in a simulated config?

I'm naively assuming that it is because this logic predates high speed spindles being easy to get hold of, so it wasn't seen as an issue at the time?
Last edit: 1 month 1 week ago by DauntlessA.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum